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

Unified 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 side-by-side diff with in-line comments
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 »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm64.cc
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index 53ee64b428a35ef0a1fd81535dac8d070f8b758c..4ee65866224b7d9c434b8fe15d91f1bc33a3f2bb 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -627,6 +627,13 @@ static void GenerateDispatcherCode(Assembler* assembler,
__ Push(R6); // Receiver.
__ Push(R5); // ICData/MegamorphicCache.
__ Push(R4); // Arguments descriptor.
+
+ // Adjust arguments count.
+ __ LoadFieldFromOffset(R3, R4, ArgumentsDescriptor::type_args_len_offset());
+ __ AddImmediate(TMP, R2, Smi::RawValue(1)); // Include the type arguments.
+ __ cmp(R3, Operand(0));
+ __ csinc(R2, R2, TMP, EQ); // R2 <- (R3 == 0) ? R2 : TMP.
+
// R2: Smi-tagged arguments array length.
PushArgumentsArray(assembler);
const intptr_t kNumArgs = 4;
@@ -1285,6 +1292,12 @@ void StubCode::GenerateCallClosureNoSuchMethodStub(Assembler* assembler) {
__ Push(R6);
__ Push(R4);
+ // Adjust arguments count.
+ __ LoadFieldFromOffset(R3, R4, ArgumentsDescriptor::type_args_len_offset());
+ __ AddImmediate(TMP, R2, Smi::RawValue(1)); // Include the type arguments.
+ __ cmp(R3, Operand(0));
+ __ csinc(R2, R2, TMP, EQ); // R2 <- (R3 == 0) ? R2 : TMP.
+
// R2: Smi-tagged arguments array length.
PushArgumentsArray(assembler);
« 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