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

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

Issue 10534109: Use simple loop tracking instead of size to determine if (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address next round of comments. Created 8 years, 6 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/ssa/nodes.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 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);
« no previous file with comments | « lib/compiler/implementation/ssa/builder.dart ('k') | lib/compiler/implementation/ssa/nodes.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698