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

Unified Diff: lib/compiler/implementation/native_handler.dart

Issue 10398044: Reverting 7667 (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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
« no previous file with comments | « lib/compiler/implementation/native_emitter.dart ('k') | lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/native_handler.dart
===================================================================
--- lib/compiler/implementation/native_handler.dart (revision 7672)
+++ lib/compiler/implementation/native_handler.dart (working copy)
@@ -11,10 +11,10 @@
#import('tree/tree.dart');
#import('util/util.dart');
-void processNativeClasses(CodeEmitterTask emitter,
+void processNativeClasses(Compiler compiler,
Collection<LibraryElement> libraries) {
for (LibraryElement library in libraries) {
- processNativeClassesInLibrary(emitter, library);
+ processNativeClassesInLibrary(compiler, library);
}
}
@@ -33,10 +33,9 @@
directSubtypes.add(cls);
}
-void processNativeClassesInLibrary(CodeEmitterTask emitter,
+void processNativeClassesInLibrary(Compiler compiler,
LibraryElement library) {
bool hasNativeClass = false;
- final compiler = emitter.compiler;
for (Link<Element> link = library.topLevelElements;
!link.isEmpty(); link = link.tail) {
Element element = link.head;
@@ -54,7 +53,8 @@
// Add the information that this class is a subtype of
// its supertypes. The code emitter and the ssa builder use that
// information.
- addSubtypes(classElement, emitter.nativeEmitter);
+ NativeEmitter emitter = compiler.emitter.nativeEmitter;
+ addSubtypes(classElement, emitter);
}
}
}
@@ -195,7 +195,7 @@
Compiler compiler = builder.compiler;
FunctionElement element = builder.work.element;
element.setNative();
- NativeEmitter nativeEmitter = builder.emitter.nativeEmitter;
+ NativeEmitter nativeEmitter = compiler.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 @@
}
if (!hasBody) {
- nativeEmitter.nativeMethods.add(element);
+ compiler.emitter.nativeEmitter.nativeMethods.add(element);
}
FunctionSignature parameters = element.computeSignature(builder.compiler);
« no previous file with comments | « lib/compiler/implementation/native_emitter.dart ('k') | lib/compiler/implementation/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698