Index: src/arm/full-codegen-arm.cc |
=================================================================== |
--- src/arm/full-codegen-arm.cc (revision 5865) |
+++ src/arm/full-codegen-arm.cc (working copy) |
@@ -860,18 +860,23 @@ |
} |
-void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info) { |
+void FullCodeGenerator::EmitNewClosure(Handle<SharedFunctionInfo> info, |
+ bool pretenure) { |
// Use the fast case closure allocation code that allocates in new |
// space for nested functions that don't need literals cloning. |
- if (scope()->is_function_scope() && info->num_literals() == 0) { |
+ if (scope()->is_function_scope() && |
+ info->num_literals() == 0 && |
+ !pretenure) { |
FastNewClosureStub stub; |
__ mov(r0, Operand(info)); |
__ push(r0); |
__ CallStub(&stub); |
} else { |
__ mov(r0, Operand(info)); |
- __ Push(cp, r0); |
- __ CallRuntime(Runtime::kNewClosure, 2); |
+ __ LoadRoot(r1, pretenure ? Heap::kTrueValueRootIndex |
+ : Heap::kFalseValueRootIndex); |
+ __ Push(cp, r0, r1); |
+ __ CallRuntime(Runtime::kNewClosure, 3); |
} |
context()->Plug(r0); |
} |