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

Unified Diff: lib/compiler/implementation/native_emitter.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/emitter.dart ('k') | lib/compiler/implementation/native_handler.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/native_emitter.dart
===================================================================
--- lib/compiler/implementation/native_emitter.dart (revision 7672)
+++ lib/compiler/implementation/native_emitter.dart (working copy)
@@ -4,7 +4,7 @@
class NativeEmitter {
- CodeEmitterTask emitter;
+ Compiler compiler;
StringBuffer nativeBuffer;
// Classes that participate in dynamic dispatch. These are the
@@ -30,7 +30,7 @@
// implementation.
Set<FunctionElement> nativeMethods;
- NativeEmitter(this.emitter)
+ NativeEmitter(this.compiler)
: classesWithDynamicDispatch = new Set<ClassElement>(),
nativeClasses = new Set<ClassElement>(),
subtypes = new Map<ClassElement, List<ClassElement>>(),
@@ -39,8 +39,6 @@
nativeMethods = new Set<FunctionElement>(),
nativeBuffer = new StringBuffer();
- Compiler get compiler() => emitter.compiler;
-
String get dynamicName() {
Element element = compiler.findHelper(
const SourceString('dynamicFunction'));
@@ -77,7 +75,7 @@
String get defineNativeClassFunction() {
return """
function(cls, fields, methods) {
- var generateGetterSetter = ${emitter.generateGetterSetterFunction};
+ var generateGetterSetter = ${compiler.emitter.generateGetterSetterFunction};
for (var i = 0; i < fields.length; i++) {
generateGetterSetter(fields[i], methods);
}
@@ -102,7 +100,7 @@
for (Element member in classElement.members) {
if (member.isInstanceMember()) {
- emitter.addInstanceMember(member, defineInstanceMember);
+ compiler.emitter.addInstanceMember(member, defineInstanceMember);
}
}
}
@@ -138,10 +136,10 @@
}
StringBuffer fieldBuffer = new StringBuffer();
- emitter.emitClassFields(classElement, fieldBuffer);
+ compiler.emitter.emitClassFields(classElement, fieldBuffer);
StringBuffer methodBuffer = new StringBuffer();
- emitter.emitInstanceMembers(classElement, methodBuffer);
+ compiler.emitter.emitInstanceMembers(classElement, methodBuffer);
if (methodBuffer.isEmpty() && fieldBuffer.isEmpty()) return;
« no previous file with comments | « lib/compiler/implementation/emitter.dart ('k') | lib/compiler/implementation/native_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698