Index: pkg/compiler/lib/src/js_backend/constant_system_javascript.dart |
diff --git a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart |
index 3dca32bb4515634d3d6e46465927ddeec5b7a12c..671d6c392c43e7d7d8abed259482f8e897413ded 100644 |
--- a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart |
+++ b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart |
@@ -4,13 +4,19 @@ |
library dart2js.constant_system.js; |
-import '../compiler.dart' show Compiler; |
+import '../compiler.dart' show |
+ Compiler; |
import '../constants/constant_system.dart'; |
import '../constants/values.dart'; |
import '../constant_system_dart.dart'; |
+import '../core_types.dart' show |
+ CoreTypes; |
import '../dart_types.dart'; |
-import '../elements/elements.dart' show ClassElement; |
-import '../tree/tree.dart' show DartString, LiteralDartString; |
+import '../elements/elements.dart' show |
+ ClassElement; |
+import '../tree/tree.dart' show |
+ DartString, |
+ LiteralDartString; |
import 'js_backend.dart'; |
const JAVA_SCRIPT_CONSTANT_SYSTEM = const JavaScriptConstantSystem(); |
@@ -291,6 +297,7 @@ class JavaScriptConstantSystem extends ConstantSystem { |
List<ConstantValue> keys, |
List<ConstantValue> values) { |
JavaScriptBackend backend = compiler.backend; |
+ CoreTypes coreTypes = compiler.coreTypes; |
bool onlyStringKeys = true; |
ConstantValue protoValue = null; |
@@ -311,10 +318,9 @@ class JavaScriptConstantSystem extends ConstantSystem { |
bool hasProtoKey = (protoValue != null); |
DartType keysType; |
if (sourceType.treatAsRaw) { |
- keysType = compiler.listClass.rawType; |
+ keysType = coreTypes.listType(); |
} else { |
- List<DartType> arguments = <DartType>[sourceType.typeArguments.first]; |
- keysType = new InterfaceType(compiler.listClass, arguments); |
+ keysType = coreTypes.listType(sourceType.typeArguments.first); |
} |
ListConstantValue keysList = new ListConstantValue(keysType, keys); |
String className = onlyStringKeys |