| Index: src/builtins/mips/builtins-mips.cc
|
| diff --git a/src/builtins/mips/builtins-mips.cc b/src/builtins/mips/builtins-mips.cc
|
| index 2586a6c081ba614d63bc0290aaf5e0c4b72edbea..fb08099ab3893103703db2976c39d45830b2acea 100644
|
| --- a/src/builtins/mips/builtins-mips.cc
|
| +++ b/src/builtins/mips/builtins-mips.cc
|
| @@ -1452,13 +1452,13 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) {
|
| __ And(t1, t1,
|
| Operand(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte));
|
| __ Branch(&gotta_call_runtime_no_stack, ne, t1, Operand(zero_reg));
|
| - // Is the full code valid?
|
| +
|
| + // If SFI points to anything other than CompileLazy, install that.
|
| __ lw(entry, FieldMemOperand(entry, SharedFunctionInfo::kCodeOffset));
|
| - __ lw(t1, FieldMemOperand(entry, Code::kFlagsOffset));
|
| - __ And(t1, t1, Operand(Code::KindField::kMask));
|
| - __ srl(t1, t1, Code::KindField::kShift);
|
| - __ Branch(&gotta_call_runtime_no_stack, eq, t1, Operand(Code::BUILTIN));
|
| - // Yes, install the full code.
|
| + __ Move(t1, masm->CodeObject());
|
| + __ Branch(&gotta_call_runtime_no_stack, eq, entry, Operand(t1));
|
| +
|
| + // Install the SFI's code entry.
|
| __ Addu(entry, entry, Operand(Code::kHeaderSize - kHeapObjectTag));
|
| __ sw(entry, FieldMemOperand(closure, JSFunction::kCodeEntryOffset));
|
| __ RecordWriteCodeEntryField(closure, entry, t1);
|
|
|