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

Unified Diff: runtime/vm/runtime_entry.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/runtime_entry.cc
diff --git a/runtime/vm/runtime_entry.cc b/runtime/vm/runtime_entry.cc
index 15bdab0595293f62d2741feb22174991e9b0a885..e06db120b2373b93afc54f3d347e532bca4e4f5c 100644
--- a/runtime/vm/runtime_entry.cc
+++ b/runtime/vm/runtime_entry.cc
@@ -854,9 +854,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));
@@ -926,7 +927,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(
@@ -1136,8 +1137,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());
+ 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 */
@@ -1289,8 +1293,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