65 #define DECLARATION_NODE_LIST(V) \
66 V(VariableDeclaration) \
67 V(FunctionDeclaration) \
68 V(ModuleDeclaration) \
69 V(ImportDeclaration) \
70 V(ExportDeclaration) \
72 #define MODULE_NODE_LIST(V) \
78 #define STATEMENT_NODE_LIST(V) \
81 V(ExpressionStatement) \
84 V(ContinueStatement) \
94 V(TryCatchStatement) \
95 V(TryFinallyStatement) \
98 #define EXPRESSION_NODE_LIST(V) \
100 V(NativeFunctionLiteral) \
117 V(CompareOperation) \
121 #define AST_NODE_LIST(V) \
122 DECLARATION_NODE_LIST(V) \
123 MODULE_NODE_LIST(V) \
124 STATEMENT_NODE_LIST(V) \
125 EXPRESSION_NODE_LIST(V)
128 class AstConstructionVisitor;
138 class TargetCollector;
141 class RegExpAlternative;
142 class RegExpAssertion;
144 class RegExpBackReference;
146 class RegExpCharacterClass;
148 class RegExpDisjunction;
150 class RegExpLookahead;
151 class RegExpQuantifier;
154 #define DEF_FORWARD_DECLARATION(type) class type;
156 #undef DEF_FORWARD_DECLARATION
165 #define DECLARE_NODE_TYPE(type) \
166 virtual void Accept(AstVisitor* v) V8_OVERRIDE; \
167 virtual AstNode::NodeType node_type() const V8_FINAL V8_OVERRIDE { \
168 return AstNode::k##type; \
170 template<class> friend class AstNodeFactory;
199 #define DECLARE_TYPE_ENUM(type) k##type,
204 #undef DECLARE_TYPE_ENUM
207 return zone->New(static_cast<int>(size));
213 virtual void Accept(AstVisitor* v) = 0;
218 #define DECLARE_NODE_FUNCTIONS(type) \
219 bool Is##type() { return node_type() == AstNode::k##type; } \
220 type* As##type() { return Is##type() ? reinterpret_cast<type*>(this) : NULL; }
222 #undef DECLARE_NODE_FUNCTIONS
235 int tmp = zone->
isolate()->ast_node_id();
236 zone->
isolate()->set_ast_node_id(tmp + n);
249 void*
operator new(
size_t size);
262 virtual bool IsJump()
const {
return false; }
271 void Reserve(
int capacity,
Zone* zone) { list_.Reserve(capacity, zone); }
276 int length()
const {
return list_.length(); }
281 for (
int i = 0; i < length(); ++i) {
282 if (at(i).is_identical_to(map))
return;
288 for (
int i = list_.length() - 1; i >= 0; i--) {
289 if (at(i)->FindRootMap() != root_map) {
290 list_.RemoveElement(list_.at(i));
296 list_.Add(handle.location(), zone);
347 bool IsStringLiteral();
350 bool IsNullLiteral();
353 bool IsUndefinedLiteral(
Isolate* isolate);
383 bounds_(
Bounds::Unbounded(zone)),
390 byte to_boolean_types_;
401 TARGET_FOR_NAMED_ONLY
418 return breakable_type_ == TARGET_FOR_ANONYMOUS;
430 breakable_type_(breakable_type),
433 ASSERT(labels ==
NULL || labels->length() > 0);
439 BreakableType breakable_type_;
451 statements_.Add(statement, zone);
458 return !statements_.is_empty() && statements_.last()->IsJump()
469 bool is_initializer_block,
472 statements_(capacity, zone),
473 is_initializer_block_(is_initializer_block),
479 bool is_initializer_block_;
486 VariableProxy*
proxy()
const {
return proxy_; }
490 virtual bool IsInlineable()
const;
494 VariableProxy* proxy,
506 VariableProxy* proxy_;
514 class VariableDeclaration
V8_FINAL :
public Declaration {
524 VariableProxy* proxy,
533 class FunctionDeclaration
V8_FINAL :
public Declaration {
537 FunctionLiteral* fun()
const {
return fun_; }
544 FunctionDeclaration(
Zone* zone,
545 VariableProxy* proxy,
547 FunctionLiteral* fun,
558 FunctionLiteral* fun_;
562 class ModuleDeclaration
V8_FINAL :
public Declaration {
566 Module* module()
const {
return module_; }
573 VariableProxy* proxy,
586 class ImportDeclaration
V8_FINAL :
public Declaration {
590 Module* module()
const {
return module_; }
597 VariableProxy* proxy,
610 class ExportDeclaration
V8_FINAL :
public Declaration {
636 interface_(interface),
645 class ModuleLiteral
V8_FINAL :
public Module {
651 :
Module(zone, interface, pos, body) {}
655 class ModuleVariable
V8_FINAL :
public Module {
659 VariableProxy* proxy()
const {
return proxy_; }
662 inline ModuleVariable(
Zone* zone, VariableProxy* proxy,
int pos);
665 VariableProxy* proxy_;
669 class ModulePath
V8_FINAL :
public Module {
673 Module* module()
const {
return module_; }
689 class ModuleUrl
V8_FINAL :
public Module {
697 :
Module(zone, pos), url_(url) {
705 class ModuleStatement
V8_FINAL :
public Statement {
709 VariableProxy* proxy()
const {
return proxy_; }
720 VariableProxy* proxy_;
735 virtual BailoutId ContinueId()
const = 0;
736 virtual BailoutId StackCheckId()
const = 0;
754 Label continue_target_;
760 class DoWhileStatement
V8_FINAL :
public IterationStatement {
791 class WhileStatement
V8_FINAL :
public IterationStatement {
802 return may_have_function_literal_;
805 may_have_function_literal_ = value;
816 may_have_function_literal_(
true),
824 bool may_have_function_literal_;
830 class ForStatement
V8_FINAL :
public IterationStatement {
849 return may_have_function_literal_;
852 may_have_function_literal_ = value;
869 may_have_function_literal_(
true),
870 loop_variable_(
NULL),
881 bool may_have_function_literal_;
918 class ForInStatement
V8_FINAL :
public ForEachStatement,
919 public FeedbackSlotInterface {
933 ASSERT(for_in_feedback_slot_ != kInvalidFeedbackSlot);
934 return for_in_feedback_slot_;
949 for_in_type_(SLOW_FOR_IN),
950 for_in_feedback_slot_(kInvalidFeedbackSlot),
974 assign_iterator_ = assign_iterator;
975 next_result_ = next_result;
976 result_done_ = result_done;
977 assign_each_ = assign_each;
986 return assign_iterator_;
1001 return assign_each_;
1012 assign_iterator_(
NULL),
1037 :
Statement(zone, pos), expression_(expression) { }
1053 class ContinueStatement
V8_FINAL :
public JumpStatement {
1068 class BreakStatement
V8_FINAL :
public JumpStatement {
1083 class ReturnStatement
V8_FINAL :
public JumpStatement {
1098 class WithStatement
V8_FINAL :
public Statement {
1112 expression_(expression),
1113 statement_(statement) { }
1126 bool is_default()
const {
return label_ ==
NULL; }
1128 CHECK(!is_default());
1150 Type* compare_type_;
1157 class SwitchStatement
V8_FINAL :
public BreakableStatement {
1186 class IfStatement
V8_FINAL :
public Statement {
1190 bool HasThenStatement()
const {
return !then_statement()->IsEmpty(); }
1198 return HasThenStatement() && then_statement()->IsJump()
1199 && HasElseStatement() && else_statement()->IsJump();
1213 condition_(condition),
1214 then_statement_(then_statement),
1215 else_statement_(else_statement),
1236 :
AstNode(RelocInfo::kNoPosition), targets_(0, zone) { }
1241 void AddTarget(Label* target,
Zone* zone);
1258 escaping_targets_ = targets;
1269 try_block_(try_block),
1270 escaping_targets_(
NULL) { }
1281 class TryCatchStatement
V8_FINAL :
public TryStatement {
1299 variable_(variable),
1300 catch_block_(catch_block) {
1306 Block* catch_block_;
1310 class TryFinallyStatement
V8_FINAL :
public TryStatement {
1314 Block* finally_block()
const {
return finally_block_; }
1318 Zone* zone,
int index,
Block* try_block,
Block* finally_block,
int pos)
1320 finally_block_(finally_block) { }
1323 Block* finally_block_;
1327 class DebuggerStatement
V8_FINAL :
public Statement {
1336 class EmptyStatement
V8_FINAL :
public Statement {
1345 class Literal
V8_FINAL :
public Expression {
1350 if (value_->IsInternalizedString()) {
1358 ASSERT(IsPropertyName());
1363 return value_->BooleanValue();
1366 return !value_->BooleanValue();
1371 ASSERT(!value_.is_null());
1372 return value_->IsNull();
1375 ASSERT(!value_.is_null());
1376 return value_->IsTrue();
1379 ASSERT(!value_.is_null());
1380 return value_->IsFalse();
1387 uint32_t
Hash() {
return ToString()->Hash(); }
1389 static bool Match(
void* literal1,
void* literal2) {
1392 return s1->Equals(*s2);
1401 isolate_(zone->isolate()) { }
1430 literal_index_(literal_index),
1446 void BuildConstants(
Isolate* isolate);
1447 friend class ArrayLiteral;
1448 friend class ObjectLiteral;
1477 ObjectLiteralProperty(
Zone* zone, Literal* key,
Expression* value);
1479 Literal*
key() {
return key_; }
1488 bool IsCompileTimeValue();
1490 void set_emit_store(
bool emit_store);
1496 ObjectLiteralProperty(
Zone* zone,
bool is_getter, FunctionLiteral* value);
1510 class ObjectLiteral
V8_FINAL :
public MaterializedLiteral {
1517 return constant_properties_;
1525 static bool IsBoilerplateProperty(Property* property);
1528 void BuildConstantProperties(
Isolate* isolate);
1533 void CalculateEmitStore(
Zone* zone);
1538 kHasFunction = 1 << 1
1551 int boilerplate_properties,
1555 properties_(properties),
1556 boilerplate_properties_(boilerplate_properties),
1557 fast_elements_(
false),
1558 may_store_doubles_(
false),
1559 has_function_(has_function) {}
1564 int boilerplate_properties_;
1565 bool fast_elements_;
1566 bool may_store_doubles_;
1572 class RegExpLiteral
V8_FINAL :
public MaterializedLiteral {
1599 class ArrayLiteral
V8_FINAL :
public MaterializedLiteral {
1608 return BailoutId(first_element_id_.ToInt() + i);
1612 void BuildConstantElements(
Isolate* isolate);
1616 kShallowElements = 1,
1617 kDisableMementos = 1 << 1
1636 class VariableProxy
V8_FINAL :
public Expression {
1641 return var_ ==
NULL ?
true : var_->IsValidLeftHandSide();
1645 return !is_this() &&
name().is_identical_to(n);
1669 VariableProxy(
Zone* zone,
1702 return receiver_types_.length() == 1;
1705 return &receiver_types_;
1712 return is_uninitialized_;
1731 is_for_call_(
false),
1732 is_uninitialized_(
false),
1733 is_string_access_(
false),
1734 is_function_prototype_(
false) { }
1741 SmallMapList receiver_types_;
1742 bool is_for_call_ : 1;
1743 bool is_uninitialized_ : 1;
1744 bool is_string_access_ : 1;
1745 bool is_function_prototype_ : 1;
1749 class Call
V8_FINAL :
public Expression,
public FeedbackSlotInterface {
1758 virtual int ComputeFeedbackSlotCount(
Isolate* isolate);
1760 call_feedback_slot_ = slot;
1764 return call_feedback_slot_ != kInvalidFeedbackSlot;
1769 if (expression()->IsProperty()) {
1770 return expression()->AsProperty()->GetReceiverTypes();
1776 if (expression()->IsProperty()) {
1777 return expression()->AsProperty()->IsMonomorphic();
1779 return !target_.is_null();
1800 CallType GetCallType(
Isolate* isolate)
const;
1804 bool return_is_recorded_;
1813 expression_(expression),
1814 arguments_(arguments),
1815 call_feedback_slot_(kInvalidFeedbackSlot),
1817 if (expression->IsProperty()) {
1818 expression->AsProperty()->mark_for_call();
1828 int call_feedback_slot_;
1834 class CallNew
V8_FINAL :
public Expression,
public FeedbackSlotInterface {
1844 return FLAG_pretenuring_call_new ? 2 : 1;
1847 callnew_feedback_slot_ = slot;
1851 ASSERT(callnew_feedback_slot_ != kInvalidFeedbackSlot);
1852 return callnew_feedback_slot_;
1855 ASSERT(callnew_feedback_slot_ != kInvalidFeedbackSlot);
1856 ASSERT(FLAG_pretenuring_call_new);
1857 return callnew_feedback_slot_ + 1;
1865 return allocation_site_;
1878 expression_(expression),
1879 arguments_(arguments),
1880 is_monomorphic_(
false),
1882 callnew_feedback_slot_(kInvalidFeedbackSlot),
1889 bool is_monomorphic_;
1893 int callnew_feedback_slot_;
1903 class CallRuntime
V8_FINAL :
public Expression {
1922 function_(function),
1923 arguments_(arguments) { }
1932 class UnaryOperation
V8_FINAL :
public Expression {
1942 virtual void RecordToBooleanTypeFeedback(
1952 expression_(expression),
1954 materialize_false_id_(
GetNextId(zone)) {
1969 class BinaryOperation
V8_FINAL :
public Expression {
1973 virtual
bool ResultOverwriteAllowed();
1980 allocation_site_ = allocation_site;
1989 virtual void RecordToBooleanTypeFeedback(
2022 class CountOperation
V8_FINAL :
public Expression {
2026 bool is_prefix()
const {
return is_prefix_; }
2037 return receiver_types_.length() == 1;
2040 return &receiver_types_;
2045 Type*
type()
const {
return type_; }
2062 is_prefix_(is_prefix),
2070 bool is_prefix_ : 1;
2078 SmallMapList receiver_types_;
2082 class CompareOperation
V8_FINAL :
public Expression {
2098 bool IsLiteralCompareNull(
Expression** expr);
2110 combined_type_(Type::
None(zone)) {
2119 Type* combined_type_;
2123 class Conditional
V8_FINAL :
public Expression {
2141 condition_(condition),
2142 then_expression_(then_expression),
2143 else_expression_(else_expression),
2156 class Assignment
V8_FINAL :
public Expression {
2160 Assignment* AsSimpleAssignment() {
return !is_compound() ?
this :
NULL; }
2177 return receiver_types_.length() == 1;
2181 return is_uninitialized_;
2184 return &receiver_types_;
2193 Assignment(
Zone* zone,
2199 template<
class Visitor>
2202 if (is_compound()) {
2203 binary_operation_ = factory->NewBinaryOperation(
2204 binary_op(), target_, value_,
position() + 1);
2212 BinaryOperation* binary_operation_;
2215 bool is_uninitialized_ : 1;
2218 SmallMapList receiver_types_;
2222 class Yield
V8_FINAL :
public Expression {
2241 ASSERT(yield_kind() == DELEGATING);
2245 ASSERT(yield_kind() == DELEGATING);
2256 generator_object_(generator_object),
2257 expression_(expression),
2258 yield_kind_(yield_kind),
2269 class Throw
V8_FINAL :
public Expression {
2277 :
Expression(zone, pos), exception_(exception) {}
2284 class FunctionLiteral
V8_FINAL :
public Expression {
2293 kNoDuplicateParameters = 0,
2294 kHasDuplicateParameters = 1
2319 int start_position()
const;
2320 int end_position()
const;
2321 int SourceSize()
const {
return end_position() - start_position(); }
2331 bool AllowsLazyCompilation();
2332 bool AllowsLazyCompilationWithoutContext();
2337 if (name_->length() > 0)
return name_;
2338 return inferred_name();
2343 inferred_name_ = inferred_name;
2353 return HasDuplicateParameters::decode(bitfield_);
2356 bool is_function() {
return IsFunction::decode(bitfield_) == kIsFunction; }
2364 return IsParenthesized::decode(bitfield_) == kIsParenthesized;
2367 bitfield_ = IsParenthesized::update(bitfield_, kIsParenthesized);
2371 return IsGenerator::decode(bitfield_) == kIsGenerator;
2375 AstProperties::Flags*
flags() {
return ast_properties_.flags(); }
2377 ast_properties_ = *ast_properties;
2380 slot_processor_ = *slot_processor;
2383 slot_processor_.ProcessFeedbackSlots(isolate);
2386 return slot_processor_.slot_count();
2391 dont_optimize_reason_ = reason;
2399 int materialized_literal_count,
2400 int expected_property_count,
2402 int parameter_count,
2413 inferred_name_(zone->isolate()->factory()->empty_string()),
2414 dont_optimize_reason_(kNoReason),
2415 materialized_literal_count_(materialized_literal_count),
2416 expected_property_count_(expected_property_count),
2417 handler_count_(handler_count),
2418 parameter_count_(parameter_count),
2419 function_token_position_(RelocInfo::kNoPosition) {
2421 IsExpression::encode(function_type != DECLARATION) |
2422 IsAnonymous::encode(function_type == ANONYMOUS_EXPRESSION) |
2423 Pretenure::encode(
false) |
2424 HasDuplicateParameters::encode(has_duplicate_parameters) |
2425 IsFunction::encode(is_function) |
2426 IsParenthesized::encode(is_parenthesized) |
2427 IsGenerator::encode(is_generator);
2436 AstProperties ast_properties_;
2440 int materialized_literal_count_;
2441 int expected_property_count_;
2443 int parameter_count_;
2444 int function_token_position_;
2447 class IsExpression:
public BitField<bool, 0, 1> {};
2448 class IsAnonymous:
public BitField<bool, 1, 1> {};
2449 class Pretenure:
public BitField<bool, 2, 1> {};
2450 class HasDuplicateParameters:
public BitField<ParameterFlag, 3, 1> {};
2451 class IsFunction:
public BitField<IsFunctionFlag, 4, 1> {};
2452 class IsParenthesized:
public BitField<IsParenthesizedFlag, 5, 1> {};
2453 class IsGenerator:
public BitField<IsGeneratorFlag, 6, 1> {};
2457 class NativeFunctionLiteral
V8_FINAL :
public Expression {
2467 :
Expression(zone, pos), name_(name), extension_(extension) {}
2475 class ThisFunction
V8_FINAL :
public Expression {
2483 #undef DECLARE_NODE_TYPE
2493 #define MAKE_CASE(Name) \
2494 virtual void* Visit##Name(RegExp##Name*, void* data) = 0;
2504 virtual void*
Accept(RegExpVisitor* visitor,
void* data) = 0;
2510 virtual int min_match() = 0;
2511 virtual int max_match() = 0;
2515 virtual void AppendToText(RegExpText* text,
Zone* zone);
2517 #define MAKE_ASTYPE(Name) \
2518 virtual RegExp##Name* As##Name(); \
2519 virtual bool Is##Name();
2525 class RegExpDisjunction
V8_FINAL :
public RegExpTree {
2527 explicit RegExpDisjunction(ZoneList<RegExpTree*>* alternatives);
2529 virtual RegExpNode* ToNode(RegExpCompiler* compiler,
2531 virtual RegExpDisjunction* AsDisjunction()
V8_OVERRIDE;
2546 class RegExpAlternative
V8_FINAL :
public RegExpTree {
2548 explicit RegExpAlternative(ZoneList<RegExpTree*>* nodes);
2550 virtual RegExpNode* ToNode(RegExpCompiler* compiler,
2552 virtual RegExpAlternative* AsAlternative()
V8_OVERRIDE;
2554 virtual
bool IsAlternative() V8_OVERRIDE;
2555 virtual
bool IsAnchoredAtStart() V8_OVERRIDE;
2556 virtual
bool IsAnchoredAtEnd() V8_OVERRIDE;
2557 virtual
int min_match() V8_OVERRIDE {
return min_match_; }
2567 class RegExpAssertion
V8_FINAL :
public RegExpTree {
2581 virtual RegExpAssertion* AsAssertion()
V8_OVERRIDE;
2583 virtual
bool IsAnchoredAtStart() V8_OVERRIDE;
2584 virtual
bool IsAnchoredAtEnd() V8_OVERRIDE;
2585 virtual
int min_match() V8_OVERRIDE {
return 0; }
2589 AssertionType assertion_type_;
2597 standard_set_type_(standard_set_type) {}
2600 standard_set_type_(0) {}
2604 standard_set_type_ = special_set_type;
2612 uc16 standard_set_type_;
2616 class RegExpCharacterClass
V8_FINAL :
public RegExpTree {
2620 is_negated_(is_negated) { }
2623 is_negated_(
false) { }
2627 virtual RegExpCharacterClass* AsCharacterClass()
V8_OVERRIDE;
2629 virtual
bool IsTextElement() V8_OVERRIDE {
return true; }
2636 bool is_standard(
Zone* zone);
2658 class RegExpAtom
V8_FINAL :
public RegExpTree {
2666 virtual
bool IsTextElement() V8_OVERRIDE {
return true; }
2677 class RegExpText
V8_FINAL :
public RegExpTree {
2685 virtual
bool IsTextElement() V8_OVERRIDE {
return true; }
2690 elements_.Add(elm, zone);
2691 length_ += elm.length();
2700 class RegExpQuantifier
V8_FINAL :
public RegExpTree {
2707 min_match_(min * body->min_match()),
2708 quantifier_type_(type) {
2709 if (max > 0 && body->
max_match() > kInfinity / max) {
2710 max_match_ = kInfinity;
2724 bool not_at_start =
false);
2725 virtual RegExpQuantifier* AsQuantifier()
V8_OVERRIDE;
2727 virtual
bool IsQuantifier() V8_OVERRIDE;
2728 virtual
int min_match() V8_OVERRIDE {
return min_match_; }
2743 QuantifierType quantifier_type_;
2747 class RegExpCapture
V8_FINAL :
public RegExpTree {
2750 : body_(body), index_(index) { }
2760 virtual
bool IsAnchoredAtEnd() V8_OVERRIDE;
2761 virtual
Interval CaptureRegisters() V8_OVERRIDE;
2762 virtual
bool IsCapture() V8_OVERRIDE;
2763 virtual
int min_match() V8_OVERRIDE {
return body_->min_match(); }
2776 class RegExpLookahead
V8_FINAL :
public RegExpTree {
2783 is_positive_(is_positive),
2784 capture_count_(capture_count),
2785 capture_from_(capture_from) { }
2790 virtual RegExpLookahead* AsLookahead()
V8_OVERRIDE;
2792 virtual
bool IsLookahead() V8_OVERRIDE;
2793 virtual
bool IsAnchoredAtStart() V8_OVERRIDE;
2794 virtual
int min_match() V8_OVERRIDE {
return 0; }
2809 class RegExpBackReference
V8_FINAL :
public RegExpTree {
2812 : capture_(capture) { }
2816 virtual RegExpBackReference* AsBackReference()
V8_OVERRIDE;
2818 virtual
int min_match() V8_OVERRIDE {
return 0; }
2820 int index() {
return capture_->index(); }
2823 RegExpCapture* capture_;
2827 class RegExpEmpty
V8_FINAL :
public RegExpTree {
2835 virtual
int min_match() V8_OVERRIDE {
return 0; }
2838 static RegExpEmpty* instance = ::new RegExpEmpty();
2847 inline ModuleVariable::ModuleVariable(Zone* zone, VariableProxy* proxy,
int pos)
2848 : Module(zone, proxy->
interface(), pos),
2863 virtual void Visit(
AstNode* node) = 0;
2871 #define DEF_VISIT(type) \
2872 virtual void Visit##type(type* node) = 0;
2878 #define DEFINE_AST_VISITOR_SUBCLASS_MEMBERS() \
2880 virtual void Visit(AstNode* node) V8_FINAL V8_OVERRIDE { \
2881 if (!CheckStackOverflow()) node->Accept(this); \
2884 void SetStackOverflow() { stack_overflow_ = true; } \
2885 void ClearStackOverflow() { stack_overflow_ = false; } \
2886 bool HasStackOverflow() const { return stack_overflow_; } \
2888 bool CheckStackOverflow() { \
2889 if (stack_overflow_) return true; \
2890 StackLimitCheck check(zone_->isolate()); \
2891 if (!check.HasOverflowed()) return false; \
2892 return (stack_overflow_ = true); \
2896 void InitializeAstVisitor(Zone* zone) { \
2898 stack_overflow_ = false; \
2900 Zone* zone() { return zone_; } \
2901 Isolate* isolate() { return zone_->isolate(); } \
2904 bool stack_overflow_
2913 : dont_optimize_reason_(kNoReason),
2924 #define DEF_VISIT(type) \
2925 void Visit##type(type* node);
2929 void increase_node_count() { properties_.add_node_count(1); }
2932 dont_optimize_reason_ = reason;
2935 void add_slot_node(FeedbackSlotInterface* slot_node) {
2936 slot_processor_.add_slot_node(zone_, slot_node);
2939 AstProperties properties_;
2940 DeferredFeedbackSlotProcessor slot_processor_;
2951 #define DEF_VISIT(type) \
2952 void Visit##type(type* node) {}
2962 template<
class Visitor>
2971 #define VISIT_AND_RETURN(NodeType, node) \
2972 visitor_.Visit##NodeType((node)); \
2979 VariableDeclaration* decl =
2980 new(zone_) VariableDeclaration(zone_, proxy, mode, scope, pos);
2986 FunctionLiteral* fun,
2989 FunctionDeclaration* decl =
2990 new(zone_) FunctionDeclaration(zone_, proxy, mode, fun, scope, pos);
2998 ModuleDeclaration* decl =
2999 new(zone_) ModuleDeclaration(zone_, proxy, module, scope, pos);
3007 ImportDeclaration* decl =
3008 new(zone_) ImportDeclaration(zone_, proxy, module, scope, pos);
3015 ExportDeclaration* decl =
3016 new(zone_) ExportDeclaration(zone_, proxy, scope, pos);
3021 ModuleLiteral* module =
3022 new(zone_) ModuleLiteral(zone_, body, interface, pos);
3027 ModuleVariable* module =
new(zone_) ModuleVariable(zone_, proxy, pos);
3032 ModulePath* module =
new(zone_) ModulePath(zone_, origin, name, pos);
3037 ModuleUrl* module =
new(zone_) ModuleUrl(zone_, url, pos);
3043 bool is_initializer_block,
3046 zone_, labels, capacity, is_initializer_block, pos);
3050 #define STATEMENT_WITH_LABELS(NodeType) \
3051 NodeType* New##NodeType(ZoneStringList* labels, int pos) { \
3052 NodeType* stmt = new(zone_) NodeType(zone_, labels, pos); \
3053 VISIT_AND_RETURN(NodeType, stmt); \
3059 #undef STATEMENT_WITH_LABELS
3064 switch (visit_mode) {
3066 ForInStatement* stmt =
new(zone_) ForInStatement(zone_, labels, pos);
3070 ForOfStatement* stmt =
new(zone_) ForOfStatement(zone_, labels, pos);
3079 VariableProxy* proxy,
Block* body,
int pos) {
3080 ModuleStatement* stmt =
new(zone_) ModuleStatement(zone_, proxy, body, pos);
3085 ExpressionStatement* stmt =
3086 new(zone_) ExpressionStatement(zone_, expression, pos);
3091 ContinueStatement* stmt =
new(zone_) ContinueStatement(zone_, target, pos);
3096 BreakStatement* stmt =
new(zone_) BreakStatement(zone_, target, pos);
3101 ReturnStatement* stmt =
new(zone_) ReturnStatement(zone_, expression, pos);
3109 WithStatement* stmt =
new(zone_) WithStatement(
3110 zone_, scope, expression, statement, pos);
3118 IfStatement* stmt =
new(zone_) IfStatement(
3119 zone_, condition, then_statement, else_statement, pos);
3129 TryCatchStatement* stmt =
new(zone_) TryCatchStatement(
3130 zone_, index, try_block, scope, variable, catch_block, pos);
3136 Block* finally_block,
3138 TryFinallyStatement* stmt =
new(zone_) TryFinallyStatement(
3139 zone_, index, try_block, finally_block, pos);
3144 DebuggerStatement* stmt =
new(zone_) DebuggerStatement(zone_, pos);
3149 return new(zone_) EmptyStatement(zone_, pos);
3154 CaseClause* clause =
3155 new(zone_) CaseClause(zone_, label, statements, pos);
3160 Literal* lit =
new(zone_) Literal(zone_, handle, pos);
3166 zone_->isolate()->factory()->NewNumber(number,
TENURED), pos);
3172 int boilerplate_properties,
3175 ObjectLiteral* lit =
new(zone_) ObjectLiteral(
3176 zone_, properties, literal_index, boilerplate_properties,
3183 return new(zone_) ObjectLiteral::Property(zone_, key, value);
3187 FunctionLiteral* value,
3189 ObjectLiteral::Property* prop =
3190 new(zone_) ObjectLiteral::Property(zone_, is_getter, value);
3191 prop->set_key(NewLiteral(value->name(), pos));
3199 RegExpLiteral* lit =
3200 new(zone_) RegExpLiteral(zone_, pattern, flags, literal_index, pos);
3207 ArrayLiteral* lit =
new(zone_) ArrayLiteral(
3208 zone_, values, literal_index, pos);
3213 int pos = RelocInfo::kNoPosition) {
3214 VariableProxy* proxy =
new(zone_) VariableProxy(zone_, var, pos);
3221 int position = RelocInfo::kNoPosition) {
3222 VariableProxy* proxy =
3223 new(zone_) VariableProxy(zone_, name, is_this,
interface, position);
3228 Property* prop =
new(zone_) Property(zone_, obj, key, pos);
3235 Call* call =
new(zone_) Call(zone_, expression, arguments, pos);
3242 CallNew* call =
new(zone_) CallNew(zone_, expression, arguments, pos);
3251 new(zone_) CallRuntime(zone_, name,
function, arguments, pos);
3258 UnaryOperation* node =
3259 new(zone_) UnaryOperation(zone_, op, expression, pos);
3267 BinaryOperation* node =
3268 new(zone_) BinaryOperation(zone_, op, left, right, pos);
3276 CountOperation* node =
3277 new(zone_) CountOperation(zone_, op, is_prefix, expr, pos);
3285 CompareOperation* node =
3286 new(zone_) CompareOperation(zone_, op, left, right, pos);
3294 Conditional* cond =
new(zone_) Conditional(
3295 zone_, condition, then_expression, else_expression, position);
3303 Assignment* assign =
3304 new(zone_) Assignment(zone_, op, target, value, pos);
3305 assign->Init(zone_,
this);
3311 Yield::Kind yield_kind,
3313 Yield* yield =
new(zone_) Yield(
3314 zone_, generator_object, expression, yield_kind, pos);
3319 Throw* t =
new(zone_) Throw(zone_, exception, pos);
3327 int materialized_literal_count,
3328 int expected_property_count,
3330 int parameter_count,
3331 FunctionLiteral::ParameterFlag has_duplicate_parameters,
3332 FunctionLiteral::FunctionType function_type,
3333 FunctionLiteral::IsFunctionFlag is_function,
3334 FunctionLiteral::IsParenthesizedFlag is_parenthesized,
3335 FunctionLiteral::IsGeneratorFlag is_generator,
3337 FunctionLiteral* lit =
new(zone_) FunctionLiteral(
3338 zone_, name, scope, body,
3339 materialized_literal_count, expected_property_count, handler_count,
3340 parameter_count, function_type, has_duplicate_parameters, is_function,
3341 is_parenthesized, is_generator, position);
3343 if (is_function == FunctionLiteral::kIsFunction) {
3344 visitor_.VisitFunctionLiteral(lit);
3351 NativeFunctionLiteral* lit =
3352 new(zone_) NativeFunctionLiteral(zone_, name, extension, pos);
3357 ThisFunction* fun =
new(zone_) ThisFunction(zone_, pos);
3361 #undef VISIT_AND_RETURN
ZoneList< CaseClause * > * cases() const
bool fast_elements() const
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
virtual void SetFirstFeedbackSlot(int slot)
const BailoutId prepare_id_
IfStatement(Zone *zone, Expression *condition, Statement *then_statement, Statement *else_statement, int pos)
ArrayLiteral * NewArrayLiteral(ZoneList< Expression * > *values, int literal_index, int pos)
virtual bool IsJump() const V8_FINAL V8_OVERRIDE
TypeFeedbackId test_id() const
RegExpLiteral(Zone *zone, Handle< String > pattern, Handle< String > flags, int literal_index, int pos)
ZoneList< Expression * > * arguments() const
ForOfStatement(Zone *zone, ZoneStringList *labels, int pos)
#define FOR_EACH_REG_EXP_TREE_TYPE(VISIT)
virtual bool IsTextElement()
Declaration(Zone *zone, VariableProxy *proxy, VariableMode mode, Scope *scope, int pos)
TypeFeedbackId CompareOperationFeedbackId() const
ModuleVariable * NewModuleVariable(VariableProxy *proxy, int pos)
Literal * NewLiteral(Handle< Object > handle, int pos)
static int StartRegister(int index)
BreakStatement(Zone *zone, BreakableStatement *target, int pos)
Handle< String > name() const
BreakableStatement(Zone *zone, ZoneStringList *labels, BreakableType breakable_type, int position)
void set_combined_type(Type *type)
BailoutId BackEdgeId() const
static Handle< Map > CurrentMapForDeprecated(Handle< Map > map)
ObjectLiteral::Property * NewObjectLiteralProperty(bool is_getter, FunctionLiteral *value, int pos)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths true
ZoneList< Statement * > * statements()
int CallFeedbackSlot() const
void Reserve(int capacity, Zone *zone)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf map
SmallMapList(int capacity, Zone *zone)
Block * try_block() const
FunctionLiteral * NewFunctionLiteral(Handle< String > name, Scope *scope, ZoneList< Statement * > *body, int materialized_literal_count, int expected_property_count, int handler_count, int parameter_count, FunctionLiteral::ParameterFlag has_duplicate_parameters, FunctionLiteral::FunctionType function_type, FunctionLiteral::IsFunctionFlag is_function, FunctionLiteral::IsParenthesizedFlag is_parenthesized, FunctionLiteral::IsGeneratorFlag is_generator, int position)
void set_escaping_targets(ZoneList< Label * > *targets)
TargetCollector(Zone *zone)
static String * cast(Object *obj)
BailoutId MaterializeTrueId()
void set_bounds(Bounds bounds)
int function_token_position() const
Handle< JSFunction > target() const
ModulePath(Zone *zone, Module *module, Handle< String > name, int pos)
virtual SmallMapList * GetReceiverTypes() V8_OVERRIDE
Expression * cond() const
Literal * NewNumberLiteral(double number, int pos)
Maybe< int > fixed_right_arg() const
AstProperties::Flags * flags()
void set_slot_processor(DeferredFeedbackSlotProcessor *slot_processor)
Block * catch_block() const
bool is_anonymous() const
int expected_property_count()
Statement * else_statement() const
virtual NodeType node_type() const V8_OVERRIDE
virtual void Accept(AstVisitor *v) V8_OVERRIDE
virtual InitializationFlag initialization() const V8_OVERRIDE
AstConstructionVisitor(Zone *zone)
Expression * each() const
static int ReserveIdRange(Zone *zone, int n)
static bool IsCompareOp(Value op)
static Handle< T > cast(Handle< S > that)
Interface * interface() const
Expression * right() const
ThisFunction * NewThisFunction(int pos)
void set_is_function_prototype(bool b)
static bool IsUnaryOp(Value op)
bool has_duplicate_parameters()
virtual KeyedAccessStoreMode GetStoreMode() V8_OVERRIDE
ModulePath * NewModulePath(Module *origin, Handle< String > name, int pos)
void set_standard_set_type(uc16 special_set_type)
void set_may_have_function_literal(bool value)
virtual ComputablePhase GetComputablePhase()
AstNullVisitor(Zone *zone)
Call(Zone *zone, Expression *expression, ZoneList< Expression * > *arguments, int pos)
v8::Extension * extension() const
virtual bool IsMonomorphic()
virtual bool ResultOverwriteAllowed()
static bool Match(void *literal1, void *literal2)
JumpStatement(Zone *zone, int pos)
virtual bool IsAnchoredAtEnd()
ZoneList< Expression * > * values() const
void set_dont_optimize_reason(BailoutReason reason)
unibrow::Mapping< unibrow::Ecma262Canonicalize > Canonicalize
ForInType for_in_type() const
#define ASSERT(condition)
void set_target(Handle< JSFunction > target)
ZoneList< Label * > * escaping_targets() const
ImportDeclaration * NewImportDeclaration(VariableProxy *proxy, Module *module, Scope *scope, int pos)
RegExpAtom(Vector< const uc16 > data)
Interface * interface() const
Yield(Zone *zone, Expression *generator_object, Expression *expression, Kind yield_kind, int pos)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in only print modified registers Don t break for ASM_UNIMPLEMENTED_BREAK macros print stack trace when an illegal exception is thrown randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot testing_bool_flag testing_int_flag string flag tmp file in which to serialize heap Print the time it takes to lazily compile hydrogen code stubs concurrent_recompilation concurrent_sweeping Print usage including on console Map counters to a file Enable debugger compile events enable GDBJIT interface(disables compacting GC)") DEFINE_bool(gdbjit_full
ModuleDeclaration * NewModuleDeclaration(VariableProxy *proxy, Module *module, Scope *scope, int pos)
virtual MaterializedLiteral * AsMaterializedLiteral()
Handle< String > debug_name() const
TypeFeedbackId LiteralFeedbackId() const
ObjectLiteralProperty Property
void Initialize(Statement *body)
Label * continue_target()
void set_scope(Scope *scope)
virtual bool IsValidLeftHandSide()
WithStatement * NewWithStatement(Scope *scope, Expression *expression, Statement *statement, int pos)
static int GetNextId(Zone *zone)
ImportDeclaration(Zone *zone, VariableProxy *proxy, Module *module, Scope *scope, int pos)
ZoneList< RegExpTree * > * nodes()
ContinueStatement(Zone *zone, IterationStatement *target, int pos)
NativeFunctionLiteral * NewNativeFunctionLiteral(Handle< String > name, v8::Extension *extension, int pos)
Expression * target() const
ZoneList< Property * > * properties() const
Throw(Zone *zone, Expression *exception, int pos)
bool AsArrayIndex(uint32_t *index)
#define VISIT_AND_RETURN(NodeType, node)
void set_is_uninitialized(bool b)
virtual int max_match() V8_OVERRIDE
Handle< Map > first() const
CompareOperation * NewCompareOperation(Token::Value op, Expression *left, Expression *right, int pos)
#define DECLARE_TYPE_ENUM(type)
ModuleUrl(Zone *zone, Handle< String > url, int pos)
virtual NodeType node_type() const =0
kInstanceClassNameOffset flag
CharacterSet(uc16 standard_set_type)
RegExpQuantifier(int min, int max, QuantifierType type, RegExpTree *body)
RegExpCharacterClass(uc16 type)
UnaryOperation(Zone *zone, Token::Value op, Expression *expression, int pos)
Assignment * NewAssignment(Token::Value op, Expression *target, Expression *value, int pos)
ZoneList< Statement * > * statements() const
void set_fixed_right_arg(Maybe< int > arg)
static Interface * NewValue()
Expression * else_expression() const
CompareOperation(Zone *zone, Token::Value op, Expression *left, Expression *right, int pos)
virtual Interval CaptureRegisters()
virtual BreakableStatement * AsBreakableStatement()
BailoutReason dont_optimize_reason()
DebuggerStatement * NewDebuggerStatement(int pos)
Handle< Object > value() const
void set_ast_properties(AstProperties *ast_properties)
void AddElement(TextElement elm, Zone *zone)
int for_in_feedback_slot_
CharacterSet(ZoneList< CharacterRange > *ranges)
VariableProxy * proxy() const
Statement(Zone *zone, int position)
TypeFeedbackId AssignmentFeedbackId()
ModuleDeclaration(Zone *zone, VariableProxy *proxy, Module *module, Scope *scope, int pos)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_string(expose_natives_as
Property(Zone *zone, Expression *obj, Expression *key, int pos)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object size
Throw * NewThrow(Expression *exception, int pos)
Vector< const uc16 > data()
void Add(Handle< Map > handle, Zone *zone)
IterationStatement(Zone *zone, ZoneStringList *labels, int pos)
CountOperation(Zone *zone, Token::Value op, bool is_prefix, Expression *expr, int pos)
virtual bool ToBooleanIsFalse() V8_OVERRIDE
BreakStatement * NewBreakStatement(BreakableStatement *target, int pos)
virtual MaterializedLiteral * AsMaterializedLiteral()
Expression * then_expression() const
bool has_function() const
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in only print modified registers Don t break for ASM_UNIMPLEMENTED_BREAK macros print stack trace when an illegal exception is thrown randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot testing_bool_flag testing_int_flag string flag tmp file in which to serialize heap Print the time it takes to lazily compile hydrogen code stubs concurrent_recompilation concurrent_sweeping Print usage including flags
Statement * then_statement() const
ZoneList< Label * > * targets()
bool may_have_function_literal() const
BinaryOperation * binary_operation() const
CaseClause * NewCaseClause(Expression *label, ZoneList< Statement * > *statements, int pos)
virtual IterationStatement * AsIterationStatement() V8_FINAL V8_OVERRIDE
ExpressionStatement * NewExpressionStatement(Expression *expression, int pos)
RegExpCharacterClass(ZoneList< CharacterRange > *ranges, bool is_negated)
void check(i::Vector< const uint8_t > string)
ArrayLiteral(Zone *zone, ZoneList< Expression * > *values, int literal_index, int pos)
void set_is_string_access(bool b)
void set_depth(int depth)
void set_loop_variable(Variable *var)
WithStatement(Zone *zone, Scope *scope, Expression *expression, Statement *statement, int pos)
BailoutId EntryId() const
int CallNewFeedbackSlot()
RegExpLookahead(RegExpTree *body, bool is_positive, int capture_count, int capture_from)
static bool IsAssignmentOp(Value tok)
Handle< String > AsPropertyName()
RegExpCapture * capture()
void set_function_token_position(int pos)
ObjectLiteral(Zone *zone, ZoneList< Property * > *properties, int literal_index, int boilerplate_properties, bool has_function, int pos)
SwitchStatement(Zone *zone, ZoneStringList *labels, int pos)
RegExpAssertion(AssertionType type)
BailoutId OsrEntryId() const
void set_inferred_name(Handle< String > inferred_name)
RegExpBackReference(RegExpCapture *capture)
Type * combined_type() const
VariableProxy * NewVariableProxy(Handle< String > name, bool is_this, Interface *interface=Interface::NewValue(), int position=RelocInfo::kNoPosition)
ReturnStatement(Zone *zone, Expression *expression, int pos)
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra code(assertions) for debugging") DEFINE_bool(code_comments
UnaryOperation * NewUnaryOperation(Token::Value op, Expression *expression, int pos)
Handle< AllocationSite > allocation_site() const
ElementsKind elements_kind() const
Handle< String > inferred_name() const
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
TryFinallyStatement(Zone *zone, int index, Block *try_block, Block *finally_block, int pos)
byte to_boolean_types() const
virtual TargetCollector * AsTargetCollector()
#define MAKE_ASTYPE(Name)
ZoneList< Statement * > * body() const
bool IsVariable(Handle< String > n)
#define STATEMENT_WITH_LABELS(NodeType)
Call * NewCall(Expression *expression, ZoneList< Expression * > *arguments, int pos)
ForEachStatement * NewForEachStatement(ForEachStatement::VisitMode visit_mode, ZoneStringList *labels, int pos)
Literal(Zone *zone, Handle< Object > value, int position)
Expression * left() const
RegExpLiteral * NewRegExpLiteral(Handle< String > pattern, Handle< String > flags, int literal_index, int pos)
BinaryOperation(Zone *zone, Token::Value op, Expression *left, Expression *right, int pos)
CallRuntime * NewCallRuntime(Handle< String > name, const Runtime::Function *function, ZoneList< Expression * > *arguments, int pos)
NativeFunctionLiteral(Zone *zone, Handle< String > name, v8::Extension *extension, int pos)
bool is_initializer_block() const
virtual TargetCollector * AsTargetCollector() V8_OVERRIDE
ModuleUrl * NewModuleUrl(Handle< String > url, int pos)
VariableProxy * NewVariableProxy(Variable *var, int pos=RelocInfo::kNoPosition)
Block(Zone *zone, ZoneStringList *labels, int capacity, bool is_initializer_block, int pos)
void set_type(Type *type)
Block * NewBlock(ZoneStringList *labels, int capacity, bool is_initializer_block, int pos)
TypeFeedbackId CompareId()
CallNew * NewCallNew(Expression *expression, ZoneList< Expression * > *arguments, int pos)
Handle< Map > at(int i) const
#define DECLARE_NODE_TYPE(type)
IfStatement * NewIfStatement(Expression *condition, Statement *then_statement, Statement *else_statement, int pos)
bool IsFunctionPrototype() const
void AddMapIfMissing(Handle< Map > map, Zone *zone)
Conditional(Zone *zone, Expression *condition, Expression *then_expression, Expression *else_expression, int position)
virtual bool IsPropertyName()
bool IsDeclaredVariableMode(VariableMode mode)
Module(Zone *zone, int pos)
TypeFeedbackId CountBinOpFeedbackId() const
AstProperties * ast_properties()
MaterializedLiteral(Zone *zone, int literal_index, int pos)
ZoneList< RegExpTree * > * alternatives()
Expression * subject() const
BailoutReason dont_optimize_reason()
void set_for_in_type(ForInType type)
virtual bool IsMonomorphic() V8_OVERRIDE
Handle< JSFunction > target()
static int EndRegister(int index)
TryCatchStatement * NewTryCatchStatement(int index, Block *try_block, Scope *scope, Variable *variable, Block *catch_block, int pos)
ExportDeclaration(Zone *zone, VariableProxy *proxy, Scope *scope, int pos)
BailoutId MaterializeFalseId()
Expression * condition() const
BailoutId GetIdForElement(int i)
virtual SmallMapList * GetReceiverTypes()
virtual int ComputeFeedbackSlotCount(Isolate *isolate)
void set_store_mode(KeyedAccessStoreMode mode)
Expression * label() const
void ProcessFeedbackSlots(Isolate *isolate)
static bool IsBinaryOp(Value op)
BailoutId AssignmentId() const
BailoutId RightId() const
Expression * result_done_
Expression * next_result() const
bool HasNoTypeInformation()
bool is_target_for_anonymous() const
#define DEF_FORWARD_DECLARATION(type)
Handle< T > handle(T *t, Isolate *isolate)
Expression(Zone *zone, int pos)
bool HasElseStatement() const
Expression * generator_object() const
virtual KeyedAccessStoreMode GetStoreMode()
TypeFeedbackId CallRuntimeFeedbackId() const
void FilterForPossibleTransitions(Map *root_map)
Handle< SharedFunctionInfo > shared_info()
CallNew(Zone *zone, Expression *expression, ZoneList< Expression * > *arguments, int pos)
ElementsKind GetInitialFastElementsKind()
void Init(Zone *zone, AstNodeFactory< Visitor > *factory)
bool may_store_doubles() const
static int feedback_slots()
Handle< String > flags() const
TryStatement(Zone *zone, int index, Block *try_block, int pos)
FunctionLiteral(Zone *zone, Handle< String > name, Scope *scope, ZoneList< Statement * > *body, int materialized_literal_count, int expected_property_count, int handler_count, int parameter_count, FunctionType function_type, ParameterFlag has_duplicate_parameters, IsFunctionFlag is_function, IsParenthesizedFlag is_parenthesized, IsGeneratorFlag is_generator, int position)
virtual bool IsAnchoredAtStart()
RegExpCapture(RegExpTree *body, int index)
virtual int min_match() V8_OVERRIDE
Expression * result_done() const
Expression * assign_iterator() const
TypeFeedbackId BinaryOperationFeedbackId() const
Expression * expression() const
void set_allocation_site(Handle< AllocationSite > allocation_site)
int AllocationSiteFeedbackSlot()
Expression * iterable() const
DoWhileStatement(Zone *zone, ZoneStringList *labels, int pos)
ZoneList< Handle< Object > > ZoneObjectList
void Initialize(Expression *each, Expression *subject, Statement *body)
ReturnStatement * NewReturnStatement(Expression *expression, int pos)
ExpressionStatement(Zone *zone, Expression *expression, int pos)
CountOperation * NewCountOperation(Token::Value op, bool is_prefix, Expression *expr, int pos)
TryCatchStatement(Zone *zone, int index, Block *try_block, Scope *scope, Variable *variable, Block *catch_block, int pos)
virtual bool ToBooleanIsFalse()
TypeFeedbackId CountStoreFeedbackId() const
Handle< Map > GetReceiverType()
Expression * assign_each_
Yield * NewYield(Expression *generator_object, Expression *expression, Yield::Kind yield_kind, int pos)
FunctionDeclaration * NewFunctionDeclaration(VariableProxy *proxy, VariableMode mode, FunctionLiteral *fun, Scope *scope, int pos)
ZoneStringList * labels() const
Expression * assign_each() const
#define DECLARE_NODE_FUNCTIONS(type)
Conditional * NewConditional(Expression *condition, Expression *then_expression, Expression *else_expression, int position)
TypeFeedbackId PropertyFeedbackId()
ForEachStatement(Zone *zone, ZoneStringList *labels, int pos)
VariableDeclaration(Zone *zone, VariableProxy *proxy, VariableMode mode, Scope *scope, int pos)
ZoneList< Handle< String > > ZoneStringList
Expression * next_result_
void add_node_count(int count)
static RegExpEmpty * GetInstance()
virtual BreakableStatement * AsBreakableStatement() V8_FINAL V8_OVERRIDE
void set_compare_type(Type *type)
BailoutId EntryId() const
Expression * assign_iterator_
ModuleLiteral * NewModuleLiteral(Block *body, Interface *interface, int pos)
BailoutId ReturnId() const
ContinueStatement * NewContinueStatement(IterationStatement *target, int pos)
virtual bool ToBooleanIsTrue()
void set_key(Literal *key)
AstNodeFactory(Zone *zone)
virtual bool IsJump() const
virtual IterationStatement * AsIterationStatement()
ZoneList< CharacterRange > * ranges(Zone *zone)
EmptyStatement * NewEmptyStatement(int pos)
static TypeFeedbackId reuse(BailoutId id)
ObjectLiteral::Property * NewObjectLiteralProperty(Literal *key, Expression *value)
virtual BailoutId ContinueId() const V8_OVERRIDE
bool IsStringAccess() const
virtual void Accept(AstVisitor *v)=0
void set_to_boolean_types(byte types)
VariableMode mode() const
void set_is_simple(bool is_simple)
virtual int max_match()=0
virtual BailoutId StackCheckId() const V8_OVERRIDE
Handle< Map > last() const
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter trace hydrogen to given file name trace inlining decisions trace store elimination trace all use positions trace global value numbering trace hydrogen escape analysis trace the tracking of allocation sites trace map generalization environment for every instruction deoptimize every n garbage collections put a break point before deoptimizing deoptimize uncommon cases use on stack replacement trace array bounds check elimination perform array index dehoisting use load elimination use store elimination use constant folding eliminate unreachable code number of stress runs when picking a function to watch for shared function not JSFunction itself flushes the cache of optimized code for closures on every GC functions with arguments object maximum number of escape analysis fix point iterations allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms concurrent on stack replacement do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes number of stack frames inspected by the profiler percentage of ICs that must have type info to allow optimization extra verbose compilation tracing generate extra emit comments in code disassembly enable use of SSE3 instructions if available enable use of CMOV instruction if available enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long expose natives in global object expose freeBuffer extension expose gc extension under the specified name expose externalize string extension number of stack frames to capture disable builtin natives files print name of functions for which code is generated use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations always try to OSR functions trace optimize function deoptimization minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions trace debugging JSON request response trace out of bounds accesses to external arrays trace_js_array_abuse automatically set the debug break flag when debugger commands are in the queue abort by crashing maximum length of function source code printed in a stack trace max size of the new max size of the old max size of executable always perform global GCs print one trace line following each garbage collection do not print trace line after scavenger collection print statistics of the maximum memory committed for the heap in name
TryFinallyStatement * NewTryFinallyStatement(int index, Block *try_block, Block *finally_block, int pos)
bool is_expression() const
DeferredFeedbackSlotProcessor * slot_processor()
bool HasCallFeedbackSlot() const
virtual bool ToBooleanIsTrue() V8_OVERRIDE
Module(Zone *zone, Interface *interface, int pos, Block *body=NULL)
Statement * statement() const
CharacterSet character_set()
ForInStatement(Zone *zone, ZoneStringList *labels, int pos)
virtual bool IsJump() const V8_OVERRIDE
void set_index(int index)
ExportDeclaration * NewExportDeclaration(VariableProxy *proxy, Scope *scope, int pos)
VariableDeclaration * NewVariableDeclaration(VariableProxy *proxy, VariableMode mode, Scope *scope, int pos)
BailoutId PrepareId() const
ObjectLiteral * NewObjectLiteral(ZoneList< ObjectLiteral::Property * > *properties, int literal_index, int boilerplate_properties, bool has_function, int pos)
int materialized_literal_count()
BinaryOperation * NewBinaryOperation(Token::Value op, Expression *left, Expression *right, int pos)
ForStatement(Zone *zone, ZoneStringList *labels, int pos)
Variable * loop_variable()
ModuleStatement(Zone *zone, VariableProxy *proxy, Block *body, int pos)
WhileStatement(Zone *zone, ZoneStringList *labels, int pos)
Property * NewProperty(Expression *obj, Expression *key, int pos)
AssertionType assertion_type()
bool is_jsruntime() const
ModuleStatement * NewModuleStatement(VariableProxy *proxy, Block *body, int pos)
ZoneList< TextElement > * elements()
Expression * value() const
CallRuntime(Zone *zone, Handle< String > name, const Runtime::Function *function, ZoneList< Expression * > *arguments, int pos)