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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/ssa/tracer.dart

Issue 11348177: Cleanup after the interceptor refactoring work, and add a new SSA instruction for an interceptor, s… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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) 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 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 '../js_backend/js_backend.dart'; 9 import '../js_backend/js_backend.dart';
10 import '../dart2jslib.dart'; 10 import '../dart2jslib.dart';
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
307 } 307 }
308 308
309 String visitIndex(HIndex node) => visitInvokeStatic(node); 309 String visitIndex(HIndex node) => visitInvokeStatic(node);
310 String visitIndexAssign(HIndexAssign node) => visitInvokeStatic(node); 310 String visitIndexAssign(HIndexAssign node) => visitInvokeStatic(node);
311 311
312 String visitIntegerCheck(HIntegerCheck node) { 312 String visitIntegerCheck(HIntegerCheck node) {
313 String value = temporaryId(node.value); 313 String value = temporaryId(node.value);
314 return "Integer check: $value"; 314 return "Integer check: $value";
315 } 315 }
316 316
317 String visitInterceptor(HInterceptor node) {
318 String value = temporaryId(node.inputs[0]);
319 return "Intercept: $receiver";
karlklose 2012/11/22 15:30:53 '$receiver' -> '$value'.
ngeoffray 2012/11/22 15:42:01 Nice catch. https://codereview.chromium.org/114141
320 }
321
317 String visitInvokeClosure(HInvokeClosure node) 322 String visitInvokeClosure(HInvokeClosure node)
318 => visitInvokeDynamic(node, "closure"); 323 => visitInvokeDynamic(node, "closure");
319 324
320 String visitInvokeDynamic(HInvokeDynamic invoke, String kind) { 325 String visitInvokeDynamic(HInvokeDynamic invoke, String kind) {
321 String receiver = temporaryId(invoke.receiver); 326 String receiver = temporaryId(invoke.receiver);
322 String name = invoke.selector.name.slowToString(); 327 String name = invoke.selector.name.slowToString();
323 String target = "($kind) $receiver.$name"; 328 String target = "($kind) $receiver.$name";
324 int offset = HInvoke.ARGUMENTS_OFFSET; 329 int offset = HInvoke.ARGUMENTS_OFFSET;
325 List arguments = 330 List arguments =
326 invoke.inputs.getRange(offset, invoke.inputs.length - offset); 331 invoke.inputs.getRange(offset, invoke.inputs.length - offset);
(...skipping 198 matching lines...) Expand 10 before | Expand all | Expand 10 after
525 } 530 }
526 531
527 String visitTypeConversion(HTypeConversion node) { 532 String visitTypeConversion(HTypeConversion node) {
528 return "TypeConversion: ${temporaryId(node.checkedInput)} to ${node.type}"; 533 return "TypeConversion: ${temporaryId(node.checkedInput)} to ${node.type}";
529 } 534 }
530 535
531 String visitRangeConversion(HRangeConversion node) { 536 String visitRangeConversion(HRangeConversion node) {
532 return "RangeConversion: ${node.checkedInput}"; 537 return "RangeConversion: ${node.checkedInput}";
533 } 538 }
534 } 539 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698