Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(30)

Unified Diff: pkg/compiler/lib/src/js_backend/constant_system_javascript.dart

Issue 1421003004: Add CoreClasses (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment. Created 5 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/glue.dart ('k') | pkg/compiler/lib/src/js_backend/js_backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/glue.dart ('k') | pkg/compiler/lib/src/js_backend/js_backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698