OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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_MIPS. | 5 #include "vm/globals.h" // Needed here to get TARGET_ARCH_MIPS. |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
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 1123 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1134 __ LoadObject(V1, empty_context); | 1134 __ LoadObject(V1, empty_context); |
1135 __ sw(V1, Address(FP, (slot_base - i) * kWordSize)); | 1135 __ sw(V1, Address(FP, (slot_base - i) * kWordSize)); |
1136 } | 1136 } |
1137 } else { | 1137 } else { |
1138 ASSERT(num_locals > 1); | 1138 ASSERT(num_locals > 1); |
1139 __ sw(V0, Address(FP, (slot_base - i) * kWordSize)); | 1139 __ sw(V0, Address(FP, (slot_base - i) * kWordSize)); |
1140 } | 1140 } |
1141 } | 1141 } |
1142 } | 1142 } |
1143 | 1143 |
| 1144 EndCodeSourceRange(TokenPosition::kDartCodePrologue); |
1144 VisitBlocks(); | 1145 VisitBlocks(); |
1145 | 1146 |
1146 __ break_(0); | 1147 __ break_(0); |
1147 GenerateDeferredCode(); | 1148 GenerateDeferredCode(); |
1148 | 1149 |
| 1150 BeginCodeSourceRange(); |
1149 if (is_optimizing() && !FLAG_precompiled_mode) { | 1151 if (is_optimizing() && !FLAG_precompiled_mode) { |
1150 // Leave enough space for patching in case of lazy deoptimization from | 1152 // Leave enough space for patching in case of lazy deoptimization from |
1151 // deferred code. | 1153 // deferred code. |
1152 for (intptr_t i = 0; | 1154 for (intptr_t i = 0; |
1153 i < CallPattern::kDeoptCallLengthInInstructions; | 1155 i < CallPattern::kDeoptCallLengthInInstructions; |
1154 ++i) { | 1156 ++i) { |
1155 __ nop(); | 1157 __ nop(); |
1156 } | 1158 } |
1157 lazy_deopt_pc_offset_ = assembler()->CodeSize(); | 1159 lazy_deopt_pc_offset_ = assembler()->CodeSize(); |
1158 __ Branch(*StubCode::DeoptimizeLazy_entry()); | 1160 __ Branch(*StubCode::DeoptimizeLazy_entry()); |
1159 } | 1161 } |
| 1162 EndCodeSourceRange(TokenPosition::kDartCodeEpilogue); |
1160 } | 1163 } |
1161 | 1164 |
1162 | 1165 |
1163 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, | 1166 void FlowGraphCompiler::GenerateCall(TokenPosition token_pos, |
1164 const StubEntry& stub_entry, | 1167 const StubEntry& stub_entry, |
1165 RawPcDescriptors::Kind kind, | 1168 RawPcDescriptors::Kind kind, |
1166 LocationSummary* locs) { | 1169 LocationSummary* locs) { |
1167 __ BranchLinkPatchable(stub_entry); | 1170 __ BranchLinkPatchable(stub_entry); |
1168 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); | 1171 AddCurrentDescriptor(kind, Thread::kNoDeoptId, token_pos); |
1169 RecordSafepoint(locs); | 1172 RecordSafepoint(locs); |
(...skipping 768 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1938 __ AddImmediate(SP, kDoubleSize); | 1941 __ AddImmediate(SP, kDoubleSize); |
1939 } | 1942 } |
1940 | 1943 |
1941 | 1944 |
1942 #undef __ | 1945 #undef __ |
1943 | 1946 |
1944 | 1947 |
1945 } // namespace dart | 1948 } // namespace dart |
1946 | 1949 |
1947 #endif // defined TARGET_ARCH_MIPS | 1950 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |