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;
133 class TypeFeedbackOracle;
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; }
190 #define DECLARE_TYPE_ENUM(type) k##type,
195 #undef DECLARE_TYPE_ENUM
204 void*
operator new(
size_t size,
Zone* zone) {
205 return zone->New(static_cast<int>(size));
212 virtual void Accept(AstVisitor* v) = 0;
216 #define DECLARE_NODE_FUNCTIONS(type) \
217 bool Is##type() { return node_type() == AstNode::k##type; } \
218 type* As##type() { return Is##type() ? reinterpret_cast<type*>(this) : NULL; }
220 #undef DECLARE_NODE_FUNCTIONS
236 int tmp = isolate->ast_node_id();
237 isolate->set_ast_node_id(tmp + n);
244 void*
operator new(
size_t size);
271 void Reserve(
int capacity,
Zone* zone) { list_.Reserve(capacity, zone); }
276 int length()
const {
return list_.length(); }
337 bool IsStringLiteral();
340 bool IsNullLiteral();
358 unsigned id()
const {
return id_; }
376 TARGET_FOR_NAMED_ONLY
402 ASSERT(labels ==
NULL || labels->length() > 0);
420 statements_.Add(statement, zone);
435 bool is_initializer_block,
438 statements_(capacity, zone),
439 is_initializer_block_(is_initializer_block),
445 bool is_initializer_block_;
456 virtual bool IsInlineable()
const;
509 virtual bool IsInlineable()
const;
534 Module* module()
const {
return module_; }
558 Module* module()
const {
return module_; }
613 Block* body()
const {
return body_; }
650 Module* module()
const {
return module_; }
678 :
Module(zone), url_(url) {
695 virtual int ContinueId()
const = 0;
696 virtual int StackCheckId()
const = 0;
714 Label continue_target_;
746 condition_position_(-1),
753 int condition_position_;
770 return may_have_function_literal_;
773 may_have_function_literal_ = value;
787 may_have_function_literal_(
true),
794 bool may_have_function_literal_;
818 return may_have_function_literal_;
821 may_have_function_literal_ = value;
841 may_have_function_literal_(
true),
842 loop_variable_(
NULL),
852 bool may_have_function_literal_;
866 enumerable_ = enumerable;
907 : expression_(expression) { }
924 : target_(target) { }
941 : target_(target) { }
958 : expression_(expression) { }
976 : expression_(expression),
977 statement_(statement) { }
994 CHECK(!is_default());
1007 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
1018 enum CompareTypeFeedback {
1025 CompareTypeFeedback compare_type_;
1066 bool HasThenStatement()
const {
return !then_statement()->IsEmpty(); }
1073 int IfId()
const {
return if_id_; }
1084 : condition_(condition),
1085 then_statement_(then_statement),
1086 else_statement_(else_statement),
1111 void AddTarget(Label* target,
Zone* zone);
1127 escaping_targets_ = targets;
1137 try_block_(try_block),
1138 escaping_targets_(
NULL) { }
1167 variable_(variable),
1168 catch_block_(catch_block) {
1174 Block* catch_block_;
1182 Block* finally_block()
const {
return finally_block_; }
1189 finally_block_(finally_block) { }
1192 Block* finally_block_;
1222 virtual
bool IsPropertyName() {
1223 if (handle_->IsSymbol()) {
1231 ASSERT(IsPropertyName());
1240 ASSERT(!handle_.is_null());
1241 return handle_->IsNull();
1244 ASSERT(!handle_.is_null());
1245 return handle_->IsTrue();
1248 ASSERT(!handle_.is_null());
1249 return handle_->IsFalse();
1256 uint32_t
Hash() {
return ToString()->Hash(); }
1258 static bool Match(
void* literal1,
void* literal2) {
1261 return s1->Equals(*s2);
1297 literal_index_(literal_index),
1298 is_simple_(is_simple),
1332 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
1336 bool IsCompileTimeValue();
1338 void set_emit_store(
bool emit_store);
1358 return constant_properties_;
1369 void CalculateEmitStore(
Zone* zone);
1374 kHasFunction = 1 << 1
1395 constant_properties_(constant_properties),
1396 properties_(properties),
1397 fast_elements_(fast_elements),
1398 has_function_(has_function) {}
1403 bool fast_elements_;
1454 constant_elements_(constant_elements),
1461 int first_element_id_;
1469 virtual
bool IsValidLeftHandSide() {
1470 return var_ ==
NULL ?
true : var_->IsValidLeftHandSide();
1474 return !is_this() &&
name().is_identical_to(n);
1523 virtual
bool IsValidLeftHandSide() {
return true; }
1534 void RecordTypeFeedback(TypeFeedbackOracle* oracle,
Zone* zone);
1551 is_monomorphic_(
false),
1552 is_uninitialized_(
false),
1553 is_array_length_(
false),
1554 is_string_length_(
false),
1555 is_string_access_(
false),
1556 is_function_prototype_(
false) { }
1564 bool is_monomorphic_ : 1;
1565 bool is_uninitialized_ : 1;
1566 bool is_array_length_ : 1;
1567 bool is_string_length_ : 1;
1568 bool is_string_access_ : 1;
1569 bool is_function_prototype_ : 1;
1581 void RecordTypeFeedback(TypeFeedbackOracle* oracle,
1598 bool return_is_recorded_;
1609 expression_(expression),
1610 arguments_(arguments),
1612 is_monomorphic_(
false),
1621 bool is_monomorphic_;
1640 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
1655 expression_(expression),
1656 arguments_(arguments),
1658 is_monomorphic_(
false),
1666 bool is_monomorphic_;
1695 function_(function),
1696 arguments_(arguments) { }
1709 virtual bool ResultOverwriteAllowed();
1727 expression_(expression),
1732 if (op == Token::NOT) {
1733 materialize_true_id_ =
GetNextId(isolate);
1734 materialize_false_id_ =
GetNextId(isolate);
1745 int materialize_true_id_;
1746 int materialize_false_id_;
1754 virtual bool ResultOverwriteAllowed();
1772 :
Expression(isolate), op_(op), left_(left), right_(right), pos_(pos) {
1794 bool is_prefix()
const {
return is_prefix_; }
1807 void RecordTypeFeedback(TypeFeedbackOracle* oracle,
Zone* znoe);
1825 is_prefix_(is_prefix),
1834 bool is_monomorphic_;
1853 void RecordTypeFeedback(TypeFeedbackOracle* oracle);
1859 bool IsLiteralCompareUndefined(
Expression** expr);
1860 bool IsLiteralCompareNull(
Expression** expr);
1875 compare_type_(
NONE) {
1885 enum CompareTypeFeedback {
NONE, SMI_ONLY, OBJECT_ONLY };
1886 CompareTypeFeedback compare_type_;
1911 int then_expression_position,
1912 int else_expression_position)
1914 condition_(condition),
1915 then_expression_(then_expression),
1916 else_expression_(else_expression),
1917 then_expression_position_(then_expression_position),
1918 else_expression_position_(else_expression_position),
1926 int then_expression_position_;
1927 int else_expression_position_;
1960 void RecordTypeFeedback(TypeFeedbackOracle* oracle,
Zone* zone);
1977 template<
class Visitor>
1980 if (is_compound()) {
1982 factory->NewBinaryOperation(binary_op(), target_, value_, pos_ + 1);
1993 int compound_load_id_;
1999 bool is_monomorphic_;
2015 :
Expression(isolate), exception_(exception), pos_(pos) {}
2032 kNoDuplicateParameters = 0,
2033 kHasDuplicateParameters = 1
2048 int start_position()
const;
2049 int end_position()
const;
2050 int SourceSize()
const {
return end_position() - start_position(); }
2060 return HasOnlySimpleThisPropertyAssignments::decode(bitfield_);
2063 return this_property_assignments_;
2067 bool AllowsLazyCompilation();
2071 return inferred_name();
2076 inferred_name_ = inferred_name;
2083 return HasDuplicateParameters::decode(bitfield_);
2086 bool is_function() {
return IsFunction::decode(bitfield_) == kIsFunction; }
2089 AstProperties::Flags*
flags() {
return ast_properties_.flags(); }
2091 ast_properties_ = *ast_properties;
2101 int materialized_literal_count,
2102 int expected_property_count,
2106 int parameter_count,
2114 this_property_assignments_(this_property_assignments),
2115 inferred_name_(isolate->factory()->empty_string()),
2116 materialized_literal_count_(materialized_literal_count),
2117 expected_property_count_(expected_property_count),
2118 handler_count_(handler_count),
2119 parameter_count_(parameter_count),
2120 function_token_position_(RelocInfo::kNoPosition) {
2122 HasOnlySimpleThisPropertyAssignments::encode(
2123 has_only_simple_this_property_assignments) |
2124 IsExpression::encode(type != DECLARATION) |
2125 IsAnonymous::encode(type == ANONYMOUS_EXPRESSION) |
2126 Pretenure::encode(
false) |
2127 HasDuplicateParameters::encode(has_duplicate_parameters) |
2128 IsFunction::encode(is_function);
2137 AstProperties ast_properties_;
2139 int materialized_literal_count_;
2140 int expected_property_count_;
2142 int parameter_count_;
2143 int function_token_position_;
2146 class HasOnlySimpleThisPropertyAssignments:
public BitField<bool, 0, 1> {};
2147 class IsExpression:
public BitField<bool, 1, 1> {};
2148 class IsAnonymous:
public BitField<bool, 2, 1> {};
2149 class Pretenure:
public BitField<bool, 3, 1> {};
2150 class HasDuplicateParameters:
public BitField<ParameterFlag, 4, 1> {};
2151 class IsFunction:
public BitField<IsFunctionFlag, 5, 1> {};
2160 return shared_function_info_;
2170 shared_function_info_(shared_function_info) { }
2187 #undef DECLARE_NODE_TYPE
2197 #define MAKE_CASE(Name) \
2198 virtual void* Visit##Name(RegExp##Name*, void* data) = 0;
2208 virtual void*
Accept(RegExpVisitor* visitor,
void* data) = 0;
2214 virtual int min_match() = 0;
2215 virtual int max_match() = 0;
2221 #define MAKE_ASTYPE(Name) \
2222 virtual RegExp##Name* As##Name(); \
2223 virtual bool Is##Name();
2232 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2236 virtual Interval CaptureRegisters();
2237 virtual bool IsDisjunction();
2238 virtual bool IsAnchoredAtStart();
2239 virtual bool IsAnchoredAtEnd();
2253 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2257 virtual Interval CaptureRegisters();
2258 virtual bool IsAlternative();
2259 virtual bool IsAnchoredAtStart();
2260 virtual bool IsAnchoredAtEnd();
2282 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2286 virtual bool IsAssertion();
2287 virtual bool IsAnchoredAtStart();
2288 virtual bool IsAnchoredAtEnd();
2301 standard_set_type_(standard_set_type) {}
2304 standard_set_type_(0) {}
2308 standard_set_type_ = special_set_type;
2316 uc16 standard_set_type_;
2324 is_negated_(is_negated) { }
2327 is_negated_(
false) { }
2328 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2332 virtual bool IsCharacterClass();
2340 bool is_standard(
Zone* zone);
2365 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2369 virtual bool IsAtom();
2384 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2388 virtual bool IsText();
2394 elements_.Add(elm, zone);
2406 enum Type { GREEDY, NON_GREEDY, POSSESSIVE };
2411 min_match_(min * body->min_match()),
2413 if (max > 0 && body->
max_match() > kInfinity / max) {
2414 max_match_ = kInfinity;
2419 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2428 bool not_at_start =
false);
2430 virtual Interval CaptureRegisters();
2431 virtual bool IsQuantifier();
2454 : body_(body), index_(index) { }
2455 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2463 virtual bool IsAnchoredAtStart();
2464 virtual bool IsAnchoredAtEnd();
2465 virtual Interval CaptureRegisters();
2466 virtual bool IsCapture();
2487 is_positive_(is_positive),
2488 capture_count_(capture_count),
2489 capture_from_(capture_from) { }
2491 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2495 virtual Interval CaptureRegisters();
2496 virtual bool IsLookahead();
2497 virtual bool IsAnchoredAtStart();
2516 : capture_(capture) { }
2517 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2521 virtual bool IsBackReference();
2524 int index() {
return capture_->index(); }
2534 virtual void*
Accept(RegExpVisitor* visitor,
void* data);
2538 virtual bool IsEmpty();
2552 :
Module(proxy->interface()),
2576 bool CheckStackOverflow();
2585 #define DEF_VISIT(type) \
2586 virtual void Visit##type(type* node) = 0;
2595 bool stack_overflow_;
2612 #define DEF_VISIT(type) \
2613 void Visit##type(type* node);
2617 void increase_node_count() { properties_.add_node_count(1); }
2620 AstProperties properties_;
2627 #define DEF_VISIT(type) \
2628 void Visit##type(type* node) {}
2638 template<
class Visitor>
2642 : isolate_(isolate),
2643 zone_(isolate_->zone()) { }
2647 #define VISIT_AND_RETURN(NodeType, node) \
2648 visitor_.Visit##NodeType((node)); \
2713 bool is_initializer_block,
2716 isolate_, labels, capacity, is_initializer_block, zone);
2720 #define STATEMENT_WITH_LABELS(NodeType) \
2721 NodeType* New##NodeType(ZoneStringList* labels) { \
2722 NodeType* stmt = new(zone_) NodeType(isolate_, labels); \
2723 VISIT_AND_RETURN(NodeType, stmt); \
2730 #undef STATEMENT_WITH_LABELS
2762 isolate_, condition, then_statement, else_statement);
2770 Block* catch_block) {
2772 index, try_block, scope, variable, catch_block);
2778 Block* finally_block) {
2799 return NewLiteral(isolate_->factory()->NewNumber(number,
TENURED));
2809 bool has_function) {
2811 isolate_, constant_properties, properties, literal_index,
2812 is_simple, fast_elements, depth, has_function);
2826 int literal_index) {
2828 new(zone_)
RegExpLiteral(isolate_, pattern, flags, literal_index);
2838 isolate_, constant_elements, values, literal_index, is_simple, depth);
2849 int position = RelocInfo::kNoPosition,
2853 new(zone_)
VariableProxy(isolate_, name, is_this, position, interface);
2865 Call* call =
new(zone_)
Call(isolate_, expression, arguments, pos);
2872 CallNew* call =
new(zone_)
CallNew(isolate_, expression, arguments, pos);
2880 new(zone_)
CallRuntime(isolate_, name,
function, arguments);
2922 int then_expression_position,
2923 int else_expression_position) {
2925 isolate_, condition, then_expression, else_expression,
2926 then_expression_position, else_expression_position);
2935 new(zone_)
Assignment(isolate_, op, target, value, pos);
2936 assign->
Init(isolate_,
this);
2941 Throw* t =
new(zone_)
Throw(isolate_, exception, pos);
2949 int materialized_literal_count,
2950 int expected_property_count,
2954 int parameter_count,
2959 isolate_, name, scope, body,
2960 materialized_literal_count, expected_property_count, handler_count,
2961 has_only_simple_this_property_assignments, this_property_assignments,
2962 parameter_count, type, has_duplicate_parameters, is_function);
2965 visitor_.VisitFunctionLiteral(lit);
2982 #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)
Module(Interface *interface)
RegExpLiteral(Isolate *isolate, Handle< String > pattern, Handle< String > flags, int literal_index)
virtual bool IsMonomorphic()
void set_condition_position(int pos)
virtual int position() 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
VariableProxy * NewVariableProxy(Handle< String > name, bool is_this, int position=RelocInfo::kNoPosition, Interface *interface=Interface::NewValue())
virtual Expression * AsExpression()
int expected_property_count()
virtual int position() const
AstNodeFactory(Isolate *isolate)
ModulePath(Module *module, Handle< String > name, Zone *zone)
Expression * condition() const
Expression * left() 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)
virtual void MarkAsStatement()
ModuleLiteral * NewModuleLiteral(Block *body, Interface *interface)
Handle< JSFunction > target()
RegExpLiteral * NewRegExpLiteral(Handle< String > pattern, Handle< String > flags, int literal_index)
int CompoundLoadId() const
static const int kDeclarationsId
Expression * expression() const
virtual bool IsMonomorphic()
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)
CharacterSet character_set()
ZoneList< CharacterRange > * ranges(Zone *zone)
ForInStatement(Isolate *isolate, ZoneStringList *labels)
bool has_duplicate_parameters()
Block * NewBlock(ZoneStringList *labels, int capacity, bool is_initializer_block, Zone *zone)
CallRuntime(Isolate *isolate, Handle< String > name, const Runtime::Function *function, ZoneList< Expression * > *arguments)
Handle< String > AsPropertyName()
ZoneList< Expression * > * arguments() const
value format" "after each garbage collection") DEFINE_bool(print_cumulative_gc_stat, false, "print cumulative GC statistics in name=value format on exit") DEFINE_bool(trace_gc_verbose, false, "print more details following each garbage collection") DEFINE_bool(trace_fragmentation, false, "report fragmentation for old pointer and data pages") DEFINE_bool(collect_maps, true, "garbage collect maps from which no objects can be reached") DEFINE_bool(flush_code, true, "flush code that we expect not to use again before full gc") DEFINE_bool(incremental_marking, true, "use incremental marking") DEFINE_bool(incremental_marking_steps, true, "do incremental marking steps") DEFINE_bool(trace_incremental_marking, false, "trace progress of the incremental marking") DEFINE_bool(use_idle_notification, true, "Use idle notification to reduce memory footprint.") DEFINE_bool(send_idle_notification, false, "Send idle notifcation between stress runs.") DEFINE_bool(use_ic, true, "use inline caching") DEFINE_bool(native_code_counters, false, "generate extra code for manipulating stats counters") DEFINE_bool(always_compact, false, "Perform compaction on every full GC") DEFINE_bool(lazy_sweeping, true, "Use lazy sweeping for old pointer and data spaces") DEFINE_bool(never_compact, false, "Never perform compaction on full GC-testing only") DEFINE_bool(compact_code_space, true, "Compact code space on full non-incremental collections") DEFINE_bool(cleanup_code_caches_at_gc, true, "Flush inline caches prior to mark compact collection and" "flush code caches in maps during mark compact cycle.") DEFINE_int(random_seed, 0, "Default seed for initializing random generator" "(0, the default, means to use system random).") DEFINE_bool(use_verbose_printer, true, "allows verbose printing") DEFINE_bool(allow_natives_syntax, false, "allow natives syntax") DEFINE_bool(trace_sim, false, "Trace simulator execution") DEFINE_bool(check_icache, false, "Check icache flushes in ARM and MIPS simulator") DEFINE_int(stop_sim_at, 0, "Simulator stop after x number of instructions") DEFINE_int(sim_stack_alignment, 8, "Stack alingment in bytes in simulator(4 or 8, 8 is default)") DEFINE_bool(trace_exception, false, "print stack trace when throwing exceptions") DEFINE_bool(preallocate_message_memory, false, "preallocate some memory to build stack traces.") DEFINE_bool(randomize_hashes, true, "randomize hashes to avoid predictable hash collisions" "(with snapshots this option cannot override the baked-in seed)") DEFINE_int(hash_seed, 0, "Fixed seed to use to hash property keys(0 means random)" "(with snapshots this option cannot override the baked-in seed)") DEFINE_bool(preemption, false, "activate a 100ms timer that switches between V8 threads") DEFINE_bool(regexp_optimization, true, "generate optimized regexp code") DEFINE_bool(testing_bool_flag, true, "testing_bool_flag") DEFINE_int(testing_int_flag, 13, "testing_int_flag") DEFINE_float(testing_float_flag, 2.5, "float-flag") DEFINE_string(testing_string_flag, "Hello, world!", "string-flag") DEFINE_int(testing_prng_seed, 42, "Seed used for threading test randomness") DEFINE_string(testing_serialization_file, "/tmp/serdes", "file in which to serialize heap") DEFINE_bool(help, false, "Print usage message, including flags, on console") DEFINE_bool(dump_counters, false, "Dump counters on exit") DEFINE_string(map_counters, "", "Map counters to a file") DEFINE_args(js_arguments, JSARGUMENTS_INIT, "Pass all remaining arguments to the script.Alias for\"--\".") DEFINE_bool(debug_compile_events, true,"Enable debugger compile events") DEFINE_bool(debug_script_collected_events, true,"Enable debugger script collected events") DEFINE_bool(gdbjit, false,"enable GDBJIT interface (disables compacting GC)") DEFINE_bool(gdbjit_full, false,"enable GDBJIT interface for all code objects") DEFINE_bool(gdbjit_dump, false,"dump elf objects with debug info to disk") DEFINE_string(gdbjit_dump_filter,"","dump only objects containing this substring") DEFINE_bool(force_marking_deque_overflows, false,"force overflows of marking deque by reducing it's size ""to 64 words") DEFINE_bool(stress_compaction, false,"stress the GC compactor to flush out bugs (implies ""--force_marking_deque_overflows)")#define FLAG DEFINE_bool(enable_slow_asserts, false,"enable asserts that are slow to execute") DEFINE_bool(trace_codegen, false,"print name of functions for which code is generated") DEFINE_bool(print_source, false,"pretty print source code") DEFINE_bool(print_builtin_source, false,"pretty print source code for builtins") DEFINE_bool(print_ast, false,"print source AST") DEFINE_bool(print_builtin_ast, false,"print source AST for builtins") DEFINE_string(stop_at,"","function name where to insert a breakpoint") DEFINE_bool(print_builtin_scopes, false,"print scopes for builtins") DEFINE_bool(print_scopes, false,"print scopes") DEFINE_bool(trace_contexts, false,"trace contexts operations") DEFINE_bool(gc_greedy, false,"perform GC prior to some allocations") DEFINE_bool(gc_verbose, false,"print stuff during garbage collection") DEFINE_bool(heap_stats, false,"report heap statistics before and after GC") DEFINE_bool(code_stats, false,"report code statistics after GC") DEFINE_bool(verify_heap, false,"verify heap pointers before and after GC") DEFINE_bool(print_handles, false,"report handles after GC") DEFINE_bool(print_global_handles, false,"report global handles after GC") DEFINE_bool(trace_ic, false,"trace inline cache state transitions") DEFINE_bool(print_interfaces, false,"print interfaces") DEFINE_bool(print_interface_details, false,"print interface inference details") DEFINE_int(print_interface_depth, 5,"depth for printing interfaces") DEFINE_bool(trace_normalization, false,"prints when objects are turned into dictionaries.") DEFINE_bool(trace_lazy, false,"trace lazy compilation") DEFINE_bool(collect_heap_spill_statistics, false,"report heap spill statistics along with heap_stats ""(requires heap_stats)") DEFINE_bool(trace_isolates, false,"trace isolate state changes") DEFINE_bool(log_state_changes, false,"Log state changes.") DEFINE_bool(regexp_possessive_quantifier, false,"enable possessive quantifier syntax for testing") DEFINE_bool(trace_regexp_bytecodes, false,"trace regexp bytecode execution") DEFINE_bool(trace_regexp_assembler, false,"trace regexp macro assembler calls.")#define FLAG DEFINE_bool(log, false,"Minimal logging (no API, code, GC, suspect, or handles samples).") DEFINE_bool(log_all, false,"Log all events to the log file.") DEFINE_bool(log_runtime, false,"Activate runtime system %Log call.") DEFINE_bool(log_api, false,"Log API events to the log file.") DEFINE_bool(log_code, false,"Log code events to the log file without profiling.") DEFINE_bool(log_gc, false,"Log heap samples on garbage collection for the hp2ps tool.") DEFINE_bool(log_handles, false,"Log global handle events.") DEFINE_bool(log_snapshot_positions, false,"log positions of (de)serialized objects in the snapshot.") DEFINE_bool(log_suspect, false,"Log suspect operations.") DEFINE_bool(prof, false,"Log statistical profiling information (implies --log-code).") DEFINE_bool(prof_auto, true,"Used with --prof, starts profiling automatically") DEFINE_bool(prof_lazy, false,"Used with --prof, only does sampling and logging"" when profiler is active (implies --noprof_auto).") DEFINE_bool(prof_browser_mode, true,"Used with --prof, turns on browser-compatible mode for profiling.") DEFINE_bool(log_regexp, false,"Log regular expression execution.") DEFINE_bool(sliding_state_window, false,"Update sliding state window counters.") DEFINE_string(logfile,"v8.log","Specify the name of the log file.") DEFINE_bool(ll_prof, false,"Enable low-level linux profiler.")#define FLAG DEFINE_bool(trace_elements_transitions, false,"trace elements transitions") DEFINE_bool(print_code_stubs, false,"print code stubs") DEFINE_bool(test_secondary_stub_cache, false,"test secondary stub cache by disabling the primary one") DEFINE_bool(test_primary_stub_cache, false,"test primary stub cache by disabling the secondary one") DEFINE_bool(print_code, false,"print generated code") DEFINE_bool(print_opt_code, false,"print optimized code") DEFINE_bool(print_unopt_code, false,"print unoptimized code before ""printing optimized code based on it") DEFINE_bool(print_code_verbose, false,"print more information for code") DEFINE_bool(print_builtin_code, false,"print generated code for builtins")#43"/Users/thlorenz/dev/dx/v8-perf/build/v8/src/flags.cc"2#define FLAG_MODE_DEFINE_DEFAULTS#1"/Users/thlorenz/dev/dx/v8-perf/build/v8/src/flag-definitions.h"1#define FLAG_FULL(ftype, ctype, nam, def, cmt)#define FLAG_READONLY(ftype, ctype, nam, def, cmt)#define DEFINE_implication(whenflag, thenflag)#define DEFINE_bool(nam, def, cmt)#define DEFINE_int(nam, def, cmt)#define DEFINE_float(nam, def, cmt)#define DEFINE_string(nam, def, cmt)#define DEFINE_args(nam, def, cmt)#define FLAG DEFINE_bool(use_strict, false,"enforce strict mode") DEFINE_bool(es5_readonly, false,"activate correct semantics for inheriting readonliness") DEFINE_bool(es52_globals, false,"activate new semantics for global var declarations") DEFINE_bool(harmony_typeof, false,"enable harmony semantics for typeof") DEFINE_bool(harmony_scoping, false,"enable harmony block scoping") DEFINE_bool(harmony_modules, false,"enable harmony modules (implies block scoping)") DEFINE_bool(harmony_proxies, false,"enable harmony proxies") DEFINE_bool(harmony_collections, false,"enable harmony collections (sets, maps, and weak maps)") DEFINE_bool(harmony, false,"enable all harmony features (except typeof)") DEFINE_implication(harmony, harmony_scoping) DEFINE_implication(harmony, harmony_modules) DEFINE_implication(harmony, harmony_proxies) DEFINE_implication(harmony, harmony_collections) DEFINE_implication(harmony_modules, harmony_scoping) DEFINE_bool(packed_arrays, false,"optimizes arrays that have no holes") DEFINE_bool(smi_only_arrays, true,"tracks arrays with only smi values") DEFINE_bool(clever_optimizations, true,"Optimize object size, Array shift, DOM strings and string +") DEFINE_bool(unbox_double_arrays, true,"automatically unbox arrays of doubles") DEFINE_bool(string_slices, true,"use string slices") DEFINE_bool(crankshaft, true,"use crankshaft") DEFINE_string(hydrogen_filter,"","optimization filter") DEFINE_bool(use_range, true,"use hydrogen range analysis") DEFINE_bool(eliminate_dead_phis, true,"eliminate dead phis") DEFINE_bool(use_gvn, true,"use hydrogen global value numbering") DEFINE_bool(use_canonicalizing, true,"use hydrogen instruction canonicalizing") DEFINE_bool(use_inlining, true,"use function inlining") DEFINE_int(max_inlined_source_size, 600,"maximum source size in bytes considered for a single inlining") DEFINE_int(max_inlined_nodes, 196,"maximum number of AST nodes considered for a single inlining") DEFINE_int(max_inlined_nodes_cumulative, 196,"maximum cumulative number of AST nodes considered for inlining") DEFINE_bool(loop_invariant_code_motion, true,"loop invariant code motion") DEFINE_bool(collect_megamorphic_maps_from_stub_cache, true,"crankshaft harvests type feedback from stub cache") DEFINE_bool(hydrogen_stats, false,"print statistics for hydrogen") DEFINE_bool(trace_hydrogen, false,"trace generated hydrogen to file") DEFINE_string(trace_phase,"Z","trace generated IR for specified phases") DEFINE_bool(trace_inlining, false,"trace inlining decisions") DEFINE_bool(trace_alloc, false,"trace register allocator") DEFINE_bool(trace_all_uses, false,"trace all use positions") DEFINE_bool(trace_range, false,"trace range analysis") DEFINE_bool(trace_gvn, false,"trace global value numbering") DEFINE_bool(trace_representation, false,"trace representation types") DEFINE_bool(stress_pointer_maps, false,"pointer map for every instruction") DEFINE_bool(stress_environments, false,"environment for every instruction") DEFINE_int(deopt_every_n_times, 0,"deoptimize every n times a deopt point is passed") DEFINE_bool(trap_on_deopt, false,"put a break point before deoptimizing") DEFINE_bool(deoptimize_uncommon_cases, true,"deoptimize uncommon cases") DEFINE_bool(polymorphic_inlining, true,"polymorphic inlining") DEFINE_bool(use_osr, true,"use on-stack replacement") DEFINE_bool(array_bounds_checks_elimination, false,"perform array bounds checks elimination") DEFINE_bool(array_index_dehoisting, false,"perform array index dehoisting") DEFINE_bool(trace_osr, false,"trace on-stack replacement") DEFINE_int(stress_runs, 0,"number of stress runs") DEFINE_bool(optimize_closures, true,"optimize closures") DEFINE_bool(inline_construct, true,"inline constructor calls") DEFINE_bool(inline_arguments, true,"inline functions with arguments object") DEFINE_int(loop_weight, 1,"loop weight for representation inference") DEFINE_bool(optimize_for_in, true,"optimize functions containing for-in loops") DEFINE_bool(experimental_profiler, true,"enable all profiler experiments") DEFINE_bool(watch_ic_patching, false,"profiler considers IC stability") DEFINE_int(frame_count, 1,"number of stack frames inspected by the profiler") DEFINE_bool(self_optimization, false,"primitive functions trigger their own optimization") DEFINE_bool(direct_self_opt, false,"call recompile stub directly when self-optimizing") DEFINE_bool(retry_self_opt, false,"re-try self-optimization if it failed") DEFINE_bool(count_based_interrupts, false,"trigger profiler ticks based on counting instead of timing") DEFINE_bool(interrupt_at_exit, false,"insert an interrupt check at function exit") DEFINE_bool(weighted_back_edges, false,"weight back edges by jump distance for interrupt triggering") DEFINE_int(interrupt_budget, 5900,"execution budget before interrupt is triggered") DEFINE_int(type_info_threshold, 15,"percentage of ICs that must have type info to allow optimization") DEFINE_int(self_opt_count, 130,"call count before self-optimization") DEFINE_implication(experimental_profiler, watch_ic_patching) DEFINE_implication(experimental_profiler, self_optimization) DEFINE_implication(experimental_profiler, retry_self_opt) DEFINE_implication(experimental_profiler, count_based_interrupts) DEFINE_implication(experimental_profiler, interrupt_at_exit) DEFINE_implication(experimental_profiler, weighted_back_edges) DEFINE_bool(trace_opt_verbose, false,"extra verbose compilation tracing") DEFINE_implication(trace_opt_verbose, trace_opt) DEFINE_bool(debug_code, false,"generate extra code (assertions) for debugging") DEFINE_bool(code_comments, false,"emit comments in code disassembly") DEFINE_bool(enable_sse2, true,"enable use of SSE2 instructions if available") DEFINE_bool(enable_sse3, true,"enable use of SSE3 instructions if available") DEFINE_bool(enable_sse4_1, true,"enable use of SSE4.1 instructions if available") DEFINE_bool(enable_cmov, true,"enable use of CMOV instruction if available") DEFINE_bool(enable_rdtsc, true,"enable use of RDTSC instruction if available") DEFINE_bool(enable_sahf, true,"enable use of SAHF instruction if available (X64 only)") DEFINE_bool(enable_vfp3, true,"enable use of VFP3 instructions if available - this implies ""enabling ARMv7 instructions (ARM only)") DEFINE_bool(enable_armv7, true,"enable use of ARMv7 instructions if available (ARM only)") DEFINE_bool(enable_fpu, true,"enable use of MIPS FPU instructions if available (MIPS only)") DEFINE_string(expose_natives_as, NULL,"expose natives in global object") DEFINE_string(expose_debug_as, NULL,"expose debug in global object") DEFINE_bool(expose_gc, false,"expose gc extension") DEFINE_bool(expose_externalize_string, false,"expose externalize string extension") DEFINE_int(stack_trace_limit, 10,"number of stack frames to capture") DEFINE_bool(builtins_in_stack_traces, false,"show built-in functions in stack traces") DEFINE_bool(disable_native_files, false,"disable builtin natives files") DEFINE_bool(inline_new, true,"use fast inline allocation") DEFINE_bool(stack_trace_on_abort, true,"print a stack trace if an assertion failure occurs") DEFINE_bool(trace, false,"trace function calls") DEFINE_bool(mask_constants_with_cookie, true,"use random jit cookie to mask large constants") DEFINE_bool(lazy, true,"use lazy compilation") DEFINE_bool(trace_opt, false,"trace lazy optimization") DEFINE_bool(trace_opt_stats, false,"trace lazy optimization statistics") DEFINE_bool(opt, true,"use adaptive optimizations") DEFINE_bool(always_opt, false,"always try to optimize functions") DEFINE_bool(prepare_always_opt, false,"prepare for turning on always opt") DEFINE_bool(trace_deopt, false,"trace deoptimization") DEFINE_int(min_preparse_length, 1024,"minimum length for automatic enable preparsing") DEFINE_bool(always_full_compiler, false,"try to use the dedicated run-once backend for all code") DEFINE_bool(trace_bailout, false,"print reasons for falling back to using the classic V8 backend") DEFINE_bool(compilation_cache, true,"enable compilation cache") DEFINE_bool(cache_prototype_transitions, true,"cache prototype transitions") DEFINE_bool(trace_debug_json, false,"trace debugging JSON request/response") DEFINE_bool(debugger_auto_break, true,"automatically set the debug break flag when debugger commands are ""in the queue") DEFINE_bool(enable_liveedit, true,"enable liveedit experimental feature") DEFINE_bool(break_on_abort, true,"always cause a debug break before aborting") DEFINE_int(stack_size, kPointerSize *123,"default size of stack region v8 is allowed to use (in kBytes)") DEFINE_int(max_stack_trace_source_length, 300,"maximum length of function source code printed in a stack trace.") DEFINE_bool(always_inline_smi_code, false,"always inline smi code in non-opt code") DEFINE_int(max_new_space_size, 0,"max size of the new generation (in kBytes)") DEFINE_int(max_old_space_size, 0,"max size of the old generation (in Mbytes)") DEFINE_int(max_executable_size, 0,"max size of executable memory (in Mbytes)") DEFINE_bool(gc_global, false,"always perform global GCs") DEFINE_int(gc_interval,-1,"garbage collect after <n> allocations") DEFINE_bool(trace_gc, false,"print one trace line following each garbage collection") DEFINE_bool(trace_gc_nvp, false,"print one detailed trace line in name=value format ""after each garbage collection") DEFINE_bool(print_cumulative_gc_stat, false,"print cumulative GC statistics in name=value format on exit") DEFINE_bool(trace_gc_verbose, false,"print more details following each garbage collection") DEFINE_bool(trace_fragmentation, false,"report fragmentation for old pointer and data pages") DEFINE_bool(collect_maps, true,"garbage collect maps from which no objects can be reached") DEFINE_bool(flush_code, true,"flush code that we expect not to use again before full gc") DEFINE_bool(incremental_marking, true,"use incremental marking") DEFINE_bool(incremental_marking_steps, true,"do incremental marking steps") DEFINE_bool(trace_incremental_marking, false,"trace progress of the incremental marking") DEFINE_bool(use_idle_notification, true,"Use idle notification to reduce memory footprint.") DEFINE_bool(send_idle_notification, false,"Send idle notifcation between stress runs.") DEFINE_bool(use_ic, true,"use inline caching") DEFINE_bool(native_code_counters, false,"generate extra code for manipulating stats counters") DEFINE_bool(always_compact, false,"Perform compaction on every full GC") DEFINE_bool(lazy_sweeping, true,"Use lazy sweeping for old pointer and data spaces") DEFINE_bool(never_compact, false,"Never perform compaction on full GC - testing only") DEFINE_bool(compact_code_space, true,"Compact code space on full non-incremental collections") DEFINE_bool(cleanup_code_caches_at_gc, true,"Flush inline caches prior to mark compact collection and ""flush code caches in maps during mark compact cycle.") DEFINE_int(random_seed, 0,"Default seed for initializing random generator ""(0, the default, means to use system random).") DEFINE_bool(use_verbose_printer, true,"allows verbose printing") DEFINE_bool(allow_natives_syntax, false,"allow natives syntax") DEFINE_bool(trace_sim, false,"Trace simulator execution") DEFINE_bool(check_icache, false,"Check icache flushes in ARM and MIPS simulator") DEFINE_int(stop_sim_at, 0,"Simulator stop after x number of instructions") DEFINE_int(sim_stack_alignment, 8,"Stack alingment in bytes in simulator (4 or 8, 8 is default)") DEFINE_bool(trace_exception, false,"print stack trace when throwing exceptions") DEFINE_bool(preallocate_message_memory, false,"preallocate some memory to build stack traces.") DEFINE_bool(randomize_hashes, true,"randomize hashes to avoid predictable hash collisions ""(with snapshots this option cannot override the baked-in seed)") DEFINE_int(hash_seed, 0,"Fixed seed to use to hash property keys (0 means random)""(with snapshots this option cannot override the baked-in seed)") DEFINE_bool(preemption, false,"activate a 100ms timer that switches between V8 threads") DEFINE_bool(regexp_optimization, true,"generate optimized regexp code") DEFINE_bool(testing_bool_flag, true,"testing_bool_flag") DEFINE_int(testing_int_flag, 13,"testing_int_flag") DEFINE_float(testing_float_flag, 2.5,"float-flag") DEFINE_string(testing_string_flag,"Hello, world!","string-flag") DEFINE_int(testing_prng_seed, 42,"Seed used for threading test randomness") DEFINE_string(testing_serialization_file,"/tmp/serdes","file in which to serialize heap") DEFINE_bool(help, false,"Print usage message, including flags, on console") DEFINE_bool(dump_counters, false,"Dump counters on exit") DEFINE_string(map_counters,"","Map counters to a file") DEFINE_args(js_arguments, JSARGUMENTS_INIT,"Pass all remaining arguments to the script. Alias for \"--\".") DEFINE_bool(debug_compile_events, true,"Enable debugger compile events") DEFINE_bool(debug_script_collected_events, true,"Enable debugger script collected events") DEFINE_bool(gdbjit, false,"enable GDBJIT interface (disables compacting GC)") DEFINE_bool(gdbjit_full, false,"enable GDBJIT interface for all code objects") DEFINE_bool(gdbjit_dump, false,"dump elf objects with debug info to disk") DEFINE_string(gdbjit_dump_filter,"","dump only objects containing this substring") DEFINE_bool(force_marking_deque_overflows, false,"force overflows of marking deque by reducing it's size ""to 64 words") DEFINE_bool(stress_compaction, false,"stress the GC compactor to flush out bugs (implies ""--force_marking_deque_overflows)")#define FLAG DEFINE_bool(enable_slow_asserts, false,"enable asserts that are slow to execute") DEFINE_bool(trace_codegen, false,"print name of functions for which code is generated") DEFINE_bool(print_source, false,"pretty print source code") DEFINE_bool(print_builtin_source, false,"pretty print source code for builtins") DEFINE_bool(print_ast, false,"print source AST") DEFINE_bool(print_builtin_ast, false,"print source AST for builtins") DEFINE_string(stop_at,"","function name where to insert a breakpoint") DEFINE_bool(print_builtin_scopes, false,"print scopes for builtins") DEFINE_bool(print_scopes, false,"print scopes") DEFINE_bool(trace_contexts, false,"trace contexts operations") DEFINE_bool(gc_greedy, false,"perform GC prior to some allocations") DEFINE_bool(gc_verbose, false,"print stuff during garbage collection") DEFINE_bool(heap_stats, false,"report heap statistics before and after GC") DEFINE_bool(code_stats, false,"report code statistics after GC") DEFINE_bool(verify_heap, false,"verify heap pointers before and after GC") DEFINE_bool(print_handles, false,"report handles after GC") DEFINE_bool(print_global_handles, false,"report global handles after GC") DEFINE_bool(trace_ic, false,"trace inline cache state transitions") DEFINE_bool(print_interfaces, false,"print interfaces") DEFINE_bool(print_interface_details, false,"print interface inference details") DEFINE_int(print_interface_depth, 5,"depth for printing interfaces") DEFINE_bool(trace_normalization, false,"prints when objects are turned into dictionaries.") DEFINE_bool(trace_lazy, false,"trace lazy compilation") DEFINE_bool(collect_heap_spill_statistics, false,"report heap spill statistics along with heap_stats ""(requires heap_stats)") DEFINE_bool(trace_isolates, false,"trace isolate state changes") DEFINE_bool(log_state_changes, false,"Log state changes.") DEFINE_bool(regexp_possessive_quantifier, false,"enable possessive quantifier syntax for testing") DEFINE_bool(trace_regexp_bytecodes, false,"trace regexp bytecode execution") DEFINE_bool(trace_regexp_assembler, false,"trace regexp macro assembler calls.")#define FLAG DEFINE_bool(log, false,"Minimal logging (no API, code, GC, suspect, or handles samples).") DEFINE_bool(log_all, false,"Log all events to the log file.") DEFINE_bool(log_runtime, false,"Activate runtime system %Log call.") DEFINE_bool(log_api, false,"Log API events to the log file.") DEFINE_bool(log_code, false,"Log code events to the log file without profiling.") DEFINE_bool(log_gc, false,"Log heap samples on garbage collection for the hp2ps tool.") DEFINE_bool(log_handles, false,"Log global handle events.") DEFINE_bool(log_snapshot_positions, false,"log positions of (de)serialized objects in the snapshot.") DEFINE_bool(log_suspect, false,"Log suspect operations.") DEFINE_bool(prof, false,"Log statistical profiling information (implies --log-code).") DEFINE_bool(prof_auto, true,"Used with --prof, starts profiling automatically") DEFINE_bool(prof_lazy, false,"Used with --prof, only does sampling and logging"" when profiler is active (implies --noprof_auto).") DEFINE_bool(prof_browser_mode, true,"Used with --prof, turns on browser-compatible mode for profiling.") DEFINE_bool(log_regexp, false,"Log regular expression execution.") DEFINE_bool(sliding_state_window, false,"Update sliding state window counters.") DEFINE_string(logfile,"v8.log","Specify the name of the log file.") DEFINE_bool(ll_prof, false,"Enable low-level linux profiler.")#define FLAG DEFINE_bool(trace_elements_transitions, false,"trace elements transitions") DEFINE_bool(print_code_stubs, false,"print code stubs") DEFINE_bool(test_secondary_stub_cache, false,"test secondary stub cache by disabling the primary one") DEFINE_bool(test_primary_stub_cache, false,"test primary stub cache by disabling the secondary one") DEFINE_bool(print_code, false,"print generated code") DEFINE_bool(print_opt_code, false,"print optimized code") DEFINE_bool(print_unopt_code, false,"print unoptimized code before ""printing optimized code based on it") DEFINE_bool(print_code_verbose, false,"print more information for code") DEFINE_bool(print_builtin_code, false,"print generated code for builtins")#47"/Users/thlorenz/dev/dx/v8-perf/build/v8/src/flags.cc"2 namespace{struct Flag{enum FlagType{TYPE_BOOL, TYPE_INT, TYPE_FLOAT, TYPE_STRING, TYPE_ARGS} name
virtual InitializationFlag initialization() const
virtual Statement * AsStatement()
static bool IsCompareOp(Value op)
static Handle< T > cast(Handle< S > that)
BreakStatement(BreakableStatement *target)
ExportDeclaration(VariableProxy *proxy, Scope *scope)
Expression * target() const
virtual int ContinueId() const
ExpressionStatement * NewExpressionStatement(Expression *expression)
static bool IsUnaryOp(Value op)
virtual Declaration * AsDeclaration()
Handle< JSObject > holder()
int GetIdForElement(int i)
ThisFunction(Isolate *isolate)
VariableDeclaration * NewVariableDeclaration(VariableProxy *proxy, VariableMode mode, Scope *scope)
void set_standard_set_type(uc16 special_set_type)
bool is_expression() const
virtual Declaration * AsDeclaration()
static const int kNoNumber
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()
SmallMapList(int capacity, Zone *zone)
virtual bool IsAnchoredAtEnd()
virtual int StackCheckId() const
bool IsFunctionPrototype() const
unibrow::Mapping< unibrow::Ecma262Canonicalize > Canonicalize
VariableProxy * NewVariableProxy(Variable *var)
#define ASSERT(condition)
ZoneList< Label * > * escaping_targets() const
ForStatement(Isolate *isolate, ZoneStringList *labels)
ModuleDeclaration * NewModuleDeclaration(VariableProxy *proxy, Module *module, Scope *scope)
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
Expression * enumerable() const
ZoneList< Statement * > * body() const
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
Handle< Context > context() const
void set_loop_variable(Variable *var)
void ClearStackOverflow()
Handle< String > name() const
virtual int ContinueId() 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)
static const int kFunctionEntryId
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
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
static Interface * NewValue()
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset this_property_assignments
virtual Interval CaptureRegisters()
virtual BreakableStatement * AsBreakableStatement()
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kThisPropertyAssignmentsOffset kNeedsAccessCheckBit kIsExpressionBit has_only_simple_this_property_assignments
Expression * cond() const
MaterializedLiteral(Isolate *isolate, int literal_index, bool is_simple, int depth)
CheckType check_type() const
CharacterSet(ZoneList< CharacterRange > *ranges)
bool ends_initialization_block()
VariableProxy * proxy() const
IterationStatement(Isolate *isolate, ZoneStringList *labels)
ZoneList< Label * > * targets()
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 BreakableStatement * AsBreakableStatement()
virtual SmallMapList * GetReceiverTypes()
virtual bool IsTextElement()
ModuleVariable * NewModuleVariable(VariableProxy *proxy)
FunctionDeclaration(VariableProxy *proxy, VariableMode mode, FunctionLiteral *fun, Scope *scope)
int function_token_position() const
BinaryOperation * binary_operation() const
static int StartRegister(int index)
static bool IsAssignmentOp(Value tok)
void set_scope(Scope *scope)
virtual Expression * AsExpression()
RegExpLookahead(RegExpTree *body, bool is_positive, int capture_count, int capture_from)
Handle< String > flags() const
ZoneList< RegExpTree * > * alternatives()
void set_position(int pos)
bool starts_initialization_block()
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
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
Expression * expression() const
int materialized_literal_count()
Call * NewCall(Expression *expression, ZoneList< Expression * > *arguments, int pos)
virtual int position() const
ZoneList< Statement * > * statements()
UnaryOperation(Isolate *isolate, Token::Value op, Expression *expression, int pos)
EmptyStatement * NewEmptyStatement()
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)
virtual Type node_type() const
Expression * cond() const
virtual bool IsPropertyName()
virtual int position() const
Handle< Object > handle() const
AstProperties * ast_properties()
int statement_pos() const
virtual int position() const
bool is_anonymous() const
ModuleUrl(Handle< String > url, Zone *zone)
RegExpQuantifier(int min, int max, Type type, RegExpTree *body)
SharedFunctionInfoLiteral * NewSharedFunctionInfoLiteral(Handle< SharedFunctionInfo > shared_function_info)
static int ReserveIdRange(Isolate *isolate, int n)
Statement * else_statement() const
Expression * left() const
ExpressionStatement(Expression *expression)
RegExpBackReference(RegExpCapture *capture)
virtual SmallMapList * GetReceiverTypes()
SwitchStatement(Isolate *isolate, ZoneStringList *labels)
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()
virtual bool IsMonomorphic()
bool HasStackOverflow() const
Declaration(VariableProxy *proxy, VariableMode mode, Scope *scope)
kPropertyAccessorsOffset kNamedPropertyHandlerOffset kInstanceTemplateOffset kAccessCheckInfoOffset kEvalFrominstructionsOffsetOffset kThisPropertyAssignmentsOffset flag
bool fast_elements() const
Vector< const uc16 > data()
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 trace on stack replacement optimize closures functions with arguments object optimize functions containing for in loops profiler considers IC stability primitive functions trigger their own optimization re try self optimization if it failed insert an interrupt check at function exit execution budget before interrupt is triggered call count before self optimization self_optimization count_based_interrupts weighted_back_edges trace_opt 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 enable use of ARMv7 instructions if enable use of MIPS FPU instructions if NULL
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
virtual bool ToBooleanIsFalse()
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 true
int else_expression_position() const
AstProperties::Flags * flags()
ZoneStringList * labels() const
RegExpAtom(Vector< const uc16 > data)
virtual int ContinueId() const
virtual Statement * AsStatement()
#define DECLARE_NODE_FUNCTIONS(type)
Expression * else_expression() const
Interface * interface() const
virtual TargetCollector * AsTargetCollector()
virtual int ContinueId() const
virtual int position() const
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)
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)
ImportDeclaration(VariableProxy *proxy, Module *module, Scope *scope)
virtual int position() const
virtual int StackCheckId() const
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 int StackCheckId() const
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)
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
virtual int StackCheckId() const
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
virtual int max_match()=0
RegExpAssertion(Type type)
ZoneList< RegExpTree * > * nodes()
Literal * NewNumberLiteral(double number)
ContinueStatement(IterationStatement *target)
void check(i::Vector< const char > string)
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()
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)