Chromium Code Reviews| Index: pkg/compiler/lib/src/ssa/builder.dart |
| diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart |
| index d5e4c29d6953f6f8c23e4bef9cbf64bced6a001b..8d1ef6989ee6712db21b9c8e060b8b32e2c74818 100644 |
| --- a/pkg/compiler/lib/src/ssa/builder.dart |
| +++ b/pkg/compiler/lib/src/ssa/builder.dart |
| @@ -5630,6 +5630,7 @@ class SsaBuilder extends NewResolvedVisitor { |
| // |
| // array.length == _end || throwConcurrentModificationError(array) |
| // |
| + /* |
| SsaBranchBuilder branchBuilder = new SsaBranchBuilder(this, node); |
| branchBuilder.handleLogicalAndOr( |
| () { |
| @@ -5643,6 +5644,13 @@ class SsaBuilder extends NewResolvedVisitor { |
| }, |
| isAnd: false); |
| pop(); |
| + */ |
| + HInstruction length = buildGetLength(); |
| + push(new HIdentity(length, originalLength, null, boolType)); |
| + pushInvokeStatic(node, |
| + backend.getThrowConcurrentModificationError(), |
| + [pop(), array]); |
| + pop(); |
| } |
| void buildInitializer() { |
| @@ -5651,9 +5659,9 @@ class SsaBuilder extends NewResolvedVisitor { |
| isFixed = isFixedLength(array.instructionType, compiler); |
| localsHandler.updateLocal(indexVariable, |
| graph.addConstantInt(0, compiler)); |
| - if (!isFixed) { |
| + //if (!isFixed) { |
|
sra1
2015/04/16 19:27:09
This will be changed back, was just for debugging
|
| originalLength = buildGetLength(); |
| - } |
| + //} |
| } |
| HInstruction buildCondition() { |
| @@ -5673,7 +5681,7 @@ class SsaBuilder extends NewResolvedVisitor { |
| // |
| // For now we will put the check in the body, which will miss a |
| // modification on the last iteration. |
| - buildConcurrentModificationErrorCheck(); |
| + //buildConcurrentModificationErrorCheck(); |
| // Find a type for the element. |
| // Use the element type of the indexer into the array. |
| @@ -5713,6 +5721,7 @@ class SsaBuilder extends NewResolvedVisitor { |
| visit(node.body); |
| } |
| void buildUpdate() { |
| + buildConcurrentModificationErrorCheck(); |
| // TODO(sra): It would be slightly shorter to generate `a[i++]` in the |
| // body (and that more closely follows what an inlined iterator would do) |
| // but the code is horrible as `i+1` is carried around the loop in an |