| Index: lib/compiler/implementation/native_handler.dart
|
| diff --git a/lib/compiler/implementation/native_handler.dart b/lib/compiler/implementation/native_handler.dart
|
| index b414c76197f8fa2f4fb3e2760b7a71465ba46702..0f82d51624171847f4f3104c3465934b4b5335e8 100644
|
| --- a/lib/compiler/implementation/native_handler.dart
|
| +++ b/lib/compiler/implementation/native_handler.dart
|
| @@ -11,10 +11,10 @@
|
| #import('tree/tree.dart');
|
| #import('util/util.dart');
|
|
|
| -void processNativeClasses(Compiler compiler,
|
| +void processNativeClasses(CodeEmitterTask emitter,
|
| Collection<LibraryElement> libraries) {
|
| for (LibraryElement library in libraries) {
|
| - processNativeClassesInLibrary(compiler, library);
|
| + processNativeClassesInLibrary(emitter, library);
|
| }
|
| }
|
|
|
| @@ -33,9 +33,10 @@ void addSubtypes(ClassElement cls,
|
| directSubtypes.add(cls);
|
| }
|
|
|
| -void processNativeClassesInLibrary(Compiler compiler,
|
| +void processNativeClassesInLibrary(CodeEmitterTask emitter,
|
| LibraryElement library) {
|
| bool hasNativeClass = false;
|
| + final compiler = emitter.compiler;
|
| for (Link<Element> link = library.topLevelElements;
|
| !link.isEmpty(); link = link.tail) {
|
| Element element = link.head;
|
| @@ -53,8 +54,7 @@ void processNativeClassesInLibrary(Compiler compiler,
|
| // Add the information that this class is a subtype of
|
| // its supertypes. The code emitter and the ssa builder use that
|
| // information.
|
| - NativeEmitter emitter = compiler.emitter.nativeEmitter;
|
| - addSubtypes(classElement, emitter);
|
| + addSubtypes(classElement, emitter.nativeEmitter);
|
| }
|
| }
|
| }
|
| @@ -195,7 +195,7 @@ void handleSsaNative(SsaBuilder builder, Send node) {
|
| Compiler compiler = builder.compiler;
|
| FunctionElement element = builder.work.element;
|
| element.setNative();
|
| - NativeEmitter nativeEmitter = compiler.emitter.nativeEmitter;
|
| + NativeEmitter nativeEmitter = builder.emitter.nativeEmitter;
|
| // If what we're compiling is a getter named 'typeName' and the native
|
| // class is named 'DOMType', we generate a call to the typeNameOf
|
| // function attached on the isolate.
|
| @@ -247,7 +247,7 @@ void handleSsaNative(SsaBuilder builder, Send node) {
|
| }
|
|
|
| if (!hasBody) {
|
| - compiler.emitter.nativeEmitter.nativeMethods.add(element);
|
| + nativeEmitter.nativeMethods.add(element);
|
| }
|
|
|
| FunctionSignature parameters = element.computeSignature(builder.compiler);
|
|
|