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

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

Issue 2302363003: No longer store the compilation-context in WorkItem. (Closed)
Patch Set: Created 4 years, 3 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/ssa/ssa.dart
diff --git a/pkg/compiler/lib/src/ssa/ssa.dart b/pkg/compiler/lib/src/ssa/ssa.dart
index 55b13b0c5346e6be78f62bf90dbd03cf8036b013..7ee79c8bcbde98fdaeccb1c153c15dd5c42dfb4c 100644
--- a/pkg/compiler/lib/src/ssa/ssa.dart
+++ b/pkg/compiler/lib/src/ssa/ssa.dart
@@ -14,6 +14,7 @@ import '../js_backend/backend.dart' show JavaScriptBackend, FunctionCompiler;
import 'builder.dart';
import 'builder_kernel.dart';
import 'codegen.dart';
+import 'context.dart';
import 'nodes.dart';
import 'optimize.dart';
@@ -37,8 +38,11 @@ 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);
+ var context = new SsaCompilationContext();
+ HGraph graph = useKernel
+ ? builderKernel.build(work, context)
+ : builder.build(work, context);
+ optimizer.optimize(graph, work, context);
Element element = work.element;
js.Expression result = generator.generateCode(work, graph);
if (element is FunctionElement) {

Powered by Google App Engine
This is Rietveld 408576698