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

Unified Diff: src/compiler/js-inlining.cc

Issue 1391903002: [turbofan] Separate JSInliningHeuristic into own class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased. Created 5 years, 2 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 | « src/compiler/js-inlining.h ('k') | src/compiler/js-inlining-heuristic.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/js-inlining.cc
diff --git a/src/compiler/js-inlining.cc b/src/compiler/js-inlining.cc
index 0b7c78979c8869fffe25f801bda4df5b5e0b9dac..1fb531415c78ca26efb1e3375d5a2ae20c04e156 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -246,13 +246,17 @@ Reduction JSInliner::Reduce(Node* node) {
JSCallFunctionAccessor call(node);
HeapObjectMatcher match(call.jsfunction());
- if (!match.HasValue()) return NoChange();
-
- if (!match.Value()->IsJSFunction()) return NoChange();
+ if (!match.HasValue() || !match.Value()->IsJSFunction()) return NoChange();
Handle<JSFunction> function = Handle<JSFunction>::cast(match.Value());
- if (mode_ == kRestrictedInlining && !function->shared()->force_inline()) {
- return NoChange();
- }
+
+ return ReduceJSCallFunction(node, function);
+}
+
+
+Reduction JSInliner::ReduceJSCallFunction(Node* node,
+ Handle<JSFunction> function) {
+ DCHECK_EQ(IrOpcode::kJSCallFunction, node->opcode());
+ JSCallFunctionAccessor call(node);
if (function->shared()->HasDebugInfo()) {
// Function contains break points.
« no previous file with comments | « src/compiler/js-inlining.h ('k') | src/compiler/js-inlining-heuristic.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698