63 #define DECLARATION_NODE_LIST(V) \
64 V(VariableDeclaration) \
65 V(FunctionDeclaration) \
66 V(ModuleDeclaration) \
67 V(ImportDeclaration) \
68 V(ExportDeclaration) \
70 #define MODULE_NODE_LIST(V) \
76 #define STATEMENT_NODE_LIST(V) \
78 V(ExpressionStatement) \
81 V(ContinueStatement) \
90 V(TryCatchStatement) \
91 V(TryFinallyStatement) \
94 #define EXPRESSION_NODE_LIST(V) \
96 V(SharedFunctionInfoLiteral) \
112 V(CompareOperation) \
115 #define AST_NODE_LIST(V) \
116 DECLARATION_NODE_LIST(V) \
117 MODULE_NODE_LIST(V) \
118 STATEMENT_NODE_LIST(V) \
119 EXPRESSION_NODE_LIST(V)
122 class AstConstructionVisitor;
148 #define DEF_FORWARD_DECLARATION(type) class type;
150 #undef DEF_FORWARD_DECLARATION
159 #define DECLARE_NODE_TYPE(type) \
160 virtual void Accept(AstVisitor* v); \
161 virtual AstNode::Type node_type() const { return AstNode::k##type; } \
162 template<class> friend class AstNodeFactory;
192 #define DECLARE_TYPE_ENUM(type) k##type,
197 #undef DECLARE_TYPE_ENUM
199 void*
operator new(
size_t size,
Zone* zone) {
200 return zone->New(static_cast<int>(size));
207 virtual void Accept(AstVisitor* v) = 0;
211 #define DECLARE_NODE_FUNCTIONS(type) \
212 bool Is##type() { return node_type() == AstNode::k##type; } \
213 type* As##type() { return Is##type() ? reinterpret_cast<type*>(this) : NULL; }
215 #undef DECLARE_NODE_FUNCTIONS
228 int tmp = isolate->ast_node_id();
229 isolate->set_ast_node_id(tmp + n);
242 void*
operator new(
size_t size);
267 void Reserve(
int capacity,
Zone* zone) { list_.Reserve(capacity, zone); }
272 int length()
const {
return list_.length(); }
331 bool IsStringLiteral();
334 bool IsNullLiteral();
370 TARGET_FOR_NAMED_ONLY
395 ASSERT(labels ==
NULL || labels->length() > 0);
413 statements_.Add(statement, zone);
426 bool is_initializer_block,
429 statements_(capacity, zone),
430 is_initializer_block_(is_initializer_block),
436 bool is_initializer_block_;
447 virtual bool IsInlineable()
const;
493 virtual bool IsInlineable()
const;
516 Module* module()
const {
return module_; }
538 Module* module()
const {
return module_; }
577 : interface_(
Interface::NewModule(zone)),
580 : interface_(interface),
616 Module* module()
const {
return module_; }
640 :
Module(zone), url_(url) {
656 virtual BailoutId ContinueId()
const = 0;
657 virtual BailoutId StackCheckId()
const = 0;
675 Label continue_target_;
704 condition_position_(-1),
711 int condition_position_;
728 return may_have_function_literal_;
731 may_have_function_literal_ = value;
742 may_have_function_literal_(
true),
749 bool may_have_function_literal_;
773 return may_have_function_literal_;
776 may_have_function_literal_ = value;
793 may_have_function_literal_(
true),
794 loop_variable_(
NULL),
804 bool may_have_function_literal_;
818 enumerable_ = enumerable;
857 : expression_(expression) { }
872 : target_(target) { }
887 : target_(target) { }
902 : expression_(expression) { }
918 : expression_(expression),
919 statement_(statement) { }
936 CHECK(!is_default());
960 enum CompareTypeFeedback {
967 CompareTypeFeedback compare_type_;
968 const TypeFeedbackId compare_id_;
969 const BailoutId entry_id_;
1006 bool HasThenStatement()
const {
return !then_statement()->IsEmpty(); }
1022 : condition_(condition),
1023 then_statement_(then_statement),
1024 else_statement_(else_statement),
1049 void AddTarget(Label* target,
Zone* zone);
1066 escaping_targets_ = targets;
1076 try_block_(try_block),
1077 escaping_targets_(
NULL) { }
1104 variable_(variable),
1105 catch_block_(catch_block) {
1111 Block* catch_block_;
1119 Block* finally_block()
const {
return finally_block_; }
1124 finally_block_(finally_block) { }
1127 Block* finally_block_;
1153 virtual
bool IsPropertyName() {
1154 if (handle_->IsSymbol()) {
1162 ASSERT(IsPropertyName());
1171 ASSERT(!handle_.is_null());
1172 return handle_->IsNull();
1175 ASSERT(!handle_.is_null());
1176 return handle_->IsTrue();
1179 ASSERT(!handle_.is_null());
1180 return handle_->IsFalse();
1187 uint32_t
Hash() {
return ToString()->Hash(); }
1189 static bool Match(
void* literal1,
void* literal2) {
1192 return s1->Equals(*s2);
1228 literal_index_(literal_index),
1229 is_simple_(is_simple),
1267 bool IsCompileTimeValue();
1269 void set_emit_store(
bool emit_store);
1289 return constant_properties_;
1300 void CalculateEmitStore(
Zone* zone);
1305 kHasFunction = 1 << 1
1324 constant_properties_(constant_properties),
1325 properties_(properties),
1326 fast_elements_(fast_elements),
1327 has_function_(has_function) {}
1332 bool fast_elements_;
1370 return BailoutId(first_element_id_.ToInt() + i);
1381 constant_elements_(constant_elements),
1396 virtual
bool IsValidLeftHandSide() {
1397 return var_ ==
NULL ?
true : var_->IsValidLeftHandSide();
1401 return !is_this() && name().is_identical_to(n);
1448 virtual
bool IsValidLeftHandSide() {
return true; }
1478 is_monomorphic_(
false),
1479 is_uninitialized_(
false),
1480 is_array_length_(
false),
1481 is_string_length_(
false),
1482 is_string_access_(
false),
1483 is_function_prototype_(
false) { }
1492 bool is_monomorphic_ : 1;
1493 bool is_uninitialized_ : 1;
1494 bool is_array_length_ : 1;
1495 bool is_string_length_ : 1;
1496 bool is_string_access_ : 1;
1497 bool is_function_prototype_ : 1;
1531 bool return_is_recorded_;
1540 expression_(expression),
1541 arguments_(arguments),
1543 is_monomorphic_(
false),
1552 bool is_monomorphic_;
1585 expression_(expression),
1586 arguments_(arguments),
1588 is_monomorphic_(
false),
1596 bool is_monomorphic_;
1625 function_(function),
1626 arguments_(arguments) { }
1639 virtual bool ResultOverwriteAllowed();
1657 expression_(expression),
1659 materialize_true_id_(
GetNextId(isolate)),
1660 materialize_false_id_(
GetNextId(isolate)) {
1680 virtual bool ResultOverwriteAllowed();
1721 bool is_prefix()
const {
return is_prefix_; }
1751 is_prefix_(is_prefix),
1760 bool is_monomorphic_;
1786 bool IsLiteralCompareUndefined(
Expression** expr);
1787 bool IsLiteralCompareNull(
Expression** expr);
1800 compare_type_(
NONE) {
1810 enum CompareTypeFeedback {
NONE, SMI_ONLY, OBJECT_ONLY };
1811 CompareTypeFeedback compare_type_;
1834 int then_expression_position,
1835 int else_expression_position)
1837 condition_(condition),
1838 then_expression_(then_expression),
1839 else_expression_(else_expression),
1840 then_expression_position_(then_expression_position),
1841 else_expression_position_(else_expression_position),
1849 int then_expression_position_;
1850 int else_expression_position_;
1888 template<
class Visitor>
1891 if (is_compound()) {
1893 factory->NewBinaryOperation(binary_op(), target_, value_, pos_ + 1);
1905 bool is_monomorphic_;
1919 :
Expression(isolate), exception_(exception), pos_(pos) {}
1936 kNoDuplicateParameters = 0,
1937 kHasDuplicateParameters = 1
1957 int start_position()
const;
1958 int end_position()
const;
1959 int SourceSize()
const {
return end_position() - start_position(); }
1969 return HasOnlySimpleThisPropertyAssignments::decode(bitfield_);
1972 return this_property_assignments_;
1976 bool AllowsLazyCompilation();
1977 bool AllowsLazyCompilationWithoutContext();
1980 if (name_->length() > 0)
return name_;
1981 return inferred_name();
1986 inferred_name_ = inferred_name;
1993 return HasDuplicateParameters::decode(bitfield_);
1996 bool is_function() {
return IsFunction::decode(bitfield_) == kIsFunction; }
2004 return IsParenthesized::decode(bitfield_) == kIsParenthesized;
2007 bitfield_ = IsParenthesized::update(bitfield_, kIsParenthesized);
2011 AstProperties::Flags*
flags() {
return ast_properties_.flags(); }
2013 ast_properties_ = *ast_properties;
2021 int materialized_literal_count,
2022 int expected_property_count,
2024 bool has_only_simple_this_property_assignments,
2026 int parameter_count,
2035 this_property_assignments_(this_property_assignments),
2036 inferred_name_(isolate->factory()->empty_string()),
2037 materialized_literal_count_(materialized_literal_count),
2038 expected_property_count_(expected_property_count),
2039 handler_count_(handler_count),
2040 parameter_count_(parameter_count),
2041 function_token_position_(RelocInfo::kNoPosition) {
2043 HasOnlySimpleThisPropertyAssignments::encode(
2044 has_only_simple_this_property_assignments) |
2045 IsExpression::encode(type != DECLARATION) |
2046 IsAnonymous::encode(type == ANONYMOUS_EXPRESSION) |
2047 Pretenure::encode(
false) |
2048 HasDuplicateParameters::encode(has_duplicate_parameters) |
2049 IsFunction::encode(is_function) |
2050 IsParenthesized::encode(is_parenthesized);
2059 AstProperties ast_properties_;
2061 int materialized_literal_count_;
2062 int expected_property_count_;
2064 int parameter_count_;
2065 int function_token_position_;
2068 class HasOnlySimpleThisPropertyAssignments:
public BitField<bool, 0, 1> {};
2069 class IsExpression:
public BitField<bool, 1, 1> {};
2070 class IsAnonymous:
public BitField<bool, 2, 1> {};
2071 class Pretenure:
public BitField<bool, 3, 1> {};
2072 class HasDuplicateParameters:
public BitField<ParameterFlag, 4, 1> {};
2073 class IsFunction:
public BitField<IsFunctionFlag, 5, 1> {};
2074 class IsParenthesized:
public BitField<IsParenthesizedFlag, 6, 1> {};
2083 return shared_function_info_;
2091 shared_function_info_(shared_function_info) { }
2106 #undef DECLARE_NODE_TYPE
2116 #define MAKE_CASE(Name) \
2117 virtual void* Visit##Name(RegExp##Name*, void* data) = 0;
2127 virtual void*
Accept(RegExpVisitor* visitor,
void* data) = 0;
2133 virtual int min_match() = 0;
2134 virtual int max_match() = 0;
2140 #define MAKE_ASTYPE(Name) \
2141 virtual RegExp##Name* As##Name(); \
2142 virtual bool Is##Name();
2151 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2155 virtual Interval CaptureRegisters();
2156 virtual bool IsDisjunction();
2157 virtual bool IsAnchoredAtStart();
2158 virtual bool IsAnchoredAtEnd();
2172 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2176 virtual Interval CaptureRegisters();
2177 virtual bool IsAlternative();
2178 virtual bool IsAnchoredAtStart();
2179 virtual bool IsAnchoredAtEnd();
2201 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2205 virtual bool IsAssertion();
2206 virtual bool IsAnchoredAtStart();
2207 virtual bool IsAnchoredAtEnd();
2220 standard_set_type_(standard_set_type) {}
2223 standard_set_type_(0) {}
2227 standard_set_type_ = special_set_type;
2235 uc16 standard_set_type_;
2243 is_negated_(is_negated) { }
2246 is_negated_(
false) { }
2247 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2251 virtual bool IsCharacterClass();
2259 bool is_standard(
Zone* zone);
2284 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2288 virtual bool IsAtom();
2303 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2307 virtual bool IsText();
2313 elements_.Add(elm, zone);
2325 enum Type { GREEDY, NON_GREEDY, POSSESSIVE };
2330 min_match_(min * body->min_match()),
2332 if (max > 0 && body->
max_match() > kInfinity / max) {
2333 max_match_ = kInfinity;
2338 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2347 bool not_at_start =
false);
2349 virtual Interval CaptureRegisters();
2350 virtual bool IsQuantifier();
2373 : body_(body), index_(index) { }
2374 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2382 virtual bool IsAnchoredAtStart();
2383 virtual bool IsAnchoredAtEnd();
2384 virtual Interval CaptureRegisters();
2385 virtual bool IsCapture();
2406 is_positive_(is_positive),
2407 capture_count_(capture_count),
2408 capture_from_(capture_from) { }
2410 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2414 virtual Interval CaptureRegisters();
2415 virtual bool IsLookahead();
2416 virtual bool IsAnchoredAtStart();
2435 : capture_(capture) { }
2436 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2440 virtual bool IsBackReference();
2443 int index() {
return capture_->index(); }
2453 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2457 virtual bool IsEmpty();
2495 bool CheckStackOverflow();
2504 #define DEF_VISIT(type) \
2505 virtual void Visit##type(type* node) = 0;
2514 bool stack_overflow_;
2531 #define DEF_VISIT(type) \
2532 void Visit##type(type* node);
2536 void increase_node_count() { properties_.add_node_count(1); }
2539 AstProperties properties_;
2546 #define DEF_VISIT(type) \
2547 void Visit##type(type* node) {}
2557 template<
class Visitor>
2561 : isolate_(isolate),
2566 #define VISIT_AND_RETURN(NodeType, node) \
2567 visitor_.Visit##NodeType((node)); \
2632 bool is_initializer_block) {
2634 isolate_, labels, capacity, is_initializer_block, zone_);
2638 #define STATEMENT_WITH_LABELS(NodeType) \
2639 NodeType* New##NodeType(ZoneStringList* labels) { \
2640 NodeType* stmt = new(zone_) NodeType(isolate_, labels); \
2641 VISIT_AND_RETURN(NodeType, stmt); \
2648 #undef STATEMENT_WITH_LABELS
2680 isolate_, condition, then_statement, else_statement);
2688 Block* catch_block) {
2690 index, try_block, scope, variable, catch_block);
2696 Block* finally_block) {
2717 return NewLiteral(isolate_->factory()->NewNumber(number,
TENURED));
2727 bool has_function) {
2729 isolate_, constant_properties, properties, literal_index,
2730 is_simple, fast_elements, depth, has_function);
2744 int literal_index) {
2746 new(zone_)
RegExpLiteral(isolate_, pattern, flags, literal_index);
2756 isolate_, constant_elements, values, literal_index, is_simple, depth);
2768 int position = RelocInfo::kNoPosition) {
2782 Call* call =
new(zone_)
Call(isolate_, expression, arguments, pos);
2789 CallNew* call =
new(zone_)
CallNew(isolate_, expression, arguments, pos);
2797 new(zone_)
CallRuntime(isolate_, name,
function, arguments);
2839 int then_expression_position,
2840 int else_expression_position) {
2842 isolate_, condition, then_expression, else_expression,
2843 then_expression_position, else_expression_position);
2852 new(zone_)
Assignment(isolate_, op, target, value, pos);
2853 assign->
Init(isolate_,
this);
2858 Throw* t =
new(zone_)
Throw(isolate_, exception, pos);
2866 int materialized_literal_count,
2867 int expected_property_count,
2869 bool has_only_simple_this_property_assignments,
2871 int parameter_count,
2877 isolate_, name, scope, body,
2878 materialized_literal_count, expected_property_count, handler_count,
2879 has_only_simple_this_property_assignments, this_property_assignments,
2880 parameter_count, type, has_duplicate_parameters, is_function,
2884 visitor_.VisitFunctionLiteral(lit);
2901 #undef VISIT_AND_RETURN
ZoneList< TextElement > * elements()
Block(Isolate *isolate, ZoneStringList *labels, int capacity, bool is_initializer_block, Zone *zone)
FunctionDeclaration * NewFunctionDeclaration(VariableProxy *proxy, VariableMode mode, FunctionLiteral *fun, Scope *scope)
virtual BailoutId StackCheckId() const
RegExpLiteral(Isolate *isolate, Handle< String > pattern, Handle< String > flags, int literal_index)
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit 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 SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available 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 MIPS FPU instructions if expose natives in global object expose gc extension number of stack frames to capture disable builtin natives files print a stack trace if an assertion failure occurs use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations prepare for turning on always opt minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions automatically set the debug break flag when debugger commands are in the queue always cause a debug break before aborting 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 more details following each garbage collection print amount of external allocated memory after each time it is adjusted flush code that we expect not to use again before full gc do incremental marking steps track object counts and memory usage use caching Perform compaction on every full GC Never perform compaction on full GC testing only Compact code space on full incremental collections Default seed for initializing random allows verbose printing trace parsing and preparsing Check icache flushes in ARM and MIPS simulator Stack alingment in bytes in print stack trace when throwing exceptions randomize hashes to avoid predictable hash Fixed seed to use to hash property activate a timer that switches between V8 threads testing_bool_flag float flag Seed used for threading test randomness A filename with extra code to be included in the Print usage including on console Map counters to a file Enable debugger compile events enable GDBJIT interface(disables compacting GC)") DEFINE_bool(gdbjit_full
virtual bool IsMonomorphic()
void set_condition_position(int pos)
virtual int position() const
TypeFeedbackId test_id() const
void set_may_have_function_literal(bool value)
Handle< JSGlobalPropertyCell > cell()
Handle< FixedArray > this_property_assignments()
ModuleVariable(VariableProxy *proxy)
#define FOR_EACH_REG_EXP_TREE_TYPE(VISIT)
Handle< Map > at(int i) const
Property(Isolate *isolate, Expression *obj, Expression *key, int pos)
virtual bool IsTextElement()
TryFinallyStatement(int index, Block *try_block, Block *finally_block)
Expression * right() const
int expected_property_count()
virtual int position() const
TypeFeedbackId CallNewFeedbackId() const
BailoutId PrepareId() const
ModulePath(Module *module, Handle< String > name, Zone *zone)
TypeFeedbackId CallFeedbackId() const
Expression * condition() const
Expression * left() const
virtual BailoutId ContinueId() const
Expression * cond() const
Block * try_block() const
virtual int position() const
void set_escaping_targets(ZoneList< Label * > *targets)
Handle< Map > GetMonomorphicReceiverType()
virtual int position() const
Call(Isolate *isolate, Expression *expression, ZoneList< Expression * > *arguments, int pos)
static String * cast(Object *obj)
TypeFeedbackId UnaryOperationFeedbackId() const
virtual void MarkAsStatement()
ModuleLiteral * NewModuleLiteral(Block *body, Interface *interface)
Block * NewBlock(ZoneStringList *labels, int capacity, bool is_initializer_block)
Handle< JSFunction > target()
RegExpLiteral * NewRegExpLiteral(Handle< String > pattern, Handle< String > flags, int literal_index)
Expression * expression() const
virtual bool IsMonomorphic()
Module(Interface *interface, Block *body=NULL)
CharacterSet character_set()
ZoneList< CharacterRange > * ranges(Zone *zone)
ForInStatement(Isolate *isolate, ZoneStringList *labels)
bool has_duplicate_parameters()
CallRuntime(Isolate *isolate, Handle< String > name, const Runtime::Function *function, ZoneList< Expression * > *arguments)
Handle< String > AsPropertyName()
ZoneList< Expression * > * arguments() const
virtual InitializationFlag initialization() const
static bool IsCompareOp(Value op)
static Handle< T > cast(Handle< S > that)
BreakStatement(BreakableStatement *target)
ExportDeclaration(VariableProxy *proxy, Scope *scope)
Expression * target() const
ExpressionStatement * NewExpressionStatement(Expression *expression)
static bool IsUnaryOp(Value op)
Handle< JSObject > holder()
ThisFunction(Isolate *isolate)
VariableDeclaration * NewVariableDeclaration(VariableProxy *proxy, VariableMode mode, Scope *scope)
BailoutId BackEdgeId() const
void set_standard_set_type(uc16 special_set_type)
virtual BailoutId ContinueId() const
bool is_expression() const
TypeFeedbackId CountBinOpFeedbackId() const
bool is_classic_mode() const
bool IsVariable(Handle< String > n)
virtual bool IsMonomorphic()
virtual bool IsTextElement()
virtual void Accept(AstVisitor *v)
ZoneList< Expression * > * arguments() const
ModuleUrl * NewModuleUrl(Handle< String > url)
virtual bool ResultOverwriteAllowed()
TypeFeedbackId PropertyFeedbackId()
SmallMapList(int capacity, Zone *zone)
virtual bool IsAnchoredAtEnd()
bool IsFunctionPrototype() const
unibrow::Mapping< unibrow::Ecma262Canonicalize > Canonicalize
VariableProxy * NewVariableProxy(Variable *var)
BailoutId AssignmentId() const
#define ASSERT(condition)
ZoneList< Label * > * escaping_targets() const
ForStatement(Isolate *isolate, ZoneStringList *labels)
ModuleDeclaration * NewModuleDeclaration(VariableProxy *proxy, Module *module, Scope *scope)
BailoutId RightId() const
virtual int position() const
void Init(Isolate *isolate, AstNodeFactory< Visitor > *factory)
Interface * interface() const
TryStatement(int index, Block *try_block)
bool has_only_simple_this_property_assignments()
Expression(Isolate *isolate)
ObjectLiteral(Isolate *isolate, Handle< FixedArray > constant_properties, ZoneList< Property * > *properties, int literal_index, bool is_simple, bool fast_elements, int depth, bool has_function)
TryCatchStatement(int index, Block *try_block, Scope *scope, Variable *variable, Block *catch_block)
virtual MaterializedLiteral * AsMaterializedLiteral()
bool HasElseStatement() const
virtual BailoutId ContinueId() const
Expression * enumerable() const
ZoneList< Statement * > * body() const
virtual Type node_type() const =0
void Initialize(Statement *body)
Label * continue_target()
bool may_have_function_literal() const
virtual bool IsValidLeftHandSide()
void Reserve(int capacity, Zone *zone)
Handle< String > debug_name() const
void set_loop_variable(Variable *var)
void ClearStackOverflow()
Handle< String > name() const
ArrayLiteral * NewArrayLiteral(Handle< FixedArray > constant_elements, ZoneList< Expression * > *values, int literal_index, bool is_simple, int depth)
ZoneList< Expression * > * values() const
BreakableStatement(Isolate *isolate, ZoneStringList *labels, Type type)
bool AsArrayIndex(uint32_t *index)
virtual bool ToBooleanIsTrue()
#define VISIT_AND_RETURN(NodeType, node)
Conditional(Isolate *isolate, Expression *condition, Expression *then_expression, Expression *else_expression, int then_expression_position, int else_expression_position)
CompareOperation * NewCompareOperation(Token::Value op, Expression *left, Expression *right, int pos)
#define DECLARE_TYPE_ENUM(type)
virtual SmallMapList * GetReceiverTypes()
RegExpCharacterClass(ZoneList< CharacterRange > *ranges, bool is_negated)
WhileStatement(Isolate *isolate, ZoneStringList *labels)
CharacterSet(uc16 standard_set_type)
Variable * loop_variable()
virtual bool IsTextElement()
CallNew(Isolate *isolate, Expression *expression, ZoneList< Expression * > *arguments, int pos)
virtual SmallMapList * GetReceiverTypes()
bool is_jsruntime() const
TypeFeedbackId CompareId()
Assignment * NewAssignment(Token::Value op, Expression *target, Expression *value, int pos)
ReturnStatement(Expression *expression)
ZoneList< Statement * > * statements() const
bool IsStringLength() const
static RegExpEmpty * GetInstance()
bool IsStringAccess() const
BailoutId ReturnId() const
static Interface * NewValue()
virtual Interval CaptureRegisters()
virtual BreakableStatement * AsBreakableStatement()
Expression * cond() const
MaterializedLiteral(Isolate *isolate, int literal_index, bool is_simple, int depth)
CheckType check_type() const
CharacterSet(ZoneList< CharacterRange > *ranges)
VariableProxy * proxy() const
IterationStatement(Isolate *isolate, ZoneStringList *labels)
ZoneList< Label * > * targets()
virtual BailoutId ContinueId() const
Throw * NewThrow(Expression *exception, int pos)
virtual MaterializedLiteral * AsMaterializedLiteral()
ObjectLiteral * NewObjectLiteral(Handle< FixedArray > constant_properties, ZoneList< ObjectLiteral::Property * > *properties, int literal_index, bool is_simple, bool fast_elements, int depth, bool has_function)
virtual BailoutId StackCheckId() const
virtual BreakableStatement * AsBreakableStatement()
virtual SmallMapList * GetReceiverTypes()
virtual bool IsTextElement()
TypeFeedbackId CountStoreFeedbackId() const
ModuleVariable * NewModuleVariable(VariableProxy *proxy)
FunctionDeclaration(VariableProxy *proxy, VariableMode mode, FunctionLiteral *fun, Scope *scope)
virtual Type node_type() const
int function_token_position() const
BinaryOperation * binary_operation() const
static int StartRegister(int index)
static bool IsAssignmentOp(Value tok)
void set_scope(Scope *scope)
RegExpLookahead(RegExpTree *body, bool is_positive, int capture_count, int capture_from)
Handle< String > flags() const
ZoneList< RegExpTree * > * alternatives()
BailoutId OsrEntryId() const
VariableProxy * NewVariableProxy(Handle< String > name, bool is_this, Interface *interface=Interface::NewValue(), int position=RelocInfo::kNoPosition)
void set_position(int pos)
UnaryOperation * NewUnaryOperation(Token::Value op, Expression *expression, int pos)
#define DISALLOW_COPY_AND_ASSIGN(TypeName)
Handle< String > inferred_name() const
virtual InitializationFlag initialization() const
ZoneList< Property * > * properties() const
BailoutId EntryId() const
BinaryOperation(Isolate *isolate, Token::Value op, Expression *left, Expression *right, int pos)
virtual TargetCollector * AsTargetCollector()
#define MAKE_ASTYPE(Name)
Handle< String > name() const
#define STATEMENT_WITH_LABELS(NodeType)
Statement * then_statement() const
TypeFeedbackId LiteralFeedbackId() const
Expression * expression() const
int materialized_literal_count()
Call * NewCall(Expression *expression, ZoneList< Expression * > *arguments, int pos)
BailoutId MaterializeTrueId()
virtual int position() const
ZoneList< Statement * > * statements()
FunctionLiteral * NewFunctionLiteral(Handle< String > name, Scope *scope, ZoneList< Statement * > *body, int materialized_literal_count, int expected_property_count, int handler_count, bool has_only_simple_this_property_assignments, Handle< FixedArray > this_property_assignments, int parameter_count, FunctionLiteral::ParameterFlag has_duplicate_parameters, FunctionLiteral::Type type, FunctionLiteral::IsFunctionFlag is_function, FunctionLiteral::IsParenthesizedFlag is_parenthesized)
UnaryOperation(Isolate *isolate, Token::Value op, Expression *expression, int pos)
EmptyStatement * NewEmptyStatement()
TypeFeedbackId CompareOperationFeedbackId() const
Expression * label() const
int then_expression_position() const
CallNew * NewCallNew(Expression *expression, ZoneList< Expression * > *arguments, int pos)
WithStatement * NewWithStatement(Expression *expression, Statement *statement)
RegExpCapture(RegExpTree *body, int index)
#define DECLARE_NODE_TYPE(type)
static int GetNextId(Isolate *isolate)
CompareOperation(Isolate *isolate, Token::Value op, Expression *left, Expression *right, int pos)
ReturnStatement * NewReturnStatement(Expression *expression)
Expression * cond() const
virtual bool IsPropertyName()
virtual int position() const
bool IsDeclaredVariableMode(VariableMode mode)
BailoutId GetIdForElement(int i)
Handle< Object > handle() const
activate correct semantics for inheriting readonliness false
TypeFeedbackId CallRuntimeFeedbackId() const
AstProperties * ast_properties()
int statement_pos() const
virtual int position() const
bool is_anonymous() const
ModuleUrl(Handle< String > url, Zone *zone)
virtual BailoutId StackCheckId() const
RegExpQuantifier(int min, int max, Type type, RegExpTree *body)
SharedFunctionInfoLiteral * NewSharedFunctionInfoLiteral(Handle< SharedFunctionInfo > shared_function_info)
static int ReserveIdRange(Isolate *isolate, int n)
BailoutId ReturnId() const
Statement * else_statement() const
Expression * left() const
ExpressionStatement(Expression *expression)
RegExpBackReference(RegExpCapture *capture)
virtual SmallMapList * GetReceiverTypes()
SwitchStatement(Isolate *isolate, ZoneStringList *labels)
BailoutId AssignmentId() const
Literal(Isolate *isolate, Handle< Object > handle)
static bool IsBinaryOp(Value op)
ModuleDeclaration(VariableProxy *proxy, Module *module, Scope *scope)
Conditional * NewConditional(Expression *condition, Expression *then_expression, Expression *else_expression, int then_expression_position, int else_expression_position)
bool is_target_for_anonymous() const
Handle< Map > GetReceiverType()
#define DEF_FORWARD_DECLARATION(type)
void set_statement_pos(int statement_pos)
Handle< Map > last() const
ThisFunction * NewThisFunction()
ObjectLiteral::Property * NewObjectLiteralProperty(bool is_getter, FunctionLiteral *value)
DoWhileStatement(Isolate *isolate, ZoneStringList *labels)
RegExpCapture * capture()
Statement * statement() const
Expression * value() const
Expression * right() const
virtual bool IsAnchoredAtStart()
Expression * then_expression() const
ModulePath * NewModulePath(Module *origin, Handle< String > name)
virtual bool ToBooleanIsFalse()
BailoutId MaterializeFalseId()
virtual bool IsMonomorphic()
bool HasStackOverflow() const
Declaration(VariableProxy *proxy, VariableMode mode, Scope *scope)
bool fast_elements() const
Vector< const uc16 > data()
ZoneList< Handle< Object > > ZoneObjectList
ArrayLiteral(Isolate *isolate, Handle< FixedArray > constant_elements, ZoneList< Expression * > *values, int literal_index, bool is_simple, int depth)
void set_ast_properties(AstProperties *ast_properties)
CountOperation * NewCountOperation(Token::Value op, bool is_prefix, Expression *expr, int pos)
Literal * NewLiteral(Handle< Object > handle)
Handle< String > name() const
TypeFeedbackId ForInFeedbackId() const
virtual bool ToBooleanIsFalse()
int else_expression_position() const
AstProperties::Flags * flags()
ZoneStringList * labels() const
RegExpAtom(Vector< const uc16 > data)
virtual BailoutId StackCheckId() const
#define DECLARE_NODE_FUNCTIONS(type)
Expression * else_expression() const
Interface * interface() const
virtual TargetCollector * AsTargetCollector()
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit 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 SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available 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 MIPS FPU instructions if NULL
virtual int position() const
CountOperation(Isolate *isolate, Token::Value op, bool is_prefix, Expression *expr, int pos)
bool is_initializer_block() const
ZoneList< Handle< String > > ZoneStringList
void add_node_count(int count)
Expression * expression() const
CallRuntime * NewCallRuntime(Handle< String > name, const Runtime::Function *function, ZoneList< Expression * > *arguments)
BailoutId EntryId() const
ImportDeclaration(VariableProxy *proxy, Module *module, Scope *scope)
virtual int position() const
FunctionLiteral(Isolate *isolate, Handle< String > name, Scope *scope, ZoneList< Statement * > *body, int materialized_literal_count, int expected_property_count, int handler_count, bool has_only_simple_this_property_assignments, Handle< FixedArray > this_property_assignments, int parameter_count, Type type, ParameterFlag has_duplicate_parameters, IsFunctionFlag is_function, IsParenthesizedFlag is_parenthesized)
static bool Match(void *literal1, void *literal2)
ZoneList< CaseClause * > * cases() const
TryFinallyStatement * NewTryFinallyStatement(int index, Block *try_block, Block *finally_block)
Block * catch_block() const
TargetCollector(Zone *zone)
virtual bool ToBooleanIsTrue()
DebuggerStatement * NewDebuggerStatement()
BreakStatement * NewBreakStatement(BreakableStatement *target)
Throw(Isolate *isolate, Expression *exception, int pos)
virtual IterationStatement * AsIterationStatement()
ContinueStatement * NewContinueStatement(IterationStatement *target)
void set_key(Literal *key)
static int EndRegister(int index)
SharedFunctionInfoLiteral(Isolate *isolate, Handle< SharedFunctionInfo > shared_function_info)
static TypeFeedbackId reuse(BailoutId id)
TryCatchStatement * NewTryCatchStatement(int index, Block *try_block, Scope *scope, Variable *variable, Block *catch_block)
VariableDeclaration(VariableProxy *proxy, VariableMode mode, Scope *scope)
void set_function_token_position(int pos)
virtual void Accept(AstVisitor *v)=0
void Add(Handle< Map > handle, Zone *zone)
Handle< Map > first() const
virtual bool IsMonomorphic()
Handle< JSFunction > target()
VariableMode mode() const
bool may_have_function_literal() const
activate correct semantics for inheriting readonliness enable harmony semantics for typeof enable harmony enable harmony proxies enable all harmony harmony_scoping harmony_proxies harmony_scoping tracks arrays with only smi values automatically unbox arrays of doubles use crankshaft use hydrogen range analysis use hydrogen global value numbering use function inlining maximum number of AST nodes considered for a single inlining loop invariant code motion print statistics for hydrogen trace generated IR for specified phases trace register allocator trace range analysis trace representation types environment for every instruction put a break point before deoptimizing polymorphic inlining perform array bounds checks elimination use dead code elimination trace on stack replacement optimize closures cache optimized code for closures functions with arguments object loop weight for representation inference allow uint32 values on optimize frames if they are used only in safe operations track parallel recompilation enable all profiler experiments number of stack frames inspected by the profiler call recompile stub directly when self optimizing trigger profiler ticks based on counting instead of timing weight back edges by jump distance for interrupt triggering percentage of ICs that must have type info to allow optimization watch_ic_patching retry_self_opt interrupt_at_exit 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 SAHF instruction if enable use of VFP3 instructions if available this implies enabling ARMv7 and VFP2 enable use of VFP2 instructions if available 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 MIPS FPU instructions if expose natives in global object expose gc extension number of stack frames to capture disable builtin natives files print a stack trace if an assertion failure occurs use random jit cookie to mask large constants trace lazy optimization use adaptive optimizations prepare for turning on always opt minimum length for automatic enable preparsing maximum number of optimization attempts before giving up cache prototype transitions automatically set the debug break flag when debugger commands are in the queue always cause a debug break before aborting 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 more details following each garbage collection print amount of external allocated memory after each time it is adjusted flush code that we expect not to use again before full gc do incremental marking steps track object counts and memory usage use caching Perform compaction on every full GC Never perform compaction on full GC testing only Compact code space on full incremental collections Default seed for initializing random allows verbose printing trace parsing and preparsing Check icache flushes in ARM and MIPS simulator Stack alingment in bytes in print stack trace when throwing exceptions randomize hashes to avoid predictable hash Fixed seed to use to hash property activate a timer that switches between V8 threads testing_bool_flag float flag Seed used for threading test randomness A filename with extra code to be included in the Print usage including flags
virtual int max_match()=0
RegExpAssertion(Type type)
ZoneList< RegExpTree * > * nodes()
Literal * NewNumberLiteral(double number)
TypeFeedbackId BinaryOperationFeedbackId() const
ContinueStatement(IterationStatement *target)
void check(i::Vector< const char > string)
AstNodeFactory(Isolate *isolate, Zone *zone)
Expression * each() const
IfStatement * NewIfStatement(Expression *condition, Statement *then_statement, Statement *else_statement)
virtual bool IsMonomorphic()
ZoneList< Expression * > * arguments() const
ImportDeclaration * NewImportDeclaration(VariableProxy *proxy, Module *module, Scope *scope)
IfStatement(Isolate *isolate, Expression *condition, Statement *then_statement, Statement *else_statement)
RegExpCharacterClass(uc16 type)
void Visit(AstNode *node)
virtual SmallMapList * GetReceiverTypes()
TypeFeedbackId AssignmentFeedbackId()
void AddElement(TextElement elm, Zone *zone)
BinaryOperation * NewBinaryOperation(Token::Value op, Expression *left, Expression *right, int pos)
WithStatement(Expression *expression, Statement *statement)
virtual IterationStatement * AsIterationStatement()
ExportDeclaration * NewExportDeclaration(VariableProxy *proxy, Scope *scope)
void set_inferred_name(Handle< String > inferred_name)
Property * NewProperty(Expression *obj, Expression *key, int pos)
ModuleLiteral(Block *body, Interface *interface)
virtual InitializationFlag initialization() const
void set_may_have_function_literal(bool value)
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kInstanceClassNameOffset flag