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

Unified Diff: src/crankshaft/hydrogen.cc

Issue 1563213002: Type Feedback Vector lives in the closure (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Exclude an ignition test. Created 4 years, 11 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/crankshaft/hydrogen.h ('k') | src/crankshaft/typing.cc » ('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 214b65c676c61715545130222d7290e8a0d64c11..cc987e011e891c3ea6bb180d049d82f746b51e87 100644
--- a/src/crankshaft/hydrogen.cc
+++ b/src/crankshaft/hydrogen.cc
@@ -5501,10 +5501,10 @@ void HOptimizedGraphBuilder::VisitFunctionLiteral(FunctionLiteral* expr) {
// We also have a stack overflow if the recursive compilation did.
if (HasStackOverflow()) return;
// Use the fast case closure allocation code that allocates in new
- // space for nested functions that don't need literals cloning.
+ // space for nested functions that don't need pretenuring.
HConstant* shared_info_value = Add<HConstant>(shared_info);
HInstruction* instr;
- if (!expr->pretenure() && shared_info->num_literals() == 0) {
+ if (!expr->pretenure()) {
FastNewClosureStub stub(isolate(), shared_info->language_mode(),
shared_info->kind());
FastNewClosureDescriptor descriptor(isolate());
@@ -8453,6 +8453,9 @@ bool HOptimizedGraphBuilder::TryInline(Handle<JSFunction> target,
// does not remove the code with the deoptimization support.
top_info()->AddInlinedFunction(target_info.shared_info());
+ // If target was lazily compiled, it's literals array may not yet be set up.
+ JSFunction::EnsureLiterals(target);
+
// ----------------------------------------------------------------
// After this point, we've made a decision to inline this function (so
// TryInline should always return true).
« no previous file with comments | « src/crankshaft/hydrogen.h ('k') | src/crankshaft/typing.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698