Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index b25cf79ee5ab0118df6b29875345e8ad85600971..401db6b3fbfc6af98c7f0e3eee01997106eb3127 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -2754,6 +2754,12 @@ void InstanceofStub::Generate(MacroAssembler* masm) { |
__ movp(kScratchRegister, |
Operand(kScratchRegister, kOffsetToMapCheckValue)); |
__ movp(Operand(kScratchRegister, 0), map); |
+ |
+ __ movp(r8, map); |
+ // Scratch points at the cell payload. Calculate the start of the object. |
+ __ subp(kScratchRegister, Immediate(Cell::kValueOffset - 1)); |
+ __ RecordWriteField(kScratchRegister, Cell::kValueOffset, r8, function, |
+ kDontSaveFPRegs, OMIT_REMEMBERED_SET, OMIT_SMI_CHECK); |
} |
// Loop through the prototype chain looking for the function prototype. |