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

Unified Diff: pkg/compiler/lib/src/js_emitter/startup_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/startup_emitter/emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
index 5ce007735cc507ac2ab7afddb70d0864540326b8..0441f1088ff4e6f6cd9bfe9558908eaba163cd2d 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart
@@ -40,22 +40,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,
- bool shouldGenerateSourceMap)
- : this._compiler = compiler,
- this.namer = namer,
- _emitter = new ModelEmitter(compiler, namer, nativeEmitter, closedWorld,
- task, shouldGenerateSourceMap);
+ Emitter(this._compiler, this.namer, NativeEmitter nativeEmitter,
+ this._closedWorld, CodeEmitterTask task, bool shouldGenerateSourceMap)
+ : _emitter = new ModelEmitter(_compiler, namer, nativeEmitter,
+ _closedWorld, task, shouldGenerateSourceMap);
DiagnosticReporter get reporter => _compiler.reporter;
@@ -118,7 +112,7 @@ class Emitter extends emitterTask.EmitterBase {
switch (builtin) {
case JsBuiltin.dartObjectConstructor:
- ClassElement objectClass = _compiler.commonElements.objectClass;
+ ClassElement objectClass = _closedWorld.commonElements.objectClass;
return js.js.expressionTemplateYielding(typeAccess(objectClass));
case JsBuiltin.isCheckPropertyToJsConstructorName:

Powered by Google App Engine
This is Rietveld 408576698