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

Side by Side Diff: runtime/vm/stub_code_ia32.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_arm64.cc ('k') | runtime/vm/stub_code_mips.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) 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_IA32) 6 #if defined(TARGET_ARCH_IA32)
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 501 matching lines...) Expand 10 before | Expand all | Expand 10 after
512 __ j(NOT_EQUAL, call_target_function); 512 __ j(NOT_EQUAL, call_target_function);
513 __ EnterStubFrame(); 513 __ EnterStubFrame();
514 // Load the receiver. 514 // Load the receiver.
515 __ movl(EDI, FieldAddress(EDX, ArgumentsDescriptor::count_offset())); 515 __ movl(EDI, FieldAddress(EDX, ArgumentsDescriptor::count_offset()));
516 __ movl(EAX, Address(EBP, EDI, TIMES_HALF_WORD_SIZE, 516 __ movl(EAX, Address(EBP, EDI, TIMES_HALF_WORD_SIZE,
517 kParamEndSlotFromFp * kWordSize)); 517 kParamEndSlotFromFp * kWordSize));
518 __ pushl(Immediate(0)); // Setup space on stack for result. 518 __ pushl(Immediate(0)); // Setup space on stack for result.
519 __ pushl(EAX); // Receiver. 519 __ pushl(EAX); // Receiver.
520 __ pushl(ECX); // ICData/MegamorphicCache. 520 __ pushl(ECX); // ICData/MegamorphicCache.
521 __ pushl(EDX); // Arguments descriptor array. 521 __ pushl(EDX); // Arguments descriptor array.
522
523 // Adjust arguments count.
524 __ cmpl(FieldAddress(EDX, ArgumentsDescriptor::type_args_len_offset()),
525 Immediate(0));
522 __ movl(EDX, EDI); 526 __ movl(EDX, EDI);
527 Label args_count_ok;
528 __ j(EQUAL, &args_count_ok, Assembler::kNearJump);
529 __ addl(EDX, Immediate(Smi::RawValue(1))); // Include the type arguments.
530 __ Bind(&args_count_ok);
531
523 // EDX: Smi-tagged arguments array length. 532 // EDX: Smi-tagged arguments array length.
524 PushArgumentsArray(assembler); 533 PushArgumentsArray(assembler);
525 const intptr_t kNumArgs = 4; 534 const intptr_t kNumArgs = 4;
526 __ CallRuntime(kInvokeNoSuchMethodDispatcherRuntimeEntry, kNumArgs); 535 __ CallRuntime(kInvokeNoSuchMethodDispatcherRuntimeEntry, kNumArgs);
527 __ Drop(4); 536 __ Drop(4);
528 __ popl(EAX); // Return value. 537 __ popl(EAX); // Return value.
529 __ LeaveFrame(); 538 __ LeaveFrame();
530 __ ret(); 539 __ ret();
531 } 540 }
532 541
(...skipping 618 matching lines...) Expand 10 before | Expand all | Expand 10 after
1151 __ EnterStubFrame(); 1160 __ EnterStubFrame();
1152 1161
1153 // Load the receiver. 1162 // Load the receiver.
1154 __ movl(EDI, FieldAddress(EDX, ArgumentsDescriptor::count_offset())); 1163 __ movl(EDI, FieldAddress(EDX, ArgumentsDescriptor::count_offset()));
1155 __ movl(EAX, Address(EBP, EDI, TIMES_2, kParamEndSlotFromFp * kWordSize)); 1164 __ movl(EAX, Address(EBP, EDI, TIMES_2, kParamEndSlotFromFp * kWordSize));
1156 1165
1157 __ pushl(Immediate(0)); // Setup space on stack for result from noSuchMethod. 1166 __ pushl(Immediate(0)); // Setup space on stack for result from noSuchMethod.
1158 __ pushl(EAX); // Receiver. 1167 __ pushl(EAX); // Receiver.
1159 __ pushl(EDX); // Arguments descriptor array. 1168 __ pushl(EDX); // Arguments descriptor array.
1160 1169
1170 // Adjust arguments count.
1171 __ cmpl(FieldAddress(EDX, ArgumentsDescriptor::type_args_len_offset()),
1172 Immediate(0));
1161 __ movl(EDX, EDI); 1173 __ movl(EDX, EDI);
1174 Label args_count_ok;
1175 __ j(EQUAL, &args_count_ok, Assembler::kNearJump);
1176 __ addl(EDX, Immediate(Smi::RawValue(1))); // Include the type arguments.
1177 __ Bind(&args_count_ok);
1178
1162 // EDX: Smi-tagged arguments array length. 1179 // EDX: Smi-tagged arguments array length.
1163 PushArgumentsArray(assembler); 1180 PushArgumentsArray(assembler);
1164 1181
1165 const intptr_t kNumArgs = 3; 1182 const intptr_t kNumArgs = 3;
1166 __ CallRuntime(kInvokeClosureNoSuchMethodRuntimeEntry, kNumArgs); 1183 __ CallRuntime(kInvokeClosureNoSuchMethodRuntimeEntry, kNumArgs);
1167 // noSuchMethod on closures always throws an error, so it will never return. 1184 // noSuchMethod on closures always throws an error, so it will never return.
1168 __ int3(); 1185 __ int3();
1169 } 1186 }
1170 1187
1171 1188
(...skipping 943 matching lines...) Expand 10 before | Expand all | Expand 10 after
2115 } 2132 }
2116 2133
2117 2134
2118 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) { 2135 void StubCode::GenerateAsynchronousGapMarkerStub(Assembler* assembler) {
2119 __ int3(); 2136 __ int3();
2120 } 2137 }
2121 2138
2122 } // namespace dart 2139 } // namespace dart
2123 2140
2124 #endif // defined TARGET_ARCH_IA32 2141 #endif // defined TARGET_ARCH_IA32
OLDNEW
« no previous file with comments | « runtime/vm/stub_code_arm64.cc ('k') | runtime/vm/stub_code_mips.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698