Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(38)

Side by Side Diff: runtime/vm/stub_code_arm64.cc

Issue 2859673002: Pass type argument vector to generic functions (if --reify-generic-functions is (Closed)
Patch Set: address review comments and sync Created 3 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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_ARM64) 6 #if defined(TARGET_ARCH_ARM64)
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 609 matching lines...) Expand 10 before | Expand all | Expand 10 after
620 __ EnterStubFrame(); 620 __ EnterStubFrame();
621 621
622 // Load the receiver. 622 // Load the receiver.
623 __ LoadFieldFromOffset(R2, R4, ArgumentsDescriptor::count_offset()); 623 __ LoadFieldFromOffset(R2, R4, ArgumentsDescriptor::count_offset());
624 __ add(TMP, FP, Operand(R2, LSL, 2)); // R2 is Smi. 624 __ add(TMP, FP, Operand(R2, LSL, 2)); // R2 is Smi.
625 __ LoadFromOffset(R6, TMP, kParamEndSlotFromFp * kWordSize); 625 __ LoadFromOffset(R6, TMP, kParamEndSlotFromFp * kWordSize);
626 __ Push(ZR); // Result slot. 626 __ Push(ZR); // Result slot.
627 __ Push(R6); // Receiver. 627 __ Push(R6); // Receiver.
628 __ Push(R5); // ICData/MegamorphicCache. 628 __ Push(R5); // ICData/MegamorphicCache.
629 __ Push(R4); // Arguments descriptor. 629 __ Push(R4); // Arguments descriptor.
630
631 // Adjust arguments count.
632 __ LoadFieldFromOffset(R3, R4, ArgumentsDescriptor::type_args_len_offset());
633 __ AddImmediate(TMP, R2, Smi::RawValue(1)); // Include the type arguments.
634 __ cmp(R3, Operand(0));
635 __ csinc(R2, R2, TMP, EQ); // R2 <- (R3 == 0) ? R2 : TMP.
636
630 // R2: Smi-tagged arguments array length. 637 // R2: Smi-tagged arguments array length.
631 PushArgumentsArray(assembler); 638 PushArgumentsArray(assembler);
632 const intptr_t kNumArgs = 4; 639 const intptr_t kNumArgs = 4;
633 __ CallRuntime(kInvokeNoSuchMethodDispatcherRuntimeEntry, kNumArgs); 640 __ CallRuntime(kInvokeNoSuchMethodDispatcherRuntimeEntry, kNumArgs);
634 __ Drop(4); 641 __ Drop(4);
635 __ Pop(R0); // Return value. 642 __ Pop(R0); // Return value.
636 __ LeaveStubFrame(); 643 __ LeaveStubFrame();
637 __ ret(); 644 __ ret();
638 } 645 }
639 646
(...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after
1278 __ add(TMP, FP, Operand(R2, LSL, 2)); // R2 is Smi. 1285 __ add(TMP, FP, Operand(R2, LSL, 2)); // R2 is Smi.
1279 __ LoadFromOffset(R6, TMP, kParamEndSlotFromFp * kWordSize); 1286 __ LoadFromOffset(R6, TMP, kParamEndSlotFromFp * kWordSize);
1280 1287
1281 // Push space for the return value. 1288 // Push space for the return value.
1282 // Push the receiver. 1289 // Push the receiver.
1283 // Push arguments descriptor array. 1290 // Push arguments descriptor array.
1284 __ Push(ZR); 1291 __ Push(ZR);
1285 __ Push(R6); 1292 __ Push(R6);
1286 __ Push(R4); 1293 __ Push(R4);
1287 1294
1295 // Adjust arguments count.
1296 __ LoadFieldFromOffset(R3, R4, ArgumentsDescriptor::type_args_len_offset());
1297 __ AddImmediate(TMP, R2, Smi::RawValue(1)); // Include the type arguments.
1298 __ cmp(R3, Operand(0));
1299 __ csinc(R2, R2, TMP, EQ); // R2 <- (R3 == 0) ? R2 : TMP.
1300
1288 // R2: Smi-tagged arguments array length. 1301 // R2: Smi-tagged arguments array length.
1289 PushArgumentsArray(assembler); 1302 PushArgumentsArray(assembler);
1290 1303
1291 const intptr_t kNumArgs = 3; 1304 const intptr_t kNumArgs = 3;
1292 __ CallRuntime(kInvokeClosureNoSuchMethodRuntimeEntry, kNumArgs); 1305 __ CallRuntime(kInvokeClosureNoSuchMethodRuntimeEntry, kNumArgs);
1293 // noSuchMethod on closures always throws an error, so it will never return. 1306 // noSuchMethod on closures always throws an error, so it will never return.
1294 __ brk(0); 1307 __ brk(0);
1295 } 1308 }
1296 1309
1297 1310
(...skipping 1063 matching lines...) Expand 10 before | Expand all | Expand 10 after
2361 } 2374 }
2362 2375
2363 2376
2364 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { 2377 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) {
2365 __ brk(0); 2378 __ brk(0);
2366 } 2379 }
2367 2380
2368 } // namespace dart 2381 } // namespace dart
2369 2382
2370 #endif // defined TARGET_ARCH_ARM64 2383 #endif // defined TARGET_ARCH_ARM64
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698