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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_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 tree_ir_tracer; 5 library tree_ir_tracer;
6 6
7 import 'dart:async' show EventSink; 7 import 'dart:async' show EventSink;
8 import '../tracer.dart'; 8 import '../tracer.dart';
9 import 'tree_ir_nodes.dart'; 9 import 'tree_ir_nodes.dart';
10 10
(...skipping 480 matching lines...) Expand 10 before | Expand all | Expand 10 after
491 String element = node.element.name; 491 String element = node.element.name;
492 return element; 492 return element;
493 } 493 }
494 494
495 String visitSetStatic(SetStatic node) { 495 String visitSetStatic(SetStatic node) {
496 String element = node.element.name; 496 String element = node.element.name;
497 String value = visitExpression(node.value); 497 String value = visitExpression(node.value);
498 return '$element = $value'; 498 return '$element = $value';
499 } 499 }
500 500
501 String visitGetTypeTestProperty(GetTypeTestProperty node) {
502 String object = visitExpression(node.object);
503 if (usesInfixNotation(node.object)) {
504 object = '($object)';
505 }
506 // TODO(sra): Fix up this.
507 return '$object."is-${node.dartType}"';
508 }
509
501 String visitCreateBox(CreateBox node) { 510 String visitCreateBox(CreateBox node) {
502 return 'CreateBox'; 511 return 'CreateBox';
503 } 512 }
504 513
505 String visitCreateInstance(CreateInstance node) { 514 String visitCreateInstance(CreateInstance node) {
506 String className = node.classElement.name; 515 String className = node.classElement.name;
507 String arguments = node.arguments.map(visitExpression).join(', '); 516 String arguments = node.arguments.map(visitExpression).join(', ');
508 return 'CreateInstance $className($arguments)'; 517 return 'CreateInstance $className($arguments)';
509 } 518 }
510 519
(...skipping 93 matching lines...) Expand 10 before | Expand all | Expand 10 after
604 if (name == null) { 613 if (name == null) {
605 String prefix = v.element == null ? 'v' : '${v.element.name}_'; 614 String prefix = v.element == null ? 'v' : '${v.element.name}_';
606 while (name == null || _usedNames.contains(name)) { 615 while (name == null || _usedNames.contains(name)) {
607 name = "$prefix${_counter++}"; 616 name = "$prefix${_counter++}";
608 } 617 }
609 _names[v] = name; 618 _names[v] = name;
610 _usedNames.add(name); 619 _usedNames.add(name);
611 } 620 }
612 return name; 621 return name;
613 } 622 }
614 } 623 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart ('k') | sdk/lib/_internal/js_runtime/lib/js_rti.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698