| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 part of dart2js; | 5 part of dart2js; |
| 6 | 6 |
| 7 abstract class Operation { | 7 abstract class Operation { |
| 8 String get name; | 8 String get name; |
| 9 } | 9 } |
| 10 | 10 |
| (...skipping 44 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 55 ConstantValue createString(DartString string); | 55 ConstantValue createString(DartString string); |
| 56 ConstantValue createBool(bool value); | 56 ConstantValue createBool(bool value); |
| 57 ConstantValue createNull(); | 57 ConstantValue createNull(); |
| 58 ConstantValue createMap(Compiler compiler, | 58 ConstantValue createMap(Compiler compiler, |
| 59 InterfaceType type, | 59 InterfaceType type, |
| 60 List<ConstantValue> keys, | 60 List<ConstantValue> keys, |
| 61 List<ConstantValue> values); | 61 List<ConstantValue> values); |
| 62 | 62 |
| 63 // We need to special case the subtype check for JavaScript constant | 63 // We need to special case the subtype check for JavaScript constant |
| 64 // system because an int is a double at runtime. | 64 // system because an int is a double at runtime. |
| 65 bool isSubtype(Compiler compiler, DartType s, DartType t); | 65 bool isSubtype(DartTypes types, DartType s, DartType t); |
| 66 | 66 |
| 67 /** Returns true if the [constant] is an integer at runtime. */ | 67 /** Returns true if the [constant] is an integer at runtime. */ |
| 68 bool isInt(ConstantValue constant); | 68 bool isInt(ConstantValue constant); |
| 69 /** Returns true if the [constant] is a double at runtime. */ | 69 /** Returns true if the [constant] is a double at runtime. */ |
| 70 bool isDouble(ConstantValue constant); | 70 bool isDouble(ConstantValue constant); |
| 71 /** Returns true if the [constant] is a string at runtime. */ | 71 /** Returns true if the [constant] is a string at runtime. */ |
| 72 bool isString(ConstantValue constant); | 72 bool isString(ConstantValue constant); |
| 73 /** Returns true if the [constant] is a boolean at runtime. */ | 73 /** Returns true if the [constant] is a boolean at runtime. */ |
| 74 bool isBool(ConstantValue constant); | 74 bool isBool(ConstantValue constant); |
| 75 /** Returns true if the [constant] is null at runtime. */ | 75 /** Returns true if the [constant] is null at runtime. */ |
| (...skipping 25 matching lines...) Expand all Loading... |
| 101 case ">>": return shiftRight; | 101 case ">>": return shiftRight; |
| 102 case "<": return less; | 102 case "<": return less; |
| 103 case "<=": return lessEqual; | 103 case "<=": return lessEqual; |
| 104 case ">": return greater; | 104 case ">": return greater; |
| 105 case ">=": return greaterEqual; | 105 case ">=": return greaterEqual; |
| 106 case "==": return equal; | 106 case "==": return equal; |
| 107 default: return null; | 107 default: return null; |
| 108 } | 108 } |
| 109 } | 109 } |
| 110 } | 110 } |
| OLD | NEW |