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

Unified Diff: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart

Issue 2843283004: Use more entities in program_builder, collector and registry (Closed)
Patch Set: Updated cf. comments. Created 3 years, 8 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
Index: pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
diff --git a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
index 02e9ffc1bcac47cfdb989b18d80483b36683720a..386fb8e972eadfec94168e3c789aeaacd6fa0825 100644
--- a/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
+++ b/pkg/compiler/lib/src/js_emitter/code_emitter_task.dart
@@ -24,6 +24,7 @@ import 'startup_emitter/emitter.dart' as startup_js_emitter;
import 'metadata_collector.dart' show MetadataCollector;
import 'native_emitter.dart' show NativeEmitter;
import 'type_test_registry.dart' show TypeTestRegistry;
+import 'sorter.dart';
const USE_LAZY_EMITTER = const bool.fromEnvironment("dart2js.use.lazy.emitter");
@@ -72,6 +73,11 @@ class CodeEmitterTask extends CompilerTask {
return _emitter;
}
+ /// Returns the [Sorter] use for ordering elements in the generated
+ /// JavaScript.
+ // TODO(johnniwinther): Switch this based on the used entity model.
+ Sorter get sorter => const ElementSorter();
+
String get name => 'Code emitter';
/// Returns true, if the emitter supports reflection.
@@ -176,6 +182,7 @@ class CodeEmitterTask extends CompilerTask {
_finalizeRti();
ProgramBuilder programBuilder = new ProgramBuilder(
compiler.options,
+ compiler.elementEnvironment,
compiler.commonElements,
compiler.types,
compiler.deferredLoadTask,
« no previous file with comments | « pkg/compiler/lib/src/js_backend/runtime_types.dart ('k') | pkg/compiler/lib/src/js_emitter/full_emitter/emitter.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698