44 #define DECLARATION_NODE_LIST(V) \
45 V(VariableDeclaration) \
46 V(FunctionDeclaration) \
47 V(ModuleDeclaration) \
48 V(ImportDeclaration) \
51 #define MODULE_NODE_LIST(V) \
57 #define STATEMENT_NODE_LIST(V) \
60 V(ExpressionStatement) \
63 V(ContinueStatement) \
73 V(TryCatchStatement) \
74 V(TryFinallyStatement) \
77 #define EXPRESSION_NODE_LIST(V) \
80 V(NativeFunctionLiteral) \
102 #define AST_NODE_LIST(V) \
103 DECLARATION_NODE_LIST(V) \
104 MODULE_NODE_LIST(V) \
105 STATEMENT_NODE_LIST(V) \
106 EXPRESSION_NODE_LIST(V)
109 class AstConstructionVisitor;
120 class TargetCollector;
123 class RegExpAlternative;
124 class RegExpAssertion;
126 class RegExpBackReference;
128 class RegExpCharacterClass;
130 class RegExpDisjunction;
132 class RegExpLookahead;
133 class RegExpQuantifier;
136 #define DEF_FORWARD_DECLARATION(type) class type;
138 #undef DEF_FORWARD_DECLARATION
147 #define DECLARE_NODE_TYPE(type) \
148 virtual void Accept(AstVisitor* v) OVERRIDE; \
149 virtual AstNode::NodeType node_type() const FINAL OVERRIDE { \
150 return AstNode::k##type; \
152 template<class> friend class AstNodeFactory;
174 feedback_slots_ += count;
202 #define DECLARE_TYPE_ENUM(type) k##type,
207 #undef DECLARE_TYPE_ENUM
210 return zone->New(
static_cast<int>(
size));
221 #define DECLARE_NODE_FUNCTIONS(type) \
222 bool Is##type() const { return node_type() == AstNode::k##type; } \
224 return Is##type() ? reinterpret_cast<type*>(this) : NULL; \
226 const type* As##type() const { \
227 return Is##type() ? reinterpret_cast<const type*>(this) : NULL; \
230 #undef DECLARE_NODE_FUNCTIONS
247 void*
operator new(
size_t size);
260 virtual bool IsJump()
const {
return false; }
264 class SmallMapList
FINAL {
269 void Reserve(
int capacity,
Zone* zone) { list_.Reserve(capacity, zone); }
274 int length()
const {
return list_.length(); }
278 for (
int i = 0;
i < length(); ++
i) {
279 if (at(
i).is_identical_to(
map))
return;
285 for (
int i = list_.length() - 1;
i >= 0;
i--) {
286 if (at(
i)->FindRootMap() != root_map) {
287 list_.RemoveElement(list_.at(
i));
293 list_.Add(
handle.location(), zone);
387 id_(id_gen->GetNextId()),
454 statements_.Add(statement, zone);
463 return !statements_.is_empty() && statements_.last()->IsJump()
472 bool is_initializer_block,
int pos,
IdGen* id_gen)
474 statements_(capacity, zone),
475 is_initializer_block_(is_initializer_block),
476 decls_id_(id_gen->GetNextId()),
497 VariableProxy*
proxy,
527 VariableProxy* proxy,
536 class FunctionDeclaration
FINAL :
public Declaration {
540 FunctionLiteral* fun()
const {
return fun_; }
547 FunctionDeclaration(
Zone* zone,
548 VariableProxy* proxy,
550 FunctionLiteral* fun,
569 Module* module()
const {
return module_; }
576 VariableProxy* proxy,
593 Module* module()
const {
return module_; }
600 VariableProxy* proxy,
613 class ExportDeclaration
FINAL :
public Declaration {
654 :
Module(zone, interface, pos, body) {}
658 class ModuleVariable
FINAL :
public Module {
662 VariableProxy* proxy()
const {
return proxy_; }
676 Module* module()
const {
return module_; }
681 :
Module(zone, pos), module_(module), name_(
name) {}
697 :
Module(zone, pos), url_(url) {
709 VariableProxy* proxy()
const {
return proxy_; }
710 Block*
body()
const {
return body_; }
720 VariableProxy* proxy_;
780 continue_id_(id_gen->GetNextId()),
781 back_edge_id_(id_gen->GetNextId()) {}
802 return may_have_function_literal_;
805 may_have_function_literal_ = value;
817 may_have_function_literal_(
true),
818 body_id_(id_gen->GetNextId()) {}
849 return may_have_function_literal_;
852 may_have_function_literal_ = value;
870 may_have_function_literal_(
true),
871 loop_variable_(
NULL),
872 continue_id_(id_gen->GetNextId()),
873 body_id_(id_gen->GetNextId()) {}
881 bool may_have_function_literal_;
932 DCHECK(for_in_feedback_slot_ != kInvalidFeedbackSlot);
933 return for_in_feedback_slot_;
949 for_in_type_(SLOW_FOR_IN),
950 for_in_feedback_slot_(kInvalidFeedbackSlot),
951 body_id_(id_gen->GetNextId()),
952 prepare_id_(id_gen->GetNextId()) {}
973 assign_iterator_ = assign_iterator;
974 next_result_ = next_result;
975 result_done_ = result_done;
976 assign_each_ = assign_each;
985 return assign_iterator_;
1000 return assign_each_;
1012 assign_iterator_(
NULL),
1016 back_edge_id_(id_gen->GetNextId()) {}
1036 :
Statement(zone, pos), expression_(expression) { }
1052 class ContinueStatement
FINAL :
public JumpStatement {
1097 class WithStatement
FINAL :
public Statement {
1111 expression_(expression),
1112 statement_(statement) { }
1127 CHECK(!is_default());
1142 int pos,
IdGen* id_gen);
1188 bool HasThenStatement()
const {
return !then_statement()->IsEmpty(); }
1196 return HasThenStatement() && then_statement()->IsJump()
1197 && HasElseStatement() && else_statement()->IsJump();
1208 condition_(condition),
1209 then_statement_(then_statement),
1210 else_statement_(else_statement),
1211 if_id_(id_gen->GetNextId()),
1212 then_id_(id_gen->GetNextId()),
1213 else_id_(id_gen->GetNextId()) {}
1293 variable_(variable),
1294 catch_block_(catch_block) {
1308 Block* finally_block()
const {
return finally_block_; }
1312 Zone* zone,
int index, Block* try_block, Block* finally_block,
int pos)
1314 finally_block_(finally_block) { }
1329 :
Statement(zone, pos), debugger_id_(id_gen->GetNextId()) {}
1345 class Literal
FINAL :
public Expression {
1350 return value_->IsPropertyName();
1354 DCHECK(IsPropertyName());
1359 DCHECK(IsPropertyName());
1360 return value_->AsString();
1364 return value()->BooleanValue();
1367 return !value()->BooleanValue();
1377 static bool Match(
void* literal1,
void* literal2) {
1389 isolate_(zone->isolate()) {}
1464 Literal* key,
Expression* value,
bool is_static);
1466 Literal*
key() {
return key_; }
1506 return constant_properties_;
1526 int flags = fast_elements() ? kFastElements : kNoFlags;
1527 flags |= has_function() ? kHasFunction : kNoFlags;
1534 kHasFunction = 1 << 1
1545 int boilerplate_properties,
bool has_function,
int pos,
1548 properties_(properties),
1549 boilerplate_properties_(boilerplate_properties),
1550 fast_elements_(
false),
1551 may_store_doubles_(
false),
1552 has_function_(has_function) {}
1599 return BailoutId(first_element_id_.ToInt() +
i);
1607 int flags = depth() == 1 ? kShallowElements : kNoFlags;
1608 flags |= ArrayLiteral::kDisableMementos;
1614 kShallowElements = 1,
1615 kDisableMementos = 1 << 1
1620 int pos,
IdGen* id_gen)
1623 first_element_id_(id_gen->ReserveIdRange(values->length())) {}
1636 virtual
bool IsValidReferenceExpression() const
OVERRIDE {
1637 return var_ ==
NULL ?
true : var_->IsValidReference();
1656 variable_feedback_slot_ = slot;
1680 virtual
bool IsValidReferenceExpression() const
OVERRIDE {
return true; }
1691 return receiver_types_.length() == 1;
1694 return &receiver_types_;
1701 return is_uninitialized_;
1709 return obj()->IsSuperReference();
1716 property_feedback_slot_ = slot;
1726 load_id_(id_gen->GetNextId()),
1727 property_feedback_slot_(kInvalidFeedbackSlot),
1728 is_for_call_(
false),
1729 is_uninitialized_(
false),
1730 is_string_access_(
false) {}
1755 call_feedback_slot_ = slot;
1759 return call_feedback_slot_ != kInvalidFeedbackSlot;
1764 if (expression()->IsProperty()) {
1765 return expression()->AsProperty()->GetReceiverTypes();
1771 if (expression()->IsProperty()) {
1772 return expression()->AsProperty()->IsMonomorphic();
1774 return !target_.is_null();
1778 VariableProxy* proxy = expression_->AsVariableProxy();
1779 return proxy !=
NULL && proxy->var()->IsUnallocated();
1783 return global_call() && !target_.is_null();
1794 allocation_site_ = site;
1814 bool return_is_recorded_;
1819 int pos,
IdGen* id_gen)
1821 expression_(expression),
1822 arguments_(arguments),
1823 call_feedback_slot_(kInvalidFeedbackSlot),
1824 return_id_(id_gen->GetNextId()) {
1825 if (expression->IsProperty()) {
1826 expression->AsProperty()->mark_for_call();
1852 return FLAG_pretenuring_call_new ? 2 : 1;
1855 callnew_feedback_slot_ = slot;
1859 DCHECK(callnew_feedback_slot_ != kInvalidFeedbackSlot);
1860 return callnew_feedback_slot_;
1863 DCHECK(callnew_feedback_slot_ != kInvalidFeedbackSlot);
1864 DCHECK(FLAG_pretenuring_call_new);
1865 return callnew_feedback_slot_ + 1;
1872 return allocation_site_;
1881 int pos,
IdGen* id_gen)
1883 expression_(expression),
1884 arguments_(arguments),
1885 is_monomorphic_(
false),
1886 callnew_feedback_slot_(kInvalidFeedbackSlot),
1887 return_id_(id_gen->GetNextId()) {}
1918 return (FLAG_vector_ics && is_jsruntime()) ? 1 : 0;
1921 callruntime_feedback_slot_ = slot;
1925 DCHECK(!is_jsruntime() ||
1926 callruntime_feedback_slot_ != kInvalidFeedbackSlot);
1927 return callruntime_feedback_slot_;
1938 function_(function),
1939 arguments_(arguments) {}
1967 expression_(expression),
1968 materialize_true_id_(id_gen->GetNextId()),
1969 materialize_false_id_(id_gen->GetNextId()) {
1995 allocation_site_ = allocation_site;
2014 right_id_(id_gen->GetNextId()) {
2038 bool is_prefix()
const {
return is_prefix_; }
2049 return receiver_types_.length() == 1;
2052 return &receiver_types_;
2068 int pos,
IdGen* id_gen)
2071 is_prefix_(is_prefix),
2074 assignment_id_(id_gen->GetNextId()),
2075 count_id_(id_gen->GetNextId()) {}
2087 SmallMapList receiver_types_;
2144 condition_(condition),
2145 then_expression_(then_expression),
2146 else_expression_(else_expression),
2147 then_id_(id_gen->GetNextId()),
2148 else_id_(id_gen->GetNextId()) {}
2163 Assignment* AsSimpleAssignment() {
return !is_compound() ? this :
NULL; }
2180 return receiver_types_.length() == 1;
2184 return is_uninitialized_;
2187 return &receiver_types_;
2197 int pos,
IdGen* id_gen);
2199 template<
class Visitor>
2202 if (is_compound()) {
2203 binary_operation_ = factory->NewBinaryOperation(
2204 binary_op(), target_, value_, position() + 1);
2215 bool is_uninitialized_ : 1;
2218 SmallMapList receiver_types_;
2251 return (FLAG_vector_ics && yield_kind() == kDelegating) ? 3 : 0;
2254 yield_first_feedback_slot_ = slot;
2258 DCHECK(yield_first_feedback_slot_ != kInvalidFeedbackSlot);
2259 return yield_first_feedback_slot_;
2263 DCHECK(yield_first_feedback_slot_ != kInvalidFeedbackSlot);
2264 return yield_first_feedback_slot_ + 1;
2268 DCHECK(yield_first_feedback_slot_ != kInvalidFeedbackSlot);
2269 return yield_first_feedback_slot_ + 2;
2274 Kind yield_kind,
int pos,
IdGen* id_gen)
2276 generator_object_(generator_object),
2277 expression_(expression),
2278 yield_kind_(yield_kind),
2280 yield_first_feedback_slot_(kInvalidFeedbackSlot) {}
2299 :
Expression(zone, pos, id_gen), exception_(exception) {}
2315 kNoDuplicateParameters = 0,
2316 kHasDuplicateParameters = 1
2345 int SourceSize()
const {
return end_position() - start_position(); }
2362 return raw_name_->
string();
2364 return inferred_name();
2368 if (!inferred_name_.is_null()) {
2370 return inferred_name_;
2372 if (raw_inferred_name_ !=
NULL) {
2373 return raw_inferred_name_->string();
2382 inferred_name_ = inferred_name;
2383 DCHECK(raw_inferred_name_==
NULL || raw_inferred_name_->IsEmpty());
2384 raw_inferred_name_ =
NULL;
2389 raw_inferred_name_ = raw_inferred_name;
2390 DCHECK(inferred_name_.is_null());
2401 return HasDuplicateParameters::decode(bitfield_);
2404 bool is_function() {
return IsFunction::decode(bitfield_) == kIsFunction; }
2412 return IsParenthesized::decode(bitfield_) == kIsParenthesized;
2415 bitfield_ = IsParenthesized::update(bitfield_, kIsParenthesized);
2430 AstProperties::Flags*
flags() {
return ast_properties_.flags(); }
2432 ast_properties_ = *ast_properties;
2435 return ast_properties_.feedback_slots();
2440 dont_optimize_reason_ = reason;
2447 int expected_property_count,
int handler_count,
2452 int position,
IdGen* id_gen)
2457 raw_inferred_name_(ast_value_factory->empty_string()),
2458 dont_optimize_reason_(kNoReason),
2459 materialized_literal_count_(materialized_literal_count),
2460 expected_property_count_(expected_property_count),
2461 handler_count_(handler_count),
2462 parameter_count_(parameter_count),
2463 function_token_position_(
RelocInfo::kNoPosition) {
2464 bitfield_ = IsExpression::encode(function_type != DECLARATION) |
2465 IsAnonymous::encode(function_type == ANONYMOUS_EXPRESSION) |
2466 Pretenure::encode(
false) |
2468 IsFunction::encode(is_function) |
2469 IsParenthesized::encode(is_parenthesized) |
2470 FunctionKindBits::encode(kind);
2517 int position,
IdGen* id_gen)
2521 constructor_(constructor),
2522 properties_(properties) {}
2542 :
Expression(zone, pos, id_gen), name_(
name), extension_(extension) {}
2560 class SuperReference
FINAL :
public Expression {
2564 VariableProxy* this_var()
const {
return this_var_; }
2570 :
Expression(zone, pos, id_gen), this_var_(this_var) {
2571 DCHECK(this_var->is_this());
2578 #undef DECLARE_NODE_TYPE
2588 #define MAKE_CASE(Name) \
2589 virtual void* Visit##Name(RegExp##Name*, void* data) = 0;
2612 #define MAKE_ASTYPE(Name) \
2613 virtual RegExp##Name* As##Name(); \
2614 virtual bool Is##Name();
2620 class RegExpDisjunction
FINAL :
public RegExpTree {
2631 virtual
int min_match()
OVERRIDE {
return min_match_; }
2652 virtual
int min_match()
OVERRIDE {
return min_match_; }
2692 standard_set_type_(standard_set_type) {}
2695 standard_set_type_(0) {}
2699 standard_set_type_ = special_set_type;
2715 is_negated_(is_negated) { }
2718 is_negated_(
false) { }
2785 elements_.Add(elm, zone);
2786 length_ += elm.length();
2802 min_match_(
min * body->min_match()),
2803 quantifier_type_(type) {
2804 if (max > 0 && body->
max_match() > kInfinity / max) {
2805 max_match_ = kInfinity;
2819 bool not_at_start =
false);
2823 virtual
int min_match()
OVERRIDE {
return min_match_; }
2845 : body_(body), index_(index) { }
2858 virtual
int min_match()
OVERRIDE {
return body_->min_match(); }
2871 class RegExpLookahead
FINAL :
public RegExpTree {
2878 is_positive_(is_positive),
2879 capture_count_(capture_count),
2880 capture_from_(capture_from) { }
2907 : capture_(capture) { }
2915 int index() {
return capture_->index(); }
2933 static RegExpEmpty* instance = ::new RegExpEmpty();
2942 inline ModuleVariable::ModuleVariable(Zone* zone, VariableProxy* proxy,
int pos)
2943 : Module(zone, proxy->interface(), pos),
2966 #define DEF_VISIT(type) \
2967 virtual void Visit##type(type* node) = 0;
2973 #define DEFINE_AST_VISITOR_SUBCLASS_MEMBERS() \
2975 virtual void Visit(AstNode* node) FINAL OVERRIDE { \
2976 if (!CheckStackOverflow()) node->Accept(this); \
2979 void SetStackOverflow() { stack_overflow_ = true; } \
2980 void ClearStackOverflow() { stack_overflow_ = false; } \
2981 bool HasStackOverflow() const { return stack_overflow_; } \
2983 bool CheckStackOverflow() { \
2984 if (stack_overflow_) return true; \
2985 StackLimitCheck check(zone_->isolate()); \
2986 if (!check.HasOverflowed()) return false; \
2987 return (stack_overflow_ = true); \
2991 void InitializeAstVisitor(Zone* zone) { \
2993 stack_overflow_ = false; \
2995 Zone* zone() { return zone_; } \
2996 Isolate* isolate() { return zone_->isolate(); } \
2999 bool stack_overflow_
3008 : dont_crankshaft_reason_(kNoReason), dont_turbofan_reason_(kNoReason) {}
3012 if (dont_turbofan_reason_ != kNoReason) {
3013 return dont_turbofan_reason_;
3015 return dont_crankshaft_reason_;
3023 #define DEF_VISIT(type) \
3024 void Visit##type(type* node);
3031 dont_crankshaft_reason_ = reason;
3034 dont_turbofan_reason_ = reason;
3041 properties_.increase_feedback_slots(count);
3054 #define DEF_VISIT(type) \
3055 void Visit##type(type* node) {}
3065 template<
class Visitor>
3070 : zone_(zone), ast_value_factory_(ast_value_factory), id_gen_(id_gen) {}
3074 #define VISIT_AND_RETURN(NodeType, node) \
3075 visitor_.Visit##NodeType((node)); \
3082 VariableDeclaration* decl =
3083 new(zone_) VariableDeclaration(zone_, proxy,
mode, scope, pos);
3089 FunctionLiteral* fun,
3092 FunctionDeclaration* decl =
3093 new(zone_) FunctionDeclaration(zone_, proxy,
mode, fun, scope, pos);
3101 ModuleDeclaration* decl =
3102 new(zone_) ModuleDeclaration(zone_, proxy, module, scope, pos);
3110 ImportDeclaration* decl =
3111 new(zone_) ImportDeclaration(zone_, proxy, module, scope, pos);
3118 ExportDeclaration* decl =
3119 new(zone_) ExportDeclaration(zone_, proxy, scope, pos);
3124 ModuleLiteral* module =
3125 new(zone_) ModuleLiteral(zone_, body, interface, pos);
3130 ModuleVariable* module =
new(zone_) ModuleVariable(zone_, proxy, pos);
3135 ModulePath* module =
new (zone_) ModulePath(zone_, origin,
name, pos);
3140 ModuleUrl* module =
new(zone_) ModuleUrl(zone_, url, pos);
3146 bool is_initializer_block,
3148 Block* block =
new (zone_)
3149 Block(zone_, labels, capacity, is_initializer_block, pos, id_gen_);
3153 #define STATEMENT_WITH_LABELS(NodeType) \
3154 NodeType* New##NodeType(ZoneList<const AstRawString*>* labels, int pos) { \
3155 NodeType* stmt = new (zone_) NodeType(zone_, labels, pos, id_gen_); \
3156 VISIT_AND_RETURN(NodeType, stmt); \
3162 #undef STATEMENT_WITH_LABELS
3167 switch (visit_mode) {
3169 ForInStatement* stmt =
3170 new (zone_) ForInStatement(zone_, labels, pos, id_gen_);
3174 ForOfStatement* stmt =
3175 new (zone_) ForOfStatement(zone_, labels, pos, id_gen_);
3184 VariableProxy* proxy, Block* body,
int pos) {
3185 ModuleStatement* stmt =
new(zone_) ModuleStatement(zone_, proxy, body, pos);
3190 ExpressionStatement* stmt =
3191 new(zone_) ExpressionStatement(zone_, expression, pos);
3196 ContinueStatement* stmt =
new(zone_) ContinueStatement(zone_, target, pos);
3201 BreakStatement* stmt =
new(zone_) BreakStatement(zone_, target, pos);
3206 ReturnStatement* stmt =
new(zone_) ReturnStatement(zone_, expression, pos);
3214 WithStatement* stmt =
new(zone_) WithStatement(
3215 zone_, scope, expression, statement, pos);
3223 IfStatement* stmt =
new (zone_) IfStatement(
3224 zone_, condition, then_statement, else_statement, pos, id_gen_);
3234 TryCatchStatement* stmt =
new(zone_) TryCatchStatement(
3235 zone_, index, try_block, scope, variable, catch_block, pos);
3241 Block* finally_block,
3243 TryFinallyStatement* stmt =
new(zone_) TryFinallyStatement(
3244 zone_, index, try_block, finally_block, pos);
3249 DebuggerStatement* stmt =
3250 new (zone_) DebuggerStatement(zone_, pos, id_gen_);
3255 return new(zone_) EmptyStatement(zone_, pos);
3260 CaseClause* clause =
3261 new (zone_) CaseClause(zone_, label, statements, pos, id_gen_);
3266 Literal* lit =
new (zone_)
3267 Literal(zone_, ast_value_factory_->NewString(
string), pos, id_gen_);
3273 Literal* lit =
new (zone_)
3274 Literal(zone_, ast_value_factory_->NewSymbol(
name), pos, id_gen_);
3279 Literal* lit =
new (zone_)
3280 Literal(zone_, ast_value_factory_->NewNumber(number), pos, id_gen_);
3285 Literal* lit =
new (zone_)
3286 Literal(zone_, ast_value_factory_->NewSmi(number), pos, id_gen_);
3291 Literal* lit =
new (zone_)
3292 Literal(zone_, ast_value_factory_->NewBoolean(b), pos, id_gen_);
3298 Literal* lit =
new (zone_) Literal(
3299 zone_, ast_value_factory_->NewStringList(strings), pos, id_gen_);
3305 new (zone_) Literal(zone_, ast_value_factory_->NewNull(), pos, id_gen_);
3310 Literal* lit =
new (zone_)
3311 Literal(zone_, ast_value_factory_->NewUndefined(), pos, id_gen_);
3316 Literal* lit =
new (zone_)
3317 Literal(zone_, ast_value_factory_->NewTheHole(), pos, id_gen_);
3324 int boilerplate_properties,
3327 ObjectLiteral* lit =
new (zone_)
3328 ObjectLiteral(zone_, properties, literal_index, boilerplate_properties,
3329 has_function, pos, id_gen_);
3336 return new (zone_) ObjectLiteral::Property(zone_, ast_value_factory_, key,
3341 FunctionLiteral* value,
3342 int pos,
bool is_static) {
3343 ObjectLiteral::Property* prop =
3344 new (zone_) ObjectLiteral::Property(zone_, is_getter, value, is_static);
3345 prop->set_key(NewStringLiteral(value->raw_name(), pos));
3353 RegExpLiteral* lit =
new (zone_)
3354 RegExpLiteral(zone_, pattern,
flags, literal_index, pos, id_gen_);
3362 new (zone_) ArrayLiteral(zone_, values, literal_index, pos, id_gen_);
3368 VariableProxy* proxy =
new (zone_) VariableProxy(zone_, var, pos, id_gen_);
3376 VariableProxy* proxy =
new (zone_)
3377 VariableProxy(zone_,
name, is_this, interface, position, id_gen_);
3382 Property* prop =
new (zone_) Property(zone_, obj, key, pos, id_gen_);
3389 Call* call =
new (zone_) Call(zone_, expression, arguments, pos, id_gen_);
3397 new (zone_) CallNew(zone_, expression, arguments, pos, id_gen_);
3406 new (zone_) CallRuntime(zone_,
name,
function, arguments, pos, id_gen_);
3413 UnaryOperation* node =
3414 new (zone_) UnaryOperation(zone_, op, expression, pos, id_gen_);
3422 BinaryOperation* node =
3423 new (zone_) BinaryOperation(zone_, op, left, right, pos, id_gen_);
3431 CountOperation* node =
3432 new (zone_) CountOperation(zone_, op, is_prefix, expr, pos, id_gen_);
3440 CompareOperation* node =
3441 new (zone_) CompareOperation(zone_, op, left, right, pos, id_gen_);
3449 Conditional* cond =
new (zone_) Conditional(
3450 zone_, condition, then_expression, else_expression, position, id_gen_);
3458 Assignment* assign =
3459 new (zone_) Assignment(zone_, op, target, value, pos, id_gen_);
3460 assign->Init(zone_,
this);
3466 Yield::Kind yield_kind,
3468 if (!expression) expression = NewUndefinedLiteral(pos);
3469 Yield* yield =
new (zone_)
3470 Yield(zone_, generator_object, expression, yield_kind, pos, id_gen_);
3475 Throw* t =
new (zone_)
Throw(zone_, exception, pos, id_gen_);
3482 int expected_property_count,
int handler_count,
int parameter_count,
3484 FunctionLiteral::FunctionType function_type,
3485 FunctionLiteral::IsFunctionFlag is_function,
3486 FunctionLiteral::IsParenthesizedFlag is_parenthesized,
FunctionKind kind,
3488 FunctionLiteral* lit =
new (zone_) FunctionLiteral(
3489 zone_,
name, ast_value_factory, scope, body, materialized_literal_count,
3490 expected_property_count, handler_count, parameter_count, function_type,
3494 if (is_function == FunctionLiteral::kIsFunction) {
3495 visitor_.VisitFunctionLiteral(lit);
3504 ClassLiteral* lit =
new (zone_) ClassLiteral(
3505 zone_,
name, extends, constructor, properties, position, id_gen_);
3512 NativeFunctionLiteral* lit =
3513 new (zone_) NativeFunctionLiteral(zone_,
name, extension, pos, id_gen_);
3518 ThisFunction* fun =
new (zone_) ThisFunction(zone_, pos, id_gen_);
3523 SuperReference* super =
3524 new (zone_) SuperReference(zone_, this_var, pos, id_gen_);
3528 #undef VISIT_AND_RETURN
#define DEF_FORWARD_DECLARATION(type)
#define DECLARE_TYPE_ENUM(type)
#define VISIT_AND_RETURN(NodeType, node)
#define STATEMENT_WITH_LABELS(NodeType)
#define DECLARE_NODE_TYPE(type)
#define MAKE_ASTYPE(Name)
#define DECLARE_NODE_FUNCTIONS(type)
The superclass of all JavaScript values and objects.
int ReserveIdRange(int n)
virtual NodeType node_type() const =0
virtual TargetCollector * AsTargetCollector()
static TypeFeedbackId reuse(BailoutId id)
virtual MaterializedLiteral * AsMaterializedLiteral()
virtual void Accept(AstVisitor *v)=0
virtual IterationStatement * AsIterationStatement()
virtual BreakableStatement * AsBreakableStatement()
Handle< String > string() const
NativeFunctionLiteral * NewNativeFunctionLiteral(const AstRawString *name, v8::Extension *extension, int pos)
ModuleUrl * NewModuleUrl(Handle< String > url, int pos)
BailoutReason dont_optimize_reason()
CountOperation * NewCountOperation(Token::Value op, bool is_prefix, Expression *expr, int pos)
Yield * NewYield(Expression *generator_object, Expression *expression, Yield::Kind yield_kind, int pos)
void set_dont_crankshaft_reason(BailoutReason reason)
virtual void VisitStatements(ZoneList< Statement * > *statements)
UnaryOperation * NewUnaryOperation(Token::Value op, Expression *expression, int pos)
CallNew * NewCallNew(Expression *expression, ZoneList< Expression * > *arguments, int pos)
AstProperties properties_
ModuleStatement * NewModuleStatement(VariableProxy *proxy, Block *body, int pos)
void increase_node_count()
ArrayLiteral * NewArrayLiteral(ZoneList< Expression * > *values, int literal_index, int pos)
ZoneList< CharacterRange > * ranges_
ModuleDeclaration * NewModuleDeclaration(VariableProxy *proxy, Module *module, Scope *scope, int pos)
ModuleVariable * NewModuleVariable(VariableProxy *proxy, int pos)
virtual void VisitDeclarations(ZoneList< Declaration * > *declarations)
ObjectLiteral::Property * NewObjectLiteralProperty(bool is_getter, FunctionLiteral *value, int pos, bool is_static)
VariableProxy * NewVariableProxy(const AstRawString *name, bool is_this, Interface *interface=Interface::NewValue(), int position=RelocInfo::kNoPosition)
Literal * NewBooleanLiteral(bool b, int pos)
BailoutReason dont_turbofan_reason_
Literal * NewNullLiteral(int pos)
ZoneList< CharacterRange > * ranges(Zone *zone)
ContinueStatement * NewContinueStatement(IterationStatement *target, int pos)
TryCatchStatement * NewTryCatchStatement(int index, Block *try_block, Scope *scope, Variable *variable, Block *catch_block, int pos)
ReturnStatement * NewReturnStatement(Expression *expression, int pos)
Conditional * NewConditional(Expression *condition, Expression *then_expression, Expression *else_expression, int position)
CharacterSet(uc16 standard_set_type)
VariableDeclaration * NewVariableDeclaration(VariableProxy *proxy, VariableMode mode, Scope *scope, int pos)
Literal * NewTheHoleLiteral(int pos)
Literal * NewNumberLiteral(double number, int pos)
AstValueFactory * ast_value_factory_
WithStatement * NewWithStatement(Scope *scope, Expression *expression, Statement *statement, int pos)
CompareOperation * NewCompareOperation(Token::Value op, Expression *left, Expression *right, int pos)
void add_flag(AstPropertiesFlag flag)
IfStatement * NewIfStatement(Expression *condition, Statement *then_statement, Statement *else_statement, int pos)
Literal * NewStringListLiteral(ZoneList< const AstRawString * > *strings, int pos)
ThisFunction * NewThisFunction(int pos)
Literal * NewSmiLiteral(int number, int pos)
VariableProxy * NewVariableProxy(Variable *var, int pos=RelocInfo::kNoPosition)
CaseClause * NewCaseClause(Expression *label, ZoneList< Statement * > *statements, int pos)
ExportDeclaration * NewExportDeclaration(VariableProxy *proxy, Scope *scope, int pos)
ModuleLiteral * NewModuleLiteral(Block *body, Interface *interface, int pos)
void set_standard_set_type(uc16 special_set_type)
Literal * NewUndefinedLiteral(int pos)
BailoutReason dont_crankshaft_reason_
Throw * NewThrow(Expression *exception, int pos)
ObjectLiteral * NewObjectLiteral(ZoneList< ObjectLiteral::Property * > *properties, int literal_index, int boilerplate_properties, bool has_function, int pos)
CharacterSet(ZoneList< CharacterRange > *ranges)
ImportDeclaration * NewImportDeclaration(VariableProxy *proxy, Module *module, Scope *scope, int pos)
RegExpLiteral * NewRegExpLiteral(const AstRawString *pattern, const AstRawString *flags, int literal_index, int pos)
ModulePath * NewModulePath(Module *origin, const AstRawString *name, int pos)
int feedback_slots() const
Literal * NewStringLiteral(const AstRawString *string, int pos)
Assignment * NewAssignment(Token::Value op, Expression *target, Expression *value, int pos)
AstProperties * ast_properties()
AstNodeFactory(Zone *zone, AstValueFactory *ast_value_factory, AstNode::IdGen *id_gen)
EmptyStatement * NewEmptyStatement(int pos)
ClassLiteral * NewClassLiteral(const AstRawString *name, Expression *extends, Expression *constructor, ZoneList< ObjectLiteral::Property * > *properties, int position)
virtual void VisitExpressions(ZoneList< Expression * > *expressions)
Literal * NewSymbolLiteral(const char *name, int pos)
ExpressionStatement * NewExpressionStatement(Expression *expression, int pos)
BreakStatement * NewBreakStatement(BreakableStatement *target, int pos)
void increase_feedback_slots(int count)
Block * NewBlock(ZoneList< const AstRawString * > *labels, int capacity, bool is_initializer_block, int pos)
virtual void Visit(AstNode *node)=0
ObjectLiteral::Property * NewObjectLiteralProperty(Literal *key, Expression *value, bool is_static)
ForEachStatement * NewForEachStatement(ForEachStatement::VisitMode visit_mode, ZoneList< const AstRawString * > *labels, int pos)
void set_dont_turbofan_reason(BailoutReason reason)
TryFinallyStatement * NewTryFinallyStatement(int index, Block *try_block, Block *finally_block, int pos)
Call * NewCall(Expression *expression, ZoneList< Expression * > *arguments, int pos)
FunctionDeclaration * NewFunctionDeclaration(VariableProxy *proxy, VariableMode mode, FunctionLiteral *fun, Scope *scope, int pos)
void add_slot_node(FeedbackSlotInterface *slot_node)
DebuggerStatement * NewDebuggerStatement(int pos)
CallRuntime * NewCallRuntime(const AstRawString *name, const Runtime::Function *function, ZoneList< Expression * > *arguments, int pos)
SuperReference * NewSuperReference(VariableProxy *this_var, int pos)
void add_node_count(int count)
Property * NewProperty(Expression *obj, Expression *key, int pos)
FunctionLiteral * NewFunctionLiteral(const AstRawString *name, AstValueFactory *ast_value_factory, 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, FunctionKind kind, int position)
BinaryOperation * NewBinaryOperation(Token::Value op, Expression *left, Expression *right, int pos)
BailoutId EntryId() const
ZoneList< const AstRawString * > * labels_
ZoneList< const AstRawString * > * labels() const
BreakableStatement(Zone *zone, ZoneList< const AstRawString * > *labels, BreakableType breakable_type, int position, IdGen *id_gen)
virtual BreakableStatement * AsBreakableStatement() FINAL OVERRIDE
BreakableType breakable_type_
bool is_target_for_anonymous() const
const BailoutId entry_id_
Declaration(Zone *zone, VariableProxy *proxy, VariableMode mode, Scope *scope, int pos)
VariableMode mode() const
virtual InitializationFlag initialization() const =0
VariableProxy * proxy() const
virtual bool IsInlineable() const
bool IsUndefinedLiteral(Isolate *isolate) const
byte to_boolean_types() const
virtual bool IsValidReferenceExpression() const
bool is_parenthesized() const
virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle *oracle)
void increase_parenthesization_level()
TypeFeedbackId test_id() const
void set_to_boolean_types(byte types)
unsigned parenthesization_level_
virtual KeyedAccessStoreMode GetStoreMode()
virtual bool ToBooleanIsFalse() const
virtual bool ResultOverwriteAllowed() const
void set_bounds(Bounds bounds)
virtual bool IsMonomorphic()
virtual bool IsPropertyName() const
virtual SmallMapList * GetReceiverTypes()
bool IsStringLiteral() const
const TypeFeedbackId test_id_
unsigned parenthesization_level() const
virtual bool ToBooleanIsTrue() const
bool IsNullLiteral() const
bool IsSmiLiteral() const
Expression(Zone *zone, int pos, IdGen *id_gen)
Source to read snapshot and builtins files from.
Handle< SharedFunctionInfo > shared_info_
void set_function_token_position(int pos)
ZoneList< Statement * > * body_
int expected_property_count()
ArrayLiteral(Zone *zone, ZoneList< Expression * > *values, int literal_index, int pos, IdGen *id_gen)
Handle< AllocationSite > allocation_site() const
const AstValue * raw_value() const
ClassLiteral(Zone *zone, const AstRawString *name, Expression *extends, Expression *constructor, ZoneList< Property * > *properties, int position, IdGen *id_gen)
ThisFunction(Zone *zone, int pos, IdGen *id_gen)
Handle< String > ToString()
Expression * value() const
void BindTo(Variable *var)
Handle< Map > GetReceiverType()
TypeFeedbackId CompareId()
Variable * loop_variable_
virtual int max_match() OVERRIDE
BailoutReason dont_optimize_reason_
static RegExpNode * ToNode(int min, int max, bool is_greedy, RegExpTree *body, RegExpCompiler *compiler, RegExpNode *on_success, bool not_at_start=false)
Block(Zone *zone, ZoneList< const AstRawString * > *labels, int capacity, bool is_initializer_block, int pos, IdGen *id_gen)
int yield_first_feedback_slot_
Handle< JSFunction > target_
ImportDeclaration(Zone *zone, VariableProxy *proxy, Module *module, Scope *scope, int pos)
bool has_duplicate_parameters()
Handle< AllocationSite > allocation_site()
bool is_expression() const
Expression * left() const
RegExpCapture(RegExpTree *body, int index)
virtual bool ToBooleanIsFalse() const OVERRIDE
int PropertyFeedbackSlot() const
RegExpQuantifier(int min, int max, QuantifierType type, RegExpTree *body)
TypeFeedbackId LiteralFeedbackId() const
bool may_have_function_literal() const
TypeFeedbackId CallRuntimeFeedbackId() const
VariableDeclaration(Zone *zone, VariableProxy *proxy, VariableMode mode, Scope *scope, int pos)
ObjectLiteralProperty(Zone *zone, bool is_getter, FunctionLiteral *value, bool is_static)
RegExpDisjunction(ZoneList< RegExpTree * > *alternatives)
Vector< const uc16 > data()
ContinueStatement(Zone *zone, IterationStatement *target, int pos)
Expression * condition() const
virtual RegExpCharacterClass * AsCharacterClass() OVERRIDE
Conditional(Zone *zone, Expression *condition, Expression *then_expression, Expression *else_expression, int position, IdGen *id_gen)
bool IsCompileTimeValue()
Expression * else_expression_
int length() const
The number of Latin-1 characters in the string.
CaseClause(Zone *zone, Expression *label, ZoneList< Statement * > *statements, int pos, IdGen *id_gen)
ZoneList< CaseClause * > * cases() const
Expression * iterable() const
bool is_initializer_block_
void set_fixed_right_arg(Maybe< int > arg)
Expression * extends() const
ForOfStatement(Zone *zone, ZoneList< const AstRawString * > *labels, int pos, IdGen *id_gen)
bool IsLiteralCompareUndefined(Expression **expr, Isolate *isolate)
v8::Extension * extension() const
static bool Match(void *literal1, void *literal2)
void set_may_have_function_literal(bool value)
AstProperties ast_properties_
void Reserve(int capacity, Zone *zone)
int VariableFeedbackSlot()
Statement * else_statement_
const BailoutId prepare_id_
virtual void RecordToBooleanTypeFeedback(TypeFeedbackOracle *oracle) OVERRIDE
CallRuntime(Zone *zone, const AstRawString *name, const Runtime::Function *function, ZoneList< Expression * > *arguments, int pos, IdGen *id_gen)
const BailoutId debugger_id_
bool may_have_function_literal_
CallNew(Zone *zone, Expression *expression, ZoneList< Expression * > *arguments, int pos, IdGen *id_gen)
SmallPointerList< Map * > list_
const AstRawString * AsRawPropertyName()
void AddElement(TextElement elm, Zone *zone)
virtual TargetCollector * AsTargetCollector() OVERRIDE
BailoutId MaterializeFalseId()
ModuleStatement(Zone *zone, VariableProxy *proxy, Block *body, int pos)
virtual RegExpCapture * AsCapture() OVERRIDE
bool AllowsLazyCompilationWithoutContext()
void set_inferred_name(Handle< String > inferred_name)
CountOperation(Zone *zone, Token::Value op, bool is_prefix, Expression *expr, int pos, IdGen *id_gen)
ZoneList< RegExpTree * > * alternatives_
Expression * then_expression() const
SmallMapList receiver_types_
Statement * then_statement_
ZoneList< Expression * > * arguments_
IterationStatement * target_
Handle< String > inferred_name_
Expression * assign_each() const
ZoneList< Expression * > * values() const
virtual InitializationFlag initialization() const OVERRIDE
ZoneList< Statement * > * statements() const
virtual RegExpBackReference * AsBackReference() OVERRIDE
int expected_property_count_
const TypeFeedbackId count_id_
int KeyedLoadFeedbackSlot()
int CallRuntimeFeedbackSlot()
void set_ast_properties(AstProperties *ast_properties)
TypeFeedbackId CountStoreFeedbackId() const
BailoutId DeclsId() const
TypeFeedbackId HomeObjectFeedbackId()
virtual RegExpAssertion * AsAssertion() OVERRIDE
RegExpCapture * capture()
BailoutId GetIdForElement(int i)
const BailoutId back_edge_id_
bool is_jsruntime() const
TypeFeedbackId BinaryOperationFeedbackId() const
VariableProxy(Zone *zone, const AstRawString *name, bool is_this, Interface *interface, int position, IdGen *id_gen)
const AstRawString * flags_
virtual RegExpText * AsText() OVERRIDE
virtual bool IsInlineable() const OVERRIDE
virtual RegExpEmpty * AsEmpty() OVERRIDE
int callruntime_feedback_slot_
virtual void Accept(AstVisitor *v) OVERRIDE
static RegExpNode * ToNode(RegExpTree *body, int index, RegExpCompiler *compiler, RegExpNode *on_success)
int CallFeedbackSlot() const
bool HasCallFeedbackSlot() const
BinaryOperation(Zone *zone, Token::Value op, Expression *left, Expression *right, int pos, IdGen *id_gen)
WhileStatement(Zone *zone, ZoneList< const AstRawString * > *labels, int pos, IdGen *id_gen)
BailoutId MaterializeTrueId()
Handle< AllocationSite > allocation_site_
ZoneList< Statement * > * statements()
ZoneList< Property * > * properties_
Expression * result_done_
virtual NodeType node_type() const OVERRIDE
int AllocationSiteFeedbackSlot()
int function_token_position() const
int materialized_literal_count_
bool has_function() const
Handle< Object > value() const
TryFinallyStatement(Zone *zone, int index, Block *try_block, Block *finally_block, int pos)
Handle< SharedFunctionInfo > shared_info()
const BailoutId materialize_false_id_
void set_is_string_access(bool b)
BailoutId RightId() const
BailoutId EntryId() const
Expression * constructor_
void Add(Handle< Map > handle, Zone *zone)
Yield(Zone *zone, Expression *generator_object, Expression *expression, Kind yield_kind, int pos, IdGen *id_gen)
const TypeFeedbackId compare_id_
ForStatement(Zone *zone, ZoneList< const AstRawString * > *labels, int pos, IdGen *id_gen)
Expression * cond() const
RegExpBackReference(RegExpCapture *capture)
static int EndRegister(int index)
virtual void * Accept(RegExpVisitor *visitor, void *data) OVERRIDE
virtual RegExpAlternative * AsAlternative() OVERRIDE
virtual RegExpNode * ToNode(RegExpCompiler *compiler, RegExpNode *on_success) OVERRIDE
QuantifierType quantifier_type_
const BailoutId continue_id_
TargetCollector(Zone *zone)
int property_feedback_slot_
CompareOperation(Zone *zone, Token::Value op, Expression *left, Expression *right, int pos, IdGen *id_gen)
Handle< Map > last() const
NativeFunctionLiteral(Zone *zone, const AstRawString *name, v8::Extension *extension, int pos, IdGen *id_gen)
ExportDeclaration(Zone *zone, VariableProxy *proxy, Scope *scope, int pos)
void InitializeSharedInfo(Handle< Code > code)
virtual SmallMapList * GetReceiverTypes() OVERRIDE
BailoutReason dont_optimize_reason()
const BailoutId right_id_
int CallNewFeedbackSlot()
virtual bool ToBooleanIsTrue() const OVERRIDE
Throw(Zone *zone, Expression *exception, int pos, IdGen *id_gen)
BailoutId BackEdgeId() const
v8::Extension * extension_
static bool IsBoilerplateProperty(Property *property)
const BailoutId assignment_id_
FunctionLiteral(Zone *zone, const AstRawString *name, AstValueFactory *ast_value_factory, 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, FunctionKind kind, int position, IdGen *id_gen)
Expression * assign_iterator() const
virtual bool IsJump() const OVERRIDE
void set_type(Type *type)
ZoneList< Statement * > * body() const
int function_token_position_
Expression * next_result() const
Expression * generator_object_
Vector< const uc16 > data_
virtual RegExpLookahead * AsLookahead() OVERRIDE
ObjectLiteralProperty(Zone *zone, AstValueFactory *ast_value_factory, Literal *key, Expression *value, bool is_static)
SmallMapList(int capacity, Zone *zone)
Expression * then_expression_
RegExpCharacterClass(uc16 type)
RegExpAssertion(AssertionType type)
Expression * assign_iterator_
void Init(Zone *zone, AstNodeFactory< Visitor > *factory)
VariableProxy(Zone *zone, Variable *var, int position, IdGen *id_gen)
void set_allocation_site(Handle< AllocationSite > site)
Handle< String > name() const
AssertionType assertion_type_
AstProperties::Flags * flags()
void set_raw_inferred_name(const AstString *raw_inferred_name)
int start_position() const
void set_scope(Scope *scope)
Expression * assign_each_
Statement * else_statement() const
ModuleUrl(Zone *zone, Handle< String > url, int pos)
RegExpLookahead(RegExpTree *body, bool is_positive, int capture_count, int capture_from)
const AstRawString * raw_name() const
BreakableStatement * target_
TypeFeedbackId CountBinOpFeedbackId() const
const AstRawString * name_
void set_key(Literal *key)
RegExpAtom(Vector< const uc16 > data)
ZoneList< CaseClause * > * cases_
ModulePath(Zone *zone, Module *module, const AstRawString *name, int pos)
AssertionType assertion_type()
ModuleVariable(Zone *zone, VariableProxy *proxy, int pos)
Expression * expression() const
ZoneList< Statement * > statements_
ModuleDeclaration(Zone *zone, VariableProxy *proxy, Module *module, Scope *scope, int pos)
TypeFeedbackId PropertyFeedbackId()
Assignment(Zone *zone, Token::Value op, Expression *target, Expression *value, int pos, IdGen *id_gen)
void set_loop_variable(Variable *var)
void set_compare_type(Type *type)
bool known_global_function() const
static int StartRegister(int index)
virtual bool IsMonomorphic() OVERRIDE
Interface * interface() const
virtual int min_match() OVERRIDE
SwitchStatement(Zone *zone, ZoneList< const AstRawString * > *labels, int pos, IdGen *id_gen)
Statement * statement() const
virtual KeyedAccessStoreMode GetStoreMode() OVERRIDE
BailoutId AssignmentId() const
CallType GetCallType(Isolate *isolate) const
RegExpLiteral(Zone *zone, const AstRawString *pattern, const AstRawString *flags, int literal_index, int pos, IdGen *id_gen)
const BailoutId return_id_
virtual void AppendToText(RegExpText *text, Zone *zone) OVERRIDE
CharacterSet character_set()
KeyedAccessStoreMode store_mode_
RegExpCharacterClass(ZoneList< CharacterRange > *ranges, bool is_negated)
bool IsLiteralCompareNull(Expression **expr)
DISALLOW_COPY_AND_ASSIGN(SmallMapList)
ZoneList< Label * > targets_
Expression * label() const
ZoneList< Label * > * targets()
bool ComputeGlobalTarget(Handle< GlobalObject > global, LookupIterator *it)
ReturnStatement(Zone *zone, Expression *expression, int pos)
void set_allocation_site(Handle< AllocationSite > allocation_site)
Handle< JSFunction > target() const
ZoneList< TextElement > elements_
Handle< String > inferred_name() const
Handle< String > debug_name() const
bool HasElseStatement() const
Expression * constructor() const
const BailoutId first_element_id_
virtual BailoutId StackCheckId() const OVERRIDE
ZoneList< RegExpTree * > * nodes()
virtual RegExpAtom * AsAtom() OVERRIDE
BinaryOperation * binary_operation() const
static int feedback_slots()
void set_combined_type(Type *type)
void FilterForPossibleTransitions(Map *root_map)
Call(Zone *zone, Expression *expression, ZoneList< Expression * > *arguments, int pos, IdGen *id_gen)
Maybe< int > fixed_right_arg() const
virtual RegExpQuantifier * AsQuantifier() OVERRIDE
bool HasNoTypeInformation()
DoWhileStatement(Zone *zone, ZoneList< const AstRawString * > *labels, int pos, IdGen *id_gen)
void AddTarget(Label *target, Zone *zone)
WithStatement(Zone *zone, Scope *scope, Expression *expression, Statement *statement, int pos)
Token::Value binary_op() const
ObjectLiteralProperty Property
int materialized_literal_count()
bool is_anonymous() const
StrictMode strict_mode() const
Type * combined_type() const
const BailoutId decls_id_
Expression * else_expression() const
virtual RegExpDisjunction * AsDisjunction() OVERRIDE
void BuildConstantElements(Isolate *isolate)
bool is_standard(Zone *zone)
IfStatement(Zone *zone, Expression *condition, Statement *then_statement, Statement *else_statement, int pos, IdGen *id_gen)
ZoneList< Statement * > * statements_
BreakStatement(Zone *zone, BreakableStatement *target, int pos)
TypeFeedbackId AssignmentFeedbackId()
ZoneList< Expression * > * arguments() const
bool is_initializer_block() const
bool may_store_doubles() const
ExpressionStatement(Zone *zone, Expression *expression, int pos)
int callnew_feedback_slot_
static RegExpEmpty * GetInstance()
Literal(Zone *zone, const AstValue *value, int position, IdGen *id_gen)
Handle< String > AsPropertyName()
ForInType for_in_type() const
const BailoutId materialize_true_id_
Handle< FixedArray > constant_elements_
VariableProxy * this_var_
void set_dont_optimize_reason(BailoutReason reason)
ZoneList< Expression * > * values_
Handle< FixedArray > constant_properties_
Maybe< int > fixed_right_arg_
ZoneList< CharacterRange > * ranges(Zone *zone)
virtual int ComputeFeedbackSlotCount()
void set_emit_store(bool emit_store)
ZoneList< RegExpTree * > * alternatives()
TypeFeedbackId CompareOperationFeedbackId() const
ForInStatement(Zone *zone, ZoneList< const AstRawString * > *labels, int pos, IdGen *id_gen)
int variable_feedback_slot_
void set_store_mode(KeyedAccessStoreMode mode)
SuperReference(Zone *zone, VariableProxy *this_var, int pos, IdGen *id_gen)
Handle< Map > first() const
void RecordTypeFeedback(TypeFeedbackOracle *oracle)
ModuleLiteral(Zone *zone, Block *body, Interface *interface, int pos)
Handle< Map > at(int i) const
const BailoutId entry_id_
Expression * target() const
bool IsLiteralCompareTypeof(Expression **expr, Handle< String > *check)
DebuggerStatement(Zone *zone, int pos, IdGen *id_gen)
bool IsStringAccess() const
Handle< Map > receiver_type_
ZoneList< Property * > * properties() const
Statement * then_statement() const
Variable * loop_variable()
BailoutId PrepareId() const
Expression * right() const
BinaryOperation * binary_operation_
UnaryOperation(Zone *zone, Token::Value op, Expression *expression, int pos, IdGen *id_gen)
virtual void SetFirstFeedbackSlot(int slot)
bool AllowsLazyCompilation()
Expression * next_result_
void AddMapIfMissing(Handle< Map > map, Zone *zone)
ZoneList< TextElement > * elements()
const AstString * raw_inferred_name_
BailoutId ReturnId() const
Handle< String > flags() const
virtual BailoutId ContinueId() const OVERRIDE
void BuildConstantProperties(Isolate *isolate)
int for_in_feedback_slot_
ObjectLiteral(Zone *zone, ZoneList< Property * > *properties, int literal_index, int boilerplate_properties, bool has_function, int pos, IdGen *id_gen)
ZoneList< RegExpTree * > * nodes_
void set_index(int index)
TryCatchStatement(Zone *zone, int index, Block *try_block, Scope *scope, Variable *variable, Block *catch_block, int pos)
void CalculateEmitStore(Zone *zone)
const Runtime::Function * function_
int boilerplate_properties_
RegExpAlternative(ZoneList< RegExpTree * > *nodes)
Handle< JSFunction > target()
void set_target(Handle< JSFunction > target)
bool IsUsingCallFeedbackSlot(Isolate *isolate) const
const AstRawString * raw_name_
Property(Zone *zone, Expression *obj, Expression *key, int pos, IdGen *id_gen)
const AstRawString * pattern_
Expression * result_done() const
EmptyStatement(Zone *zone, int pos)
bool fast_elements() const
void set_is_uninitialized(bool b)
Expression * generator_object() const
Block * catch_block() const
void set_for_in_type(ForInType type)
virtual void SetFirstFeedbackSlot(int slot)=0
virtual int ComputeFeedbackSlotCount()=0
void Initialize(Expression *each, Expression *subject, Statement *body)
Expression * each() const
ForEachStatement(Zone *zone, ZoneList< const AstRawString * > *labels, int pos, IdGen *id_gen)
Expression * subject() const
static Handle< T > cast(Handle< S > that)
static Interface * NewValue()
virtual IterationStatement * AsIterationStatement() FINAL OVERRIDE
IterationStatement(Zone *zone, ZoneList< const AstRawString * > *labels, int pos, IdGen *id_gen)
void Initialize(Statement *body)
BailoutId OsrEntryId() const
virtual BailoutId ContinueId() const =0
const BailoutId osr_entry_id_
Label * continue_target()
virtual BailoutId StackCheckId() const =0
virtual bool IsJump() const FINAL OVERRIDE
JumpStatement(Zone *zone, int pos)
static MaybeHandle< Map > TryUpdate(Handle< Map > map) WARN_UNUSED_RESULT
friend class ArrayLiteral
void set_depth(int depth)
Handle< Object > GetBoilerplateValue(Expression *expression, Isolate *isolate)
virtual MaterializedLiteral * AsMaterializedLiteral()
void set_is_simple(bool is_simple)
void BuildConstants(Isolate *isolate)
MaterializedLiteral(Zone *zone, int literal_index, int pos, IdGen *id_gen)
friend class ObjectLiteral
Module(Zone *zone, int pos)
Interface * interface() const
Module(Zone *zone, Interface *interface, int pos, Block *body=NULL)
OStream & Print(OStream &os, Zone *zone)
virtual void * Accept(RegExpVisitor *visitor, void *data)=0
virtual bool IsAnchoredAtStart()
virtual bool IsAnchoredAtEnd()
virtual int min_match()=0
virtual void AppendToText(RegExpText *text, Zone *zone)
static const int kInfinity
virtual RegExpNode * ToNode(RegExpCompiler *compiler, RegExpNode *on_success)=0
virtual Interval CaptureRegisters()
virtual int max_match()=0
virtual bool IsTextElement()
static const int kNoPosition
Statement(Zone *zone, int position)
virtual bool IsJump() const
bool Equals(String *other)
static bool IsCompareOp(Value op)
static bool IsBinaryOp(Value op)
static bool IsUnaryOp(Value op)
static bool IsAssignmentOp(Value tok)
void set_escaping_targets(ZoneList< Label * > *targets)
ZoneList< Label * > * escaping_targets_
ZoneList< Label * > * escaping_targets() const
TryStatement(Zone *zone, int index, Block *try_block, int pos)
Block * try_block() const
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS 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 enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions true
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS 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_BOOL(enable_always_align_csp
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS 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 enable alignment of csp to bytes on platforms which prefer the register to always be NULL
#define FOR_EACH_REG_EXP_TREE_TYPE(VISIT)
#define DCHECK(condition)
#define DCHECK_EQ(v1, v2)
bool IsValidFunctionKind(FunctionKind kind)
bool IsArrowFunction(FunctionKind kind)
kFeedbackVectorOffset kHiddenPrototypeBit kReadOnlyPrototypeBit kDoNotCacheBit kIsTopLevelBit kAllowLazyCompilationWithoutContext has_duplicate_parameters
ZoneList< Handle< String > > ZoneStringList
static int min(int a, int b)
bool IsDeclaredVariableMode(VariableMode mode)
bool IsGeneratorFunction(FunctionKind kind)
bool IsConciseMethod(FunctionKind kind)
Handle< T > handle(T *t, Isolate *isolate)
ZoneList< Handle< Object > > ZoneObjectList
kFeedbackVectorOffset flag
Debugger support for the V8 JavaScript engine.
static Handle< Value > Throw(Isolate *isolate, const char *message)