| Index: src/builtins/ia32/builtins-ia32.cc
|
| diff --git a/src/builtins/ia32/builtins-ia32.cc b/src/builtins/ia32/builtins-ia32.cc
|
| index 72d8d4cc0f781b75094ecaa596eb8427149aefd4..401723f523976bc2893f6db436bdf64da197d745 100644
|
| --- a/src/builtins/ia32/builtins-ia32.cc
|
| +++ b/src/builtins/ia32/builtins-ia32.cc
|
| @@ -1037,6 +1037,7 @@
|
| __ cmp(index, Immediate(Smi::FromInt(2)));
|
| __ j(less, &gotta_call_runtime);
|
|
|
| + // Find literals.
|
| // edx : native context
|
| // ebx : length / index
|
| // eax : optimized code map
|
| @@ -1054,6 +1055,20 @@
|
| __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset));
|
| __ cmp(temp, native_context);
|
| __ j(not_equal, &loop_bottom);
|
| + // Literals available?
|
| + __ mov(temp, FieldOperand(map, index, times_half_pointer_size,
|
| + SharedFunctionInfo::kOffsetToPreviousLiterals));
|
| + __ mov(temp, FieldOperand(temp, WeakCell::kValueOffset));
|
| + __ JumpIfSmi(temp, &gotta_call_runtime);
|
| +
|
| + // Save the literals in the closure.
|
| + __ mov(ecx, Operand(esp, 0));
|
| + __ mov(FieldOperand(ecx, JSFunction::kLiteralsOffset), temp);
|
| + __ push(index);
|
| + __ RecordWriteField(ecx, JSFunction::kLiteralsOffset, temp, index,
|
| + kDontSaveFPRegs, EMIT_REMEMBERED_SET, OMIT_SMI_CHECK);
|
| + __ pop(index);
|
| +
|
| // Code available?
|
| Register entry = ecx;
|
| __ mov(entry, FieldOperand(map, index, times_half_pointer_size,
|
| @@ -1061,7 +1076,7 @@
|
| __ mov(entry, FieldOperand(entry, WeakCell::kValueOffset));
|
| __ JumpIfSmi(entry, &try_shared);
|
|
|
| - // Found code. Get it into the closure and return.
|
| + // Found literals and code. Get them into the closure and return.
|
| __ pop(closure);
|
| // Store code entry in the closure.
|
| __ lea(entry, FieldOperand(entry, Code::kHeaderSize));
|
| @@ -1095,7 +1110,7 @@
|
| __ cmp(index, Immediate(Smi::FromInt(1)));
|
| __ j(greater, &loop_top);
|
|
|
| - // We found no code.
|
| + // We found neither literals nor code.
|
| __ jmp(&gotta_call_runtime);
|
|
|
| __ bind(&try_shared);
|
|
|