| Index: lib/compiler/implementation/ssa/codegen.dart
|
| diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
|
| index e43edf1800e0bf96b158403fc4c3c8e8b8417b59..a2090d55375b519ead3e430bc3a8ee9344ef9965 100644
|
| --- a/lib/compiler/implementation/ssa/codegen.dart
|
| +++ b/lib/compiler/implementation/ssa/codegen.dart
|
| @@ -1607,13 +1607,21 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor {
|
| buffer.add(compiler.namer.instanceMethodInvocationName(
|
| currentLibrary, node.name, node.selector));
|
| visitArguments(node.inputs);
|
| + bool inLoop = node.block.enclosingLoopHeader !== null;
|
| if (node.element !== null) {
|
| // If we know we're calling a specific method, register that
|
| // method only.
|
| + if (inLoop) {
|
| + backend.builder.functionsCalledInLoop.add(node.element);
|
| + }
|
| world.registerDynamicInvocationOf(node.element);
|
| } else {
|
| + if (inLoop) {
|
| + backend.builder.selectorsCalledInLoop[node.name] = node.selector;
|
| + }
|
| world.registerDynamicInvocation(
|
| - node.name, getOptimizedSelectorFor(node, node.selector));
|
| + node.name,
|
| + getOptimizedSelectorFor(node, node.selector));
|
| }
|
| }
|
| endExpression(JSPrecedence.CALL_PRECEDENCE);
|
|
|