Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index c45b6ab3ccd9679e1ad5f0ac0447aa3c9bf21375..fa9d4e86993aae1895fed00638343e0f81d7205d 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -91,11 +91,15 @@ void FastNewClosureStub::Generate(MacroAssembler* masm) { |
&gc, |
TAG_OBJECT); |
+ int map_index = strict_mode_ == kStrictMode |
+ ? Context::FUNCTION_MAP_STRICT_INDEX |
+ : Context::FUNCTION_MAP_INDEX; |
+ |
// Compute the function map in the current global context and set that |
// as the map of the allocated object. |
__ ldr(r2, MemOperand(cp, Context::SlotOffset(Context::GLOBAL_INDEX))); |
__ ldr(r2, FieldMemOperand(r2, GlobalObject::kGlobalContextOffset)); |
- __ ldr(r2, MemOperand(r2, Context::SlotOffset(Context::FUNCTION_MAP_INDEX))); |
+ __ ldr(r2, MemOperand(r2, Context::SlotOffset(map_index))); |
__ str(r2, FieldMemOperand(r0, HeapObject::kMapOffset)); |
// Initialize the rest of the function. We don't have to update the |