| Index: lib/compiler/implementation/ssa/codegen.dart
|
| diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
|
| index 1b7e7d16c32cdbe58adca3905b604347a719b59a..67d4934fb3a59407466d634b6e7e31e19e86492b 100644
|
| --- a/lib/compiler/implementation/ssa/codegen.dart
|
| +++ b/lib/compiler/implementation/ssa/codegen.dart
|
| @@ -1585,13 +1585,17 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
|
| buffer.add(compiler.namer.instanceMethodInvocationName(
|
| currentLibrary, node.name, node.selector));
|
| visitArguments(node.inputs);
|
| + var inLoop = node.block.enclosingLoopHeader !== null;
|
| if (node.element !== null) {
|
| // If we know we're calling a specific method, register that
|
| // method only.
|
| + if (inLoop) node.element.calledInLoop = true;
|
| world.registerDynamicInvocationOf(node.element);
|
| } else {
|
| world.registerDynamicInvocation(
|
| - node.name, getOptimizedSelectorFor(node, node.selector));
|
| + node.name,
|
| + getOptimizedSelectorFor(node, node.selector),
|
| + inLoop: inLoop);
|
| }
|
| }
|
| endExpression(JSPrecedence.CALL_PRECEDENCE);
|
| @@ -2623,12 +2627,12 @@ class SsaUnoptimizedCodeGenerator extends SsaCodeGenerator {
|
| // find the name of its checked input. Note that there must be a
|
| // name, otherwise the instruction would not be in the live
|
| // environment.
|
| - HInstruction unwrap(argument) {
|
| + HInstruction unwrap(argument) {
|
| while (argument is HCheck && !variableNames.hasName(argument)) {
|
| argument = argument.checkedInput;
|
| }
|
| assert(variableNames.hasName(argument));
|
| - return argument;
|
| + return argument;
|
| }
|
|
|
| void visitTypeGuard(HTypeGuard node) {
|
|
|