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

Side by Side Diff: pkg/compiler/lib/src/cps_ir/cps_ir_tracer.dart

Issue 1385423002: dart2js cps_ir: Use interceptors for is-checks (version 2) (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: fix analyzer warnings Created 5 years, 2 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
OLDNEW
1 // Copyright (c) 2014, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2014, 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 dart2js.ir_tracer; 5 library dart2js.ir_tracer;
6 6
7 import 'dart:async' show EventSink; 7 import 'dart:async' show EventSink;
8 import 'cps_ir_nodes.dart' as cps_ir; 8 import 'cps_ir_nodes.dart' as cps_ir;
9 import '../tracer.dart'; 9 import '../tracer.dart';
10 10
(...skipping 328 matching lines...) Expand 10 before | Expand all | Expand 10 after
339 } 339 }
340 340
341 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { 341 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) {
342 String args = node.arguments.map(formatReference).join(', '); 342 String args = node.arguments.map(formatReference).join(', ');
343 return "CreateInvocationMirror(${node.selector.name}, $args)"; 343 return "CreateInvocationMirror(${node.selector.name}, $args)";
344 } 344 }
345 345
346 visitTypeTest(cps_ir.TypeTest node) { 346 visitTypeTest(cps_ir.TypeTest node) {
347 String value = formatReference(node.value); 347 String value = formatReference(node.value);
348 String args = node.typeArguments.map(formatReference).join(', '); 348 String args = node.typeArguments.map(formatReference).join(', ');
349 return "TypeTest ($value ${node.dartType} ($args))"; 349 String interceptor = node.interceptor == null
350 ? ''
351 : ' ${formatReference(node.interceptor)}';
352 return "TypeTest ($value ${node.dartType} ($args)$interceptor)";
353 }
354
355 visitTypeTestViaFlag(cps_ir.TypeTestViaFlag node) {
356 String interceptor = formatReference(node.interceptor);
357 return "TypeTestViaFlag ($interceptor ${node.dartType})";
350 } 358 }
351 359
352 visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) { 360 visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) {
353 String operator = node.operator.toString(); 361 String operator = node.operator.toString();
354 String args = node.arguments.map(formatReference).join(', '); 362 String args = node.arguments.map(formatReference).join(', ');
355 return 'ApplyBuiltinOperator $operator ($args)'; 363 return 'ApplyBuiltinOperator $operator ($args)';
356 } 364 }
357 365
358 visitApplyBuiltinMethod(cps_ir.ApplyBuiltinMethod node) { 366 visitApplyBuiltinMethod(cps_ir.ApplyBuiltinMethod node) {
359 String method = node.method.toString(); 367 String method = node.method.toString();
(...skipping 276 matching lines...) Expand 10 before | Expand all | Expand 10 after
636 } 644 }
637 645
638 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) { 646 visitCreateInvocationMirror(cps_ir.CreateInvocationMirror node) {
639 unexpectedNode(node); 647 unexpectedNode(node);
640 } 648 }
641 649
642 visitTypeTest(cps_ir.TypeTest node) { 650 visitTypeTest(cps_ir.TypeTest node) {
643 unexpectedNode(node); 651 unexpectedNode(node);
644 } 652 }
645 653
654 visitTypeTestViaFlag(cps_ir.TypeTestViaFlag node) {
655 unexpectedNode(node);
656 }
657
646 visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) { 658 visitApplyBuiltinOperator(cps_ir.ApplyBuiltinOperator node) {
647 unexpectedNode(node); 659 unexpectedNode(node);
648 } 660 }
649 661
650 visitApplyBuiltinMethod(cps_ir.ApplyBuiltinMethod node) { 662 visitApplyBuiltinMethod(cps_ir.ApplyBuiltinMethod node) {
651 unexpectedNode(node); 663 unexpectedNode(node);
652 } 664 }
653 665
654 visitGetLength(cps_ir.GetLength node) { 666 visitGetLength(cps_ir.GetLength node) {
655 unexpectedNode(node); 667 unexpectedNode(node);
(...skipping 32 matching lines...) Expand 10 before | Expand all | Expand 10 after
688 @override 700 @override
689 visitYield(cps_ir.Yield node) { 701 visitYield(cps_ir.Yield node) {
690 addEdgeToContinuation(node.continuation); 702 addEdgeToContinuation(node.continuation);
691 } 703 }
692 704
693 @override 705 @override
694 visitRefinement(cps_ir.Refinement node) { 706 visitRefinement(cps_ir.Refinement node) {
695 unexpectedNode(node); 707 unexpectedNode(node);
696 } 708 }
697 } 709 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/cps_ir_nodes_sexpr.dart ('k') | pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698