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 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.cc ('k') | src/hydrogen.cc » ('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 4166acee624c99517500d25b84b00906663bd8a6..af021459a2f99706e3012fe67c07df789288e616 100644
--- a/src/compiler/js-inlining.cc
+++ b/src/compiler/js-inlining.cc
@@ -57,9 +57,7 @@ static void Parse(Handle<JSFunction> function, CompilationInfoWithZone* info) {
CHECK(Parser::Parse(info));
CHECK(Rewriter::Rewrite(info));
CHECK(Scope::Analyze(info));
- CHECK_NE(NULL, info->scope());
- Handle<ScopeInfo> scope_info = ScopeInfo::Create(info->scope(), info->zone());
- info->shared_info()->set_scope_info(*scope_info);
+ CHECK(Compiler::EnsureDeoptimizationSupport(info));
}
@@ -393,18 +391,6 @@ void JSInliner::TryInlineCall(Node* call_node) {
CompilationInfoWithZone info(function);
Parse(function, &info);
- if (!function->shared()->has_deoptimization_support()) {
- // TODO(turbofan) In the future, unoptimized code with deopt support could
- // be generated lazily once deopt is triggered.
- info.EnableDeoptimizationSupport();
- if (!FullCodeGenerator::MakeCode(&info)) {
- DCHECK(false);
- return;
- }
- function->shared()->EnableDeoptimizationSupport(*info.code());
- function->shared()->set_feedback_vector(*info.feedback_vector());
- }
-
if (info.scope()->arguments() != NULL) {
// For now do not inline functions that use their arguments array.
SmartArrayPointer<char> name = function->shared()->DebugName()->ToCString();
« no previous file with comments | « src/compiler.cc ('k') | src/hydrogen.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698