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

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

Issue 1110813005: cps-ir: Implement type tests for interface types without type arguments. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. 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 | Annotate | Revision Log
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.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 dart2js.ir_builder; 5 library dart2js.ir_builder;
6 6
7 import '../constants/constant_system.dart'; 7 import '../constants/constant_system.dart';
8 import '../constants/expressions.dart'; 8 import '../constants/expressions.dart';
9 import '../constants/values.dart' show PrimitiveConstantValue; 9 import '../constants/values.dart' show PrimitiveConstantValue;
10 import '../dart_types.dart'; 10 import '../dart_types.dart';
(...skipping 1958 matching lines...) Expand 10 before | Expand all | Expand 10 after
1969 ir.Primitive buildTypeOperator(ir.Primitive receiver, 1969 ir.Primitive buildTypeOperator(ir.Primitive receiver,
1970 DartType type, 1970 DartType type,
1971 {bool isTypeTest: false, 1971 {bool isTypeTest: false,
1972 bool isNotCheck: false}) { 1972 bool isNotCheck: false}) {
1973 assert(isOpen); 1973 assert(isOpen);
1974 assert(isTypeTest != null); 1974 assert(isTypeTest != null);
1975 assert(!isNotCheck || isTypeTest); 1975 assert(!isNotCheck || isTypeTest);
1976 ir.Primitive check = _continueWithExpression( 1976 ir.Primitive check = _continueWithExpression(
1977 (k) => new ir.TypeOperator(receiver, type, k, isTypeTest: isTypeTest)); 1977 (k) => new ir.TypeOperator(receiver, type, k, isTypeTest: isTypeTest));
1978 return isNotCheck ? buildNegation(check) : check; 1978 return isNotCheck ? buildNegation(check) : check;
1979
1980 } 1979 }
1981 1980
1982 /// Create a lazy and/or expression. [leftValue] is the value of the left 1981 /// Create a lazy and/or expression. [leftValue] is the value of the left
1983 /// operand and [buildRightValue] is called to process the value of the right 1982 /// operand and [buildRightValue] is called to process the value of the right
1984 /// operand in the context of its own [IrBuilder]. 1983 /// operand in the context of its own [IrBuilder].
1985 ir.Primitive buildLogicalOperator( 1984 ir.Primitive buildLogicalOperator(
1986 ir.Primitive leftValue, 1985 ir.Primitive leftValue,
1987 ir.Primitive buildRightValue(IrBuilder builder), 1986 ir.Primitive buildRightValue(IrBuilder builder),
1988 {bool isLazyOr: false}) { 1987 {bool isLazyOr: false}) {
1989 // e0 && e1 is translated as if e0 ? (e1 == true) : false. 1988 // e0 && e1 is translated as if e0 ? (e1 == true) : false.
(...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after
2661 } 2660 }
2662 2661
2663 /// Synthetic parameter to a JavaScript factory method that takes the type 2662 /// Synthetic parameter to a JavaScript factory method that takes the type
2664 /// argument given for the type variable [variable]. 2663 /// argument given for the type variable [variable].
2665 class TypeInformationParameter implements Local { 2664 class TypeInformationParameter implements Local {
2666 final TypeVariableElement variable; 2665 final TypeVariableElement variable;
2667 final ExecutableElement executableContext; 2666 final ExecutableElement executableContext;
2668 TypeInformationParameter(this.variable, this.executableContext); 2667 TypeInformationParameter(this.variable, this.executableContext);
2669 String get name => variable.name; 2668 String get name => variable.name;
2670 } 2669 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698