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_ARM) | 6 #if defined(TARGET_ARCH_ARM) |
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/cpu.h" | 10 #include "vm/cpu.h" |
(...skipping 588 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
599 __ EnterStubFrame(); | 599 __ EnterStubFrame(); |
600 // Load the receiver. | 600 // Load the receiver. |
601 __ ldr(R2, FieldAddress(R4, ArgumentsDescriptor::count_offset())); | 601 __ ldr(R2, FieldAddress(R4, ArgumentsDescriptor::count_offset())); |
602 __ add(IP, FP, Operand(R2, LSL, 1)); // R2 is Smi. | 602 __ add(IP, FP, Operand(R2, LSL, 1)); // R2 is Smi. |
603 __ ldr(R8, Address(IP, kParamEndSlotFromFp * kWordSize)); | 603 __ ldr(R8, Address(IP, kParamEndSlotFromFp * kWordSize)); |
604 __ LoadImmediate(IP, 0); | 604 __ LoadImmediate(IP, 0); |
605 __ Push(IP); // Result slot. | 605 __ Push(IP); // Result slot. |
606 __ Push(R8); // Receiver. | 606 __ Push(R8); // Receiver. |
607 __ Push(R9); // ICData/MegamorphicCache. | 607 __ Push(R9); // ICData/MegamorphicCache. |
608 __ Push(R4); // Arguments descriptor. | 608 __ Push(R4); // Arguments descriptor. |
| 609 |
| 610 // Adjust arguments count. |
| 611 __ ldr(R3, FieldAddress(R4, ArgumentsDescriptor::type_args_len_offset())); |
| 612 __ cmp(R3, Operand(0)); |
| 613 __ AddImmediate(R2, R2, Smi::RawValue(1), NE); // Include the type arguments. |
| 614 |
609 // R2: Smi-tagged arguments array length. | 615 // R2: Smi-tagged arguments array length. |
610 PushArgumentsArray(assembler); | 616 PushArgumentsArray(assembler); |
611 const intptr_t kNumArgs = 4; | 617 const intptr_t kNumArgs = 4; |
612 __ CallRuntime(kInvokeNoSuchMethodDispatcherRuntimeEntry, kNumArgs); | 618 __ CallRuntime(kInvokeNoSuchMethodDispatcherRuntimeEntry, kNumArgs); |
613 __ Drop(4); | 619 __ Drop(4); |
614 __ Pop(R0); // Return value. | 620 __ Pop(R0); // Return value. |
615 __ LeaveStubFrame(); | 621 __ LeaveStubFrame(); |
616 __ Ret(); | 622 __ Ret(); |
617 } | 623 } |
618 | 624 |
(...skipping 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1244 __ ldr(R2, FieldAddress(R4, ArgumentsDescriptor::count_offset())); | 1250 __ ldr(R2, FieldAddress(R4, ArgumentsDescriptor::count_offset())); |
1245 __ add(IP, FP, Operand(R2, LSL, 1)); // R2 is Smi. | 1251 __ add(IP, FP, Operand(R2, LSL, 1)); // R2 is Smi. |
1246 __ ldr(R8, Address(IP, kParamEndSlotFromFp * kWordSize)); | 1252 __ ldr(R8, Address(IP, kParamEndSlotFromFp * kWordSize)); |
1247 | 1253 |
1248 // Push space for the return value. | 1254 // Push space for the return value. |
1249 // Push the receiver. | 1255 // Push the receiver. |
1250 // Push arguments descriptor array. | 1256 // Push arguments descriptor array. |
1251 __ LoadImmediate(IP, 0); | 1257 __ LoadImmediate(IP, 0); |
1252 __ PushList((1 << R4) | (1 << R8) | (1 << IP)); | 1258 __ PushList((1 << R4) | (1 << R8) | (1 << IP)); |
1253 | 1259 |
| 1260 // Adjust arguments count. |
| 1261 __ ldr(R3, FieldAddress(R4, ArgumentsDescriptor::type_args_len_offset())); |
| 1262 __ cmp(R3, Operand(0)); |
| 1263 __ AddImmediate(R2, R2, Smi::RawValue(1), NE); // Include the type arguments. |
| 1264 |
1254 // R2: Smi-tagged arguments array length. | 1265 // R2: Smi-tagged arguments array length. |
1255 PushArgumentsArray(assembler); | 1266 PushArgumentsArray(assembler); |
1256 | 1267 |
1257 const intptr_t kNumArgs = 3; | 1268 const intptr_t kNumArgs = 3; |
1258 __ CallRuntime(kInvokeClosureNoSuchMethodRuntimeEntry, kNumArgs); | 1269 __ CallRuntime(kInvokeClosureNoSuchMethodRuntimeEntry, kNumArgs); |
1259 // noSuchMethod on closures always throws an error, so it will never return. | 1270 // noSuchMethod on closures always throws an error, so it will never return. |
1260 __ bkpt(0); | 1271 __ bkpt(0); |
1261 } | 1272 } |
1262 | 1273 |
1263 | 1274 |
(...skipping 1049 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2313 } | 2324 } |
2314 | 2325 |
2315 | 2326 |
2316 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { | 2327 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { |
2317 __ bkpt(0); | 2328 __ bkpt(0); |
2318 } | 2329 } |
2319 | 2330 |
2320 } // namespace dart | 2331 } // namespace dart |
2321 | 2332 |
2322 #endif // defined TARGET_ARCH_ARM | 2333 #endif // defined TARGET_ARCH_ARM |
OLD | NEW |