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..f93883c01230915fa8a30707e5ceb86022eb7875 100644 |
| --- a/lib/compiler/implementation/ssa/codegen.dart |
| +++ b/lib/compiler/implementation/ssa/codegen.dart |
| @@ -1731,17 +1731,21 @@ 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. |
| + // TODO(sgjesse): Should specific functions be handled better than just |
| + // through their selector? |
|
floitsch
2012/08/06 15:01:06
Example?
Søren Gjesse
2012/08/07 09:06:03
I couldn't find one, so I removed the TODO.
|
| + 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); |
| } 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); |