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_backend/codegen/task.dart

Issue 1316673006: dart2js cps: Use TypeMaskSystem when inserting refinement nodes. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Remove unused ClassElement variable && rebase Created 5 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
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/codegen/task.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen/task.dart b/pkg/compiler/lib/src/js_backend/codegen/task.dart
index 93a23205ba6a5a4558912dd0e566a3abd7c538ce..ac95eec51e5e2290d5ec7212d65d27d68ffcca62 100644
--- a/pkg/compiler/lib/src/js_backend/codegen/task.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen/task.dart
@@ -38,6 +38,7 @@ import '../../tree_ir/optimization/optimization.dart';
import '../../tree_ir/optimization/optimization.dart' as tree_opt;
import '../../tree_ir/tree_ir_integrity.dart';
import '../../cps_ir/cps_ir_nodes_sexpr.dart';
+import '../../cps_ir/type_mask_system.dart';
class CpsFunctionCompiler implements FunctionCompiler {
final ConstantSystem constantSystem;
@@ -69,7 +70,6 @@ class CpsFunctionCompiler implements FunctionCompiler {
/// Generates JavaScript code for `work.element`.
js.Fun compile(CodegenWorkItem work) {
AstElement element = work.element;
- JavaScriptBackend backend = compiler.backend;
return compiler.withCurrentElement(element, () {
try {
// TODO(karlklose): remove this fallback when we do not need it for
@@ -170,10 +170,13 @@ class CpsFunctionCompiler implements FunctionCompiler {
assert(checkCpsIntegrity(cpsNode));
}
+ TypeMaskSystem typeSystem = new TypeMaskSystem(compiler);
+
applyCpsPass(new RedundantJoinEliminator());
applyCpsPass(new RedundantPhiEliminator());
- applyCpsPass(new InsertRefinements(compiler.typesTask, compiler.world));
- TypePropagator typePropagator = new TypePropagator(compiler, this);
+ applyCpsPass(new InsertRefinements(typeSystem));
+ TypePropagator typePropagator =
+ new TypePropagator(compiler, typeSystem, this);
applyCpsPass(typePropagator);
dumpTypedIR(cpsNode, typePropagator);
applyCpsPass(new RemoveRefinements());
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | pkg/compiler/lib/src/world.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698