| 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 254 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 265 const Array& arguments_descriptor = | 265 const Array& arguments_descriptor = |
| 266 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, | 266 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, |
| 267 argument_names())); | 267 argument_names())); |
| 268 __ LoadObject(S4, arguments_descriptor); | 268 __ LoadObject(S4, arguments_descriptor); |
| 269 | 269 |
| 270 // Load closure function code in T2. | 270 // Load closure function code in T2. |
| 271 // S4: arguments descriptor array. | 271 // S4: arguments descriptor array. |
| 272 // S5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 272 // S5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). |
| 273 ASSERT(locs()->in(0).reg() == T0); | 273 ASSERT(locs()->in(0).reg() == T0); |
| 274 __ LoadImmediate(S5, 0); | 274 __ LoadImmediate(S5, 0); |
| 275 __ lw(T2, FieldAddress(T0, Function::instructions_offset())); | 275 __ lw(T2, FieldAddress(T0, Function::entry_point_offset())); |
| 276 __ AddImmediate(T2, Instructions::HeaderSize() - kHeapObjectTag); | |
| 277 __ jalr(T2); | 276 __ jalr(T2); |
| 278 compiler->RecordSafepoint(locs()); | 277 compiler->RecordSafepoint(locs()); |
| 279 // Marks either the continuation point in unoptimized code or the | 278 // Marks either the continuation point in unoptimized code or the |
| 280 // deoptimization point in optimized code, after call. | 279 // deoptimization point in optimized code, after call. |
| 281 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); | 280 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); |
| 282 if (compiler->is_optimizing()) { | 281 if (compiler->is_optimizing()) { |
| 283 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); | 282 compiler->AddDeoptIndexAtCall(deopt_id_after, token_pos()); |
| 284 } | 283 } |
| 285 // Add deoptimization continuation point after the call and before the | 284 // Add deoptimization continuation point after the call and before the |
| 286 // arguments are removed. | 285 // arguments are removed. |
| (...skipping 5305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5592 1, | 5591 1, |
| 5593 locs()); | 5592 locs()); |
| 5594 __ lw(result, Address(SP, 1 * kWordSize)); | 5593 __ lw(result, Address(SP, 1 * kWordSize)); |
| 5595 __ addiu(SP, SP, Immediate(2 * kWordSize)); | 5594 __ addiu(SP, SP, Immediate(2 * kWordSize)); |
| 5596 } | 5595 } |
| 5597 | 5596 |
| 5598 | 5597 |
| 5599 } // namespace dart | 5598 } // namespace dart |
| 5600 | 5599 |
| 5601 #endif // defined TARGET_ARCH_MIPS | 5600 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |