Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(627)

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/builder.dart

Issue 12082054: Fix crash in compiler when we are generating a bailout method where a loop contains continue/break/… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 7 years, 10 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
OLDNEW
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 part of ssa; 5 part of ssa;
6 6
7 /** 7 /**
8 * A special element for the extra parameter taken by intercepted 8 * A special element for the extra parameter taken by intercepted
9 * methods. We need to override [Element.computeType] because our 9 * methods. We need to override [Element.computeType] because our
10 * optimizers may look at its declared type. 10 * optimizers may look at its declared type.
(...skipping 2031 matching lines...) Expand 10 before | Expand all | Expand 10 after
2042 close(new HGoto()); 2042 close(new HGoto());
2043 avoidCriticalEdge.addSuccessor(loopEntryBlock); // The back-edge. 2043 avoidCriticalEdge.addSuccessor(loopEntryBlock); // The back-edge.
2044 2044
2045 conditionExpression = 2045 conditionExpression =
2046 new SubExpression(conditionBlock, conditionEndBlock); 2046 new SubExpression(conditionBlock, conditionEndBlock);
2047 } 2047 }
2048 2048
2049 endLoop(loopEntryBlock, conditionEndBlock, jumpHandler, localsHandler); 2049 endLoop(loopEntryBlock, conditionEndBlock, jumpHandler, localsHandler);
2050 if (!isAbortingBody || hasContinues) { 2050 if (!isAbortingBody || hasContinues) {
2051 loopEntryBlock.postProcessLoopHeader(); 2051 loopEntryBlock.postProcessLoopHeader();
2052 SubGraph bodyGraph = new SubGraph(bodyEntryBlock, bodyExitBlock); 2052 SubGraph bodyGraph = new SubGraph(loopEntryBlock, bodyExitBlock);
2053 HLoopBlockInformation loopBlockInfo = 2053 HLoopBlockInformation loopBlockInfo =
2054 new HLoopBlockInformation( 2054 new HLoopBlockInformation(
2055 HLoopBlockInformation.DO_WHILE_LOOP, 2055 HLoopBlockInformation.DO_WHILE_LOOP,
2056 null, 2056 null,
2057 wrapExpressionGraph(conditionExpression), 2057 wrapExpressionGraph(conditionExpression),
2058 wrapStatementGraph(bodyGraph), 2058 wrapStatementGraph(bodyGraph),
2059 null, 2059 null,
2060 loopEntryBlock.loopInformation.target, 2060 loopEntryBlock.loopInformation.target,
2061 loopEntryBlock.loopInformation.labels, 2061 loopEntryBlock.loopInformation.labels,
2062 sourceFileLocationForBeginToken(node), 2062 sourceFileLocationForBeginToken(node),
(...skipping 2891 matching lines...) Expand 10 before | Expand all | Expand 10 after
4954 new HSubGraphBlockInformation(elseBranch.graph)); 4954 new HSubGraphBlockInformation(elseBranch.graph));
4955 4955
4956 HBasicBlock conditionStartBlock = conditionBranch.block; 4956 HBasicBlock conditionStartBlock = conditionBranch.block;
4957 conditionStartBlock.setBlockFlow(info, joinBlock); 4957 conditionStartBlock.setBlockFlow(info, joinBlock);
4958 SubGraph conditionGraph = conditionBranch.graph; 4958 SubGraph conditionGraph = conditionBranch.graph;
4959 HIf branch = conditionGraph.end.last; 4959 HIf branch = conditionGraph.end.last;
4960 assert(branch is HIf); 4960 assert(branch is HIf);
4961 branch.blockInformation = conditionStartBlock.blockFlow; 4961 branch.blockInformation = conditionStartBlock.blockFlow;
4962 } 4962 }
4963 } 4963 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698