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: |