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

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

Issue 1087973002: Rewrite for-in loop as indexing loop for JavaScript indexable arrays (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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/optimize.dart
diff --git a/pkg/compiler/lib/src/ssa/optimize.dart b/pkg/compiler/lib/src/ssa/optimize.dart
index d4e546842a3747165e85e2eb5aa7fe52b504655d..8b946af927c5743811020d055e367206dfbd514d 100644
--- a/pkg/compiler/lib/src/ssa/optimize.dart
+++ b/pkg/compiler/lib/src/ssa/optimize.dart
@@ -55,6 +55,7 @@ class SsaOptimizerTask extends CompilerTask {
new SsaTypePropagator(compiler),
new SsaCodeMotion(),
new SsaLoadElimination(compiler),
+ new SsaRedundantPhiEliminator(),
new SsaDeadPhiEliminator(),
new SsaTypePropagator(compiler),
new SsaValueRangeAnalyzer(compiler, constantSystem, this, work),
@@ -841,6 +842,19 @@ class SsaInstructionSimplifier extends HBaseVisitor
return new HFieldSet(field, receiver, value);
}
+ HInstruction visitInvokeStatic(HInvokeStatic node) {
+ if (node.element == backend.getThrowConcurrentModificationError()) {
sra1 2015/04/16 19:27:09 If we agree on this general approach I will add an
+ if (node.inputs.length == 2) {
+ HInstruction firstArgument = node.inputs[0];
+ if (firstArgument is HConstant) {
+ HConstant constant = firstArgument;
+ if (constant.constant.isTrue) return constant;
+ }
+ }
+ }
+ return node;
+ }
+
HInstruction visitStringConcat(HStringConcat node) {
// Simplify string concat:
//

Powered by Google App Engine
This is Rietveld 408576698