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

Unified Diff: pkg/compiler/lib/src/deferred_load.dart

Issue 2935663002: Remove Compiler.commonElements (Closed)
Patch Set: Remove Compiler._commonElements Created 3 years, 6 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/compiler.dart ('k') | pkg/compiler/lib/src/inferrer/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/deferred_load.dart
diff --git a/pkg/compiler/lib/src/deferred_load.dart b/pkg/compiler/lib/src/deferred_load.dart
index 37a7c83869ed5e4734852ef36e062585808c14e8..971a1d98b3a1854a5a7b96cfd9bcc3d4a0c21419 100644
--- a/pkg/compiler/lib/src/deferred_load.dart
+++ b/pkg/compiler/lib/src/deferred_load.dart
@@ -93,7 +93,7 @@ class DeferredLoadTask extends CompilerTask {
/// DeferredLibrary from dart:async
ClassElement get deferredLibraryClass =>
- compiler.commonElements.deferredLibraryClass;
+ compiler.resolution.commonElements.deferredLibraryClass;
/// A synthetic import representing the loading of the main program.
final _DeferredImport _fakeMainImport = const _DeferredImport();
@@ -505,7 +505,7 @@ class DeferredLoadTask extends CompilerTask {
}
traverseLibrary(root);
- result.add(compiler.commonElements.coreLibrary);
+ result.add(compiler.resolution.commonElements.coreLibrary);
return result;
}
@@ -718,7 +718,7 @@ class DeferredLoadTask extends CompilerTask {
// Now check to see if we have to add more elements due to
// mirrors.
- if (compiler.commonElements.mirrorsLibrary != null) {
+ if (compiler.resolution.commonElements.mirrorsLibrary != null) {
_addMirrorElements();
}
@@ -831,7 +831,8 @@ class DeferredLoadTask extends CompilerTask {
metadata.ensureResolved(compiler.resolution);
ConstantValue value =
compiler.constants.getConstantValue(metadata.constant);
- ResolutionDartType type = value.getType(compiler.commonElements);
+ ResolutionDartType type =
+ value.getType(compiler.resolution.commonElements);
Element element = type.element;
if (element == deferredLibraryClass) {
reporter.reportErrorMessage(
@@ -1081,9 +1082,11 @@ class _DeclaredDeferredImport implements _DeferredImport {
metadata.ensureResolved(compiler.resolution);
ConstantValue value =
compiler.constants.getConstantValue(metadata.constant);
- ResolutionDartType type = value.getType(compiler.commonElements);
+ ResolutionDartType type =
+ value.getType(compiler.resolution.commonElements);
Element element = type.element;
- if (element == compiler.commonElements.deferredLibraryClass) {
+ if (element ==
+ compiler.resolution.commonElements.deferredLibraryClass) {
ConstructedConstantValue constant = value;
StringConstantValue s = constant.fields.values.single;
result = s.primitiveValue;
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/inferrer/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698