| OLD | NEW |
| 1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2014, 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_ARM64. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_ARM64. |
| 6 #if defined(TARGET_ARCH_ARM64) | 6 #if defined(TARGET_ARCH_ARM64) |
| 7 | 7 |
| 8 #include "vm/flow_graph_compiler.h" | 8 #include "vm/flow_graph_compiler.h" |
| 9 | 9 |
| 10 #include "vm/ast_printer.h" | 10 #include "vm/ast_printer.h" |
| 11 #include "vm/compiler.h" | 11 #include "vm/compiler.h" |
| 12 #include "vm/cpu.h" | 12 #include "vm/cpu.h" |
| 13 #include "vm/dart_entry.h" | 13 #include "vm/dart_entry.h" |
| 14 #include "vm/deopt_instructions.h" | 14 #include "vm/deopt_instructions.h" |
| 15 #include "vm/il_printer.h" | 15 #include "vm/il_printer.h" |
| 16 #include "vm/instructions.h" |
| 16 #include "vm/locations.h" | 17 #include "vm/locations.h" |
| 17 #include "vm/object_store.h" | 18 #include "vm/object_store.h" |
| 18 #include "vm/parser.h" | 19 #include "vm/parser.h" |
| 19 #include "vm/stack_frame.h" | 20 #include "vm/stack_frame.h" |
| 20 #include "vm/stub_code.h" | 21 #include "vm/stub_code.h" |
| 21 #include "vm/symbols.h" | 22 #include "vm/symbols.h" |
| 22 | 23 |
| 23 namespace dart { | 24 namespace dart { |
| 24 | 25 |
| 25 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization."); | 26 DEFINE_FLAG(bool, trap_on_deoptimization, false, "Trap on deoptimization."); |
| (...skipping 1077 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1103 } | 1104 } |
| 1104 } | 1105 } |
| 1105 | 1106 |
| 1106 VisitBlocks(); | 1107 VisitBlocks(); |
| 1107 | 1108 |
| 1108 __ brk(0); | 1109 __ brk(0); |
| 1109 ASSERT(assembler()->constant_pool_allowed()); | 1110 ASSERT(assembler()->constant_pool_allowed()); |
| 1110 GenerateDeferredCode(); | 1111 GenerateDeferredCode(); |
| 1111 | 1112 |
| 1112 if (is_optimizing()) { | 1113 if (is_optimizing()) { |
| 1114 // Leave enough space for patching in case of lazy deoptimization from |
| 1115 // deferred code. |
| 1116 for (intptr_t i = 0; |
| 1117 i < CallPattern::kDeoptCallLengthInInstructions; |
| 1118 ++i) { |
| 1119 __ orr(R0, ZR, Operand(R0)); // nop |
| 1120 } |
| 1113 lazy_deopt_pc_offset_ = assembler()->CodeSize(); | 1121 lazy_deopt_pc_offset_ = assembler()->CodeSize(); |
| 1114 __ BranchPatchable(*StubCode::DeoptimizeLazy_entry()); | 1122 __ BranchPatchable(*StubCode::DeoptimizeLazy_entry()); |
| 1115 } | 1123 } |
| 1116 } | 1124 } |
| 1117 | 1125 |
| 1118 | 1126 |
| 1119 void FlowGraphCompiler::GenerateCall(intptr_t token_pos, | 1127 void FlowGraphCompiler::GenerateCall(intptr_t token_pos, |
| 1120 const StubEntry& stub_entry, | 1128 const StubEntry& stub_entry, |
| 1121 RawPcDescriptors::Kind kind, | 1129 RawPcDescriptors::Kind kind, |
| 1122 LocationSummary* locs) { | 1130 LocationSummary* locs) { |
| (...skipping 688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1811 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1819 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 1812 __ PopDouble(reg); | 1820 __ PopDouble(reg); |
| 1813 } | 1821 } |
| 1814 | 1822 |
| 1815 | 1823 |
| 1816 #undef __ | 1824 #undef __ |
| 1817 | 1825 |
| 1818 } // namespace dart | 1826 } // namespace dart |
| 1819 | 1827 |
| 1820 #endif // defined TARGET_ARCH_ARM64 | 1828 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |