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

Side by Side Diff: pkg/compiler/lib/src/tree_ir/tree_ir_nodes.dart

Issue 1144163004: dart2js cps: Always use interceptors and type tags for 'is' checks. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Long line Created 5 years, 7 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_nodes; 5 library tree_ir_nodes;
6 6
7 import '../constants/expressions.dart'; 7 import '../constants/expressions.dart';
8 import '../constants/values.dart' as values; 8 import '../constants/values.dart' as values;
9 import '../dart_types.dart' show DartType, GenericType, InterfaceType, TypeVaria bleType; 9 import '../dart_types.dart' show DartType, GenericType, InterfaceType, TypeVaria bleType;
10 import '../elements/elements.dart'; 10 import '../elements/elements.dart';
(...skipping 312 matching lines...) Expand 10 before | Expand all | Expand 10 after
323 final List<LiteralMapEntry> entries; 323 final List<LiteralMapEntry> entries;
324 324
325 LiteralMap(this.type, this.entries); 325 LiteralMap(this.type, this.entries);
326 326
327 accept(ExpressionVisitor visitor) => visitor.visitLiteralMap(this); 327 accept(ExpressionVisitor visitor) => visitor.visitLiteralMap(this);
328 accept1(ExpressionVisitor1 visitor, arg) { 328 accept1(ExpressionVisitor1 visitor, arg) {
329 return visitor.visitLiteralMap(this, arg); 329 return visitor.visitLiteralMap(this, arg);
330 } 330 }
331 } 331 }
332 332
333 /// Given the interceptor for a value, test the value against a type.
333 class TypeOperator extends Expression { 334 class TypeOperator extends Expression {
334 Expression receiver; 335 Expression receiver;
335 final DartType type; 336 final DartType type;
336 final bool isTypeTest; 337 final bool isTypeTest;
337 338
338 TypeOperator(this.receiver, this.type, {bool this.isTypeTest}); 339 TypeOperator(this.receiver, this.type, {bool this.isTypeTest});
339 340
340 accept(ExpressionVisitor visitor) => visitor.visitTypeOperator(this); 341 accept(ExpressionVisitor visitor) => visitor.visitTypeOperator(this);
341 accept1(ExpressionVisitor1 visitor, arg) { 342 accept1(ExpressionVisitor1 visitor, arg) {
342 return visitor.visitTypeOperator(this, arg); 343 return visitor.visitTypeOperator(this, arg);
(...skipping 1111 matching lines...) Expand 10 before | Expand all | Expand 10 after
1454 visitTypeExpression(TypeExpression node) { 1455 visitTypeExpression(TypeExpression node) {
1455 _replaceExpressions(node.arguments); 1456 _replaceExpressions(node.arguments);
1456 return node; 1457 return node;
1457 } 1458 }
1458 1459
1459 visitCreateInvocationMirror(CreateInvocationMirror node) { 1460 visitCreateInvocationMirror(CreateInvocationMirror node) {
1460 _replaceExpressions(node.arguments); 1461 _replaceExpressions(node.arguments);
1461 return node; 1462 return node;
1462 } 1463 }
1463 } 1464 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698