| Index: src/builtins/s390/builtins-s390.cc
|
| diff --git a/src/builtins/s390/builtins-s390.cc b/src/builtins/s390/builtins-s390.cc
|
| index de770969f689926ef4fb8328decd848bea3e0c7c..306769b1871be6d0d5843df0150411226edad986 100644
|
| --- a/src/builtins/s390/builtins-s390.cc
|
| +++ b/src/builtins/s390/builtins-s390.cc
|
| @@ -1374,6 +1374,7 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
|
| __ CmpSmiLiteral(index, Smi::FromInt(2), r0);
|
| __ blt(&gotta_call_runtime);
|
|
|
| + // Find literals.
|
| // r9 : native context
|
| // r4 : length / index
|
| // r8 : optimized code map
|
| @@ -1394,6 +1395,18 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
|
| __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset));
|
| __ CmpP(temp, native_context);
|
| __ bne(&loop_bottom, Label::kNear);
|
| + // Literals available?
|
| + __ LoadP(temp,
|
| + FieldMemOperand(array_pointer,
|
| + SharedFunctionInfo::kOffsetToPreviousLiterals));
|
| + __ LoadP(temp, FieldMemOperand(temp, WeakCell::kValueOffset));
|
| + __ JumpIfSmi(temp, &gotta_call_runtime);
|
| +
|
| + // Save the literals in the closure.
|
| + __ StoreP(temp, FieldMemOperand(closure, JSFunction::kLiteralsOffset), r0);
|
| + __ RecordWriteField(closure, JSFunction::kLiteralsOffset, temp, r6,
|
| + kLRHasNotBeenSaved, kDontSaveFPRegs, EMIT_REMEMBERED_SET,
|
| + OMIT_SMI_CHECK);
|
|
|
| // Code available?
|
| Register entry = r6;
|
| @@ -1403,7 +1416,7 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
|
| __ LoadP(entry, FieldMemOperand(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.
|
| // Store code entry in the closure.
|
| __ AddP(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag));
|
| __ StoreP(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset), r0);
|
| @@ -1437,7 +1450,7 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
|
| __ CmpSmiLiteral(index, Smi::FromInt(1), r0);
|
| __ bgt(&loop_top);
|
|
|
| - // We found no code.
|
| + // We found neither literals nor code.
|
| __ b(&gotta_call_runtime);
|
|
|
| __ bind(&try_shared);
|
|
|