| OLD | NEW |
| 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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/globals.h" // Needed here to get TARGET_ARCH_ARM. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM. |
| 6 #if defined(TARGET_ARCH_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/cpu.h" | 10 #include "vm/cpu.h" |
| 11 #include "vm/dart_entry.h" | 11 #include "vm/dart_entry.h" |
| 12 #include "vm/flow_graph.h" |
| 12 #include "vm/flow_graph_compiler.h" | 13 #include "vm/flow_graph_compiler.h" |
| 13 #include "vm/locations.h" | 14 #include "vm/locations.h" |
| 14 #include "vm/object_store.h" | 15 #include "vm/object_store.h" |
| 15 #include "vm/parser.h" | 16 #include "vm/parser.h" |
| 16 #include "vm/simulator.h" | 17 #include "vm/simulator.h" |
| 17 #include "vm/stack_frame.h" | 18 #include "vm/stack_frame.h" |
| 18 #include "vm/stub_code.h" | 19 #include "vm/stub_code.h" |
| 19 #include "vm/symbols.h" | 20 #include "vm/symbols.h" |
| 20 | 21 |
| 21 #define __ compiler->assembler()-> | 22 #define __ compiler->assembler()-> |
| (...skipping 6153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6175 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6176 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 6176 if (!compiler->CanFallThroughTo(normal_entry())) { | 6177 if (!compiler->CanFallThroughTo(normal_entry())) { |
| 6177 __ b(compiler->GetJumpLabel(normal_entry())); | 6178 __ b(compiler->GetJumpLabel(normal_entry())); |
| 6178 } | 6179 } |
| 6179 } | 6180 } |
| 6180 | 6181 |
| 6181 | 6182 |
| 6182 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 6183 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 6183 __ Bind(compiler->GetJumpLabel(this)); | 6184 __ Bind(compiler->GetJumpLabel(this)); |
| 6184 if (!compiler->is_optimizing()) { | 6185 if (!compiler->is_optimizing()) { |
| 6185 if (FLAG_emit_edge_counters) { | 6186 if (FLAG_emit_edge_counters && |
| 6187 (!last_instruction()->IsGoto() || |
| 6188 (this == compiler->flow_graph().graph_entry()->normal_entry()))) { |
| 6186 compiler->EmitEdgeCounter(); | 6189 compiler->EmitEdgeCounter(); |
| 6187 } | 6190 } |
| 6188 // Add an edge counter. | 6191 // Add an edge counter. |
| 6189 // On ARM the deoptimization descriptor points after the edge counter | 6192 // On ARM the deoptimization descriptor points after the edge counter |
| 6190 // code so that we can reuse the same pattern matching code as at call | 6193 // code so that we can reuse the same pattern matching code as at call |
| 6191 // sites, which matches backwards from the end of the pattern. | 6194 // sites, which matches backwards from the end of the pattern. |
| 6192 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, | 6195 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 6193 deopt_id_, | 6196 deopt_id_, |
| 6194 Scanner::kNoSourcePos); | 6197 Scanner::kNoSourcePos); |
| 6195 } | 6198 } |
| (...skipping 154 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6350 compiler->GenerateCall(token_pos(), | 6353 compiler->GenerateCall(token_pos(), |
| 6351 &label, | 6354 &label, |
| 6352 PcDescriptors::kOther, | 6355 PcDescriptors::kOther, |
| 6353 locs()); | 6356 locs()); |
| 6354 __ Drop(ArgumentCount()); // Discard arguments. | 6357 __ Drop(ArgumentCount()); // Discard arguments. |
| 6355 } | 6358 } |
| 6356 | 6359 |
| 6357 } // namespace dart | 6360 } // namespace dart |
| 6358 | 6361 |
| 6359 #endif // defined TARGET_ARCH_ARM | 6362 #endif // defined TARGET_ARCH_ARM |
| OLD | NEW |