OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
4 // met: | 4 // met: |
5 // | 5 // |
6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
(...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 | 56 |
57 // only one OSR point per compile is allowed. | 57 // only one OSR point per compile is allowed. |
58 ASSERT(graph->osr() == NULL); | 58 ASSERT(graph->osr() == NULL); |
59 | 59 |
60 // remember this builder as the one OSR builder in the graph. | 60 // remember this builder as the one OSR builder in the graph. |
61 graph->set_osr(this); | 61 graph->set_osr(this); |
62 | 62 |
63 HBasicBlock* non_osr_entry = graph->CreateBasicBlock(); | 63 HBasicBlock* non_osr_entry = graph->CreateBasicBlock(); |
64 osr_entry_ = graph->CreateBasicBlock(); | 64 osr_entry_ = graph->CreateBasicBlock(); |
65 HValue* true_value = graph->GetConstantTrue(); | 65 HValue* true_value = graph->GetConstantTrue(); |
66 HBranch* test = new(zone) HBranch(true_value, ToBooleanStub::Types(), | 66 HBranch* test = builder_->New<HBranch>(true_value, ToBooleanStub::Types(), |
67 non_osr_entry, osr_entry_); | 67 non_osr_entry, osr_entry_); |
68 builder_->current_block()->Finish(test); | 68 builder_->current_block()->Finish(test); |
69 | 69 |
70 HBasicBlock* loop_predecessor = graph->CreateBasicBlock(); | 70 HBasicBlock* loop_predecessor = graph->CreateBasicBlock(); |
71 non_osr_entry->Goto(loop_predecessor); | 71 non_osr_entry->Goto(loop_predecessor); |
72 | 72 |
73 builder_->set_current_block(osr_entry_); | 73 builder_->set_current_block(osr_entry_); |
74 osr_entry_->set_osr_entry(); | 74 osr_entry_->set_osr_entry(); |
75 BailoutId osr_entry_id = statement->OsrEntryId(); | 75 BailoutId osr_entry_id = statement->OsrEntryId(); |
76 | 76 |
77 HEnvironment *environment = builder_->environment(); | 77 HEnvironment *environment = builder_->environment(); |
(...skipping 49 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
127 const ZoneList<HPhi*>* phis = osr_loop_entry_->phis(); | 127 const ZoneList<HPhi*>* phis = osr_loop_entry_->phis(); |
128 for (int j = 0; j < phis->length(); j++) { | 128 for (int j = 0; j < phis->length(); j++) { |
129 HPhi* phi = phis->at(j); | 129 HPhi* phi = phis->at(j); |
130 if (phi->HasMergedIndex()) { | 130 if (phi->HasMergedIndex()) { |
131 osr_values_->at(phi->merged_index())->set_incoming_value(phi); | 131 osr_values_->at(phi->merged_index())->set_incoming_value(phi); |
132 } | 132 } |
133 } | 133 } |
134 } | 134 } |
135 | 135 |
136 } } // namespace v8::internal | 136 } } // namespace v8::internal |
OLD | NEW |