Index: src/crankshaft/hydrogen.cc |
diff --git a/src/crankshaft/hydrogen.cc b/src/crankshaft/hydrogen.cc |
index e7dca1a13c46d323a71b49dd9d4d030ac97a35f5..79bbbc34e231ad9b68dd0765dcd43d9bef0c48f3 100644 |
--- a/src/crankshaft/hydrogen.cc |
+++ b/src/crankshaft/hydrogen.cc |
@@ -5538,10 +5538,10 @@ |
// 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 pretenuring. |
+ // space for nested functions that don't need literals cloning. |
HConstant* shared_info_value = Add<HConstant>(shared_info); |
HInstruction* instr; |
- if (!expr->pretenure()) { |
+ if (!expr->pretenure() && shared_info->num_literals() == 0) { |
FastNewClosureStub stub(isolate(), shared_info->language_mode(), |
shared_info->kind()); |
FastNewClosureDescriptor descriptor(isolate()); |
@@ -8478,9 +8478,6 @@ |
// 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()); |
- |
- // 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 |