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

Unified Diff: runtime/vm/stub_code_arm.cc

Issue 2859673002: Pass type argument vector to generic functions (if --reify-generic-functions is (Closed)
Patch Set: Created 3 years, 8 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
Index: runtime/vm/stub_code_arm.cc
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc
index 47d6fa232fe6686b9c025663a3c64a8eecb956e7..033c8ea5a02f65626dade796bb3429c9eb53a658 100644
--- a/runtime/vm/stub_code_arm.cc
+++ b/runtime/vm/stub_code_arm.cc
@@ -606,6 +606,12 @@ static void GenerateDispatcherCode(Assembler* assembler,
__ Push(R8); // Receiver.
__ Push(R9); // ICData/MegamorphicCache.
__ Push(R4); // Arguments descriptor.
+
+ // Adjust arguments count.
+ __ ldr(R3, FieldAddress(R4, ArgumentsDescriptor::type_args_len_offset()));
+ __ cmp(R3, Operand(0));
+ __ AddImmediate(R2, R2, Smi::RawValue(1), NE); // Include the type arguments.
+
// R2: Smi-tagged arguments array length.
PushArgumentsArray(assembler);
const intptr_t kNumArgs = 4;
@@ -1251,6 +1257,11 @@ void StubCode::GenerateCallClosureNoSuchMethodStub(Assembler* assembler) {
__ LoadImmediate(IP, 0);
__ PushList((1 << R4) | (1 << R8) | (1 << IP));
+ // Adjust arguments count.
+ __ ldr(R3, FieldAddress(R4, ArgumentsDescriptor::type_args_len_offset()));
+ __ cmp(R3, Operand(0));
+ __ AddImmediate(R2, R2, Smi::RawValue(1), NE); // Include the type arguments.
+
// R2: Smi-tagged arguments array length.
PushArgumentsArray(assembler);

Powered by Google App Engine
This is Rietveld 408576698