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

Unified Diff: pkg/compiler/lib/src/js_emitter/full_emitter/emitter.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
Index: pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
index 871a2d6207649d06408ebd9465c9a33bf7108526..c69eee5b26fa35bd675b8122a49ab61f9ff33082 100644
--- a/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart
@@ -123,7 +123,7 @@ class Emitter extends js_emitter.EmitterBase {
ConstantEmitter constantEmitter;
NativeEmitter get nativeEmitter => task.nativeEmitter;
TypeTestRegistry get typeTestRegistry => task.typeTestRegistry;
- CommonElements get commonElements => compiler.commonElements;
+ CommonElements get commonElements => _closedWorld.commonElements;
ElementEnvironment get _elementEnvironment => compiler.elementEnvironment;
// The full code that is written to each hunk part-file.
@@ -809,7 +809,7 @@ class Emitter extends js_emitter.EmitterBase {
jsAst.Expression finishedClassesAccess =
generateEmbeddedGlobalAccess(embeddedNames.FINISHED_CLASSES);
jsAst.Expression cyclicThrow =
- staticFunctionAccess(compiler.commonElements.cyclicThrowHelper);
+ staticFunctionAccess(commonElements.cyclicThrowHelper);
jsAst.Expression laziesAccess =
generateEmbeddedGlobalAccess(embeddedNames.LAZIES);
@@ -1905,7 +1905,7 @@ class Emitter extends js_emitter.EmitterBase {
jsAst.Comment buildGeneratedBy() {
List<String> options = [];
- if (compiler.commonElements.mirrorsLibrary != null &&
+ if (commonElements.mirrorsLibrary != null &&
!compiler.options.loadFromDill) {
// TODO(johnniwinther): Add `isMirrorsUsed` to [BackendData] instead
// of checking `mirrorsLibrary`.

Powered by Google App Engine
This is Rietveld 408576698