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

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

Issue 9578021: Revert "Refactor constant part." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 8 years, 9 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/ssa/optimize.dart ('k') | dart/frog/leg/tree/nodes.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) 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 #library('tracer'); 5 #library('tracer');
6 6
7 #import('dart:io'); 7 #import('dart:io');
8 #import('ssa.dart'); 8 #import('ssa.dart');
9 #import('../leg.dart'); 9 #import('../leg.dart');
10 10
(...skipping 199 matching lines...) Expand 10 before | Expand all | Expand 10 after
210 } 210 }
211 211
212 String visitBreak(HBreak node) { 212 String visitBreak(HBreak node) {
213 HBasicBlock target = currentBlock.successors[0]; 213 HBasicBlock target = currentBlock.successors[0];
214 if (node.label !== null) { 214 if (node.label !== null) {
215 return "Break ${node.label.slowToString()}: (B${target.id})"; 215 return "Break ${node.label.slowToString()}: (B${target.id})";
216 } 216 }
217 return "Break: (B${target.id})"; 217 return "Break: (B${target.id})";
218 } 218 }
219 219
220 String visitConstant(HConstant constant) => "Constant ${constant.constant}";
221
222 String visitDivide(HDivide node) => visitInvokeStatic(node); 220 String visitDivide(HDivide node) => visitInvokeStatic(node);
223 221
224 String visitEquals(HEquals node) => visitInvokeStatic(node); 222 String visitEquals(HEquals node) => visitInvokeStatic(node);
225 223
226 String visitExit(HExit node) => "exit"; 224 String visitExit(HExit node) => "exit";
227 225
228 String visitFieldGet(HFieldGet node) { 226 String visitFieldGet(HFieldGet node) {
229 return 'get ${node.element.name.slowToString()}'; 227 return 'get ${node.element.name.slowToString()}';
230 } 228 }
231 229
(...skipping 90 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 320
323 String visitForeignNew(HForeignNew node) { 321 String visitForeignNew(HForeignNew node) {
324 return visitGenericInvoke("New", 322 return visitGenericInvoke("New",
325 "${node.element.name.slowToString()}", 323 "${node.element.name.slowToString()}",
326 node.inputs); 324 node.inputs);
327 } 325 }
328 326
329 String visitLess(HLess node) => visitInvokeStatic(node); 327 String visitLess(HLess node) => visitInvokeStatic(node);
330 String visitLessEqual(HLessEqual node) => visitInvokeStatic(node); 328 String visitLessEqual(HLessEqual node) => visitInvokeStatic(node);
331 329
330 String visitLiteral(HLiteral literal) => "Literal ${literal.value}";
331
332 String visitLiteralList(HLiteralList node) { 332 String visitLiteralList(HLiteralList node) {
333 StringBuffer elementsString = new StringBuffer(); 333 StringBuffer elementsString = new StringBuffer();
334 for (int i = 0; i < node.inputs.length; i++) { 334 for (int i = 0; i < node.inputs.length; i++) {
335 if (i != 0) elementsString.add(", "); 335 if (i != 0) elementsString.add(", ");
336 elementsString.add(temporaryId(node.inputs[i])); 336 elementsString.add(temporaryId(node.inputs[i]));
337 } 337 }
338 return "Literal list: [$elementsString]"; 338 return "Literal list: [$elementsString]";
339 } 339 }
340 340
341 String visitLoad(HLoad node) => "Load: ${temporaryId(node.inputs[0])}"; 341 String visitLoad(HLoad node) => "Load: ${temporaryId(node.inputs[0])}";
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
443 default: unreachable(); 443 default: unreachable();
444 } 444 }
445 return "TypeGuard: ${temporaryId(node.inputs[0])} is $type"; 445 return "TypeGuard: ${temporaryId(node.inputs[0])} is $type";
446 } 446 }
447 447
448 String visitIs(HIs node) { 448 String visitIs(HIs node) {
449 String type = node.typeExpression.toString(); 449 String type = node.typeExpression.toString();
450 return "TypeTest: ${temporaryId(node.expression)} is $type"; 450 return "TypeTest: ${temporaryId(node.expression)} is $type";
451 } 451 }
452 } 452 }
OLDNEW
« no previous file with comments | « dart/frog/leg/ssa/optimize.dart ('k') | dart/frog/leg/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698