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

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

Issue 2813093002: Remove BackendClasses and JavaScriptBackendClasses. (Closed)
Patch Set: . Created 3 years, 8 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
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 1f6df06faa2e1fa859d85965ce208ae92ead87f0..a8bd89ab4d3ee3b6238cda4db83414aaf387ea56 100644
--- a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
@@ -4,7 +4,6 @@
library dart2js.constant_system.js;
-import '../common/backend_api.dart' show BackendClasses;
import '../constant_system_dart.dart';
import '../constants/constant_system.dart';
import '../constants/values.dart';
@@ -318,9 +317,8 @@ class JavaScriptConstantSystem extends ConstantSystem {
}
@override
- ConstantValue createType(CommonElements commonElements,
- BackendClasses backendClasses, DartType type) {
- InterfaceType instanceType = backendClasses.typeType;
+ ConstantValue createType(CommonElements commonElements, DartType type) {
+ InterfaceType instanceType = commonElements.typeLiteralType;
return new TypeConstantValue(type, instanceType);
}
@@ -357,7 +355,6 @@ class JavaScriptConstantSystem extends ConstantSystem {
MapConstantValue createMap(
CommonElements commonElements,
- BackendClasses backendClasses,
InterfaceType sourceType,
List<ConstantValue> keys,
List<ConstantValue> values) {
@@ -385,17 +382,16 @@ class JavaScriptConstantSystem extends ConstantSystem {
keysType = commonElements.listType(sourceType.typeArguments.first);
}
ListConstantValue keysList = new ListConstantValue(keysType, keys);
- InterfaceType type = backendClasses.getConstantMapTypeFor(sourceType,
+ InterfaceType type = commonElements.getConstantMapTypeFor(sourceType,
hasProtoKey: hasProtoKey, onlyStringKeys: onlyStringKeys);
return new JavaScriptMapConstant(
type, keysList, values, protoValue, onlyStringKeys);
}
@override
- ConstantValue createSymbol(CommonElements commonElements,
- BackendClasses backendClasses, String text) {
- InterfaceType type = backendClasses.symbolType;
- FieldEntity field = backendClasses.symbolField;
+ ConstantValue createSymbol(CommonElements commonElements, String text) {
+ InterfaceType type = commonElements.symbolImplementationType;
+ FieldEntity field = commonElements.symbolField;
ConstantValue argument = createString(new DartString.literal(text));
// TODO(johnniwinther): Use type arguments when all uses no longer expect
// a [FieldElement].
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen_listener.dart ('k') | pkg/compiler/lib/src/js_backend/custom_elements_analysis.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698