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

Unified Diff: runtime/vm/jit_optimizer.cc

Issue 2894953002: Support inlining of calls where type arguments are passed to generic functions. (Closed)
Patch Set: Merge branch 'master' into slave Created 3 years, 6 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/jit_optimizer.cc
diff --git a/runtime/vm/jit_optimizer.cc b/runtime/vm/jit_optimizer.cc
index e0cb503d05b3f095cdc7a7da4d7b3d631cbed161..03943efdffb38447856014b2f77e3e4cc8b8382b 100644
--- a/runtime/vm/jit_optimizer.cc
+++ b/runtime/vm/jit_optimizer.cc
@@ -98,10 +98,13 @@ bool JitOptimizer::TryCreateICData(InstanceCallInstr* call) {
return false;
}
+ const intptr_t receiver_index = call->FirstParamIndex();
GrowableArray<intptr_t> class_ids(call->ic_data()->NumArgsTested());
- ASSERT(call->ic_data()->NumArgsTested() <= call->ArgumentCount());
+ ASSERT(call->ic_data()->NumArgsTested() <=
+ call->ArgumentCount() - receiver_index);
Vyacheslav Egorov (Google) 2017/07/03 16:15:43 I think you can use call->ArgumentCountWithoutType
regis 2017/07/05 18:41:30 Done.
for (intptr_t i = 0; i < call->ic_data()->NumArgsTested(); i++) {
- class_ids.Add(call->PushArgumentAt(i)->value()->Type()->ToCid());
+ class_ids.Add(
+ call->PushArgumentAt(receiver_index + i)->value()->Type()->ToCid());
}
const Token::Kind op_kind = call->token_kind();
« runtime/vm/intermediate_language.h ('K') | « runtime/vm/intermediate_language_test.cc ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698