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

Side by Side Diff: dart/frog/leg/ssa/builder.dart

Issue 9808109: Implement unlabeled continue. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 8 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
« no previous file with comments | « dart/frog/leg/lib/hash_map_set.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 class Interceptors { 5 class Interceptors {
6 Compiler compiler; 6 Compiler compiler;
7 Interceptors(Compiler this.compiler); 7 Interceptors(Compiler this.compiler);
8 8
9 SourceString mapOperatorToMethodName(Operator op) { 9 SourceString mapOperatorToMethodName(Operator op) {
10 String name = op.source.stringValue; 10 String name = op.source.stringValue;
(...skipping 1146 matching lines...) Expand 10 before | Expand all | Expand 10 after
1157 }); 1157 });
1158 bodyBlock.addSuccessor(updateBlock); 1158 bodyBlock.addSuccessor(updateBlock);
1159 continueLocals.add(localsHandler); 1159 continueLocals.add(localsHandler);
1160 1160
1161 open(updateBlock); 1161 open(updateBlock);
1162 1162
1163 localsHandler = localsHandler.mergeMultiple(continueLocals, updateBlock); 1163 localsHandler = localsHandler.mergeMultiple(continueLocals, updateBlock);
1164 1164
1165 HLabeledBlockInformation labelInfo; 1165 HLabeledBlockInformation labelInfo;
1166 List<LabelElement> labels = jumpHandler.labels(); 1166 List<LabelElement> labels = jumpHandler.labels();
1167 TargetElement target = elements[loop];
1167 if (!labels.isEmpty()) { 1168 if (!labels.isEmpty()) {
1168 beginBodyBlock.labeledBlockInformation = 1169 beginBodyBlock.labeledBlockInformation =
1169 new HLabeledBlockInformation(bodyGraph, updateBlock, 1170 new HLabeledBlockInformation(bodyGraph, updateBlock,
1170 jumpHandler.labels(), isContinue: true); 1171 jumpHandler.labels(), isContinue: true);
1172 } else if (target !== null && target.isContinueTarget) {
1173 beginBodyBlock.labeledBlockInformation =
1174 new HLabeledBlockInformation.implicit(bodyGraph, updateBlock,
1175 target, isContinue: true);
1171 } 1176 }
1172 1177
1173 localsHandler.enterLoopUpdates(loop); 1178 localsHandler.enterLoopUpdates(loop);
1174 1179
1175 update(); 1180 update();
1176 1181
1177 updateBlock = close(new HGoto()); 1182 updateBlock = close(new HGoto());
1178 // The back-edge completing the cycle. 1183 // The back-edge completing the cycle.
1179 updateBlock.addSuccessor(conditionBlock); 1184 updateBlock.addSuccessor(conditionBlock);
1180 conditionBlock.postProcessLoopHeader(); 1185 conditionBlock.postProcessLoopHeader();
(...skipping 1742 matching lines...) Expand 10 before | Expand all | Expand 10 after
2923 false, 2928 false,
2924 <HInstruction>[target, input])); 2929 <HInstruction>[target, input]));
2925 return builder.pop(); 2930 return builder.pop();
2926 } 2931 }
2927 2932
2928 HInstruction result() { 2933 HInstruction result() {
2929 flushLiterals(); 2934 flushLiterals();
2930 return prefix; 2935 return prefix;
2931 } 2936 }
2932 } 2937 }
OLDNEW
« no previous file with comments | « dart/frog/leg/lib/hash_map_set.dart ('k') | dart/tests/co19/co19-leg.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698