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

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

Issue 10386086: RFC: Start refactoring to provide more than a single backend. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Next iteration 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/compiler.dart ('k') | lib/compiler/implementation/native_emitter.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/emitter.dart
diff --git a/lib/compiler/implementation/emitter.dart b/lib/compiler/implementation/emitter.dart
index e5762dd39ff38c95bd02a3bde13dea9485019b6b..e4f1e403016b5a320ac5b7c2abbeae019abf006e 100644
--- a/lib/compiler/implementation/emitter.dart
+++ b/lib/compiler/implementation/emitter.dart
@@ -25,7 +25,7 @@ class CodeEmitterTask extends CompilerTask {
bool needsDefineClass = false;
bool needsClosureClass = false;
final Namer namer;
- final NativeEmitter nativeEmitter;
+ NativeEmitter nativeEmitter;
StringBuffer boundClosureBuffer;
StringBuffer mainBuffer;
/** Shorter access to [isolatePropertiesName]. Both here in the code, as
@@ -34,10 +34,11 @@ class CodeEmitterTask extends CompilerTask {
CodeEmitterTask(Compiler compiler)
: namer = compiler.namer,
- nativeEmitter = new NativeEmitter(compiler),
boundClosureBuffer = new StringBuffer(),
mainBuffer = new StringBuffer(),
- super(compiler);
+ super(compiler) {
+ nativeEmitter = new NativeEmitter(this);
+ }
String get name() => 'CodeEmitter';
@@ -777,13 +778,11 @@ function() {
if (member.kind == ElementKind.GETTER || member.kind == ElementKind.FIELD) {
Set<Selector> selectors = compiler.universe.invokedNames[member.name];
if (selectors !== null && !selectors.isEmpty()) {
- compiler.emitter.emitCallStubForGetter(member, selectors,
- defineInstanceMember);
+ emitCallStubForGetter(member, selectors, defineInstanceMember);
Anton Muhin 2012/05/14 14:36:45 might have been an oversight while moving code aro
floitsch 2012/05/14 15:10:29 LGTM.
}
} else if (member.kind == ElementKind.FUNCTION) {
if (compiler.universe.hasGetter(member, compiler)) {
- compiler.emitter.emitDynamicFunctionGetter(member,
- defineInstanceMember);
+ emitDynamicFunctionGetter(member, defineInstanceMember);
}
}
}
« no previous file with comments | « lib/compiler/implementation/compiler.dart ('k') | lib/compiler/implementation/native_emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698