| 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 1088 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1099 } | 1099 } |
| 1100 } | 1100 } |
| 1101 } | 1101 } |
| 1102 | 1102 |
| 1103 EndCodeSourceRange(TokenPosition::kDartCodePrologue); | 1103 EndCodeSourceRange(TokenPosition::kDartCodePrologue); |
| 1104 VisitBlocks(); | 1104 VisitBlocks(); |
| 1105 | 1105 |
| 1106 __ brk(0); | 1106 __ brk(0); |
| 1107 ASSERT(assembler()->constant_pool_allowed()); | 1107 ASSERT(assembler()->constant_pool_allowed()); |
| 1108 GenerateDeferredCode(); | 1108 GenerateDeferredCode(); |
| 1109 | |
| 1110 BeginCodeSourceRange(); | |
| 1111 if (is_optimizing() && !FLAG_precompiled_mode) { | |
| 1112 // Leave enough space for patching in case of lazy deoptimization. | |
| 1113 for (intptr_t i = 0; | |
| 1114 i < CallPattern::kDeoptCallLengthInInstructions; | |
| 1115 ++i) { | |
| 1116 __ orr(R0, ZR, Operand(R0)); // nop | |
| 1117 } | |
| 1118 lazy_deopt_return_pc_offset_ = assembler()->CodeSize(); | |
| 1119 __ BranchPatchable(*StubCode::DeoptimizeLazyFromReturn_entry()); | |
| 1120 lazy_deopt_throw_pc_offset_ = assembler()->CodeSize(); | |
| 1121 __ BranchPatchable(*StubCode::DeoptimizeLazyFromThrow_entry()); | |
| 1122 } | |
| 1123 EndCodeSourceRange(TokenPosition::kDartCodeEpilogue); | |
| 1124 } | 1109 } |
| 1125 | 1110 |
| 1126 | 1111 |
| 1127 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, | 1112 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, |
| 1128 const StubEntry& stub_entry, | 1113 const StubEntry& stub_entry, |
| 1129 RawPcDescriptors::Kind kind, | 1114 RawPcDescriptors::Kind kind, |
| 1130 LocationSummary* locs) { | 1115 LocationSummary* locs) { |
| 1131 __ BranchLinkPatchable(stub_entry); | 1116 __ BranchLinkPatchable(stub_entry); |
| 1132 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); | 1117 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); |
| 1133 RecordSafepoint(locs); | 1118 RecordSafepoint(locs); |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1922 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1907 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 1923 __ PopDouble(reg); | 1908 __ PopDouble(reg); |
| 1924 } | 1909 } |
| 1925 | 1910 |
| 1926 | 1911 |
| 1927 #undef __ | 1912 #undef __ |
| 1928 | 1913 |
| 1929 } // namespace dart | 1914 } // namespace dart |
| 1930 | 1915 |
| 1931 #endif // defined TARGET_ARCH_ARM64 | 1916 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |