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

Unified Diff: runtime/vm/runtime_entry.cc

Issue 2859673002: Pass type argument vector to generic functions (if --reify-generic-functions is (Closed)
Patch Set: fix dartk 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
Index: runtime/vm/runtime_entry.cc
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index 5c8e8a316ad9dcb5c5937d827e2955ff16fcad81..6d07ad84ccaa467152b9953f70c93fc46e04f32b 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -858,9 +858,10 @@ static bool ResolveCallThroughGetter(const Instance& receiver,
Function* result) {
// 1. Check if there is a getter with the same name.
const String& getter_name = String::Handle(Field::GetterName(target_name));
+ const int kTypeArgsLen = 0;
const int kNumArguments = 1;
ArgumentsDescriptor args_desc(
- Array::Handle(ArgumentsDescriptor::New(kNumArguments)));
+ Array::Handle(ArgumentsDescriptor::New(kTypeArgsLen, kNumArguments)));
const Function& getter =
Function::Handle(Resolver::ResolveDynamicForReceiverClass(
receiver_class, getter_name, args_desc));
@@ -930,7 +931,7 @@ static RawFunction* ComputeTypeCheckTarget(const Instance& receiver,
static RawFunction* InlineCacheMissHandler(
- const GrowableArray<const Instance*>& args,
+ const GrowableArray<const Instance*>& args, // Checked arguments only.
const ICData& ic_data) {
const Instance& receiver = *args[0];
ArgumentsDescriptor arguments_descriptor(
@@ -1144,8 +1145,11 @@ DEFINE_RUNTIME_ENTRY(SingleTargetMiss, 1) {
// We lost the original ICData when we patched to the monomorphic case.
const String& name = String::Handle(zone, old_target.name());
ASSERT(!old_target.HasOptionalParameters());
- const Array& descriptor = Array::Handle(
- zone, ArgumentsDescriptor::New(old_target.num_fixed_parameters()));
+ ASSERT(!old_target.IsGeneric());
Vyacheslav Egorov (Google) 2017/05/13 22:20:14 I think to guarantee this assertion we need to hav
regis 2017/05/18 21:02:13 Oops. Done. Thanks.
+ const int kTypeArgsLen = 0;
+ const Array& descriptor =
+ Array::Handle(zone, ArgumentsDescriptor::New(
+ kTypeArgsLen, old_target.num_fixed_parameters()));
const ICData& ic_data =
ICData::Handle(zone, ICData::New(caller_function, name, descriptor,
Thread::kNoDeoptId, 1, /* args_tested */
@@ -1299,8 +1303,11 @@ DEFINE_RUNTIME_ENTRY(MonomorphicMiss, 1) {
// We lost the original ICData when we patched to the monomorphic case.
const String& name = String::Handle(zone, old_target.name());
ASSERT(!old_target.HasOptionalParameters());
- const Array& descriptor = Array::Handle(
- zone, ArgumentsDescriptor::New(old_target.num_fixed_parameters()));
+ ASSERT(!old_target.IsGeneric());
+ const int kTypeArgsLen = 0;
+ const Array& descriptor =
+ Array::Handle(zone, ArgumentsDescriptor::New(
+ kTypeArgsLen, old_target.num_fixed_parameters()));
const ICData& ic_data =
ICData::Handle(zone, ICData::New(caller_function, name, descriptor,
Thread::kNoDeoptId, 1, /* args_tested */

Powered by Google App Engine
This is Rietveld 408576698