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

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

Issue 9421035: Support break and labeled statements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address review comments. Update expectations. Created 8 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
« no previous file with comments | « frog/leg/resolver.dart ('k') | frog/leg/ssa/builder.dart » ('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 BailoutInfo { 5 class BailoutInfo {
6 int instructionId; 6 int instructionId;
7 int bailoutId; 7 int bailoutId;
8 BailoutInfo(this.instructionId, this.bailoutId); 8 BailoutInfo(this.instructionId, this.bailoutId);
9 } 9 }
10 10
(...skipping 153 matching lines...) Expand 10 before | Expand all | Expand 10 after
164 environment.addAll(phisInput); 164 environment.addAll(phisInput);
165 } 165 }
166 } 166 }
167 167
168 void visitGoto(HGoto goto) { 168 void visitGoto(HGoto goto) {
169 HBasicBlock block = goto.block; 169 HBasicBlock block = goto.block;
170 if (block.successors[0].dominator != block) return; 170 if (block.successors[0].dominator != block) return;
171 visitBasicBlock(block.successors[0]); 171 visitBasicBlock(block.successors[0]);
172 } 172 }
173 173
174 void visitBreak(HBreak breakInstruction) {
175 unimplemented();
176 }
177
174 void visitLoopBranch(HLoopBranch branch) { 178 void visitLoopBranch(HLoopBranch branch) {
175 HBasicBlock block = branch.block; 179 HBasicBlock block = branch.block;
176 180
177 // Visit the code after the loop. 181 // Visit the code after the loop.
178 visitBasicBlock(block.successors[1]); 182 visitBasicBlock(block.successors[1]);
179 // TODO(ngeoffray): Remove the instructions of the loop-exit from 183 // TODO(ngeoffray): Remove the instructions of the loop-exit from
180 // the environment. 184 // the environment.
181 185
182 HBasicBlock header = block.isLoopHeader() ? block : block.parentLoopHeader; 186 HBasicBlock header = block.isLoopHeader() ? block : block.parentLoopHeader;
183 // Put the loop phis in the environment. 187 // Put the loop phis in the environment.
(...skipping 152 matching lines...) Expand 10 before | Expand all | Expand 10 after
336 compiler.internalError('Control flow instructions already dealt with.', 340 compiler.internalError('Control flow instructions already dealt with.',
337 instruction: instruction); 341 instruction: instruction);
338 } 342 }
339 343
340 visitBailoutTarget(HBailoutTarget target) { 344 visitBailoutTarget(HBailoutTarget target) {
341 blocks.forEach((HBasicBlock block) { 345 blocks.forEach((HBasicBlock block) {
342 block.bailouts.add(target); 346 block.bailouts.add(target);
343 }); 347 });
344 } 348 }
345 } 349 }
OLDNEW
« no previous file with comments | « frog/leg/resolver.dart ('k') | frog/leg/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698