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

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

Issue 9166010: Implement super calls. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 8 years, 11 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 251 matching lines...) Expand 10 before | Expand all | Expand 10 after
262 => visitInvokeStatic(invoke); 262 => visitInvokeStatic(invoke);
263 263
264 String visitInvokeStatic(HInvokeStatic invoke) { 264 String visitInvokeStatic(HInvokeStatic invoke) {
265 String target = temporaryId(invoke.target); 265 String target = temporaryId(invoke.target);
266 int offset = HInvoke.ARGUMENTS_OFFSET; 266 int offset = HInvoke.ARGUMENTS_OFFSET;
267 List arguments = 267 List arguments =
268 invoke.inputs.getRange(offset, invoke.inputs.length - offset); 268 invoke.inputs.getRange(offset, invoke.inputs.length - offset);
269 return visitGenericInvoke("Invoke", target, arguments); 269 return visitGenericInvoke("Invoke", target, arguments);
270 } 270 }
271 271
272 String visitInvokeSuper(HInvokeSuper invoke) {
273 String target = temporaryId(invoke.target);
274 print(target);
ngeoffray 2012/01/11 13:00:48 Remove print.
karlklose 2012/01/11 13:46:12 Done.
275 int offset = HInvoke.ARGUMENTS_OFFSET + 1;
276 List arguments =
277 invoke.inputs.getRange(offset, invoke.inputs.length - offset);
278 return visitGenericInvoke("Invoke super", target, arguments);
279 }
280
272 String visitForeign(HForeign foreign) { 281 String visitForeign(HForeign foreign) {
273 return visitGenericInvoke("Foreign", "${foreign.code}", foreign.inputs); 282 return visitGenericInvoke("Foreign", "${foreign.code}", foreign.inputs);
274 } 283 }
275 284
276 String visitForeignNew(HForeignNew node) { 285 String visitForeignNew(HForeignNew node) {
277 return visitGenericInvoke("New", "${node.element.name}", node.inputs); 286 return visitGenericInvoke("New", "${node.element.name}", node.inputs);
278 } 287 }
279 288
280 String visitLess(HLess node) => visitInvokeStatic(node); 289 String visitLess(HLess node) => visitInvokeStatic(node);
281 String visitLessEqual(HLessEqual node) => visitInvokeStatic(node); 290 String visitLessEqual(HLessEqual node) => visitInvokeStatic(node);
(...skipping 80 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 case HType.INTEGER: type = "integer"; break; 371 case HType.INTEGER: type = "integer"; break;
363 case HType.DOUBLE: type = "double"; break; 372 case HType.DOUBLE: type = "double"; break;
364 case HType.NUMBER: type = "number"; break; 373 case HType.NUMBER: type = "number"; break;
365 case HType.STRING: type = "string"; break; 374 case HType.STRING: type = "string"; break;
366 case HType.STRING_OR_ARRAY: type = "string_or_array"; break; 375 case HType.STRING_OR_ARRAY: type = "string_or_array"; break;
367 default: unreachable(); 376 default: unreachable();
368 } 377 }
369 return "TypeGuard: ${temporaryId(node.inputs[0])} is $type"; 378 return "TypeGuard: ${temporaryId(node.inputs[0])} is $type";
370 } 379 }
371 } 380 }
OLDNEW
« frog/leg/ssa/nodes.dart ('K') | « frog/leg/ssa/nodes.dart ('k') | frog/leg/tree/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698