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

Unified Diff: pkg/compiler/lib/src/ssa/builder.dart

Issue 1159813002: dart2js: Minor cleanup in inlining heuristics. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 7 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 | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/ssa/builder.dart
diff --git a/pkg/compiler/lib/src/ssa/builder.dart b/pkg/compiler/lib/src/ssa/builder.dart
index f210452a62ca79f4c87100395718d62112933112..d1808df7e00df1e4df05e8649ad493ffa33be7e8 100644
--- a/pkg/compiler/lib/src/ssa/builder.dart
+++ b/pkg/compiler/lib/src/ssa/builder.dart
@@ -1362,6 +1362,11 @@ class SsaBuilder extends NewResolvedVisitor {
return true;
}
+ bool doesNotContainCode() {
+ // A function with size 1 does not contain any code.
+ return InlineWeeder.canBeInlined(function, 1, true);
+ }
+
bool reductiveHeuristic() {
// The call is on a path which is executed rarely, so inline only if it
// does not make the program larger.
@@ -1375,12 +1380,7 @@ class SsaBuilder extends NewResolvedVisitor {
// that usually means the factory constructor is left unused and not
// emitted.
// We at least inline bodies that are empty (and thus have a size of 1).
- return InlineWeeder.canBeInlined(function, 1, true);
- }
-
- bool doesNotContainCode() {
- // A function with size 1 does not contain any code.
- return InlineWeeder.canBeInlined(function, 1, true);
+ return doesNotContainCode();
}
bool heuristicSayGoodToGo() {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698