Index: src/ia32/code-stubs-ia32.cc |
diff --git a/src/ia32/code-stubs-ia32.cc b/src/ia32/code-stubs-ia32.cc |
index c539ff564626c4f7b4499487c96a8e6d37593521..fd340f7f8378d9da7ae3e0ad778348b7fba0f0fd 100644 |
--- a/src/ia32/code-stubs-ia32.cc |
+++ b/src/ia32/code-stubs-ia32.cc |
@@ -69,11 +69,15 @@ void FastNewClosureStub::Generate(MacroAssembler* masm) { |
// Get the function info from the stack. |
__ mov(edx, Operand(esp, 1 * kPointerSize)); |
+ int map_index = strict_mode_ == kStrictMode |
+ ? Context::FUNCTION_MAP_STRICT_INDEX |
Mads Ager (chromium)
2011/03/15 08:49:54
This is part of another change but I think I would
|
+ : Context::FUNCTION_MAP_INDEX; |
+ |
// Compute the function map in the current global context and set that |
// as the map of the allocated object. |
__ mov(ecx, Operand(esi, Context::SlotOffset(Context::GLOBAL_INDEX))); |
__ mov(ecx, FieldOperand(ecx, GlobalObject::kGlobalContextOffset)); |
- __ mov(ecx, Operand(ecx, Context::SlotOffset(Context::FUNCTION_MAP_INDEX))); |
+ __ mov(ecx, Operand(ecx, Context::SlotOffset(map_index))); |
__ mov(FieldOperand(eax, JSObject::kMapOffset), ecx); |
// Initialize the rest of the function. We don't have to update the |