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

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

Issue 9421035: Support break and labeled statements. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: 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
OLDNEW
1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2011, 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 HTracer extends HGraphVisitor { 5 class HTracer extends HGraphVisitor {
6 int indent = 0; 6 int indent = 0;
7 final StringBuffer output; 7 final StringBuffer output;
8 8
9 factory HTracer.singleton() { 9 factory HTracer.singleton() {
10 if (_singleton === null) _singleton = new HTracer._internal(); 10 if (_singleton === null) _singleton = new HTracer._internal();
(...skipping 184 matching lines...) Expand 10 before | Expand all | Expand 10 after
195 String visitBitOr(HBitOr node) => visitInvokeStatic(node); 195 String visitBitOr(HBitOr node) => visitInvokeStatic(node);
196 196
197 String visitBitXor(HBitXor node) => visitInvokeStatic(node); 197 String visitBitXor(HBitXor node) => visitInvokeStatic(node);
198 198
199 String visitBoundsCheck(HBoundsCheck node) { 199 String visitBoundsCheck(HBoundsCheck node) {
200 String lengthId = temporaryId(node.length); 200 String lengthId = temporaryId(node.length);
201 String indexId = temporaryId(node.index); 201 String indexId = temporaryId(node.index);
202 return "Bounds check: length = $lengthId, index = $indexId"; 202 return "Bounds check: length = $lengthId, index = $indexId";
203 } 203 }
204 204
205 String visitBreak(HBreak node) {
206 if (node.label !== null) return "break " + node.label.stringValue;
207 return "break";
208 }
209
205 String visitDivide(HDivide node) => visitInvokeStatic(node); 210 String visitDivide(HDivide node) => visitInvokeStatic(node);
206 211
207 String visitEquals(HEquals node) => visitInvokeStatic(node); 212 String visitEquals(HEquals node) => visitInvokeStatic(node);
208 213
209 String visitExit(HExit node) => "exit"; 214 String visitExit(HExit node) => "exit";
210 215
211 String visitFieldGet(HFieldGet node) => 'get ${node.element.name}'; 216 String visitFieldGet(HFieldGet node) => 'get ${node.element.name}';
212 217
213 String visitFieldSet(HFieldSet node) { 218 String visitFieldSet(HFieldSet node) {
214 String valueId = temporaryId(node.value); 219 String valueId = temporaryId(node.value);
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
413 default: unreachable(); 418 default: unreachable();
414 } 419 }
415 return "TypeGuard: ${temporaryId(node.inputs[0])} is $type"; 420 return "TypeGuard: ${temporaryId(node.inputs[0])} is $type";
416 } 421 }
417 422
418 String visitIs(HIs node) { 423 String visitIs(HIs node) {
419 String type = node.typeExpression.toString(); 424 String type = node.typeExpression.toString();
420 return "TypeTest: ${temporaryId(node.expression)} is $type"; 425 return "TypeTest: ${temporaryId(node.expression)} is $type";
421 } 426 }
422 } 427 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698