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 1102 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1113 __ LoadObject(R1, empty_context); | 1113 __ LoadObject(R1, empty_context); |
1114 __ StoreToOffset(R1, FP, (slot_base - i) * kWordSize); | 1114 __ StoreToOffset(R1, FP, (slot_base - i) * kWordSize); |
1115 } | 1115 } |
1116 } else { | 1116 } else { |
1117 ASSERT(num_locals > 1); | 1117 ASSERT(num_locals > 1); |
1118 __ StoreToOffset(R0, FP, (slot_base - i) * kWordSize); | 1118 __ StoreToOffset(R0, FP, (slot_base - i) * kWordSize); |
1119 } | 1119 } |
1120 } | 1120 } |
1121 } | 1121 } |
1122 | 1122 |
| 1123 EndCodeSourceRange(TokenPosition::kDartCodePrologue); |
1123 VisitBlocks(); | 1124 VisitBlocks(); |
1124 | 1125 |
1125 __ brk(0); | 1126 __ brk(0); |
1126 ASSERT(assembler()->constant_pool_allowed()); | 1127 ASSERT(assembler()->constant_pool_allowed()); |
1127 GenerateDeferredCode(); | 1128 GenerateDeferredCode(); |
1128 | 1129 |
| 1130 BeginCodeSourceRange(); |
1129 if (is_optimizing() && !FLAG_precompiled_mode) { | 1131 if (is_optimizing() && !FLAG_precompiled_mode) { |
1130 // Leave enough space for patching in case of lazy deoptimization from | 1132 // Leave enough space for patching in case of lazy deoptimization from |
1131 // deferred code. | 1133 // deferred code. |
1132 for (intptr_t i = 0; | 1134 for (intptr_t i = 0; |
1133 i < CallPattern::kDeoptCallLengthInInstructions; | 1135 i < CallPattern::kDeoptCallLengthInInstructions; |
1134 ++i) { | 1136 ++i) { |
1135 __ orr(R0, ZR, Operand(R0)); // nop | 1137 __ orr(R0, ZR, Operand(R0)); // nop |
1136 } | 1138 } |
1137 lazy_deopt_pc_offset_ = assembler()->CodeSize(); | 1139 lazy_deopt_pc_offset_ = assembler()->CodeSize(); |
1138 __ BranchPatchable(*StubCode::DeoptimizeLazy_entry()); | 1140 __ BranchPatchable(*StubCode::DeoptimizeLazy_entry()); |
1139 } | 1141 } |
| 1142 EndCodeSourceRange(TokenPosition::kDartCodeEpilogue); |
1140 } | 1143 } |
1141 | 1144 |
1142 | 1145 |
1143 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, | 1146 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, |
1144 const StubEntry& stub_entry, | 1147 const StubEntry& stub_entry, |
1145 RawPcDescriptors::Kind kind, | 1148 RawPcDescriptors::Kind kind, |
1146 LocationSummary* locs) { | 1149 LocationSummary* locs) { |
1147 __ BranchLinkPatchable(stub_entry); | 1150 __ BranchLinkPatchable(stub_entry); |
1148 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); | 1151 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); |
1149 RecordSafepoint(locs); | 1152 RecordSafepoint(locs); |
(...skipping 760 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1910 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1913 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
1911 __ PopDouble(reg); | 1914 __ PopDouble(reg); |
1912 } | 1915 } |
1913 | 1916 |
1914 | 1917 |
1915 #undef __ | 1918 #undef __ |
1916 | 1919 |
1917 } // namespace dart | 1920 } // namespace dart |
1918 | 1921 |
1919 #endif // defined TARGET_ARCH_ARM64 | 1922 #endif // defined TARGET_ARCH_ARM64 |
OLD | NEW |