Chromium Code Reviews| 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 */ |