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

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

Issue 2595493002: Merge CoreTypes and CoreClasses into CommonElements. (Closed)
Patch Set: Updated cf. comment Created 4 years 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/backend_impact.dart ('k') | pkg/compiler/lib/src/js_backend/namer.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 08174df252d834880d872d183b866b6d0a548a9e..ee445b3ecef129b338e0bc803d2f1d173747f8a1 100644
--- a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
@@ -8,7 +8,7 @@ import '../compiler.dart' show Compiler;
import '../constant_system_dart.dart';
import '../constants/constant_system.dart';
import '../constants/values.dart';
-import '../core_types.dart' show CoreTypes;
+import '../core_types.dart' show CommonElements;
import '../dart_types.dart';
import '../elements/elements.dart' show ClassElement, FieldElement;
import '../tree/dartstring.dart' show DartString, LiteralDartString;
@@ -334,7 +334,8 @@ class JavaScriptConstantSystem extends ConstantSystem {
// integer type check is Math.floor, which will return true only
// for real integers, and our double type check is 'typeof number'
// which will return true for both integers and doubles.
- if (s == types.coreTypes.intType && t == types.coreTypes.doubleType) {
+ if (s == types.commonElements.intType &&
+ t == types.commonElements.doubleType) {
return true;
}
return types.isSubtype(s, t);
@@ -343,7 +344,7 @@ class JavaScriptConstantSystem extends ConstantSystem {
MapConstantValue createMap(Compiler compiler, InterfaceType sourceType,
List<ConstantValue> keys, List<ConstantValue> values) {
JavaScriptBackend backend = compiler.backend;
- CoreTypes coreTypes = compiler.coreTypes;
+ CommonElements commonElements = compiler.commonElements;
bool onlyStringKeys = true;
ConstantValue protoValue = null;
@@ -364,9 +365,9 @@ class JavaScriptConstantSystem extends ConstantSystem {
bool hasProtoKey = (protoValue != null);
DartType keysType;
if (sourceType.treatAsRaw) {
- keysType = coreTypes.listType();
+ keysType = commonElements.listType();
} else {
- keysType = coreTypes.listType(sourceType.typeArguments.first);
+ keysType = commonElements.listType(sourceType.typeArguments.first);
}
ListConstantValue keysList = new ListConstantValue(keysType, keys);
String className = onlyStringKeys
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend_impact.dart ('k') | pkg/compiler/lib/src/js_backend/namer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698