| Index: pkg/compiler/lib/src/ssa/builder.dart
|
| diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
|
| index ade11d4865dc4f1c6123113b926c21ecb851241c..502e88cd1f229bfba518a48a1f49d76808026c35 100644
|
| --- a/pkg/compiler/lib/src/ssa/builder.dart
|
| +++ b/pkg/compiler/lib/src/ssa/builder.dart
|
| @@ -1037,13 +1037,9 @@ class SsaBuilder extends ast.Visitor
|
| closureToClassMapper.getMemberMap(callee);
|
| localsHandler.closureData = newClosureData;
|
| if (resolvedAst.kind == ResolvedAstKind.PARSED) {
|
| - // TODO(efortuna): Take out the test below for null once we are no
|
| - // longer dealing with the ClosureClassMap interface directly.
|
| - if (newClosureData.capturingScopes[resolvedAst.node] != null) {
|
| - localsHandler.enterScope(
|
| - newClosureData.capturingScopes[resolvedAst.node],
|
| - forGenerativeConstructorBody: callee.isGenerativeConstructorBody);
|
| - }
|
| + localsHandler.enterScope(
|
| + newClosureData.capturingScopes[resolvedAst.node],
|
| + forGenerativeConstructorBody: callee.isGenerativeConstructorBody);
|
| }
|
| buildInitializers(callee, constructorResolvedAsts, fieldValues);
|
| localsHandler.closureData = oldClosureData;
|
| @@ -1731,12 +1727,7 @@ class SsaBuilder extends ast.Visitor
|
| }
|
|
|
| loopHandler.handleLoop(
|
| - node,
|
| - closureToClassMapper.getClosureRepresentationInfoForLoop(node),
|
| - buildInitializer,
|
| - buildCondition,
|
| - buildUpdate,
|
| - buildBody);
|
| + node, buildInitializer, buildCondition, buildUpdate, buildBody);
|
| }
|
|
|
| visitWhile(ast.While node) {
|
| @@ -1746,12 +1737,7 @@ class SsaBuilder extends ast.Visitor
|
| return popBoolified();
|
| }
|
|
|
| - loopHandler.handleLoop(
|
| - node,
|
| - closureToClassMapper.getClosureRepresentationInfoForLoop(node),
|
| - () {},
|
| - buildCondition,
|
| - () {}, () {
|
| + loopHandler.handleLoop(node, () {}, buildCondition, () {}, () {
|
| visit(node.body);
|
| });
|
| }
|
| @@ -1759,9 +1745,7 @@ class SsaBuilder extends ast.Visitor
|
| visitDoWhile(ast.DoWhile node) {
|
| assert(isReachable);
|
| LocalsHandler savedLocals = new LocalsHandler.from(localsHandler);
|
| - var loopClosureInfo =
|
| - closureToClassMapper.getClosureRepresentationInfoForLoop(node);
|
| - localsHandler.startLoop(loopClosureInfo);
|
| + localsHandler.startLoop(node);
|
| loopDepth++;
|
| JumpHandler jumpHandler = loopHandler.beginLoopHeader(node);
|
| HLoopInformation loopInfo = current.loopInformation;
|
| @@ -1779,7 +1763,7 @@ class SsaBuilder extends ast.Visitor
|
| // Using a separate block is just a simple workaround.
|
| bodyEntryBlock = openNewBlock();
|
| }
|
| - localsHandler.enterLoopBody(loopClosureInfo);
|
| + localsHandler.enterLoopBody(node);
|
| visit(node.body);
|
|
|
| // If there are no continues we could avoid the creation of the condition
|
| @@ -5468,12 +5452,7 @@ class SsaBuilder extends ast.Visitor
|
|
|
| buildProtectedByFinally(() {
|
| loopHandler.handleLoop(
|
| - node,
|
| - closureToClassMapper.getClosureRepresentationInfoForLoop(node),
|
| - buildInitializer,
|
| - buildCondition,
|
| - buildUpdate,
|
| - buildBody);
|
| + node, buildInitializer, buildCondition, buildUpdate, buildBody);
|
| }, () {
|
| pushInvokeDynamic(node, Selectors.cancel, null, [streamIterator]);
|
| push(new HAwait(pop(),
|
| @@ -5540,12 +5519,7 @@ class SsaBuilder extends ast.Visitor
|
| }
|
|
|
| loopHandler.handleLoop(
|
| - node,
|
| - closureToClassMapper.getClosureRepresentationInfoForLoop(node),
|
| - buildInitializer,
|
| - buildCondition,
|
| - () {},
|
| - buildBody);
|
| + node, buildInitializer, buildCondition, () {}, buildBody);
|
| }
|
|
|
| buildAssignLoopVariable(ast.ForIn node, HInstruction value) {
|
| @@ -5664,12 +5638,7 @@ class SsaBuilder extends ast.Visitor
|
| }
|
|
|
| loopHandler.handleLoop(
|
| - node,
|
| - closureToClassMapper.getClosureRepresentationInfoForLoop(node),
|
| - buildInitializer,
|
| - buildCondition,
|
| - buildUpdate,
|
| - buildBody);
|
| + node, buildInitializer, buildCondition, buildUpdate, buildBody);
|
| }
|
|
|
| visitLabel(ast.Label node) {
|
| @@ -6016,13 +5985,7 @@ class SsaBuilder extends ast.Visitor
|
| }
|
|
|
| void buildLoop() {
|
| - loopHandler.handleLoop(
|
| - node,
|
| - closureToClassMapper.getClosureRepresentationInfoForLoop(node),
|
| - () {},
|
| - buildCondition,
|
| - () {},
|
| - buildSwitch);
|
| + loopHandler.handleLoop(node, () {}, buildCondition, () {}, buildSwitch);
|
| }
|
|
|
| if (hasDefault) {
|
|
|