| 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 | 1114 |
| 1115 EndCodeSourceRange(TokenPosition::kDartCodePrologue); | 1115 EndCodeSourceRange(TokenPosition::kDartCodePrologue); |
| 1116 VisitBlocks(); | 1116 VisitBlocks(); |
| 1117 | 1117 |
| 1118 __ brk(0); | 1118 __ brk(0); |
| 1119 ASSERT(assembler()->constant_pool_allowed()); | 1119 ASSERT(assembler()->constant_pool_allowed()); |
| 1120 GenerateDeferredCode(); | 1120 GenerateDeferredCode(); |
| 1121 | 1121 |
| 1122 BeginCodeSourceRange(); | 1122 BeginCodeSourceRange(); |
| 1123 if (is_optimizing() && !FLAG_precompiled_mode) { | 1123 if (is_optimizing() && !FLAG_precompiled_mode) { |
| 1124 // Leave enough space for patching in case of lazy deoptimization from | 1124 // Leave enough space for patching in case of lazy deoptimization. |
| 1125 // deferred code. | |
| 1126 for (intptr_t i = 0; | 1125 for (intptr_t i = 0; |
| 1127 i < CallPattern::kDeoptCallLengthInInstructions; | 1126 i < CallPattern::kDeoptCallLengthInInstructions; |
| 1128 ++i) { | 1127 ++i) { |
| 1129 __ orr(R0, ZR, Operand(R0)); // nop | 1128 __ orr(R0, ZR, Operand(R0)); // nop |
| 1130 } | 1129 } |
| 1131 lazy_deopt_pc_offset_ = assembler()->CodeSize(); | 1130 lazy_deopt_return_pc_offset_ = assembler()->CodeSize(); |
| 1132 __ BranchPatchable(*StubCode::DeoptimizeLazy_entry()); | 1131 __ BranchPatchable(*StubCode::DeoptimizeLazyFromReturn_entry()); |
| 1132 lazy_deopt_throw_pc_offset_ = assembler()->CodeSize(); |
| 1133 __ BranchPatchable(*StubCode::DeoptimizeLazyFromThrow_entry()); |
| 1133 } | 1134 } |
| 1134 EndCodeSourceRange(TokenPosition::kDartCodeEpilogue); | 1135 EndCodeSourceRange(TokenPosition::kDartCodeEpilogue); |
| 1135 } | 1136 } |
| 1136 | 1137 |
| 1137 | 1138 |
| 1138 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, | 1139 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, |
| 1139 const StubEntry& stub_entry, | 1140 const StubEntry& stub_entry, |
| 1140 RawPcDescriptors::Kind kind, | 1141 RawPcDescriptors::Kind kind, |
| 1141 LocationSummary* locs) { | 1142 LocationSummary* locs) { |
| 1142 __ BranchLinkPatchable(stub_entry); | 1143 __ BranchLinkPatchable(stub_entry); |
| (...skipping 790 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1933 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1934 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 1934 __ PopDouble(reg); | 1935 __ PopDouble(reg); |
| 1935 } | 1936 } |
| 1936 | 1937 |
| 1937 | 1938 |
| 1938 #undef __ | 1939 #undef __ |
| 1939 | 1940 |
| 1940 } // namespace dart | 1941 } // namespace dart |
| 1941 | 1942 |
| 1942 #endif // defined TARGET_ARCH_ARM64 | 1943 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |