Chromium Code Reviews| Index: lib/compiler/implementation/ssa/codegen.dart |
| diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart |
| index 1ef09f150366d92b7012dd2e92fe84fd3cc3afb6..82b9b4ce7f88604f3e88cc3b9b719c1f66df6fcc 100644 |
| --- a/lib/compiler/implementation/ssa/codegen.dart |
| +++ b/lib/compiler/implementation/ssa/codegen.dart |
| @@ -1731,17 +1731,19 @@ class SsaCodeGenerator implements HVisitor, HBlockInformationVisitor { |
| currentLibrary, node.name, node.selector)); |
| visitArguments(node.inputs); |
| bool inLoop = node.block.enclosingLoopHeader !== null; |
| + |
| + // Register this invocation to collect the types used at all call sites. |
| + Selector selector = getOptimizedSelectorFor(node, node.selector); |
| + backend.registerDynamicInvocation(node, selector); |
| + |
| 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); |
| - } |
| + if (inLoop) backend.builder.functionsCalledInLoop.add(node.element); |
| world.registerDynamicInvocationOf(node.element); |
|
ahe
2012/08/07 11:23:26
I would prefer to incorporate backend.registerDyna
Søren Gjesse
2012/08/08 10:36:02
I see your point, but currently the world (Enqueue
ahe
2012/08/08 13:00:27
Inside the Enqueuer, you can access the backend us
|
| } else { |
| - Selector selector = getOptimizedSelectorFor(node, node.selector); |
| - world.registerDynamicInvocation(node.name, selector); |
| if (inLoop) backend.builder.selectorsCalledInLoop[node.name] = selector; |
| + world.registerDynamicInvocation(node.name, selector); |
| } |
| } |
| endExpression(JSPrecedence.CALL_PRECEDENCE); |