mirror of
https://github.com/dart-lang/sdk
synced 2024-10-06 14:49:43 +00:00
[dart2wasm] Fix accesses to type arguments in sync*
functions
Fixes the `Iteration` benchmark. Change-Id: I947c413524a3d55d19f56d0bfbb45dc5125e972a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/287467 Commit-Queue: Aske Simon Christensen <askesc@google.com> Reviewed-by: Ömer Ağacan <omersa@google.com>
This commit is contained in:
parent
9e1c3b4c26
commit
4733f9b754
|
@ -248,7 +248,14 @@ class SyncStarCodeGenerator extends CodeGenerator {
|
|||
|
||||
Context? context = closures.contexts[functionNode];
|
||||
if (context != null && context.isEmpty) context = context.parent;
|
||||
|
||||
generateOuter(functionNode, context, resumeFun);
|
||||
|
||||
// Forget about the outer function locals containing the type arguments,
|
||||
// so accesses to the type arguments in the inner function will fetch them
|
||||
// from the context.
|
||||
typeLocals.clear();
|
||||
|
||||
generateInner(functionNode, context, resumeFun);
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in a new issue