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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_ia32.cc
diff --git a/runtime/vm/stub_code_ia32.cc b/runtime/vm/stub_code_ia32.cc
index a0cc04a252f04cbb635304f0a222047ac6196c13..67cd47637a5fa978e98921aed1ba8f860c842d69 100644
--- a/runtime/vm/stub_code_ia32.cc
+++ b/runtime/vm/stub_code_ia32.cc
@@ -519,7 +519,16 @@ static void GenerateDispatcherCode(Assembler* assembler,
__ pushl(EAX); // Receiver.
__ pushl(ECX); // ICData/MegamorphicCache.
__ pushl(EDX); // Arguments descriptor array.
+
+ // Adjust arguments count.
+ __ cmpl(FieldAddress(EDX, ArgumentsDescriptor::type_args_len_offset()),
+ Immediate(0));
__ movl(EDX, EDI);
+ Label args_count_ok;
+ __ j(EQUAL, &args_count_ok, Assembler::kNearJump);
+ __ addl(EDX, Immediate(Smi::RawValue(1))); // Include the type arguments.
+ __ Bind(&args_count_ok);
+
// EDX: Smi-tagged arguments array length.
PushArgumentsArray(assembler);
const intptr_t kNumArgs = 4;
@@ -1158,7 +1167,15 @@ void StubCode::GenerateCallClosureNoSuchMethodStub(Assembler* assembler) {
__ pushl(EAX); // Receiver.
__ pushl(EDX); // Arguments descriptor array.
+ // Adjust arguments count.
+ __ cmpl(FieldAddress(EDX, ArgumentsDescriptor::type_args_len_offset()),
+ Immediate(0));
__ movl(EDX, EDI);
+ Label args_count_ok;
+ __ j(EQUAL, &args_count_ok, Assembler::kNearJump);
+ __ addl(EDX, Immediate(Smi::RawValue(1))); // Include the type arguments.
+ __ Bind(&args_count_ok);
+
// EDX: Smi-tagged arguments array length.
PushArgumentsArray(assembler);
« 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