27 class HLoopInformation;
35 class HBasicBlock
FINAL :
public ZoneObject {
43 HGraph*
graph()
const {
return graph_; }
52 return IsLoopHeader() ? loop_information()
53 : (parent_loop_header() !=
NULL
54 ? parent_loop_header()->loop_information() :
NULL);
59 return &dominated_blocks_;
62 return &deleted_phis_;
65 deleted_phis_.Add(merge_index, zone());
67 HBasicBlock*
dominator()
const {
return dominator_; }
73 first_instruction_index_ = index;
77 last_instruction_index_ = index;
99 DCHECK(end()->SuccessorCount() == 0);
100 last_environment_ =
NULL;
108 parent_loop_header_ = block;
120 HSimulate* instr = CreateSimulate(ast_id, removable);
121 AddInstruction(instr, position);
135 is_inline_return_target_ =
true;
136 inlined_entry_block_ = inlined_entry_block;
141 return end() !=
NULL && end()->IsDeoptimize();
149 return dominates_loop_successors_;
152 dominates_loop_successors_ =
true;
174 FunctionState* state =
NULL,
175 bool add_simulate =
true);
177 Goto(block, position,
NULL,
false);
183 FunctionState* state,
224 : predecessor_list_(block->predecessors()), current_(0) { }
226 bool Done() {
return current_ >= predecessor_list_->length(); }
227 HBasicBlock*
Current() {
return predecessor_list_->at(current_); }
239 : instr_(block->first()) {
240 next_ = Done() ?
NULL : instr_->next();
243 inline bool Done()
const {
return instr_ ==
NULL; }
247 next_ = Done() ?
NULL : instr_->next();
259 : back_edges_(4, zone),
260 loop_header_(loop_header),
263 blocks_.Add(loop_header, zone);
275 stack_check_ = stack_check;
279 while (other !=
NULL) {
283 other = other->parent_loop();
288 HBasicBlock* parent_header = loop_header()->parent_loop_header();
289 return parent_header !=
NULL ? parent_header->loop_information() :
NULL;
303 class InductionVariableBlocksTable;
355 return arguments_object_.get();
359 arguments_object_.set(
object);
365 DCHECK(!disallow_adding_new_values_);
366 values_.Add(value, zone());
367 return values_.length() - 1;
370 if (
id >= 0 &&
id < values_.length())
return values_[id];
374 disallow_adding_new_values_ =
true;
380 void Verify(
bool do_full_verify)
const;
396 type_change_checksum_ += delta;
397 return type_change_checksum_;
401 if (environment_size > maximum_environment_size_) {
402 maximum_environment_size_ = environment_size;
408 return use_optimistic_licm_;
412 use_optimistic_licm_ = value;
416 is_recursive_ =
true;
420 return is_recursive_;
425 if (depends_on_empty_array_proto_elements_)
return;
427 handle(isolate()->initial_object_prototype()->
map()),
430 handle(isolate()->initial_array_prototype()->
map()),
432 depends_on_empty_array_proto_elements_ =
true;
436 return depends_on_empty_array_proto_elements_;
440 DCHECK(uint32_instructions_ ==
NULL || !uint32_instructions_->is_empty());
441 return uint32_instructions_ !=
NULL;
445 DCHECK(uint32_instructions_ ==
NULL || !uint32_instructions_->is_empty());
446 return uint32_instructions_;
450 DCHECK(uint32_instructions_ ==
NULL || !uint32_instructions_->is_empty());
451 if (uint32_instructions_ ==
NULL) {
454 uint32_instructions_->
Add(instr, zone());
476 template<
class Phase>
519 : shared_(shared), start_position_(shared->start_position()) {
537 Zone* HBasicBlock::zone()
const {
return graph_->zone(); }
551 class HEnvironment
FINAL :
public ZoneObject {
568 return &assigned_variables_;
574 HEnvironment*
outer()
const {
return outer_; }
581 HEnterInlined*
entry()
const {
return entry_; }
582 void set_entry(HEnterInlined* entry) { entry_ = entry; }
584 int length()
const {
return values_.length(); }
587 return parameter_count() + specials_count() + local_count();
591 return parameter_count() + specials_count();
595 Bind(IndexFor(variable), value);
601 Bind(parameter_count(), value);
605 return Lookup(IndexFor(variable));
609 HValue* result = values_[index];
616 return Lookup(parameter_count());
622 values_.Add(value, zone());
626 DCHECK(!ExpressionStackIsEmpty());
627 if (push_count_ > 0) {
632 return values_.RemoveLast();
642 int index = length() - index_from_top - 1;
643 DCHECK(HasExpressionAt(index));
644 return values_[index];
658 FunctionLiteral*
function,
659 HConstant* undefined,
663 HEnvironment* outer = outer_;
664 while (outer->frame_type() !=
JS_FUNCTION) outer = outer->outer_;
665 if (drop_extra) outer->Drop(1);
674 assigned_variables_.Clear();
679 values_[index] = value;
689 : parameter_count_ + specials_count_;
694 return i >= first_local_index() &&
i < first_expression_index();
698 return i >= 0 &&
i < parameter_count();
702 return i >= parameter_count() &&
i < parameter_count() + specials_count();
721 int arguments)
const;
726 void Initialize(
int parameter_count,
int local_count,
int stack_height);
734 int parameter_count_;
738 HEnterInlined* entry_;
757 class HIfContinuation;
805 int original_length_;
859 HBasicBlock* if_true,
860 HBasicBlock* if_false)
862 condition_(condition),
864 if_false_(if_false) {
877 return reinterpret_cast<TestContext*
>(context);
881 HBasicBlock*
if_true()
const {
return if_true_; }
882 HBasicBlock*
if_false()
const {
return if_false_; }
895 class FunctionState
FINAL {
909 delete test_context_;
910 test_context_ =
NULL;
913 FunctionState*
outer() {
return outer_; }
915 HEnterInlined*
entry() {
return entry_; }
916 void set_entry(HEnterInlined* entry) { entry_ = entry; }
920 arguments_object_ = arguments_object;
925 arguments_elements_ = arguments_elements;
956 HEnterInlined* entry_;
958 HArgumentsObject* arguments_object_;
968 class HIfContinuation
FINAL {
971 : continuation_captured_(
false),
973 false_branch_(
NULL) {}
975 HBasicBlock* false_branch)
976 : continuation_captured_(
true), true_branch_(true_branch),
977 false_branch_(false_branch) {}
981 HBasicBlock* false_branch) {
982 DCHECK(!continuation_captured_);
983 true_branch_ = true_branch;
984 false_branch_ = false_branch;
985 continuation_captured_ =
true;
989 HBasicBlock** false_branch) {
990 DCHECK(continuation_captured_);
991 *true_branch = true_branch_;
992 *false_branch = false_branch_;
993 continuation_captured_ =
false;
999 return IsTrueReachable() || IsFalseReachable();
1015 : current_site_(
NULL), feedback_site_(feedback_site),
1018 : current_site_(current_site), pretenure_flag_(
NOT_TENURED) {}
1020 : current_site_(
NULL), pretenure_flag_(pretenure_flag) {}
1028 return current_site() !=
NULL;
1032 if (!feedback_site().is_null())
return feedback_site()->GetPretenureMode();
1033 return pretenure_flag_;
1081 HBasicBlock* target,
1082 FunctionState* state =
NULL,
1083 bool add_simulate =
true) {
1087 FunctionState* state =
NULL,
1088 bool add_simulate =
true) {
1099 FunctionState* state) {
1118 template<
class I,
class P1>
1123 template<
class I,
class P1>
1126 template<
class I,
class P1>
1131 DCHECK(!result->IsReturn() && !result->IsSimulate() &&
1132 !result->IsDeoptimize());
1136 template<
class I,
class P1>
1141 DCHECK(!result->IsReturn() && !result->IsSimulate() &&
1142 !result->IsDeoptimize());
1146 template<
class I,
class P1,
class P2>
1151 template<
class I,
class P1,
class P2>
1156 template<
class I,
class P1,
class P2>
1161 DCHECK(!result->IsSimulate());
1165 template<
class I,
class P1,
class P2>
1170 DCHECK(!result->IsSimulate());
1174 template<
class I,
class P1,
class P2,
class P3>
1179 template<
class I,
class P1,
class P2,
class P3>
1184 template<
class I,
class P1,
class P2,
class P3>
1189 template<
class I,
class P1,
class P2,
class P3>
1194 template<
class I,
class P1,
class P2,
class P3,
class P4>
1199 template<
class I,
class P1,
class P2,
class P3,
class P4>
1204 template<
class I,
class P1,
class P2,
class P3,
class P4>
1209 template<
class I,
class P1,
class P2,
class P3,
class P4>
1214 template<
class I,
class P1,
class P2,
class P3,
class P4,
class P5>
1219 template<
class I,
class P1,
class P2,
class P3,
class P4,
class P5>
1224 template<
class I,
class P1,
class P2,
class P3,
class P4,
class P5>
1229 template<
class I,
class P1,
class P2,
class P3,
class P4,
class P5>
1234 template<
class I,
class P1,
class P2,
class P3,
class P4,
class P5,
class P6>
1239 template<
class I,
class P1,
class P2,
class P3,
class P4,
class P5,
class P6>
1244 template<
class I,
class P1,
class P2,
class P3,
class P4,
class P5,
class P6>
1249 template<
class I,
class P1,
class P2,
class P3,
class P4,
class P5,
class P6>
1254 template<
class I,
class P1,
class P2,
class P3,
class P4,
1255 class P5,
class P6,
class P7>
1260 template<
class I,
class P1,
class P2,
class P3,
class P4,
1261 class P5,
class P6,
class P7>
1266 template<
class I,
class P1,
class P2,
class P3,
1267 class P4,
class P5,
class P6,
class P7>
1272 template<
class I,
class P1,
class P2,
class P3,
1273 class P4,
class P5,
class P6,
class P7>
1278 template<
class I,
class P1,
class P2,
class P3,
class P4,
1279 class P5,
class P6,
class P7,
class P8>
1285 template<
class I,
class P1,
class P2,
class P3,
class P4,
1286 class P5,
class P6,
class P7,
class P8>
1291 template<
class I,
class P1,
class P2,
class P3,
class P4,
1292 class P5,
class P6,
class P7,
class P8>
1298 template<
class I,
class P1,
class P2,
class P3,
class P4,
1299 class P5,
class P6,
class P7,
class P8>
1316 template <
class BitFieldClass>
1318 HValue* mask_value = Add<HConstant>(
static_cast<int>(BitFieldClass::kMask));
1320 AddUncasted<HBitwise>(Token::BIT_AND, encoded_field, mask_value);
1321 return AddUncasted<HShr>(masked_field,
1322 Add<HConstant>(
static_cast<int>(BitFieldClass::kShift)));
1354 int bit_field_mask);
1363 HIfContinuation* join_continuation);
1368 HIfContinuation* continuation);
1388 HAllocationMode allocation_mode);
1395 HAllocationMode allocation_mode);
1411 HAllocationMode allocation_mode);
1415 HAllocationMode allocation_mode);
1439 return Add<HStoreNamedField>(
object, HObjectAccess::ForMap(),
1440 Add<HConstant>(
map));
1459 HAllocationMode allocation_mode);
1484 HIfContinuation* continuation);
1487 if (!finished_) End();
1492 template<
class Condition>
1495 AddCompare(compare);
1499 template<
class Condition,
class P2>
1502 AddCompare(compare);
1506 template<
class Condition,
class P2,
class P3>
1509 AddCompare(compare);
1513 template<
class Condition>
1520 template<
class Condition,
class P2>
1527 template<
class Condition,
class P2,
class P3>
1534 template<
class Condition>
1537 return If<Condition>(p);
1540 template<
class Condition,
class P2>
1543 return If<Condition>(
p1,
p2);
1546 template<
class Condition,
class P2,
class P3>
1549 return If<Condition>(
p1,
p2,
p3);
1552 template<
class Condition>
1555 return If<Condition>(p);
1558 template<
class Condition,
class P2>
1561 return If<Condition>(
p1,
p2);
1564 template<
class Condition,
class P2,
class P3>
1567 return If<Condition>(
p1,
p2,
p3);
1647 HBasicBlock** else_continuation);
1680 class LoopBuilder
FINAL {
1697 HValue* increment_amount);
1734 class JSArrayBuilder
FINAL {
1738 HValue* allocation_site_payload,
1739 HValue* constructor_function,
1757 FillMode fill_mode = FILL_WITH_HOLE);
1763 int capacity_upper_bound,
1765 FillMode fill_mode = FILL_WITH_HOLE);
1767 HConstant* capacity_upper_bound,
1769 FillMode fill_mode = FILL_WITH_HOLE);
1779 HGraph*
graph() {
return builder_->graph(); }
1796 HValue* length_argument);
1820 HValue* allocation_site_payload,
1867 HIfContinuation* continuation);
1870 HValue* previous_object_size,
1888 if (FLAG_hydrogen_track_positions) {
1908 template <
typename ViewClass>
1932 inline HDeoptimize* HGraphBuilder::Add<HDeoptimize>(
1936 if (FLAG_always_opt)
return NULL;
1941 HDeoptimize* instr = New<HDeoptimize>(reason, type, after_deopt_block);
1954 return Add<HDeoptimize>(reason, type);
1959 inline HSimulate* HGraphBuilder::Add<HSimulate>(
1962 HSimulate* instr =
current_block()->CreateSimulate(
id, removable);
1969 inline HSimulate* HGraphBuilder::Add<HSimulate>(
1982 inline HReturn* HGraphBuilder::Add<HReturn>(
HValue* value) {
1983 int num_parameters =
graph()->info()->num_parameters();
1984 HValue* params = AddUncasted<HConstant>(num_parameters);
1985 HReturn* return_instruction = New<HReturn>(value, params);
1987 return return_instruction;
1992 inline HReturn* HGraphBuilder::Add<HReturn>(HConstant* value) {
1993 return Add<HReturn>(
static_cast<HValue*
>(value));
1998 return Add<HReturn>(value);
2003 inline HInstruction* HGraphBuilder::AddUncasted<HReturn>(HConstant* value) {
2004 return Add<HReturn>(value);
2009 inline HCallRuntime* HGraphBuilder::Add<HCallRuntime>(
2012 int argument_count) {
2013 HCallRuntime* instr = New<HCallRuntime>(
name, c_function, argument_count);
2014 if (
graph()->info()->IsStub()) {
2029 int argument_count) {
2030 return Add<HCallRuntime>(
name, c_function, argument_count);
2035 inline HContext* HGraphBuilder::New<HContext>() {
2036 return HContext::New(
zone());
2042 return New<HContext>();
2057 continue_block_(
NULL),
2059 drop_extra_(drop_extra) {
2092 BreakAndContinueScope*
next() {
return next_; }
2120 HBasicBlock* second,
2131 void operator delete(
void* pointer) { }
2138 (CallRuntime* call);
2141 class SubgraphScope;
2187 #define INLINE_FUNCTION_GENERATOR_DECLARATION(Name, argc, ressize) \
2188 void Generate##Name(CallRuntime* call);
2192 #undef INLINE_FUNCTION_GENERATOR_DECLARATION
2197 void VisitNot(UnaryOperation* expr);
2205 HBasicBlock* loop_entry);
2215 HBasicBlock* loop_entry,
2216 HBasicBlock* body_exit,
2217 HBasicBlock* loop_successor,
2218 HBasicBlock* break_block);
2227 HBasicBlock* exit_block,
2228 HBasicBlock* continue_block);
2236 HEnvironment* env) {
2237 if (!FLAG_analyze_environment_liveness)
return false;
2242 !value->IsArgumentsObject() &&
2243 env->is_local_index(index);
2247 int index = env->IndexFor(var);
2248 env->Bind(index, value);
2250 HEnvironmentMarker* bind =
2251 Add<HEnvironmentMarker>(HEnvironmentMarker::BIND, index);
2254 bind->set_closure(env->closure());
2261 int index = env->IndexFor(var);
2262 HValue* value = env->Lookup(index);
2264 HEnvironmentMarker* lookup =
2265 Add<HEnvironmentMarker>(HEnvironmentMarker::LOOKUP, index);
2268 lookup->set_closure(env->closure());
2282 HBasicBlock* true_block,
2283 HBasicBlock* false_block);
2296 #define DECLARE_VISIT(type) virtual void Visit##type(type* node) OVERRIDE;
2298 #undef DECLARE_VISIT
2333 int arguments_count,
2334 HValue* implicit_return_value,
2350 HValue* implicit_return_value);
2353 int arguments_count);
2366 SmallMapList* receiver_types);
2376 SmallMapList* receiver_maps,
2386 const char* failure_reason);
2400 SmallMapList* types,
2405 bool is_zero_byte_offset,
2432 access_(HObjectAccess::ForMap()) { }
2453 return Accessors::IsJSObjectFieldAccessor<Type>(
type_,
name_, &offset);
2458 if (Accessors::IsJSObjectFieldAccessor<Type>(
type_,
name_, &offset)) {
2459 if (
type_->
Is(Type::String())) {
2461 *
access = HObjectAccess::ForStringLength();
2464 *
access = HObjectAccess::ForArrayLength(
map()->elements_kind());
2466 *
access = HObjectAccess::ForMapAndOffset(
map(), offset);
2508 return lookup_.GetLocalFieldIndexFromMap(*
map);
2526 access_.representation().generalize(r));
2549 bool can_inline_accessor =
true);
2558 bool is_uninitialized =
false);
2562 SmallMapList* types,
2582 Type* combined_type,
2592 BinaryOperation* expr,
2597 CountOperation* expr);
2607 SmallMapList* maps);
2626 bool* has_side_effects);
2632 bool* has_side_effects);
2639 bool is_uninitialized =
false);
2661 bool is_uninitialized =
false);
2695 HValue* object_elements);
2707 bool pass_argument_count);
2711 HValue* expected_param_count);
2714 int argument_count);
2762 full_code_gen_ += full_code_gen;
2768 optimize_graph_ += delta;
2774 base::TimeDelta optimize_graph,
2775 base::TimeDelta generate_code) {
2776 IncrementCreateGraph(create_graph);
2777 IncrementOptimizeGraph(optimize_graph);
2778 IncrementGenerateCode(generate_code);
2814 : trace_(&string_allocator_), indent_(0) {
2815 if (FLAG_trace_hydrogen_file ==
NULL) {
2817 "hydrogen-%d-%d.cfg",
2821 StrNCpy(filename_, FLAG_trace_hydrogen_file, filename_.length());
2837 tracer->PrintIndent();
2838 tracer->trace_.Add(
"begin_%s\n",
name);
2844 tracer_->PrintIndent();
2845 tracer_->trace_.Add(
"end_%s\n", name_);
2846 DCHECK(tracer_->indent_ >= 0);
2847 tracer_->FlushToFile();
2861 trace_.Add(
"%s\n",
name);
2866 trace_.Add(
"%s \"%s\"\n",
name, value);
2871 trace_.Add(
"%s %d000\n",
name,
static_cast<int>(value / 1000));
2876 trace_.Add(
"%s \"B%d\"\n",
name, block_id);
2881 trace_.Add(
"%s %d\n",
name, value);
2885 for (
int i = 0;
i < indent_;
i++) {
2897 class NoObservableSideEffectsScope
FINAL {
2901 builder_->graph()->IncrementInNoSideEffectsScope();
2904 builder_->graph()->DecrementInNoSideEffectsScope();
static int GetCurrentProcessId()
virtual void ReturnValue(HValue *value)=0
virtual void ReturnControl(HControlInstruction *instr, BailoutId ast_id)=0
HOptimizedGraphBuilder * owner() const
AstContext(HOptimizedGraphBuilder *owner, Expression::Context kind)
virtual void ReturnContinuation(HIfContinuation *continuation, BailoutId ast_id)=0
Expression::Context kind_
HOptimizedGraphBuilder * owner_
virtual void ReturnInstruction(HInstruction *instr, BailoutId ast_id)=0
void set_for_typeof(bool for_typeof)
HAllocationMode(Handle< AllocationSite > feedback_site)
bool CreateAllocationMementos() const WARN_UNUSED_RESULT
HInstructionIterator(HBasicBlock *block)
HAllocationMode(PretenureFlag pretenure_flag)
HAllocationMode(HValue *current_site)
PretenureFlag GetPretenureMode() const WARN_UNUSED_RESULT
Handle< AllocationSite > feedback_site() const
Handle< AllocationSite > feedback_site_
PretenureFlag pretenure_flag_
HValue * current_site() const
HPredecessorIterator(HBasicBlock *block)
const ZoneList< HBasicBlock * > * predecessor_list_
@ kElementsCantBeAddedGroup
Tag(HTracer *tracer, const char *name)
int start_position() const
InlinedFunctionInfo(Handle< SharedFunctionInfo > shared)
Handle< SharedFunctionInfo > shared() const
Handle< SharedFunctionInfo > shared_
Source to read snapshot and builtins files from.
bool IsConstantUndefined(HConstant *constant)
bool IsUnreachable() const
HBasicBlock * if_false() const
void set_first_instruction_index(int index)
bool IsLoopSuccessorDominator() const
HControlInstruction * end() const
void AttachLoopInformation()
HEnterInlined * entry() const
EmbeddedVector< char, 64 > filename_
ZoneList< HBasicBlock * > predecessors_
HLoopInformation * parent_loop()
NoObservableSideEffectsScope(HGraphBuilder *builder)
HEnvironment * outer() const
void RemovePhi(HPhi *phi)
SetOncePointer< HArgumentsObject > arguments_object_
HConstant * GetConstantNull()
HConstant * GetConstantMinus1()
HBasicBlock * function_return()
HValue * Lookup(int index) const
void Initialize(CompilationInfo *info)
ZoneList< HInstruction * > * uint32_instructions()
void MarkSuccEdgeUnreachable(int succ)
SetOncePointer< HConstant > constant_null_
HSimulate * AddNewSimulate(BailoutId ast_id, HSourcePosition position, RemovableSimulate removable=FIXED_SIMULATE)
void PrintEmptyProperty(const char *name)
int GetMaximumValueID() const
Expression * condition() const
HEnvironment * CopyAsLoopHeader(HBasicBlock *block) const
HArgumentsElements * arguments_elements()
SetOncePointer< HConstant > constant_the_hole_
int length() const
The number of Latin-1 characters in the string.
HBasicBlock * inlined_entry_block()
HEnvironment * last_environment_
EffectContext(HOptimizedGraphBuilder *owner)
HLoopInformation * loop_information() const
base::TimeDelta full_code_gen_
HGraph(CompilationInfo *info)
HBasicBlock * GetLastBackEdge() const
HBasicBlock * parent_loop_header_
const ZoneList< HPhi * > * phis() const
void AddInstruction(HInstruction *instr, HSourcePosition position)
void SetJoinId(BailoutId ast_id)
int PredecessorIndexOf(HBasicBlock *predecessor) const
ZoneList< InlinedFunctionInfo > inlined_functions_
bool is_inline_return_target_
TestContext * test_context()
void AssignCommonDominator(HBasicBlock *other)
int specials_count() const
HArgumentsObject * GetArgumentsObject() const
void set_argument_count(int count)
bool Dominates(HBasicBlock *other) const
static TestContext * cast(AstContext *context)
void Initialize(const HEnvironment *other)
int maximum_environment_size()
void set_last_instruction_index(int index)
HBasicBlock * true_branch() const
HBasicBlock * entry_block_
bool is_recursive() const
bool IsInlineReturnTarget() const
void BuildBranch(HValue *value)
AstContext * call_context()
HBasicBlock * parent_loop_header() const
const ZoneList< HBasicBlock * > * dominated_blocks() const
void IncrementCreateGraph(base::TimeDelta delta)
HControlInstruction * end_
HConstant * GetConstant0()
bool IsInsideNoSideEffectsScope()
void PrintBlockProperty(const char *name, int block_id)
SetOncePointer< HConstant > constant_1_
CompilationInfo * compilation_info_
HSimulate * CreateSimulate(BailoutId ast_id, RemovableSimulate removable)
void IncrementOptimizeGraph(base::TimeDelta delta)
HConstant * GetInvalidContext()
bool depends_on_empty_array_proto_elements()
void SetValueAt(int index, HValue *value)
void set_arguments_object(HArgumentsObject *arguments_object)
SetOncePointer< HConstant > constant_undefined_
HIfContinuation(HBasicBlock *true_branch, HBasicBlock *false_branch)
HOptimizedGraphBuilder * owner_
bool use_optimistic_licm_
HEnvironment(HEnvironment *outer, Handle< JSFunction > closure, FrameType frame_type, int arguments, Zone *zone)
HConstant * GetConstantFalse()
SetOncePointer< HConstant > constant_minus1_
const ZoneList< HBasicBlock * > * blocks() const
void set_entry(HEnterInlined *entry)
void PrintLongProperty(const char *name, int64_t value)
void SaveTiming(const char *name, base::TimeDelta time, unsigned size)
int first_instruction_index_
HBasicBlock * function_return_
bool HasEnvironment() const
bool is_local_index(int i) const
HStackCheck * stack_check_
int GetNextValueID(HValue *value)
HConstant * GetConstantTrue()
HPhi * AddNewPhi(int merged_index)
FunctionState(HOptimizedGraphBuilder *owner, CompilationInfo *info, InliningKind inlining_kind, int inlining_id)
void SetExpressionStackAt(int index_from_top, HValue *value)
HBasicBlock * true_branch_
TestContext * test_context_
void Bind(Variable *variable, HValue *value)
int type_change_checksum_
HStackCheck * stack_check() const
ZoneList< HInstruction * > * uint32_instructions_
HConstant * GetConstant(SetOncePointer< HConstant > *pointer, int32_t integer_value)
int first_expression_index() const
void set_arguments_elements(HArgumentsElements *arguments_elements)
bool HasPredecessor() const
HConstant * GetConstantUndefined()
void AddDominatedBlock(HBasicBlock *block)
HBasicBlock * entry_block() const
void RestoreActualValues()
CompilationInfo * info() const
void EliminateRedundantBoundsChecksUsingInductionVariables()
void AddBlock(HBasicBlock *block)
bool HasParentLoopHeader() const
int argument_count() const
HConstant * GetConstant1()
CompilationInfo * compilation_info()
bool IsDeoptimizing() const
bool IsConstant0(HConstant *constant)
bool IsConstant1(HConstant *constant)
void RegisterBackEdge(HBasicBlock *block)
int last_instruction_index() const
HBasicBlock * false_branch_
HValue * Lookup(Variable *variable) const
AstContext * call_context_
InliningKind inlining_kind() const
bool IsNestedInThisLoop(HLoopInformation *other)
const ZoneList< int > * deleted_phis() const
bool continuation_captured_
void SetInitialEnvironment(HEnvironment *env)
void Print(const char *stats_name)
HInstruction * last() const
HArgumentsObject * arguments_object()
void IncrementGenerateCode(base::TimeDelta delta)
void MarkAsLoopSuccessorDominator()
void set_stack_check(HStackCheck *stack_check)
ValueContext(HOptimizedGraphBuilder *owner, ArgumentsAllowedFlag flag)
int maximum_environment_size_
bool ProcessArgumentsObject()
void Bind(int index, HValue *value)
HBasicBlock * if_true() const
void PostProcessLoopHeader(IterationStatement *stmt)
bool ExpressionStackIsEmpty() const
int first_local_index() const
base::TimeDelta create_graph_
ZoneList< int > deleted_phis_
void TraceLiveRange(LiveRange *range, const char *type, Zone *zone)
int LoopNestingDepth() const
const ZoneList< HPhi * > * phi_list() const
bool Optimize(BailoutReason *bailout_reason)
void FinishExit(HControlInstruction *instruction, HSourcePosition position)
void PrintIntProperty(const char *name, int value)
HEnvironment * arguments_environment()
void DecrementInNoSideEffectsScope()
HEnvironment(const HEnvironment *other, Zone *zone)
HEnvironment * CopyForInlining(Handle< JSFunction > target, int arguments, FunctionLiteral *function, HConstant *undefined, InliningKind inlining_kind) const
virtual void ReturnContinuation(HIfContinuation *continuation, BailoutId ast_id) OVERRIDE
void Goto(HBasicBlock *block, HSourcePosition position, FunctionState *state=NULL, bool add_simulate=true)
void set_osr(HOsrBuilder *osr)
void GotoNoSimulate(HBasicBlock *block, HSourcePosition position)
HConstant * GetConstantHole()
HValue * ExpressionStackAt(int index_from_top) const
SetOncePointer< HConstant > constant_invalid_context_
HInstruction * first() const
HEnvironment * start_environment_
void UpdateEnvironment(HEnvironment *env)
HLoopInformation(HBasicBlock *loop_header, Zone *zone)
Handle< JSFunction > closure() const
HBasicBlock * loop_header_
void IncrementSubtotals(base::TimeDelta create_graph, base::TimeDelta optimize_graph, base::TimeDelta generate_code)
base::TimeDelta optimize_graph_
DISALLOW_COPY_AND_ASSIGN(HGraph)
void IncrementInNoSideEffectsScope()
void TraceHydrogen(const char *name, HGraph *graph)
HValue * LookupValue(int id) const
GrowableBitVector assigned_variables_
int TraceInlinedFunction(Handle< SharedFunctionInfo > shared, HSourcePosition position)
void SetArgumentsObject(HArgumentsObject *object)
const GrowableBitVector * assigned_variables() const
void FinalizeUniqueness()
HBasicBlock * inlined_entry_block_
bool IsLoopHeader() const
int last_instruction_index_
void ClearInlinedTestContext()
HArgumentsElements * arguments_elements_
void update_maximum_environment_size(int environment_size)
HSourcePosition outer_source_position_
bool IsConstantNull(HConstant *constant)
void Initialize(int parameter_count, int local_count, int stack_height)
SetOncePointer< HConstant > constant_false_
HEnvironment * CreateStubEnvironment(HEnvironment *outer, Handle< JSFunction > target, FrameType frame_type, int arguments) const
void set_block_id(int id)
int first_instruction_index() const
int update_type_change_checksum(int delta)
bool dominates_loop_successors_
bool use_optimistic_licm()
bool is_special_index(int i) const
virtual void ReturnInstruction(HInstruction *instr, BailoutId ast_id) OVERRIDE
ZoneList< HBasicBlock * > dominated_blocks_
void set_last(HInstruction *instr)
void PrintStringProperty(const char *name, const char *value)
virtual void ReturnControl(HControlInstruction *instr, BailoutId ast_id) OVERRIDE
void DetachLoopInformation()
bool IsConstantFalse(HConstant *constant)
HBasicBlock * dominator() const
bool HasExpressionAt(int index) const
bool IsStartBlock() const
void set_ast_id(BailoutId id)
bool disallow_adding_new_values_
bool IsConstantTrue(HConstant *constant)
void AddLeaveInlined(HValue *return_value, FunctionState *state, HSourcePosition position)
void set_parent_loop_header(HBasicBlock *block)
ArgumentsAllowedFlag flag_
bool TrueAndFalseReachable()
bool EqualToOrDominates(HBasicBlock *other) const
HBasicBlock(HGraph *graph)
void Trace(const char *name, HGraph *graph, LChunk *chunk)
FrameType frame_type() const
HBasicBlock * loop_header() const
HLoopInformation * current_loop() const
HEnvironment(Zone *zone, int parameter_count)
HEnvironment(HEnvironment *outer, Scope *scope, Handle< JSFunction > closure, Zone *zone)
void Continue(HBasicBlock **true_branch, HBasicBlock **false_branch)
HLoopInformation * loop_information_
bool IsConstantHole(HConstant *constant)
void RegisterPredecessor(HBasicBlock *pred)
void MarkDependsOnEmptyArrayProtoElements()
int no_side_effects_scope_count_
const ZoneList< HValue * > * values() const
void MarkAsInlineReturnTarget(HBasicBlock *inlined_entry_block)
HConstant * ReinsertConstantIfNecessary(HConstant *constant)
bool has_uint32_instructions()
void RecordUint32Instruction(HInstruction *instr)
int SourcePositionToScriptPosition(HSourcePosition position)
ZoneList< HBasicBlock * > blocks_
bool IsConstantMinus1(HConstant *constant)
void AddIncomingEdge(HBasicBlock *block, HEnvironment *other)
HBasicBlock * false_branch() const
const ZoneList< HBasicBlock * > * back_edges() const
bool IsStandardConstant(HConstant *constant)
bool CheckArgumentsPhiUses()
void AssignLoopSuccessorDominators()
void TraceCompilation(CompilationInfo *info)
List< const char * > names_
HeapStringAllocator string_allocator_
HBasicBlock * CreateBasicBlock()
HEnvironment * CopyWithoutHistory() const
int parameter_count() const
~NoObservableSideEffectsScope()
virtual void ReturnValue(HValue *value) OVERRIDE
SetOncePointer< HConstant > constant_0_
ZoneList< HPhi * > * phi_list_
void Capture(HBasicBlock *true_branch, HBasicBlock *false_branch)
void DisallowAddingNewValues()
void TraceLiveRanges(const char *name, LAllocator *allocator)
List< base::TimeDelta > times_
void IncrementFullCodeGen(base::TimeDelta full_code_gen)
Isolate * isolate() const
SetOncePointer< HConstant > constant_true_
void RecordDeletedPhi(int merge_index)
HEnvironment * DiscardInlined(bool drop_extra)
ZoneList< HBasicBlock * > back_edges_
void set_use_optimistic_licm(bool value)
TestContext(HOptimizedGraphBuilder *owner, Expression *condition, HBasicBlock *if_true, HBasicBlock *if_false)
bool depends_on_empty_array_proto_elements_
HEnvironment * last_environment() const
void Finish(HControlInstruction *last, HSourcePosition position)
HEnvironment * Copy() const
void TraceLithium(const char *name, LChunk *chunk)
bool is_parameter_index(int i) const
int IndexFor(Variable *variable) const
void BindContext(HValue *value)
HEnvironment * start_environment() const
const ZoneList< HBasicBlock * > * predecessors() const
base::TimeDelta generate_code_
MergeAtJoinBlock(HBasicBlock *block, bool deopt, MergeAtJoinBlock *next)
Condition * IfNot(HValue *p)
HAllocate * AllocateArray(HValue *capacity, HConstant *capacity_upper_bound, HValue *length_field, FillMode fill_mode=FILL_WITH_HOLE)
HValue * allocation_site_payload_
void Initialize(HGraphBuilder *builder)
HBasicBlock * header_block_
HAllocate * AllocateArray(HValue *capacity, int capacity_upper_bound, HValue *length_field, FillMode fill_mode=FILL_WITH_HOLE)
HValue * GetElementsLocation()
Condition * AndIf(HValue *p1, P2 p2, P3 p3)
JSArrayBuilder(HGraphBuilder *builder, ElementsKind kind, HValue *constructor_function=NULL)
void CaptureContinuation(HIfContinuation *continuation)
HValue * constructor_function_
HAllocate * elements_location()
Condition * AndIf(HValue *p)
JSArrayBuilder(HGraphBuilder *builder, ElementsKind kind, HValue *allocation_site_payload, HValue *constructor_function, AllocationSiteOverrideMode override_mode)
HInstruction * increment_
HValue * BeginBody(HValue *initial, HValue *terminating, Token::Value token)
HGraphBuilder * builder() const
void Deopt(const char *reason)
void Finish(HBasicBlock **then_continuation, HBasicBlock **else_continuation)
HBasicBlock * first_false_block_
HAllocate * elements_location_
int elements_size() const
bool pending_merge_block_
Condition * If(HValue *p)
MergeAtJoinBlock * merge_at_join_blocks_
Condition * IfNot(HValue *p1, P2 p2)
void InitializeDontCreateBlocks(HGraphBuilder *builder)
void AddMergeAtJoinBlock(bool deopt)
HBasicBlock * first_true_block_
LoopBuilder(HGraphBuilder *builder)
void ElseDeopt(const char *reason)
Condition * OrIf(HValue *p1, P2 p2, P3 p3)
IfBuilder(HGraphBuilder *builder, HIfContinuation *continuation)
void Return(HValue *value)
void BeginBody(int drop_count)
int deopt_merge_at_join_block_count_
int normal_merge_at_join_block_count_
HValue * increment_amount_
HAllocate * AllocateEmptyArray()
Condition * OrIf(HValue *p)
HValue * EmitInternalMapCode()
IfBuilder(HGraphBuilder *builder)
HBasicBlock * body_block_
void JoinContinuation(HIfContinuation *continuation)
Condition * If(HValue *p1, P2 p2)
HBasicBlock * split_edge_merge_block_
HBasicBlock * exit_trampoline_block_
void Initialize(HGraphBuilder *builder, HValue *context, Direction direction, HValue *increment_amount)
Condition * AndIf(HValue *p1, P2 p2)
Condition * OrIf(HValue *p1, P2 p2)
void ThenDeopt(const char *reason)
Condition * IfNot(HValue *p1, P2 p2, P3 p3)
HAllocate * AllocateArray(HValue *capacity, HValue *length_field, FillMode fill_mode=FILL_WITH_HOLE)
LoopBuilder(HGraphBuilder *builder, HValue *context, Direction direction, HValue *increment_amount)
Condition * If(HValue *p1, P2 p2, P3 p3)
HGraphBuilder * builder()
HBasicBlock * exit_block_
LoopBuilder(HGraphBuilder *builder, HValue *context, Direction direction)
HControlInstruction * AddCompare(HControlInstruction *compare)
HValue * BuildUncheckedDictionaryElementLoad(HValue *receiver, HValue *elements, HValue *key, HValue *hash)
HValue * BuildGetElementsKind(HValue *object)
void BuildJSObjectCheck(HValue *receiver, int bit_field_mask)
void BuildJSArrayHeader(HValue *array, HValue *array_map, HValue *elements, AllocationSiteMode mode, ElementsKind elements_kind, HValue *allocation_site_payload, HValue *length_field)
HInstruction * AddUncasted(P1 p1)
HAllocate * BuildAllocateElements(ElementsKind kind, HValue *size_in_bytes)
void FinishExitWithHardDeoptimization(const char *reason)
HInstruction * AddUncasted(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
HInstruction * BuildGetArrayFunction()
HInstruction * NewUncasted(P1 p1, P2 p2)
HEnvironment * environment() const
HValue * BuildAllocateArrayFromLength(JSArrayBuilder *array_builder, HValue *length_argument)
HValue * BuildCheckHeapObject(HValue *object)
I * Add(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
void BuildNonGlobalObjectCheck(HValue *receiver)
void set_source_position(HSourcePosition position)
I * Add(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
HValue * BuildStringAdd(HValue *left, HValue *right, HAllocationMode allocation_mode)
void BuildTransitionElementsKind(HValue *object, HValue *map, ElementsKind from_kind, ElementsKind to_kind, bool is_jsarray)
HInstruction * NewUncasted(P1 p1, P2 p2, P3 p3, P4 p4)
void EnterInlinedSource(int start_position, int id)
HValue * BuildElementIndexHash(HValue *index)
static const int kElementLoopUnrollThreshold
HStoreNamedField * AddStoreMapConstant(HValue *object, Handle< Map > map)
HSourcePosition position_
void set_current_block(HBasicBlock *block)
HInstruction * BuildUncheckedMonomorphicElementAccess(HValue *checked_object, HValue *key, HValue *val, bool is_js_array, ElementsKind elements_kind, PropertyAccessType access_type, LoadKeyedHoleMode load_mode, KeyedAccessStoreMode store_mode)
void SetSourcePosition(int position)
HValue * BuildAddStringLengths(HValue *left_length, HValue *right_length)
void BuildCopyElements(HValue *from_elements, ElementsKind from_elements_kind, HValue *to_elements, ElementsKind to_elements_kind, HValue *length, HValue *capacity)
HInstruction * NewUncasted(P1 p1, P2 p2, P3 p3)
HValue * AddLoadJSBuiltin(Builtins::JavaScript builtin)
HValue * BuildCreateConsString(HValue *length, HValue *left, HValue *right, HAllocationMode allocation_mode)
void AddSimulate(BailoutId id, RemovableSimulate removable=FIXED_SIMULATE)
I * New(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
void GotoNoSimulate(HBasicBlock *from, HBasicBlock *target)
void GotoNoSimulate(HBasicBlock *target)
HInstruction * AddUncasted(P1 p1, P2 p2)
I * Add(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
HInstruction * NewUncasted(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
HInstruction * NewUncasted(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
HSourcePosition source_position()
void AddLeaveInlined(HValue *return_value, FunctionState *state)
HLoadNamedField * AddLoadElements(HValue *object, HValue *dependency=NULL)
void BuildArrayBufferViewInitialization(HValue *obj, HValue *buffer, HValue *byte_offset, HValue *byte_length)
void BuildCreateAllocationMemento(HValue *previous_object, HValue *previous_object_size, HValue *payload)
HConstant * EstablishElementsAllocationSize(ElementsKind kind, int capacity)
HGraphBuilder(CompilationInfo *info)
I * New(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
HValue * BuildKeyedLookupCacheHash(HValue *object, HValue *key)
virtual HValue * context()=0
HAllocate * BuildAllocate(HValue *object_size, HType type, InstanceType instance_type, HAllocationMode allocation_mode)
HInstruction * NewUncasted(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
HInstruction * BuildCheckPrototypeMaps(Handle< JSObject > prototype, Handle< JSObject > holder)
void BuildFillElementsWithValue(HValue *elements, ElementsKind elements_kind, HValue *from, HValue *to, HValue *value)
I * New(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5)
HValue * BuildRegExpConstructResult(HValue *length, HValue *index, HValue *input)
HValue * BuildDecodeField(HValue *encoded_field)
void set_scope(Scope *scope)
HLoadNamedField * AddLoadFixedArrayLength(HValue *object, HValue *dependency=NULL)
HInstruction * AddUncasted(P1 p1, P2 p2, P3 p3, P4 p4)
HValue * BuildCheckForCapacityGrow(HValue *object, HValue *elements, ElementsKind kind, HValue *length, HValue *key, bool is_js_array, PropertyAccessType access_type)
HValue * BuildNumberToString(HValue *object, Type *type)
HInstruction * AddLoadStringInstanceType(HValue *string)
HSourcePosition ScriptPositionToSourcePosition(int position)
void Goto(HBasicBlock *from, HBasicBlock *target, FunctionState *state=NULL, bool add_simulate=true)
HInstruction * AddElementAccess(HValue *elements, HValue *checked_key, HValue *val, HValue *dependency, ElementsKind elements_kind, PropertyAccessType access_type, LoadKeyedHoleMode load_mode=NEVER_RETURN_HOLE)
HLoadNamedField * AddLoadMap(HValue *object, HValue *dependency=NULL)
HBasicBlock * CreateBasicBlock(HEnvironment *env)
void BuildCopySeqStringChars(HValue *src, HValue *src_offset, String::Encoding src_encoding, HValue *dst, HValue *dst_offset, String::Encoding dst_encoding, HValue *length)
HValue * BuildBinaryOperation(Token::Value op, HValue *left, HValue *right, Type *left_type, Type *right_type, Type *result_type, Maybe< int > fixed_right_arg, HAllocationMode allocation_mode)
HLoadNamedField * AddLoadArrayLength(HValue *object, ElementsKind kind, HValue *dependency=NULL)
HValue * BuildCalculateElementsSize(ElementsKind kind, HValue *capacity)
Isolate * isolate() const
HValue * BuildUncheckedStringAdd(HValue *left, HValue *right, HAllocationMode allocation_mode)
void BuildKeyedIndexCheck(HValue *key, HIfContinuation *join_continuation)
I * Add(P1 p1, P2 p2, P3 p3, P4 p4)
HValue * EnforceNumberType(HValue *number, Type *expected)
virtual bool BuildGraph()=0
HInstruction * AddUncasted()
void BuildFillElementsWithHole(HValue *elements, ElementsKind elements_kind, HValue *from, HValue *to)
HInstruction * AddUncasted(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
HInstruction * AddInstruction(HInstruction *instr)
void FinishExitCurrentBlock(HControlInstruction *instruction)
HValue * BuildCloneShallowArrayEmpty(HValue *boilerplate, HValue *allocation_site, AllocationSiteMode mode)
HInstruction * NewUncasted()
HValue * BuildNewElementsCapacity(HValue *old_capacity)
HInstruction * BuildConstantMapCheck(Handle< JSObject > constant)
HValue * BuildCloneShallowArrayCow(HValue *boilerplate, HValue *allocation_site, AllocationSiteMode mode, ElementsKind kind)
HBasicBlock * CreateLoopHeaderBlock()
HAllocate * AllocateJSArrayObject(AllocationSiteMode mode)
void BuildCompareNil(HValue *value, Type *type, HIfContinuation *continuation)
I * Add(P1 p1, P2 p2, P3 p3)
I * Add(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
HValue * BuildCopyElementsOnWrite(HValue *object, HValue *elements, ElementsKind kind, HValue *length)
HInstruction * AddUncasted(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6)
void AddIncrementCounter(StatsCounter *counter)
HInstruction * NewUncasted(P1 p1)
HValue * BuildAllocateElementsAndInitializeElementsHeader(ElementsKind kind, HValue *capacity)
HValue * BuildGrowElementsCapacity(HValue *object, HValue *elements, ElementsKind kind, ElementsKind new_kind, HValue *length, HValue *new_capacity)
I * New(P1 p1, P2 p2, P3 p3, P4 p4)
HValue * TruncateToNumber(HValue *value, Type **expected)
I * New(P1 p1, P2 p2, P3 p3)
I * New(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
HValue * BuildCheckString(HValue *string)
CompilationInfo * top_info()
void BuildTestForDictionaryProperties(HValue *object, HIfContinuation *continuation)
bool MatchRotateRight(HValue *left, HValue *right, HValue **operand, HValue **shift_amount)
HBasicBlock * current_block_
HInstruction * BuildGetNativeContext()
HInstruction * AddUncasted(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7, P8 p8)
HInstruction * AddLoadStringLength(HValue *string)
HValue * BuildObjectSizeAlignment(HValue *unaligned_size, int header_size)
HBasicBlock * current_block() const
HInstruction * NewUncasted(P1 p1, P2 p2, P3 p3, P4 p4, P5 p5, P6 p6, P7 p7)
void AddLeaveInlined(HBasicBlock *block, HValue *return_value, FunctionState *state)
void BuildInitializeElementsHeader(HValue *elements, ElementsKind kind, HValue *capacity)
void Goto(HBasicBlock *target, FunctionState *state=NULL, bool add_simulate=true)
I * AddInstructionTyped(I *instr)
void FinishCurrentBlock(HControlInstruction *last)
HInstruction * AddUncasted(P1 p1, P2 p2, P3 p3)
HValue * BuildWrapReceiver(HValue *object, HValue *function)
HValue * BuildCloneShallowArrayNonEmpty(HValue *boilerplate, HValue *allocation_site, AllocationSiteMode mode, ElementsKind kind)
HBasicBlock * break_block_
HOptimizedGraphBuilder * owner_
void set_continue_block(HBasicBlock *block)
void set_break_block(HBasicBlock *block)
HBasicBlock * break_block()
HBasicBlock * Get(BreakableStatement *stmt, BreakType type, Scope **scope, int *drop_extra)
BreakAndContinueScope(BreakAndContinueInfo *info, HOptimizedGraphBuilder *owner)
BreakAndContinueInfo * info()
BreakableStatement * target()
BreakAndContinueScope * next()
BreakableStatement * target_
HBasicBlock * continue_block_
HBasicBlock * continue_block()
HOptimizedGraphBuilder * owner()
BreakAndContinueInfo * info_
BreakAndContinueScope * next_
BreakAndContinueInfo(BreakableStatement *target, Scope *scope, int drop_extra=0)
CompilationInfo * current_info()
Type * ToType(Handle< Map > map)
bool LookupInPrototypes()
HOptimizedGraphBuilder * builder_
void GeneralizeRepresentation(Representation r)
CompilationInfo * top_info()
bool IsConfigurable() const
PropertyAccessInfo(HOptimizedGraphBuilder *builder, PropertyAccessType access_type, Type *type, Handle< String > name)
SmallMapList * field_maps()
PropertyAccessType access_type_
Handle< JSFunction > accessor()
Isolate * isolate() const
Handle< Map > GetFieldOwnerFromMap(Handle< Map > map) const
bool CanAccessAsMonomorphic(SmallMapList *types)
Handle< String > name() const
bool IsJSObjectFieldAccessor()
Handle< JSObject > holder_
void LoadFieldMaps(Handle< Map > map)
bool CanAccessMonomorphic()
bool LoadResult(Handle< Map > map)
Handle< Object > constant()
Handle< JSObject > holder()
Handle< Object > constant_
bool IsTransition() const
Handle< HeapType > GetFieldTypeFromMap(Handle< Map > map) const
bool IsCompatible(PropertyAccessInfo *other)
int GetLocalFieldIndexFromMap(Handle< Map > map) const
Handle< Object > GetAccessorsFromMap(Handle< Map > map) const
Representation representation() const
Handle< Object > GetConstantFromMap(Handle< Map > map) const
Handle< JSFunction > accessor_
Handle< Map > transition()
Handle< JSObject > api_holder_
bool GetJSObjectFieldAccess(HObjectAccess *access)
static const InlineFunctionGenerator kInlineFunctionGenerators[]
bool TryInlineBuiltinMethodCall(Call *expr, HValue *receiver, Handle< Map > receiver_map)
PushBeforeSimulateBehavior
@ NO_PUSH_BEFORE_SIMULATE
HBasicBlock * BuildLoopEntry()
HInstruction * BuildFastLiteral(Handle< JSObject > boilerplate_object, AllocationSiteUsageContext *site_context)
static const int kUnlimitedMaxInlinedNodes
bool TryInlineApiMethodCall(Call *expr, HValue *receiver, SmallMapList *receiver_types)
static const int kMaxStorePolymorphism
void HandleLiteralCompareTypeof(CompareOperation *expr, Expression *sub_expr, Handle< String > check)
void VisitForControl(Expression *expr, HBasicBlock *true_block, HBasicBlock *false_block)
HValue * BuildBinaryOperation(BinaryOperation *expr, HValue *left, HValue *right, PushBeforeSimulateBehavior push_sim_result)
HBasicBlock * CreateLoop(IterationStatement *statement, HBasicBlock *loop_entry, HBasicBlock *body_exit, HBasicBlock *loop_successor, HBasicBlock *break_block)
HInstruction * BuildIncrement(bool returns_original_input, CountOperation *expr)
HInstruction * BuildNamedAccess(PropertyAccessType access, BailoutId ast_id, BailoutId reutrn_id, Expression *expr, HValue *object, Handle< String > name, HValue *value, bool is_uninitialized=false)
HValue * BuildAllocateFixedTypedArray(ExternalArrayType array_type, size_t element_size, ElementsKind fixed_elements_kind, HValue *byte_length, HValue *length)
HInstruction * NewArgumentAdaptorCall(HValue *fun, HValue *context, int argument_count, HValue *expected_param_count)
void VisitNot(UnaryOperation *expr)
HInstruction * BuildMonomorphicAccess(PropertyAccessInfo *info, HValue *object, HValue *checked_object, HValue *value, BailoutId ast_id, BailoutId return_id, bool can_inline_accessor=true)
void HandleLiteralCompareNil(CompareOperation *expr, Expression *sub_expr, NilValue nil)
AstContext * ast_context_
void(HOptimizedGraphBuilder::* InlineFunctionGenerator)(CallRuntime *call)
HBasicBlock * CreateJoin(HBasicBlock *first, HBasicBlock *second, BailoutId join_id)
void ClearInlinedTestContext()
TestContext * inlined_test_context() const
HCheckMaps * AddCheckMap(HValue *object, Handle< Map > map)
void VisitComma(BinaryOperation *expr)
void BuildEmitFixedArray(Handle< FixedArrayBase > elements, ElementsKind kind, HValue *object_elements, AllocationSiteUsageContext *site_context)
void VisitForTypeOf(Expression *expr)
HValue * BuildArrayIndexOf(HValue *receiver, HValue *search_element, ElementsKind kind, ArrayIndexOfMode mode)
AstContext * call_context() const
HInstruction * BuildStringCharCodeAt(HValue *string, HValue *index)
static const int kMaxCallPolymorphism
HOptimizedGraphBuilder(CompilationInfo *info)
BreakAndContinueScope * break_scope_
void BuildInitElementsInObjectHeader(Handle< JSObject > boilerplate_object, HInstruction *object, HInstruction *object_elements)
HInstruction * BuildNamedGeneric(PropertyAccessType access, Expression *expr, HValue *object, Handle< String > name, HValue *value, bool is_uninitialized=false)
void HandleGlobalVariableAssignment(Variable *var, HValue *value, BailoutId ast_id)
friend class FunctionState
BreakAndContinueScope * break_scope() const
FunctionState initial_function_state_
bool TryInline(Handle< JSFunction > target, int arguments_count, HValue *implicit_return_value, BailoutId ast_id, BailoutId return_id, InliningKind inlining_kind, HSourcePosition position)
void VisitExpressions(ZoneList< Expression * > *exprs)
Type * ToType(Handle< Map > map)
bool IsCallArrayInlineable(int argument_count, Handle< AllocationSite > site)
AstContext * ast_context() const
HValue * BuildAllocateExternalElements(ExternalArrayType array_type, bool is_zero_byte_offset, HValue *buffer, HValue *byte_offset, HValue *length)
void BuildArrayCall(Expression *expr, int arguments_count, HValue *function, Handle< AllocationSite > cell)
bool TryInlineApply(Handle< JSFunction > function, Call *expr, int arguments_count)
bool IsEligibleForEnvironmentLivenessAnalysis(Variable *var, int index, HValue *value, HEnvironment *env)
bool TryInlineApiFunctionCall(Call *expr, HValue *receiver)
static const int kMaxLoadPolymorphism
CompilationInfo * current_info() const
bool TryArgumentsAccess(Property *expr)
void BuildEmitFixedDoubleArray(Handle< FixedArrayBase > elements, ElementsKind kind, HValue *object_elements)
HInstruction * NewPlainFunctionCall(HValue *fun, int argument_count, bool pass_argument_count)
Handle< JSFunction > array_function()
bool TryInlineConstruct(CallNew *expr, HValue *implicit_return_value)
HInstruction * BuildCallConstantFunction(Handle< JSFunction > target, int argument_count)
void SetUpScope(Scope *scope)
void PushArgumentsFromEnvironment(int count)
virtual void VisitStatements(ZoneList< Statement * > *statements) OVERRIDE
void HandleCompoundAssignment(Assignment *expr)
bool TryHandleArrayCall(Call *expr, HValue *function)
bool TryCallApply(Call *expr)
HValue * ImplicitReceiverFor(HValue *function, Handle< JSFunction > target)
bool TryInlineSetter(Handle< JSFunction > setter, Handle< Map > receiver_map, BailoutId id, BailoutId assignment_id, HValue *implicit_return_value)
void VisitDeclarations(ZoneList< Declaration * > *declarations)
bool TryInlineApiGetter(Handle< JSFunction > function, Handle< Map > receiver_map, BailoutId ast_id)
static const int kUnlimitedMaxInlinedNodesCumulative
GlobalPropertyAccess LookupGlobalProperty(Variable *var, LookupIterator *it, PropertyAccessType access_type)
void BindIfLive(Variable *var, HValue *value)
void set_ast_context(AstContext *context)
static const int kMaxFastLiteralProperties
HValue * HandleKeyedElementAccess(HValue *obj, HValue *key, HValue *val, Expression *expr, BailoutId ast_id, BailoutId return_id, PropertyAccessType access_type, bool *has_side_effects)
bool TryInlineCall(Call *expr)
FunctionState * function_state_
void set_function_state(FunctionState *state)
void set_break_scope(BreakAndContinueScope *head)
virtual bool BuildGraph() OVERRIDE
friend class KeyedLoadFastElementStub
ZoneList< Handle< Object > > globals_
bool PreProcessOsrEntry(IterationStatement *statement)
HValue * BuildContextChainWalk(Variable *var)
StrictMode function_strict_mode()
bool TryHandleArrayCallNew(CallNew *expr, HValue *function)
FunctionState * function_state() const
HInstruction * BuildMonomorphicElementAccess(HValue *object, HValue *key, HValue *val, HValue *dependency, Handle< Map > map, PropertyAccessType access_type, KeyedAccessStoreMode store_mode)
void VisitDelete(UnaryOperation *expr)
HControlInstruction * BuildCompareInstruction(Token::Value op, HValue *left, HValue *right, Type *left_type, Type *right_type, Type *combined_type, HSourcePosition left_position, HSourcePosition right_position, PushBeforeSimulateBehavior push_sim_result, BailoutId bailout_id)
void VisitArithmeticExpression(BinaryOperation *expr)
void BuildLoad(Property *property, BailoutId ast_id)
HBasicBlock * function_return() const
LoadKeyedHoleMode BuildKeyedHoleMode(Handle< Map > map)
bool TryInlineGetter(Handle< JSFunction > getter, Handle< Map > receiver_map, BailoutId ast_id, BailoutId return_id)
bool TryInlineApiSetter(Handle< JSFunction > function, Handle< Map > receiver_map, BailoutId ast_id)
void BuildStoreForEffect(Expression *expression, Property *prop, BailoutId ast_id, BailoutId return_id, HValue *object, HValue *key, HValue *value)
void BuildEmitInObjectProperties(Handle< JSObject > boilerplate_object, HInstruction *object, AllocationSiteUsageContext *site_context, PretenureFlag pretenure_flag)
HValue * LookupAndMakeLive(Variable *var)
void VisitLogicalExpression(BinaryOperation *expr)
void HandlePolymorphicCallNamed(Call *expr, HValue *receiver, SmallMapList *types, Handle< String > name)
HInstruction * BuildStoreNamedField(PropertyAccessInfo *info, HValue *checked_object, HValue *value)
HInstruction * TryBuildConsolidatedElementLoad(HValue *object, HValue *key, HValue *val, SmallMapList *maps)
HInstruction * BuildKeyedGeneric(PropertyAccessType access_type, Expression *expr, HValue *object, HValue *key, HValue *value)
void TraceInline(Handle< JSFunction > target, Handle< JSFunction > caller, const char *failure_reason)
HValue * HandlePolymorphicElementAccess(Expression *expr, HValue *object, HValue *key, HValue *val, SmallMapList *maps, PropertyAccessType access_type, KeyedAccessStoreMode store_mode, bool *has_side_effects)
void VisitVoid(UnaryOperation *expr)
int InliningAstSize(Handle< JSFunction > target)
void HandlePolymorphicNamedFieldAccess(PropertyAccessType access_type, Expression *expr, BailoutId ast_id, BailoutId return_id, HValue *object, HValue *value, SmallMapList *types, Handle< String > name)
bool TryInlineBuiltinFunctionCall(Call *expr)
bool TryInlineApiCall(Handle< JSFunction > function, HValue *receiver, SmallMapList *receiver_maps, int argc, BailoutId ast_id, ApiCallType call_type)
void VisitLoopBody(IterationStatement *stmt, HBasicBlock *loop_entry)
static const int kUnlimitedMaxInlinedSourceSize
HOsrBuilder * osr() const
HInstruction * PreProcessCall(Instruction *call)
HInstruction * BuildLoadNamedField(PropertyAccessInfo *info, HValue *checked_object)
void VisitForEffect(Expression *expr)
HInstruction * BuildThisFunction()
void BuildInlinedCallArray(Expression *expression, int argument_count, Handle< AllocationSite > site)
DEFINE_AST_VISITOR_SUBCLASS_MEMBERS()
void VisitForValue(Expression *expr, ArgumentsAllowedFlag flag=ARGUMENTS_NOT_ALLOWED)
void PushLoad(Property *property, HValue *object, HValue *key)
static const int kMaxFastLiteralDepth
void VisitTypeof(UnaryOperation *expr)
void HandlePropertyAssignment(Assignment *expr)
void BuildEmitElements(Handle< JSObject > boilerplate_object, Handle< FixedArrayBase > elements, HValue *object_elements, AllocationSiteUsageContext *site_context)
void Bind(Variable *var, HValue *value)
HBasicBlock * JoinContinue(IterationStatement *statement, HBasicBlock *exit_block, HBasicBlock *continue_block)
void EnsureArgumentsArePushedForAccess()
void BuildEmitObjectHeader(Handle< JSObject > boilerplate_object, HInstruction *object)
DISALLOW_COPY_AND_ASSIGN(HOptimizedGraphBuilder)
void Bailout(BailoutReason reason)
void BuildStore(Expression *expression, Property *prop, BailoutId ast_id, BailoutId return_id, bool is_uninitialized=false)
void AddCheckPrototypeMaps(Handle< JSObject > holder, Handle< Map > receiver_map)
DISALLOW_COPY_AND_ASSIGN(HPhase)
HPhase(const char *name, HGraph *graph)
void set_position(int position)
void set_inlining_id(int inlining_id)
static const int kPreallocatedArrayElements
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
static void AddDependentCompilationInfo(Handle< Map > map, DependentCode::DependencyGroup group, CompilationInfo *info)
static const int kNoPosition
bool Equals(String *other)
static TypeHandle Array(TypeHandle element, Region *region)
bool IsStackAllocated() const
bool is_arguments() const
#define WARN_UNUSED_RESULT
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf map
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in only print modified registers Trace simulator debug messages Implied by trace sim abort randomize hashes to avoid predictable hash Fixed seed to use to hash property Print the time it takes to deserialize the snapshot A filename with extra code to be included in the A file to write the raw snapshot bytes to(mksnapshot only)") DEFINE_STRING(raw_context_file
enable harmony numeric enable harmony object literal extensions Optimize object size
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be expose gc extension under the specified name show built in functions in stack traces use random jit cookie to mask large constants minimum length for automatic enable preparsing CPU profiler sampling interval in microseconds trace out of bounds accesses to external arrays default size of stack region v8 is allowed to maximum length of function source code printed in a stack trace min size of a semi the new space consists of two semi spaces print one trace line following each garbage collection do not print trace line after scavenger collection print cumulative GC statistics in name
enable harmony numeric enable harmony object literal extensions true
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long mode(MIPS only)") DEFINE_BOOL(enable_always_align_csp
enable harmony numeric enable harmony object literal extensions Optimize object Array DOM strings and string trace pretenuring decisions of HAllocate instructions Enables optimizations which favor memory size over execution speed maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining trace the tracking of allocation sites deoptimize every n garbage collections perform array bounds checks elimination analyze liveness of environment slots and zap dead values flushes the cache of optimized code for closures on every GC allow uint32 values on optimize frames if they are used only in safe operations track concurrent recompilation artificial compilation delay in ms do not emit check maps for constant values that have a leaf deoptimize the optimized code if the layout of the maps changes enable context specialization in TurboFan execution budget before interrupt is triggered max percentage of megamorphic generic ICs to allow optimization enable use of SAHF instruction if enable use of VFP3 instructions if available enable use of NEON instructions if enable use of SDIV and UDIV instructions if enable use of MLS instructions if enable loading bit constant by means of movw movt instruction enable unaligned accesses for enable use of d16 d31 registers on ARM this requires VFP3 force all emitted branches to be in long enable alignment of csp to bytes on platforms which prefer the register to always be NULL
enable harmony numeric enable harmony object literal extensions Optimize object Array shift
#define INLINE_FUNCTION_GENERATOR_DECLARATION(Name, argc, ressize)
#define DECLARE_VISIT(type)
#define DCHECK(condition)
void StrNCpy(Vector< char > dest, const char *src, size_t n)
TypeImpl< ZoneTypeConfig > Type
int SNPrintF(Vector< char > str, const char *format,...)
bool IsFastDoubleElementsKind(ElementsKind kind)
Handle< T > handle(T *t, Isolate *isolate)
int WriteChars(const char *filename, const char *str, int size, bool verbose)
OStream & operator<<(OStream &os, const BasicBlockProfiler &p)
AllocationSiteOverrideMode
kFeedbackVectorOffset flag
STATIC_ASSERT(sizeof(CPURegister)==sizeof(Register))
Debugger support for the V8 JavaScript engine.
#define INLINE_OPTIMIZED_FUNCTION_LIST(F)
#define INLINE_FUNCTION_LIST(F)