Index: src/builtins/ia32/builtins-ia32.cc |
diff --git a/src/builtins/ia32/builtins-ia32.cc b/src/builtins/ia32/builtins-ia32.cc |
index 0f23ec1ebb48ba13c78d7dcc992f6d0acdc012ed..bd638672b1efa061881dcccaf2dac027e10983bf 100644 |
--- a/src/builtins/ia32/builtins-ia32.cc |
+++ b/src/builtins/ia32/builtins-ia32.cc |
@@ -1122,14 +1122,14 @@ void Builtins::Generate_CompileLazy(MacroAssembler* masm) { |
__ test_b(FieldOperand(entry, SharedFunctionInfo::kMarkedForTierUpByteOffset), |
Immediate(1 << SharedFunctionInfo::kMarkedForTierUpBitWithinByte)); |
__ j(not_zero, &gotta_call_runtime_no_stack); |
- // Is the full code valid? |
+ |
+ // If SFI points to anything other than CompileLazy, install that. |
__ mov(entry, FieldOperand(entry, SharedFunctionInfo::kCodeOffset)); |
- __ mov(ebx, FieldOperand(entry, Code::kFlagsOffset)); |
- __ and_(ebx, Code::KindField::kMask); |
- __ shr(ebx, Code::KindField::kShift); |
- __ cmp(ebx, Immediate(Code::BUILTIN)); |
+ __ Move(ebx, masm->CodeObject()); |
+ __ cmp(entry, ebx); |
__ j(equal, &gotta_call_runtime_no_stack); |
- // Yes, install the full code. |
+ |
+ // Install the SFI's code entry. |
__ lea(entry, FieldOperand(entry, Code::kHeaderSize)); |
__ mov(FieldOperand(closure, JSFunction::kCodeEntryOffset), entry); |
__ RecordWriteCodeEntryField(closure, entry, ebx); |