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/js_backend/constant_system_javascript.dart

Issue 792643003: Add DartTypes to abstract Types. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Rebased Created 6 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
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 3d6e72fb1d831c0c9e3c53e97d2884fb7be92fc0..9afb0884159877713bf17eeb219686b89e7f93c7 100644
--- a/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
+++ b/pkg/compiler/lib/src/js_backend/constant_system_javascript.dart
@@ -233,21 +233,21 @@ class JavaScriptConstantSystem extends ConstantSystem {
bool isBool(ConstantValue constant) => constant.isBool;
bool isNull(ConstantValue constant) => constant.isNull;
- bool isSubtype(Compiler compiler, DartType s, DartType t) {
+ bool isSubtype(DartTypes types, DartType s, DartType t) {
// At runtime, an integer is both an integer and a double: the
// 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.element == compiler.intClass && t.element == compiler.doubleClass) {
+ if (s == types.coreTypes.intType && t == types.coreTypes.doubleType) {
return true;
}
- return compiler.types.isSubtype(s, t);
+ return types.isSubtype(s, t);
}
MapConstantValue createMap(Compiler compiler,
- InterfaceType sourceType,
- List<ConstantValue> keys,
- List<ConstantValue> values) {
+ InterfaceType sourceType,
+ List<ConstantValue> keys,
+ List<ConstantValue> values) {
JavaScriptBackend backend = compiler.backend;
bool onlyStringKeys = true;
« no previous file with comments | « pkg/compiler/lib/src/js_backend/codegen/task.dart ('k') | pkg/compiler/lib/src/tree_ir/tree_ir_builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698