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

Unified Diff: pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart

Issue 2873633002: Pass data objects to ConstantEmitter (Closed)
Patch Set: Created 3 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 | « pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
diff --git a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
index 732c7ecae6e3b4f3a8714abca10a79ed963a8870..7a4b3c7370328425490a8cd09d3d4ddc1bcb50da 100644
--- a/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
+++ b/pkg/compiler/lib/src/js_emitter/startup_emitter/model_emitter.dart
@@ -44,6 +44,8 @@ import '../../js/js.dart' as js;
import '../../js_backend/js_backend.dart'
show JavaScriptBackend, Namer, ConstantEmitter, StringBackedName;
import '../../js_backend/interceptor_data.dart';
+import '../../world.dart';
+import '../code_emitter_task.dart';
import '../constant_ordering.dart' show deepCompareConstants;
import '../headers.dart';
import '../js_emitter.dart' show NativeEmitter;
@@ -59,7 +61,7 @@ class ModelEmitter {
ConstantEmitter constantEmitter;
final NativeEmitter nativeEmitter;
final bool shouldGenerateSourceMap;
- final InterceptorData _interceptorData;
+ final ClosedWorld _closedWorld;
// The full code that is written to each hunk part-file.
final Map<Fragment, CodeOutput> outputBuffers = <Fragment, CodeOutput>{};
@@ -75,14 +77,23 @@ class ModelEmitter {
static const String typeNameProperty = r"builtin$cls";
- ModelEmitter(this.compiler, this.namer, this.nativeEmitter,
- this._interceptorData, this.shouldGenerateSourceMap) {
+ ModelEmitter(this.compiler, this.namer, this.nativeEmitter, this._closedWorld,
+ CodeEmitterTask task, this.shouldGenerateSourceMap) {
this.constantEmitter = new ConstantEmitter(
- compiler, namer, this.generateConstantReference, constantListGenerator);
+ compiler.options,
+ _closedWorld.commonElements,
+ compiler.backend.rtiNeed,
+ compiler.backend.rtiEncoder,
+ namer,
+ task,
+ this.generateConstantReference,
+ constantListGenerator);
}
DiagnosticReporter get reporter => compiler.reporter;
+ InterceptorData get _interceptorData => _closedWorld.interceptorData;
+
js.Expression constantListGenerator(js.Expression array) {
// TODO(floitsch): remove hard-coded name.
return js.js('makeConstList(#)', [array]);
« no previous file with comments | « pkg/compiler/lib/src/js_emitter/startup_emitter/emitter.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698