| 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 interface Operation { | 5 interface Operation { |
| 6 final SourceString name; | 6 final SourceString name; |
| 7 bool isUserDefinable(); | 7 bool isUserDefinable(); |
| 8 } | 8 } |
| 9 | 9 |
| 10 interface UnaryOperation extends Operation { | 10 interface UnaryOperation extends Operation { |
| (...skipping 33 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 44 BinaryOperation get subtract; | 44 BinaryOperation get subtract; |
| 45 BinaryOperation get truncatingDivide; | 45 BinaryOperation get truncatingDivide; |
| 46 | 46 |
| 47 Constant createInt(int i); | 47 Constant createInt(int i); |
| 48 Constant createDouble(double d); | 48 Constant createDouble(double d); |
| 49 // We need a diagnostic node to report errors in case the string is malformed. | 49 // We need a diagnostic node to report errors in case the string is malformed. |
| 50 Constant createString(DartString string, Node diagnosticNode); | 50 Constant createString(DartString string, Node diagnosticNode); |
| 51 Constant createBool(bool value); | 51 Constant createBool(bool value); |
| 52 Constant createNull(); | 52 Constant createNull(); |
| 53 | 53 |
| 54 // We need to special case the subtype check for JavaScript constant |
| 55 // system because an int is a double at runtime. |
| 56 bool isSubtype(Compiler compiler, DartType s, DartType t); |
| 57 |
| 54 /** Returns true if the [constant] is an integer at runtime. */ | 58 /** Returns true if the [constant] is an integer at runtime. */ |
| 55 bool isInt(Constant constant); | 59 bool isInt(Constant constant); |
| 56 /** Returns true if the [constant] is a double at runtime. */ | 60 /** Returns true if the [constant] is a double at runtime. */ |
| 57 bool isDouble(Constant constant); | 61 bool isDouble(Constant constant); |
| 58 /** Returns true if the [constant] is a string at runtime. */ | 62 /** Returns true if the [constant] is a string at runtime. */ |
| 59 bool isString(Constant constant); | 63 bool isString(Constant constant); |
| 60 /** Returns true if the [constant] is a boolean at runtime. */ | 64 /** Returns true if the [constant] is a boolean at runtime. */ |
| 61 bool isBool(Constant constant); | 65 bool isBool(Constant constant); |
| 62 /** Returns true if the [constant] is null at runtime. */ | 66 /** Returns true if the [constant] is null at runtime. */ |
| 63 bool isNull(Constant constant); | 67 bool isNull(Constant constant); |
| 64 } | 68 } |
| OLD | NEW |