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

Unified Diff: pkg/compiler/lib/src/cps_ir/cps_fragment.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: Put "pending statics" error in status file Created 5 years, 2 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/bounds_checker.dart ('k') | pkg/compiler/lib/src/cps_ir/octagon.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/cps_ir/cps_fragment.dart
diff --git a/pkg/compiler/lib/src/cps_ir/cps_fragment.dart b/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
index cecad3191c8bbc8f295d11f3cc67b0f8b5d9a3c6..7fc2ae38373fb2bd8cac048dd568cec129d9ae34 100644
--- a/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
+++ b/pkg/compiler/lib/src/cps_ir/cps_fragment.dart
@@ -314,3 +314,11 @@ class CpsFragment {
insertBelow(node.parent);
}
}
+
+/// Removes [node], unlinking all its references and replaces it with [newNode].
+void destroyAndReplace(Expression node, Expression newNode) {
+ InteriorNode parent = node.parent;
+ RemovalVisitor.remove(node);
+ parent.body = newNode;
+ newNode.parent = parent;
+}
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/bounds_checker.dart ('k') | pkg/compiler/lib/src/cps_ir/octagon.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698