| 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" |
| (...skipping 1103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1114 __ LoadObject(R1, empty_context); | 1114 __ LoadObject(R1, empty_context); |
| 1115 __ StoreToOffset(R1, FP, (slot_base - i) * kWordSize); | 1115 __ StoreToOffset(R1, FP, (slot_base - i) * kWordSize); |
| 1116 } | 1116 } |
| 1117 } else { | 1117 } else { |
| 1118 ASSERT(num_locals > 1); | 1118 ASSERT(num_locals > 1); |
| 1119 __ StoreToOffset(R0, FP, (slot_base - i) * kWordSize); | 1119 __ StoreToOffset(R0, FP, (slot_base - i) * kWordSize); |
| 1120 } | 1120 } |
| 1121 } | 1121 } |
| 1122 } | 1122 } |
| 1123 | 1123 |
| 1124 MaybeEmitCodeSourceMapEntry(TokenPosition::kDartCodePrologue); |
| 1124 VisitBlocks(); | 1125 VisitBlocks(); |
| 1125 | 1126 |
| 1126 __ brk(0); | 1127 __ brk(0); |
| 1127 ASSERT(assembler()->constant_pool_allowed()); | 1128 ASSERT(assembler()->constant_pool_allowed()); |
| 1128 GenerateDeferredCode(); | 1129 GenerateDeferredCode(); |
| 1129 | 1130 |
| 1131 SaveCodeSize(); |
| 1130 if (is_optimizing() && !FLAG_precompilation) { | 1132 if (is_optimizing() && !FLAG_precompilation) { |
| 1131 // Leave enough space for patching in case of lazy deoptimization from | 1133 // Leave enough space for patching in case of lazy deoptimization from |
| 1132 // deferred code. | 1134 // deferred code. |
| 1133 for (intptr_t i = 0; | 1135 for (intptr_t i = 0; |
| 1134 i < CallPattern::kDeoptCallLengthInInstructions; | 1136 i < CallPattern::kDeoptCallLengthInInstructions; |
| 1135 ++i) { | 1137 ++i) { |
| 1136 __ orr(R0, ZR, Operand(R0)); // nop | 1138 __ orr(R0, ZR, Operand(R0)); // nop |
| 1137 } | 1139 } |
| 1138 lazy_deopt_pc_offset_ = assembler()->CodeSize(); | 1140 lazy_deopt_pc_offset_ = assembler()->CodeSize(); |
| 1139 __ BranchPatchable(*StubCode::DeoptimizeLazy_entry()); | 1141 __ BranchPatchable(*StubCode::DeoptimizeLazy_entry()); |
| 1140 } | 1142 } |
| 1143 MaybeEmitCodeSourceMapEntry(TokenPosition::kDartCodeEpilogue); |
| 1141 } | 1144 } |
| 1142 | 1145 |
| 1143 | 1146 |
| 1144 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, | 1147 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, |
| 1145 const StubEntry& stub_entry, | 1148 const StubEntry& stub_entry, |
| 1146 RawPcDescriptors::Kind kind, | 1149 RawPcDescriptors::Kind kind, |
| 1147 LocationSummary* locs) { | 1150 LocationSummary* locs) { |
| 1148 __ BranchLinkPatchable(stub_entry); | 1151 __ BranchLinkPatchable(stub_entry); |
| 1149 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); | 1152 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); |
| 1150 RecordSafepoint(locs); | 1153 RecordSafepoint(locs); |
| (...skipping 732 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1883 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1886 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 1884 __ PopDouble(reg); | 1887 __ PopDouble(reg); |
| 1885 } | 1888 } |
| 1886 | 1889 |
| 1887 | 1890 |
| 1888 #undef __ | 1891 #undef __ |
| 1889 | 1892 |
| 1890 } // namespace dart | 1893 } // namespace dart |
| 1891 | 1894 |
| 1892 #endif // defined TARGET_ARCH_ARM64 | 1895 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |