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

Unified Diff: pkg/compiler/lib/src/ssa/ssa.dart

Issue 2575083002: Pass ClosedWorld directly to codegen tasks (Closed)
Patch Set: Updated cf. comment. Created 4 years 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/ssa/optimize.dart ('k') | pkg/compiler/lib/src/ssa/ssa_tracer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/ssa.dart
diff --git a/pkg/compiler/lib/src/ssa/ssa.dart b/pkg/compiler/lib/src/ssa/ssa.dart
index 55b13b0c5346e6be78f62bf90dbd03cf8036b013..92f05f94a0b1d03382047880d80a532667cfbec9 100644
--- a/pkg/compiler/lib/src/ssa/ssa.dart
+++ b/pkg/compiler/lib/src/ssa/ssa.dart
@@ -10,6 +10,7 @@ import '../elements/elements.dart' show Element, FunctionElement;
import '../io/source_information.dart';
import '../js/js.dart' as js;
import '../js_backend/backend.dart' show JavaScriptBackend, FunctionCompiler;
+import '../world.dart' show ClosedWorld;
import 'builder.dart';
import 'builder_kernel.dart';
@@ -36,11 +37,13 @@ class SsaFunctionCompiler implements FunctionCompiler {
/// Generates JavaScript code for `work.element`.
/// Using the ssa builder, optimizer and codegenerator.
- js.Fun compile(CodegenWorkItem work) {
- HGraph graph = useKernel ? builderKernel.build(work) : builder.build(work);
- optimizer.optimize(work, graph);
+ js.Fun compile(CodegenWorkItem work, ClosedWorld closedWorld) {
+ HGraph graph = useKernel
+ ? builderKernel.build(work, closedWorld)
+ : builder.build(work, closedWorld);
+ optimizer.optimize(work, graph, closedWorld);
Element element = work.element;
- js.Expression result = generator.generateCode(work, graph);
+ js.Expression result = generator.generateCode(work, graph, closedWorld);
if (element is FunctionElement) {
// TODO(sigmund): replace by kernel transformer when `useKernel` is true.
result = backend.rewriteAsync(element, result);
« no previous file with comments | « pkg/compiler/lib/src/ssa/optimize.dart ('k') | pkg/compiler/lib/src/ssa/ssa_tracer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698