| Index: runtime/vm/code_generator.cc
|
| diff --git a/runtime/vm/code_generator.cc b/runtime/vm/code_generator.cc
|
| index 87b2a89ce36376f5c4f5177f71085f7ce9f022c5..37e00ad5626b6774fee919ece5c26fef2f5d478f 100644
|
| --- a/runtime/vm/code_generator.cc
|
| +++ b/runtime/vm/code_generator.cc
|
| @@ -1097,7 +1097,8 @@ DEFINE_RUNTIME_ENTRY(UpdateICDataTwoArgs, 4) {
|
| // Otherwise return null.
|
| static RawInstance* ResolveImplicitClosure(const Instance& receiver,
|
| const Class& receiver_class,
|
| - const String& target_name) {
|
| + const String& target_name,
|
| + const ICData& ic_data) {
|
| // 1. Check if was a getter call.
|
| if (!Field::IsGetterName(target_name)) return Instance::null();
|
|
|
| @@ -1120,6 +1121,11 @@ static RawInstance* ResolveImplicitClosure(const Instance& receiver,
|
| AbstractTypeArguments::Handle(receiver.GetTypeArguments());
|
| closure.SetTypeArguments(type_arguments);
|
| }
|
| +
|
| + ASSERT(ic_data.num_args_tested() == 1);
|
| + ic_data.AddReceiverCheck(
|
| + receiver_class.id(),
|
| + Function::Handle(StubCode::GetMethodExtractor(closure_function)));
|
| return closure.raw();
|
| }
|
|
|
| @@ -1404,7 +1410,8 @@ DEFINE_RUNTIME_ENTRY(InstanceFunctionLookup, 4) {
|
|
|
| Instance& closure = Instance::Handle(ResolveImplicitClosure(receiver,
|
| receiver_class,
|
| - target_name));
|
| + target_name,
|
| + ic_data));
|
| if (!closure.IsNull()) {
|
| arguments.SetReturn(closure);
|
| return;
|
|
|