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

Unified Diff: pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart

Issue 1353443002: dart2js cps: Add a pass for eliminating bounds checks. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: 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
Index: pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
diff --git a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
index 0e617829efa8fe0dbd6082ebf985f30437f25934..2616c6794428f4ba3a2a4628576047acf14663e5 100644
--- a/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
+++ b/pkg/compiler/lib/src/cps_ir/shrinking_reductions.dart
@@ -492,6 +492,9 @@ class _RemovalVisitor extends RecursiveVisitor {
/// Traverses the CPS term and sets node.parent for each visited node.
class ParentVisitor extends RecursiveVisitor {
+ static final ParentVisitor _instance = new ParentVisitor();
+ static void setParentPointers(Node node) => _instance.visit(node);
+
processFunctionDefinition(FunctionDefinition node) {
node.body.parent = node;
if (node.thisParameter != null) node.thisParameter.parent = node;

Powered by Google App Engine
This is Rietveld 408576698