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

Unified Diff: pkg/compiler/lib/src/js_emitter/lazy_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/lazy_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
index 17a558a5c21a059846a85db55edb75061e29e559..06bf92ef4b36d8cf28e31d6b4cc551be2f9a21b9 100644
--- a/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/lazy_emitter/emitter.dart
@@ -36,17 +36,16 @@ class EmitterFactory implements emitterTask.EmitterFactory {
class Emitter extends emitterTask.EmitterBase {
final Compiler _compiler;
+ final ClosedWorld _closedWorld;
final Namer namer;
final ModelEmitter _emitter;
JavaScriptBackend get _backend => _compiler.backend;
- Emitter(Compiler compiler, Namer namer, NativeEmitter nativeEmitter,
- ClosedWorld closedWorld, CodeEmitterTask task)
- : this._compiler = compiler,
- this.namer = namer,
- _emitter =
- new ModelEmitter(compiler, namer, nativeEmitter, closedWorld, task);
+ Emitter(this._compiler, this.namer, NativeEmitter nativeEmitter,
+ this._closedWorld, CodeEmitterTask task)
+ : _emitter = new ModelEmitter(
+ _compiler, namer, nativeEmitter, _closedWorld, task);
DiagnosticReporter get reporter => _compiler.reporter;
@@ -126,7 +125,7 @@ class Emitter extends emitterTask.EmitterBase {
switch (builtin) {
case JsBuiltin.dartObjectConstructor:
return js.js.expressionTemplateYielding(
- typeAccess(_compiler.commonElements.objectClass));
+ typeAccess(_closedWorld.commonElements.objectClass));
case JsBuiltin.isCheckPropertyToJsConstructorName:
int isPrefixLength = namer.operatorIsPrefix.length;

Powered by Google App Engine
This is Rietveld 408576698