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

Unified Diff: pkg/compiler/lib/src/constants/constant_system.dart

Issue 2684783003: Refactor ConstantSystem (Closed)
Patch Set: Updated cf. comments. Created 3 years, 10 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/constant_system_dart.dart ('k') | pkg/compiler/lib/src/constants/evaluation.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/constants/constant_system.dart
diff --git a/pkg/compiler/lib/src/constants/constant_system.dart b/pkg/compiler/lib/src/constants/constant_system.dart
index 14d0941af78b0704788b4d81589bec24b0a2855b..49d5e814f0c3078ff8038fd54fc7ee0e769b86bc 100644
--- a/pkg/compiler/lib/src/constants/constant_system.dart
+++ b/pkg/compiler/lib/src/constants/constant_system.dart
@@ -4,8 +4,10 @@
library dart2js.constant_system;
-import '../compiler.dart' show Compiler;
-import '../elements/resolution_types.dart';
+import '../common/backend_api.dart' show BackendClasses;
+import '../core_types.dart' show CommonElements;
+import '../elements/resolution_types.dart' show DartTypes;
+import '../elements/types.dart';
import '../resolution/operators.dart';
import '../tree/dartstring.dart' show DartString;
import 'values.dart';
@@ -64,19 +66,21 @@ abstract class ConstantSystem {
ConstantValue createString(DartString string);
ConstantValue createBool(bool value);
ConstantValue createNull();
- ConstantValue createList(
- ResolutionInterfaceType type, List<ConstantValue> values);
- // TODO(johnniwinther): Remove the need for [compiler].
- ConstantValue createMap(Compiler compiler, ResolutionInterfaceType type,
- List<ConstantValue> keys, List<ConstantValue> values);
- // TODO(johnniwinther): Remove the need for [compiler].
- ConstantValue createType(Compiler compiler, ResolutionDartType type);
- // TODO(johnniwinther): Remove the need for [compiler].
- ConstantValue createSymbol(Compiler compiler, String text);
+ ConstantValue createList(InterfaceType type, List<ConstantValue> values);
+ ConstantValue createMap(
+ CommonElements commonElements,
+ BackendClasses backendClasses,
+ InterfaceType type,
+ List<ConstantValue> keys,
+ List<ConstantValue> values);
+ ConstantValue createType(CommonElements commonElements,
+ BackendClasses backendClasses, DartType type);
+ ConstantValue createSymbol(CommonElements commonElements,
+ BackendClasses backendClasses, String text);
// We need to special case the subtype check for JavaScript constant
// system because an int is a double at runtime.
- bool isSubtype(DartTypes types, ResolutionDartType s, ResolutionDartType t);
+ bool isSubtype(DartTypes types, DartType s, DartType t);
/** Returns true if the [constant] is an integer at runtime. */
bool isInt(ConstantValue constant);
« no previous file with comments | « pkg/compiler/lib/src/constant_system_dart.dart ('k') | pkg/compiler/lib/src/constants/evaluation.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698