Index: src/full-codegen/x64/full-codegen-x64.cc |
diff --git a/src/full-codegen/x64/full-codegen-x64.cc b/src/full-codegen/x64/full-codegen-x64.cc |
index 28cef4924961c6abbc480739395db5d0128aa052..32538a86091313c57c511ada623e5cebcac7af33 100644 |
--- a/src/full-codegen/x64/full-codegen-x64.cc |
+++ b/src/full-codegen/x64/full-codegen-x64.cc |
@@ -1170,8 +1170,11 @@ |
// 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()) { |
+ if (!FLAG_always_opt && |
+ !FLAG_prepare_always_opt && |
+ !pretenure && |
+ scope()->is_function_scope() && |
+ info->num_literals() == 0) { |
FastNewClosureStub stub(isolate(), info->language_mode(), info->kind()); |
__ Move(rbx, info); |
__ CallStub(&stub); |