| Index: pkg/compiler/lib/src/compile_time_constants.dart
|
| diff --git a/pkg/compiler/lib/src/compile_time_constants.dart b/pkg/compiler/lib/src/compile_time_constants.dart
|
| index 629d4570d32ab647f50078a36a7ec727c05da9b5..724e6f669eca41b3b3742ed62d178f622b6ba15a 100644
|
| --- a/pkg/compiler/lib/src/compile_time_constants.dart
|
| +++ b/pkg/compiler/lib/src/compile_time_constants.dart
|
| @@ -29,6 +29,9 @@ abstract class ConstantEnvironment {
|
| /// The [ConstantSystem] used by this environment.
|
| ConstantSystem get constantSystem;
|
|
|
| + /// Returns `true` if a value has been computed for [expression].
|
| + bool hasConstantValue(ConstantExpression expression);
|
| +
|
| /// Returns the constant value computed for [expression].
|
| // TODO(johnniwinther): Support directly evaluation of [expression].
|
| ConstantValue getConstantValue(ConstantExpression expression);
|
| @@ -287,6 +290,10 @@ abstract class ConstantCompilerBase implements ConstantCompiler {
|
| return null;
|
| }
|
|
|
| + bool hasConstantValue(ConstantExpression expression) {
|
| + return constantValueMap.containsKey(expression);
|
| + }
|
| +
|
| ConstantValue getConstantValue(ConstantExpression expression) {
|
| return constantValueMap[expression];
|
| }
|
|
|