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

Unified Diff: pkg/compiler/lib/src/native/enqueue.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/native/behavior.dart ('k') | pkg/compiler/lib/src/patch_parser.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/native/enqueue.dart
diff --git a/pkg/compiler/lib/src/native/enqueue.dart b/pkg/compiler/lib/src/native/enqueue.dart
index bd37b4c88f000c4628dacc30300614f111ee1641..e5405ba9b29774f0c7dddd7082c23ca140097ab9 100644
--- a/pkg/compiler/lib/src/native/enqueue.dart
+++ b/pkg/compiler/lib/src/native/enqueue.dart
@@ -9,7 +9,7 @@ import '../common/backend_api.dart' show ForeignResolver;
import '../common/resolution.dart' show Resolution;
import '../compiler.dart' show Compiler;
import '../constants/values.dart';
-import '../core_types.dart' show CoreTypes;
+import '../core_types.dart' show CommonElements;
import '../dart_types.dart';
import '../elements/elements.dart';
import '../elements/modelx.dart' show FunctionElementX;
@@ -97,7 +97,7 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer {
Resolution get resolution => compiler.resolution;
DiagnosticReporter get reporter => compiler.reporter;
- CoreTypes get coreTypes => compiler.coreTypes;
+ CommonElements get commonElements => compiler.commonElements;
void onInstantiatedType(InterfaceType type) {
if (_unusedClasses.remove(type.element)) {
@@ -439,23 +439,23 @@ abstract class NativeEnqueuerBase implements NativeEnqueuer {
for (var type in behavior.typesInstantiated) {
if (type is SpecialType) {
if (type == SpecialType.JsObject) {
- registerInstantiation(compiler.coreTypes.objectType);
+ registerInstantiation(compiler.commonElements.objectType);
}
continue;
}
if (type is InterfaceType) {
- if (type == coreTypes.intType) {
+ if (type == commonElements.intType) {
registerInstantiation(type);
- } else if (type == coreTypes.doubleType) {
+ } else if (type == commonElements.doubleType) {
registerInstantiation(type);
- } else if (type == coreTypes.numType) {
- registerInstantiation(coreTypes.doubleType);
- registerInstantiation(coreTypes.intType);
- } else if (type == coreTypes.stringType) {
+ } else if (type == commonElements.numType) {
+ registerInstantiation(commonElements.doubleType);
+ registerInstantiation(commonElements.intType);
+ } else if (type == commonElements.stringType) {
registerInstantiation(type);
- } else if (type == coreTypes.nullType) {
+ } else if (type == commonElements.nullType) {
registerInstantiation(type);
- } else if (type == coreTypes.boolType) {
+ } else if (type == commonElements.boolType) {
registerInstantiation(type);
} else if (compiler.types.isSubtype(
type, backend.backendClasses.listImplementation.rawType)) {
@@ -564,8 +564,8 @@ class NativeResolutionEnqueuer extends NativeEnqueuerBase {
*
*/
NativeBehavior resolveJsCall(Send node, ForeignResolver resolver) {
- return NativeBehavior.ofJsCallSend(
- node, reporter, compiler.parsingContext, compiler.coreTypes, resolver);
+ return NativeBehavior.ofJsCallSend(node, reporter, compiler.parsingContext,
+ compiler.commonElements, resolver);
}
/**
@@ -580,7 +580,7 @@ class NativeResolutionEnqueuer extends NativeEnqueuerBase {
NativeBehavior resolveJsEmbeddedGlobalCall(
Send node, ForeignResolver resolver) {
return NativeBehavior.ofJsEmbeddedGlobalCallSend(
- node, reporter, compiler.coreTypes, resolver);
+ node, reporter, compiler.commonElements, resolver);
}
/**
@@ -594,7 +594,7 @@ class NativeResolutionEnqueuer extends NativeEnqueuerBase {
*/
NativeBehavior resolveJsBuiltinCall(Send node, ForeignResolver resolver) {
return NativeBehavior.ofJsBuiltinCallSend(
- node, reporter, compiler.coreTypes, resolver);
+ node, reporter, compiler.commonElements, resolver);
}
}
« no previous file with comments | « pkg/compiler/lib/src/native/behavior.dart ('k') | pkg/compiler/lib/src/patch_parser.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698