| Index: lib/compiler/implementation/ssa/optimize.dart
|
| ===================================================================
|
| --- lib/compiler/implementation/ssa/optimize.dart (revision 12169)
|
| +++ lib/compiler/implementation/ssa/optimize.dart (working copy)
|
| @@ -696,7 +696,7 @@
|
| const SourceString('length'),
|
| lengthInterceptor.getLibrary()); // TODO(kasperl): Wrong.
|
| HInvokeInterceptor length = new HInvokeInterceptor(
|
| - selector, <HInstruction>[interceptor, receiver]);
|
| + selector, <HInstruction>[interceptor, receiver], true);
|
| types[length] = HType.INTEGER;
|
| node.block.addBefore(node, length);
|
|
|
| @@ -755,6 +755,9 @@
|
| bool isDeadCode(HInstruction instruction) {
|
| return !instruction.hasSideEffects(types)
|
| && instruction.usedBy.isEmpty()
|
| + // A dynamic getter that has no side effect can still throw
|
| + // a NoSuchMethodError or a NullPointerException.
|
| + && instruction is !HInvokeDynamicGetter
|
| && instruction is !HCheck
|
| && instruction is !HTypeGuard
|
| && !instruction.isControlFlow();
|
|
|