Chromium Code Reviews| Index: sdk/lib/_internal/compiler/implementation/constants.dart |
| diff --git a/sdk/lib/_internal/compiler/implementation/constants.dart b/sdk/lib/_internal/compiler/implementation/constants.dart |
| index 4ff011ccd77651823df56bc82d548abf3de51400..9350fb3b359202267164612cb36ab862d2c0a071 100644 |
| --- a/sdk/lib/_internal/compiler/implementation/constants.dart |
| +++ b/sdk/lib/_internal/compiler/implementation/constants.dart |
| @@ -374,19 +374,26 @@ class MapConstant extends ObjectConstant { |
| /** The dart class implementing constant map literals. */ |
| static const SourceString DART_CLASS = const SourceString("ConstantMap"); |
| + static const SourceString DART_STRING_CLASS = |
| + const SourceString("ConstantStringMap"); |
| static const SourceString DART_PROTO_CLASS = |
| const SourceString("ConstantProtoMap"); |
| + static const SourceString DART_GENERAL_CLASS = |
| + const SourceString("GeneralConstantMap"); |
| static const SourceString LENGTH_NAME = const SourceString("length"); |
| static const SourceString JS_OBJECT_NAME = const SourceString("_jsObject"); |
| static const SourceString KEYS_NAME = const SourceString("_keys"); |
| static const SourceString PROTO_VALUE = const SourceString("_protoValue"); |
| + static const SourceString JS_DATA_NAME = const SourceString("_jsData"); |
| final ListConstant keys; |
| final List<Constant> values; |
| final Constant protoValue; |
| final int hashCode; |
| + final bool hasNonStringKey; |
| - MapConstant(DartType type, this.keys, List<Constant> values, this.protoValue) |
| + MapConstant(DartType type, this.keys, List<Constant> values, this.protoValue, |
| + this.hasNonStringKey) |
| : this.values = values, |
| this.hashCode = computeHash(type, values), |
| super(type); |
| @@ -415,7 +422,12 @@ class MapConstant extends ObjectConstant { |
| } |
| List<Constant> getDependencies() { |
| - List<Constant> result = <Constant>[keys]; |
| + List<Constant> result = <Constant>[]; |
| + if (hasNonStringKey) { |
|
ngeoffray
2013/09/13 07:30:15
This seems fishy. Why can't you just add keys? Is
Johnni Winther
2013/09/18 12:37:21
If I just add [keys], we will create an unused con
|
| + result.addAll(keys.entries); |
| + } else { |
| + result.add(keys); |
| + } |
| result.addAll(values); |
| return result; |
| } |