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

Unified Diff: pkg/dart2js_incremental/lib/library_updater.dart

Issue 1226733010: dart2js: Remove oldEmitter field in emitter-task. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 5 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 | « pkg/dart2js_incremental/lib/dart2js_incremental.dart ('k') | tests/compiler/dart2js/mirrors_used_test.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/dart2js_incremental/lib/library_updater.dart
diff --git a/pkg/dart2js_incremental/lib/library_updater.dart b/pkg/dart2js_incremental/lib/library_updater.dart
index f111d4a582952d5eeb717f4488e0414ccb4dd738..c62c1206c6ea75633c4e1057a08301c476ecfff4 100644
--- a/pkg/dart2js_incremental/lib/library_updater.dart
+++ b/pkg/dart2js_incremental/lib/library_updater.dart
@@ -63,6 +63,7 @@ import 'package:compiler/src/js_emitter/js_emitter.dart' show
ClassEmitter,
CodeEmitterTask,
ContainerBuilder,
+ OldEmitter,
MemberInfo,
computeMixinClass;
@@ -897,9 +898,9 @@ class LibraryUpdater extends JsFeatures {
if (constants != null) {
for (ConstantValue constant in constants) {
if (!_compiledConstants.contains(constant)) {
+ OldEmitter fullEmitter = emitter.emitter;
jsAst.Statement constantInitializer =
- emitter.oldEmitter.buildConstantInitializer(constant)
- .toStatement();
+ fullEmitter.buildConstantInitializer(constant).toStatement();
updates.add(constantInitializer);
}
}
@@ -976,8 +977,9 @@ if (this.pendingStubs) {
}
// A static (or top-level) field.
if (backend.constants.lazyStatics.contains(element)) {
+ OldEmitter fullEmitter = emitter.emitter;
jsAst.Expression init =
- emitter.oldEmitter.buildLazilyInitializedStaticField(
+ fullEmitter.buildLazilyInitializedStaticField(
element, isolateProperties: namer.currentIsolate);
if (init == null) {
throw new StateError("Initializer optimized away for $element");
@@ -1470,7 +1472,10 @@ abstract class JsFeatures {
CodeEmitterTask get emitter => backend.emitter;
- ContainerBuilder get containerBuilder => emitter.oldEmitter.containerBuilder;
+ ContainerBuilder get containerBuilder {
+ OldEmitter fullEmitter = emitter.emitter;
+ return fullEmitter.containerBuilder;
+ }
EnqueueTask get enqueuer => compiler.enqueuer;
}
@@ -1480,7 +1485,10 @@ class EmitterHelper extends JsFeatures {
EmitterHelper(this.compiler);
- ClassEmitter get classEmitter => backend.emitter.oldEmitter.classEmitter;
+ ClassEmitter get classEmitter {
+ OldEmitter fullEmitter = emitter.emitter;
+ return fullEmitter.classEmitter;
+ }
List<String> computeFields(ClassElement classElement) {
Class cls = new ProgramBuilder(compiler, namer, emitter)
« no previous file with comments | « pkg/dart2js_incremental/lib/dart2js_incremental.dart ('k') | tests/compiler/dart2js/mirrors_used_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698