| 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 217 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 228 const Array& arguments_descriptor = | 228 const Array& arguments_descriptor = |
| 229 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, | 229 Array::ZoneHandle(ArgumentsDescriptor::New(argument_count, |
| 230 argument_names())); | 230 argument_names())); |
| 231 __ LoadObject(S4, arguments_descriptor); | 231 __ LoadObject(S4, arguments_descriptor); |
| 232 | 232 |
| 233 // Load closure function code in T2. | 233 // Load closure function code in T2. |
| 234 // S4: arguments descriptor array. | 234 // S4: arguments descriptor array. |
| 235 // S5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). | 235 // S5: Smi 0 (no IC data; the lazy-compile stub expects a GC-safe value). |
| 236 ASSERT(locs()->in(0).reg() == T0); | 236 ASSERT(locs()->in(0).reg() == T0); |
| 237 __ LoadImmediate(S5, 0); | 237 __ LoadImmediate(S5, 0); |
| 238 __ lw(T2, FieldAddress(T0, Function::code_offset())); | 238 __ lw(T2, FieldAddress(T0, Function::instructions_offset())); |
| 239 __ lw(T2, FieldAddress(T2, Code::instructions_offset())); | |
| 240 __ AddImmediate(T2, Instructions::HeaderSize() - kHeapObjectTag); | 239 __ AddImmediate(T2, Instructions::HeaderSize() - kHeapObjectTag); |
| 241 __ jalr(T2); | 240 __ jalr(T2); |
| 242 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall, | 241 compiler->AddCurrentDescriptor(PcDescriptors::kClosureCall, |
| 243 deopt_id(), | 242 deopt_id(), |
| 244 token_pos()); | 243 token_pos()); |
| 245 compiler->RecordSafepoint(locs()); | 244 compiler->RecordSafepoint(locs()); |
| 246 // Marks either the continuation point in unoptimized code or the | 245 // Marks either the continuation point in unoptimized code or the |
| 247 // deoptimization point in optimized code, after call. | 246 // deoptimization point in optimized code, after call. |
| 248 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); | 247 const intptr_t deopt_id_after = Isolate::ToDeoptAfter(deopt_id()); |
| 249 if (compiler->is_optimizing()) { | 248 if (compiler->is_optimizing()) { |
| (...skipping 4414 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4664 compiler->GenerateCall(token_pos(), | 4663 compiler->GenerateCall(token_pos(), |
| 4665 &label, | 4664 &label, |
| 4666 PcDescriptors::kOther, | 4665 PcDescriptors::kOther, |
| 4667 locs()); | 4666 locs()); |
| 4668 __ Drop(ArgumentCount()); // Discard arguments. | 4667 __ Drop(ArgumentCount()); // Discard arguments. |
| 4669 } | 4668 } |
| 4670 | 4669 |
| 4671 } // namespace dart | 4670 } // namespace dart |
| 4672 | 4671 |
| 4673 #endif // defined TARGET_ARCH_MIPS | 4672 #endif // defined TARGET_ARCH_MIPS |
| OLD | NEW |