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/intermediate_language.h" | 8 #include "vm/intermediate_language.h" |
9 | 9 |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 261 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
272 // S4: arguments descriptor array. | 272 // S4: arguments descriptor array. |
273 // S5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 273 // S5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). |
274 ASSERT(locs()->in(0).reg() == T0); | 274 ASSERT(locs()->in(0).reg() == T0); |
275 __ LoadImmediate(S5, 0); | 275 __ LoadImmediate(S5, 0); |
276 __ lw(T2, FieldAddress(T0, Function::entry_point_offset())); | 276 __ lw(T2, FieldAddress(T0, Function::entry_point_offset())); |
277 __ lw(CODE_REG, FieldAddress(T0, Function::code_offset())); | 277 __ lw(CODE_REG, FieldAddress(T0, Function::code_offset())); |
278 __ jalr(T2); | 278 __ jalr(T2); |
279 compiler->RecordSafepoint(locs()); | 279 compiler->RecordSafepoint(locs()); |
280 // Marks either the continuation point in unoptimized code or the | 280 // Marks either the continuation point in unoptimized code or the |
281 // deoptimization point in optimized code, after call. | 281 // deoptimization point in optimized code, after call. |
282 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); | 282 const intptr_t deopt_id_after = Thread::ToDeoptAfter(deopt_id()); |
283 if (compiler->is_optimizing()) { | 283 if (compiler->is_optimizing()) { |
284 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); | 284 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); |
285 } | 285 } |
286 // Add deoptimization continuation point after the call and before the | 286 // Add deoptimization continuation point after the call and before the |
287 // arguments are removed. | 287 // arguments are removed. |
288 // In optimized code this descriptor is needed for exception handling. | 288 // In optimized code this descriptor is needed for exception handling. |
289 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, | 289 compiler->AddCurrentDescriptor(RawPcDescriptors::kDeopt, |
290 deopt_id_after, | 290 deopt_id_after, |
291 token_pos()); | 291 token_pos()); |
292 __ Drop(argument_count); | 292 __ Drop(argument_count); |
(...skipping 5310 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5603 1, | 5603 1, |
5604 locs()); | 5604 locs()); |
5605 __ lw(result, Address(SP, 1 * kWordSize)); | 5605 __ lw(result, Address(SP, 1 * kWordSize)); |
5606 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5606 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
5607 } | 5607 } |
5608 | 5608 |
5609 | 5609 |
5610 } // namespace dart | 5610 } // namespace dart |
5611 | 5611 |
5612 #endif // defined TARGET_ARCH_MIPS | 5612 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |