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.h" | 5 #include "vm/flow_graph.h" |
6 | 6 |
7 #include "vm/bit_vector.h" | 7 #include "vm/bit_vector.h" |
8 #include "vm/cha.h" | 8 #include "vm/cha.h" |
9 #include "vm/flow_graph_builder.h" | 9 #include "vm/flow_graph_builder.h" |
10 #include "vm/flow_graph_compiler.h" | 10 #include "vm/flow_graph_compiler.h" |
(...skipping 1000 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1011 env.Add(param); | 1011 env.Add(param); |
1012 } | 1012 } |
1013 } | 1013 } |
1014 | 1014 |
1015 // Initialize all locals in the renaming environment For OSR, the locals have | 1015 // Initialize all locals in the renaming environment For OSR, the locals have |
1016 // already been handled as parameters. | 1016 // already been handled as parameters. |
1017 if (!IsCompiledForOsr()) { | 1017 if (!IsCompiledForOsr()) { |
1018 for (intptr_t i = parameter_count(); i < variable_count(); ++i) { | 1018 for (intptr_t i = parameter_count(); i < variable_count(); ++i) { |
1019 if (i == CurrentContextEnvIndex()) { | 1019 if (i == CurrentContextEnvIndex()) { |
1020 if (function().IsClosureFunction()) { | 1020 if (function().IsClosureFunction()) { |
1021 CurrentContextInstr* context = | 1021 CurrentContextInstr* context = new CurrentContextInstr(); |
1022 new CurrentContextInstr(Thread::kNoDeoptId); | |
1023 context->set_ssa_temp_index(alloc_ssa_temp_index()); // New SSA temp. | 1022 context->set_ssa_temp_index(alloc_ssa_temp_index()); // New SSA temp. |
1024 AddToInitialDefinitions(context); | 1023 AddToInitialDefinitions(context); |
1025 env.Add(context); | 1024 env.Add(context); |
1026 } else { | 1025 } else { |
1027 env.Add(constant_empty_context()); | 1026 env.Add(constant_empty_context()); |
1028 } | 1027 } |
1029 } else { | 1028 } else { |
1030 env.Add(constant_null()); | 1029 env.Add(constant_null()); |
1031 } | 1030 } |
1032 } | 1031 } |
(...skipping 1278 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2311 Representation rep, | 2310 Representation rep, |
2312 intptr_t cid) { | 2311 intptr_t cid) { |
2313 ExtractNthOutputInstr* extract = | 2312 ExtractNthOutputInstr* extract = |
2314 new (Z) ExtractNthOutputInstr(new (Z) Value(instr), index, rep, cid); | 2313 new (Z) ExtractNthOutputInstr(new (Z) Value(instr), index, rep, cid); |
2315 instr->ReplaceUsesWith(extract); | 2314 instr->ReplaceUsesWith(extract); |
2316 InsertAfter(instr, extract, NULL, FlowGraph::kValue); | 2315 InsertAfter(instr, extract, NULL, FlowGraph::kValue); |
2317 } | 2316 } |
2318 | 2317 |
2319 | 2318 |
2320 } // namespace dart | 2319 } // namespace dart |
OLD | NEW |