44 HGraph* graph = builder_->
graph();
52 HBasicBlock* non_osr_entry = graph->CreateBasicBlock();
53 osr_entry_ = graph->CreateBasicBlock();
54 HValue* true_value = graph->GetConstantTrue();
56 non_osr_entry, osr_entry_);
59 HBasicBlock* loop_predecessor = graph->CreateBasicBlock();
60 builder_->
Goto(non_osr_entry, loop_predecessor);
63 osr_entry_->set_osr_entry();
66 HEnvironment *environment = builder_->
environment();
67 int first_expression_index = environment->first_expression_index();
68 int length = environment->length();
71 for (
int i = 0; i < first_expression_index; ++i) {
72 HUnknownOSRValue* osr_value
73 = builder_->
Add<HUnknownOSRValue>(environment, i);
74 environment->Bind(i, osr_value);
75 osr_values_->
Add(osr_value, zone);
78 if (first_expression_index != length) {
79 environment->Drop(length - first_expression_index);
80 for (
int i = first_expression_index; i < length; ++i) {
81 HUnknownOSRValue* osr_value
82 = builder_->
Add<HUnknownOSRValue>(environment, i);
83 environment->Push(osr_value);
84 osr_values_->
Add(osr_value, zone);
88 unoptimized_frame_slots_ =
89 environment->local_count() + environment->push_count();
93 environment = environment->Copy();
96 builder_->
Add<HSimulate>(osr_entry_id);
97 builder_->
Add<HOsrEntry>(osr_entry_id);
98 HContext* context = builder_->
Add<HContext>();
99 environment->BindContext(context);
100 builder_->
Goto(loop_predecessor);
101 loop_predecessor->SetJoinId(statement->
EntryId());
106 return osr_loop_entry_;
117 for (
int j = 0; j < phis->length(); j++) {
118 HPhi* phi = phis->
at(j);
119 if (phi->HasMergedIndex()) {
120 osr_values_->
at(phi->merged_index())->set_incoming_value(phi);
enable upcoming ES6 features enable harmony block scoping enable harmony enable harmony proxies enable harmony generators enable harmony numeric enable harmony string enable harmony math functions harmony_scoping harmony_symbols harmony_collections harmony_iteration harmony_strings harmony_scoping harmony_maths tracks arrays with only smi values Optimize object Array DOM strings and string pretenure call new trace pretenuring decisions of HAllocate instructions track fields with only smi values track fields with heap values track_fields track_fields Enables optimizations which favor memory size over execution speed use string slices optimization filter maximum number of GVN fix point iterations use function inlining use allocation folding eliminate write barriers targeting allocations in optimized code maximum source size in bytes considered for a single inlining maximum cumulative number of AST nodes considered for inlining crankshaft harvests type feedback from stub cache trace check elimination phase hydrogen tracing filter NULL
#define ASSERT(condition)
HBasicBlock * current_block() const
HEnvironment * environment() const
CompilationInfo * current_info() const
BailoutId osr_ast_id() const
void set_current_block(HBasicBlock *block)
HBasicBlock * BuildLoopEntry()
BailoutId OsrEntryId() const
HBasicBlock * BuildOsrLoopEntry(IterationStatement *statement)
bool HasOsrEntryAt(IterationStatement *statement)
void Add(const T &element, AllocationPolicy allocator=AllocationPolicy())
BailoutId EntryId() const
void FinishCurrentBlock(HControlInstruction *last)
void Goto(HBasicBlock *from, HBasicBlock *target, FunctionState *state=NULL, bool add_simulate=true)