Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(623)

Unified Diff: lib/compiler/implementation/ssa/codegen.dart

Issue 10827181: Collect call site information and use that for estimating parameter types (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Additional fix Created 8 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/universe.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: lib/compiler/implementation/ssa/codegen.dart
diff --git a/lib/compiler/implementation/ssa/codegen.dart b/lib/compiler/implementation/ssa/codegen.dart
index e7bb18399fd799743546577fa73aa1f069ac29df..1e2e902dfac740ca10df86d58a282d597cc00a64 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);
} 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);
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/universe.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698