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" | 5 #include "vm/globals.h" |
6 #if defined(TARGET_ARCH_MIPS) | 6 #if defined(TARGET_ARCH_MIPS) |
7 | 7 |
8 #include "vm/assembler.h" | 8 #include "vm/assembler.h" |
9 #include "vm/compiler.h" | 9 #include "vm/compiler.h" |
10 #include "vm/dart_entry.h" | 10 #include "vm/dart_entry.h" |
(...skipping 605 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
616 // Push space for the return value. | 616 // Push space for the return value. |
617 // Push the receiver. | 617 // Push the receiver. |
618 // Push ICData/MegamorphicCache object. | 618 // Push ICData/MegamorphicCache object. |
619 // Push arguments descriptor array. | 619 // Push arguments descriptor array. |
620 // Push original arguments array. | 620 // Push original arguments array. |
621 __ addiu(SP, SP, Immediate(-4 * kWordSize)); | 621 __ addiu(SP, SP, Immediate(-4 * kWordSize)); |
622 __ sw(ZR, Address(SP, 3 * kWordSize)); | 622 __ sw(ZR, Address(SP, 3 * kWordSize)); |
623 __ sw(T6, Address(SP, 2 * kWordSize)); | 623 __ sw(T6, Address(SP, 2 * kWordSize)); |
624 __ sw(S5, Address(SP, 1 * kWordSize)); | 624 __ sw(S5, Address(SP, 1 * kWordSize)); |
625 __ sw(S4, Address(SP, 0 * kWordSize)); | 625 __ sw(S4, Address(SP, 0 * kWordSize)); |
| 626 |
| 627 // Adjust arguments count. |
| 628 __ lw(TMP, FieldAddress(S4, ArgumentsDescriptor::type_args_len_offset())); |
| 629 Label args_count_ok; |
| 630 __ BranchEqual(TMP, Immediate(0), &args_count_ok); |
| 631 __ AddImmediate(A1, A1, Smi::RawValue(1)); // Include the type arguments. |
| 632 __ Bind(&args_count_ok); |
| 633 |
626 // A1: Smi-tagged arguments array length. | 634 // A1: Smi-tagged arguments array length. |
627 PushArgumentsArray(assembler); | 635 PushArgumentsArray(assembler); |
628 const intptr_t kNumArgs = 4; | 636 const intptr_t kNumArgs = 4; |
629 __ CallRuntime(kInvokeNoSuchMethodDispatcherRuntimeEntry, kNumArgs); | 637 __ CallRuntime(kInvokeNoSuchMethodDispatcherRuntimeEntry, kNumArgs); |
630 __ lw(V0, Address(SP, 4 * kWordSize)); // Return value. | 638 __ lw(V0, Address(SP, 4 * kWordSize)); // Return value. |
631 __ addiu(SP, SP, Immediate(5 * kWordSize)); | 639 __ addiu(SP, SP, Immediate(5 * kWordSize)); |
632 __ LeaveStubFrame(); | 640 __ LeaveStubFrame(); |
633 __ Ret(); | 641 __ Ret(); |
634 } | 642 } |
635 | 643 |
(...skipping 665 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1301 | 1309 |
1302 // Push space for the return value. | 1310 // Push space for the return value. |
1303 // Push the receiver. | 1311 // Push the receiver. |
1304 // Push arguments descriptor array. | 1312 // Push arguments descriptor array. |
1305 const intptr_t kNumArgs = 3; | 1313 const intptr_t kNumArgs = 3; |
1306 __ addiu(SP, SP, Immediate(-kNumArgs * kWordSize)); | 1314 __ addiu(SP, SP, Immediate(-kNumArgs * kWordSize)); |
1307 __ sw(ZR, Address(SP, 2 * kWordSize)); | 1315 __ sw(ZR, Address(SP, 2 * kWordSize)); |
1308 __ sw(T6, Address(SP, 1 * kWordSize)); | 1316 __ sw(T6, Address(SP, 1 * kWordSize)); |
1309 __ sw(S4, Address(SP, 0 * kWordSize)); | 1317 __ sw(S4, Address(SP, 0 * kWordSize)); |
1310 | 1318 |
| 1319 // Adjust arguments count. |
| 1320 __ lw(TMP, FieldAddress(S4, ArgumentsDescriptor::type_args_len_offset())); |
| 1321 Label args_count_ok; |
| 1322 __ BranchEqual(TMP, Immediate(0), &args_count_ok); |
| 1323 __ AddImmediate(A1, A1, Smi::RawValue(1)); // Include the type arguments. |
| 1324 __ Bind(&args_count_ok); |
| 1325 |
1311 // A1: Smi-tagged arguments array length. | 1326 // A1: Smi-tagged arguments array length. |
1312 PushArgumentsArray(assembler); | 1327 PushArgumentsArray(assembler); |
1313 | 1328 |
1314 __ CallRuntime(kInvokeClosureNoSuchMethodRuntimeEntry, kNumArgs); | 1329 __ CallRuntime(kInvokeClosureNoSuchMethodRuntimeEntry, kNumArgs); |
1315 // noSuchMethod on closures always throws an error, so it will never return. | 1330 // noSuchMethod on closures always throws an error, so it will never return. |
1316 __ break_(0); | 1331 __ break_(0); |
1317 } | 1332 } |
1318 | 1333 |
1319 | 1334 |
1320 // T0: function object. | 1335 // T0: function object. |
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2432 } | 2447 } |
2433 | 2448 |
2434 | 2449 |
2435 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { | 2450 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { |
2436 __ break_(0); | 2451 __ break_(0); |
2437 } | 2452 } |
2438 | 2453 |
2439 } // namespace dart | 2454 } // namespace dart |
2440 | 2455 |
2441 #endif // defined TARGET_ARCH_MIPS | 2456 #endif // defined TARGET_ARCH_MIPS |
OLD | NEW |