| 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_X64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_X64. |
| 6 #if defined(TARGET_ARCH_X64) | 6 #if defined(TARGET_ARCH_X64) |
| 7 | 7 |
| 8 #include "vm/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
| 9 | 9 |
| 10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
| 11 #include "vm/flow_graph.h" |
| 11 #include "vm/flow_graph_compiler.h" | 12 #include "vm/flow_graph_compiler.h" |
| 12 #include "vm/locations.h" | 13 #include "vm/locations.h" |
| 13 #include "vm/object_store.h" | 14 #include "vm/object_store.h" |
| 14 #include "vm/parser.h" | 15 #include "vm/parser.h" |
| 15 #include "vm/stack_frame.h" | 16 #include "vm/stack_frame.h" |
| 16 #include "vm/stub_code.h" | 17 #include "vm/stub_code.h" |
| 17 #include "vm/symbols.h" | 18 #include "vm/symbols.h" |
| 18 | 19 |
| 19 #define __ compiler->assembler()-> | 20 #define __ compiler->assembler()-> |
| 20 | 21 |
| (...skipping 5562 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5583 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5584 void GraphEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 5584 if (!compiler->CanFallThroughTo(normal_entry())) { | 5585 if (!compiler->CanFallThroughTo(normal_entry())) { |
| 5585 __ jmp(compiler->GetJumpLabel(normal_entry())); | 5586 __ jmp(compiler->GetJumpLabel(normal_entry())); |
| 5586 } | 5587 } |
| 5587 } | 5588 } |
| 5588 | 5589 |
| 5589 | 5590 |
| 5590 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { | 5591 void TargetEntryInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| 5591 __ Bind(compiler->GetJumpLabel(this)); | 5592 __ Bind(compiler->GetJumpLabel(this)); |
| 5592 if (!compiler->is_optimizing()) { | 5593 if (!compiler->is_optimizing()) { |
| 5593 if (FLAG_emit_edge_counters) { | 5594 if (FLAG_emit_edge_counters && |
| 5595 (!last_instruction()->IsGoto() || |
| 5596 (this == compiler->flow_graph().graph_entry()->normal_entry()))) { |
| 5594 compiler->EmitEdgeCounter(); | 5597 compiler->EmitEdgeCounter(); |
| 5595 } | 5598 } |
| 5596 // The deoptimization descriptor points after the edge counter code for | 5599 // The deoptimization descriptor points after the edge counter code for |
| 5597 // uniformity with ARM and MIPS, where we can reuse pattern matching | 5600 // uniformity with ARM and MIPS, where we can reuse pattern matching |
| 5598 // code that matches backwards from the end of the pattern. | 5601 // code that matches backwards from the end of the pattern. |
| 5599 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, | 5602 compiler->AddCurrentDescriptor(PcDescriptors::kDeopt, |
| 5600 deopt_id_, | 5603 deopt_id_, |
| 5601 Scanner::kNoSourcePos); | 5604 Scanner::kNoSourcePos); |
| 5602 } | 5605 } |
| 5603 if (HasParallelMove()) { | 5606 if (HasParallelMove()) { |
| (...skipping 216 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5820 PcDescriptors::kOther, | 5823 PcDescriptors::kOther, |
| 5821 locs()); | 5824 locs()); |
| 5822 __ Drop(ArgumentCount()); // Discard arguments. | 5825 __ Drop(ArgumentCount()); // Discard arguments. |
| 5823 } | 5826 } |
| 5824 | 5827 |
| 5825 } // namespace dart | 5828 } // namespace dart |
| 5826 | 5829 |
| 5827 #undef __ | 5830 #undef __ |
| 5828 | 5831 |
| 5829 #endif // defined TARGET_ARCH_X64 | 5832 #endif // defined TARGET_ARCH_X64 |
| OLD | NEW |