OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
4 | 4 |
5 #include "vm/flow_graph_builder.h" | 5 #include "vm/flow_graph_builder.h" |
6 | 6 |
7 #include "lib/invocation_mirror.h" | 7 #include "lib/invocation_mirror.h" |
8 #include "vm/ast_printer.h" | 8 #include "vm/ast_printer.h" |
9 #include "vm/bit_vector.h" | 9 #include "vm/bit_vector.h" |
10 #include "vm/class_finalizer.h" | 10 #include "vm/class_finalizer.h" |
(...skipping 2364 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2375 } | 2375 } |
2376 | 2376 |
2377 | 2377 |
2378 void EffectGraphVisitor::BuildLetTempExpressions(LetNode* node) { | 2378 void EffectGraphVisitor::BuildLetTempExpressions(LetNode* node) { |
2379 intptr_t num_temps = node->num_temps(); | 2379 intptr_t num_temps = node->num_temps(); |
2380 for (intptr_t i = 0; i < num_temps; ++i) { | 2380 for (intptr_t i = 0; i < num_temps; ++i) { |
2381 ValueGraphVisitor for_value(owner()); | 2381 ValueGraphVisitor for_value(owner()); |
2382 node->InitializerAt(i)->Visit(&for_value); | 2382 node->InitializerAt(i)->Visit(&for_value); |
2383 Append(for_value); | 2383 Append(for_value); |
2384 Value* temp_val = for_value.value(); | 2384 Value* temp_val = for_value.value(); |
| 2385 ASSERT(!node->TempAt(i)->HasIndex() || |
| 2386 (node->TempAt(i)->index() == GetCurrentTempLocalIndex())); |
2385 node->TempAt(i)->set_index(GetCurrentTempLocalIndex()); | 2387 node->TempAt(i)->set_index(GetCurrentTempLocalIndex()); |
2386 Do(new(Z) PushTempInstr(temp_val)); | 2388 Do(new(Z) PushTempInstr(temp_val)); |
2387 owner()->AllocateTemp(); | 2389 owner()->AllocateTemp(); |
2388 } | 2390 } |
2389 } | 2391 } |
2390 | 2392 |
2391 | 2393 |
2392 void EffectGraphVisitor::VisitLetNode(LetNode* node) { | 2394 void EffectGraphVisitor::VisitLetNode(LetNode* node) { |
2393 BuildLetTempExpressions(node); | 2395 BuildLetTempExpressions(node); |
2394 | 2396 |
(...skipping 1977 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4372 Report::MessageF(Report::kBailout, | 4374 Report::MessageF(Report::kBailout, |
4373 Script::Handle(function.script()), | 4375 Script::Handle(function.script()), |
4374 function.token_pos(), | 4376 function.token_pos(), |
4375 "FlowGraphBuilder Bailout: %s %s", | 4377 "FlowGraphBuilder Bailout: %s %s", |
4376 String::Handle(function.name()).ToCString(), | 4378 String::Handle(function.name()).ToCString(), |
4377 reason); | 4379 reason); |
4378 UNREACHABLE(); | 4380 UNREACHABLE(); |
4379 } | 4381 } |
4380 | 4382 |
4381 } // namespace dart | 4383 } // namespace dart |
OLD | NEW |