| Index: runtime/vm/parser.cc
|
| diff --git a/runtime/vm/parser.cc b/runtime/vm/parser.cc
|
| index ee1b60fe8313faa133a770b14f72a20f3058d33f..b0cb36bceba4b90065812b03714f678d95d7cbac 100644
|
| --- a/runtime/vm/parser.cc
|
| +++ b/runtime/vm/parser.cc
|
| @@ -6571,7 +6571,7 @@ RawFunction* Parser::OpenSyncGeneratorFunction(intptr_t func_pos) {
|
| // function has already been created by a previous
|
| // compilation.
|
| const Function& found_func = Function::Handle(
|
| - Z, current_class().LookupClosureFunction(func_pos));
|
| + Z, I->LookupClosureFunction(script_, func_pos));
|
| if (!found_func.IsNull() &&
|
| (found_func.token_pos() == func_pos) &&
|
| (found_func.script() == innermost_function().script()) &&
|
| @@ -6712,7 +6712,7 @@ RawFunction* Parser::OpenAsyncFunction(intptr_t async_func_pos) {
|
| // this async function has already been created by a previous
|
| // compilation of this function.
|
| const Function& found_func = Function::Handle(
|
| - Z, current_class().LookupClosureFunction(async_func_pos));
|
| + Z, I->LookupClosureFunction(script_, async_func_pos));
|
| if (!found_func.IsNull() &&
|
| (found_func.token_pos() == async_func_pos) &&
|
| (found_func.script() == innermost_function().script()) &&
|
| @@ -6848,7 +6848,7 @@ RawFunction* Parser::OpenAsyncGeneratorFunction(intptr_t async_func_pos) {
|
| // this async generator has already been created by a previous
|
| // compilation of this function.
|
| const Function& found_func = Function::Handle(
|
| - Z, current_class().LookupClosureFunction(async_func_pos));
|
| + Z, I->LookupClosureFunction(script_, async_func_pos));
|
| if (!found_func.IsNull() &&
|
| (found_func.token_pos() == async_func_pos) &&
|
| (found_func.script() == innermost_function().script()) &&
|
| @@ -7619,7 +7619,7 @@ AstNode* Parser::ParseFunctionStatement(bool is_literal) {
|
| // TODO(hausner): There could be two different closures at the given
|
| // function_pos, one enclosed in a closurized function and one enclosed in the
|
| // non-closurized version of this same function.
|
| - function = current_class().LookupClosureFunction(function_pos);
|
| + function = I->LookupClosureFunction(script_, function_pos);
|
| if (function.IsNull() || (function.token_pos() != function_pos) ||
|
| (function.parent_function() != innermost_function().raw())) {
|
| // The function will be registered in the lookup table by the
|
| @@ -13121,7 +13121,7 @@ RawFunction* Parser::BuildConstructorClosureFunction(const Function& ctr,
|
| intptr_t token_pos) {
|
| ASSERT(ctr.kind() == RawFunction::kConstructor);
|
| Function& closure = Function::Handle(Z);
|
| - closure = current_class().LookupClosureFunction(token_pos);
|
| + closure = I->LookupClosureFunction(script_, token_pos);
|
| if (!closure.IsNull()) {
|
| ASSERT(closure.IsConstructorClosureFunction());
|
| return closure.raw();
|
|
|