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

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

Issue 194663005: Take is checks into account when deriving interceptor classes. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Added tests and removed fix from cl Created 6 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 | « no previous file | tests/language/interceptor9_test.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) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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:async' show EventSink; 7 import 'dart:async' show EventSink;
8 8
9 import 'ssa.dart'; 9 import 'ssa.dart';
10 import '../js_backend/js_backend.dart'; 10 import '../js_backend/js_backend.dart';
(...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after
322 322
323 String visitIndexAssign(HIndexAssign node) { 323 String visitIndexAssign(HIndexAssign node) {
324 String receiver = temporaryId(node.receiver); 324 String receiver = temporaryId(node.receiver);
325 String index = temporaryId(node.index); 325 String index = temporaryId(node.index);
326 String value = temporaryId(node.value); 326 String value = temporaryId(node.value);
327 return "IndexAssign: $receiver[$index] = $value"; 327 return "IndexAssign: $receiver[$index] = $value";
328 } 328 }
329 329
330 String visitInterceptor(HInterceptor node) { 330 String visitInterceptor(HInterceptor node) {
331 String value = temporaryId(node.inputs[0]); 331 String value = temporaryId(node.inputs[0]);
332 if (node.interceptedClasses != null) {
333 JavaScriptBackend backend = compiler.backend;
334 String cls = backend.namer.getInterceptorSuffix(node.interceptedClasses);
335 return "Intercept ($cls): $value";
336 }
332 return "Intercept: $value"; 337 return "Intercept: $value";
333 } 338 }
334 339
335 String visitInvokeClosure(HInvokeClosure node) 340 String visitInvokeClosure(HInvokeClosure node)
336 => visitInvokeDynamic(node, "closure"); 341 => visitInvokeDynamic(node, "closure");
337 342
338 String visitInvokeDynamic(HInvokeDynamic invoke, String kind) { 343 String visitInvokeDynamic(HInvokeDynamic invoke, String kind) {
339 String receiver = temporaryId(invoke.receiver); 344 String receiver = temporaryId(invoke.receiver);
340 String name = invoke.selector.name; 345 String name = invoke.selector.name;
341 String target = "($kind) $receiver.$name"; 346 String target = "($kind) $receiver.$name";
(...skipping 197 matching lines...) Expand 10 before | Expand all | Expand 10 after
539 } 544 }
540 545
541 String visitInterfaceType(HInterfaceType node) { 546 String visitInterfaceType(HInterfaceType node) {
542 return "InterfaceType: ${node.dartType}"; 547 return "InterfaceType: ${node.dartType}";
543 } 548 }
544 549
545 String visitDynamicType(HDynamicType node) { 550 String visitDynamicType(HDynamicType node) {
546 return "DynamicType"; 551 return "DynamicType";
547 } 552 }
548 } 553 }
OLDNEW
« no previous file with comments | « no previous file | tests/language/interceptor9_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698