| 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 1100 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1111 } | 1111 } |
| 1112 } | 1112 } |
| 1113 } | 1113 } |
| 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 | |
| 1122 BeginCodeSourceRange(); | |
| 1123 if (is_optimizing() && !FLAG_precompiled_mode) { | |
| 1124 // Leave enough space for patching in case of lazy deoptimization. | |
| 1125 for (intptr_t i = 0; | |
| 1126 i < CallPattern::kDeoptCallLengthInInstructions; | |
| 1127 ++i) { | |
| 1128 __ orr(R0, ZR, Operand(R0)); // nop | |
| 1129 } | |
| 1130 lazy_deopt_return_pc_offset_ = assembler()->CodeSize(); | |
| 1131 __ BranchPatchable(*StubCode::DeoptimizeLazyFromReturn_entry()); | |
| 1132 lazy_deopt_throw_pc_offset_ = assembler()->CodeSize(); | |
| 1133 __ BranchPatchable(*StubCode::DeoptimizeLazyFromThrow_entry()); | |
| 1134 } | |
| 1135 EndCodeSourceRange(TokenPosition::kDartCodeEpilogue); | |
| 1136 } | 1121 } |
| 1137 | 1122 |
| 1138 | 1123 |
| 1139 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, | 1124 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, |
| 1140 const StubEntry& stub_entry, | 1125 const StubEntry& stub_entry, |
| 1141 RawPcDescriptors::Kind kind, | 1126 RawPcDescriptors::Kind kind, |
| 1142 LocationSummary* locs) { | 1127 LocationSummary* locs) { |
| 1143 __ BranchLinkPatchable(stub_entry); | 1128 __ BranchLinkPatchable(stub_entry); |
| 1144 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); | 1129 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); |
| 1145 RecordSafepoint(locs); | 1130 RecordSafepoint(locs); |
| (...skipping 788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1934 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { | 1919 void ParallelMoveResolver::RestoreFpuScratch(FpuRegister reg) { |
| 1935 __ PopDouble(reg); | 1920 __ PopDouble(reg); |
| 1936 } | 1921 } |
| 1937 | 1922 |
| 1938 | 1923 |
| 1939 #undef __ | 1924 #undef __ |
| 1940 | 1925 |
| 1941 } // namespace dart | 1926 } // namespace dart |
| 1942 | 1927 |
| 1943 #endif // defined TARGET_ARCH_ARM64 | 1928 #endif // defined TARGET_ARCH_ARM64 |
| OLD | NEW |