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

Unified Diff: src/hydrogen.cc

Issue 563123004: Unify use-sites of EnsureDeoptimizationSupport. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Decomplicatification (aka. simplify). Created 6 years, 3 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/cctest/compiler/function-tester.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/hydrogen.cc
diff --git a/src/hydrogen.cc b/src/hydrogen.cc
index 3c0705c7346f532b304357f83d90496af5edc4de..675b61155ba937a9c518bfb5cd16cbfa3be39306 100644
--- a/src/hydrogen.cc
+++ b/src/hydrogen.cc
@@ -7835,26 +7835,9 @@ 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 (!target_shared->has_deoptimization_support()) {
- // Note that we compile here using the same AST that we will use for
- // generating the optimized inline code.
- target_info.EnableDeoptimizationSupport();
- if (!FullCodeGenerator::MakeCode(&target_info)) {
- TraceInline(target, caller, "could not generate deoptimization info");
- return false;
- }
- if (target_shared->scope_info() == ScopeInfo::Empty(isolate())) {
- // The scope info might not have been set if a lazily compiled
- // function is inlined before being called for the first time.
- Handle<ScopeInfo> target_scope_info =
- ScopeInfo::Create(target_info.scope(), zone());
- target_shared->set_scope_info(*target_scope_info);
- }
- target_shared->EnableDeoptimizationSupport(*target_info.code());
- target_shared->set_feedback_vector(*target_info.feedback_vector());
- Compiler::RecordFunctionCompilation(Logger::FUNCTION_TAG,
- &target_info,
- target_shared);
+ if (!Compiler::EnsureDeoptimizationSupport(&target_info)) {
+ TraceInline(target, caller, "could not generate deoptimization info");
+ return false;
}
// ----------------------------------------------------------------
« no previous file with comments | « src/compiler/js-inlining.cc ('k') | test/cctest/compiler/function-tester.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698