Index: src/full-codegen/full-codegen.cc |
diff --git a/src/full-codegen/full-codegen.cc b/src/full-codegen/full-codegen.cc |
index 0cdcc78a935c75822a8dc94e5d2dd8937d241cac..b8ac566d71f87f3610882c7fa51d1ae1b7c48fcf 100644 |
--- a/src/full-codegen/full-codegen.cc |
+++ b/src/full-codegen/full-codegen.cc |
@@ -1001,11 +1001,8 @@ void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, |
// flag, we need to use the runtime function so that the new function |
// we are creating here gets a chance to have its code optimized and |
// doesn't just get a copy of the existing unoptimized code. |
- if (!FLAG_always_opt && |
- !FLAG_prepare_always_opt && |
- !pretenure && |
- scope()->is_function_scope() && |
- info->num_literals() == 0) { |
+ if (!FLAG_always_opt && !FLAG_prepare_always_opt && !pretenure && |
+ scope()->is_function_scope()) { |
FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); |
__ Move(stub.GetCallInterfaceDescriptor().GetRegisterParameter(0), info); |
__ CallStub(&stub); |