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

Unified Diff: pkg/compiler/lib/src/ssa/types.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/ssa/kernel_impact.dart ('k') | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/types.dart
diff --git a/pkg/compiler/lib/src/ssa/types.dart b/pkg/compiler/lib/src/ssa/types.dart
index fdab0378aac66a38e9f1a0ca838a3a2a348f7d97..21be147f44350e06165cd78997d995995e0f2c82 100644
--- a/pkg/compiler/lib/src/ssa/types.dart
+++ b/pkg/compiler/lib/src/ssa/types.dart
@@ -3,7 +3,7 @@
// BSD-style license that can be found in the LICENSE file.
import '../compiler.dart' show Compiler;
-import '../core_types.dart' show CoreClasses;
+import '../core_types.dart' show CommonElements;
import '../elements/elements.dart';
import '../native/native.dart' as native;
import '../tree/tree.dart' as ast;
@@ -36,17 +36,18 @@ class TypeMaskFactory {
var typesReturned = nativeBehavior.typesReturned;
if (typesReturned.isEmpty) return commonMasks.dynamicType;
- CoreClasses coreClasses = closedWorld.coreClasses;
+ CommonElements commonElements = closedWorld.commonElements;
// [type] is either an instance of [DartType] or special objects
// like [native.SpecialType.JsObject].
TypeMask fromNativeType(dynamic type) {
if (type == native.SpecialType.JsObject) {
- return new TypeMask.nonNullExact(coreClasses.objectClass, closedWorld);
+ return new TypeMask.nonNullExact(
+ commonElements.objectClass, closedWorld);
}
if (type.isVoid) return commonMasks.nullType;
- if (type.element == coreClasses.nullClass) return commonMasks.nullType;
+ if (type.element == commonElements.nullClass) return commonMasks.nullType;
if (type.treatAsDynamic) return commonMasks.dynamicType;
return new TypeMask.nonNullSubtype(type.element, closedWorld);
}
« no previous file with comments | « pkg/compiler/lib/src/ssa/kernel_impact.dart ('k') | pkg/compiler/lib/src/typechecker.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698