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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 1415133002: Introduce a reference to the code object of inlined functions in CompilationInfo. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweak 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.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/crankshaft/hydrogen.cc
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc
index fd83081de556af8122405ca851099e015ed40555..fd7f5e6b93a00d2867f4a00f3d40b905038e250b 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -8411,13 +8411,6 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
}
}
- // Generate the deoptimization data for the unoptimized version of
- // the target function if we don't already have it.
- if (!Compiler::EnsureDeoptimizationSupport(&target_info)) {
- TraceInline(target, caller, "could not generate deoptimization info");
- return false;
- }
-
// In strong mode it is an error to call a function with too few arguments.
// In that case do not inline because then the arity check would be skipped.
if (is_strong(function->language_mode()) &&
@@ -8427,6 +8420,17 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
return false;
}
+ // Generate the deoptimization data for the unoptimized version of
+ // the target function if we don't already have it.
+ if (!Compiler::EnsureDeoptimizationSupport(&target_info)) {
+ TraceInline(target, caller, "could not generate deoptimization info");
+ return false;
+ }
+ // Remember that we inlined this function. This needs to be called right
+ // after the EnsureDeoptimizationSupport call so that the code flusher
+ // does not remove the code with the deoptimization support.
+ top_info()->AddInlinedFunction(target_info.shared_info());
+
// ----------------------------------------------------------------
// After this point, we've made a decision to inline this function (so
// TryInline should always return true).
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | test/mjsunit/mjsunit.status » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698