OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #include "src/crankshaft/hydrogen-osr.h" | 5 #include "src/crankshaft/hydrogen-osr.h" |
6 | 6 |
7 #include "src/crankshaft/hydrogen.h" | 7 #include "src/crankshaft/hydrogen.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 12 matching lines...) Expand all Loading... |
23 | 23 |
24 // only one OSR point per compile is allowed. | 24 // only one OSR point per compile is allowed. |
25 DCHECK(graph->osr() == NULL); | 25 DCHECK(graph->osr() == NULL); |
26 | 26 |
27 // remember this builder as the one OSR builder in the graph. | 27 // remember this builder as the one OSR builder in the graph. |
28 graph->set_osr(this); | 28 graph->set_osr(this); |
29 | 29 |
30 HBasicBlock* non_osr_entry = graph->CreateBasicBlock(); | 30 HBasicBlock* non_osr_entry = graph->CreateBasicBlock(); |
31 osr_entry_ = graph->CreateBasicBlock(); | 31 osr_entry_ = graph->CreateBasicBlock(); |
32 HValue* true_value = graph->GetConstantTrue(); | 32 HValue* true_value = graph->GetConstantTrue(); |
33 HBranch* test = builder_->New<HBranch>(true_value, ToBooleanICStub::Types(), | 33 HBranch* test = builder_->New<HBranch>(true_value, ToBooleanHint::kNone, |
34 non_osr_entry, osr_entry_); | 34 non_osr_entry, osr_entry_); |
35 builder_->FinishCurrentBlock(test); | 35 builder_->FinishCurrentBlock(test); |
36 | 36 |
37 HBasicBlock* loop_predecessor = graph->CreateBasicBlock(); | 37 HBasicBlock* loop_predecessor = graph->CreateBasicBlock(); |
38 builder_->Goto(non_osr_entry, loop_predecessor); | 38 builder_->Goto(non_osr_entry, loop_predecessor); |
39 | 39 |
40 builder_->set_current_block(osr_entry_); | 40 builder_->set_current_block(osr_entry_); |
41 osr_entry_->set_osr_entry(); | 41 osr_entry_->set_osr_entry(); |
42 BailoutId osr_entry_id = statement->OsrEntryId(); | 42 BailoutId osr_entry_id = statement->OsrEntryId(); |
43 | 43 |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
95 for (int j = 0; j < phis->length(); j++) { | 95 for (int j = 0; j < phis->length(); j++) { |
96 HPhi* phi = phis->at(j); | 96 HPhi* phi = phis->at(j); |
97 if (phi->HasMergedIndex()) { | 97 if (phi->HasMergedIndex()) { |
98 osr_values_->at(phi->merged_index())->set_incoming_value(phi); | 98 osr_values_->at(phi->merged_index())->set_incoming_value(phi); |
99 } | 99 } |
100 } | 100 } |
101 } | 101 } |
102 | 102 |
103 } // namespace internal | 103 } // namespace internal |
104 } // namespace v8 | 104 } // namespace v8 |
OLD | NEW |