+ loadPtr(Address(regT2, JSVariableObject::offsetOfRegisters()), regT3);
+ emitStore(index, regT1, regT0, regT3);
+ emitWriteBarrier(regT2, regT1, regT0, regT1, ShouldFilterImmediates, WriteBarrierForVariableAccess);
+}
+
+void JIT::emit_op_init_global_const(Instruction* currentInstruction)
+{
+ WriteBarrier<Unknown>* registerPointer = currentInstruction[1].u.registerPointer;
+ int value = currentInstruction[2].u.operand;
+
+ JSGlobalObject* globalObject = m_codeBlock->globalObject();
+
+ emitLoad(value, regT1, regT0);
+
+ if (Heap::isWriteBarrierEnabled()) {
+ move(TrustedImmPtr(globalObject), regT2);
+
+ emitWriteBarrier(globalObject, regT1, regT3, ShouldFilterImmediates, WriteBarrierForVariableAccess);
+ }
+
+ store32(regT1, registerPointer->tagPointer());
+ store32(regT0, registerPointer->payloadPointer());
+ map(m_bytecodeOffset + OPCODE_LENGTH(op_init_global_const), value, regT1, regT0);
+}
+
+void JIT::emit_op_init_global_const_check(Instruction* currentInstruction)
+{
+ WriteBarrier<Unknown>* registerPointer = currentInstruction[1].u.registerPointer;
+ int value = currentInstruction[2].u.operand;
+
+ JSGlobalObject* globalObject = m_codeBlock->globalObject();
+
+ emitLoad(value, regT1, regT0);
+
+ addSlowCase(branchTest8(NonZero, AbsoluteAddress(currentInstruction[3].u.predicatePointer)));
+
+ if (Heap::isWriteBarrierEnabled()) {
+ move(TrustedImmPtr(globalObject), regT2);
+ emitWriteBarrier(globalObject, regT1, regT3, ShouldFilterImmediates, WriteBarrierForVariableAccess);
+ }
+
+ store32(regT1, registerPointer->tagPointer());
+ store32(regT0, registerPointer->payloadPointer());
+ unmap();
+}
+
+void JIT::emitSlow_op_init_global_const_check(Instruction* currentInstruction, Vector<SlowCaseEntry>::iterator& iter)
+{
+ linkSlowCase(iter);
+
+ JITStubCall stubCall(this, cti_op_init_global_const_check);
+ stubCall.addArgument(regT1, regT0);
+ stubCall.addArgument(TrustedImm32(currentInstruction[4].u.operand));
+ stubCall.call();
+}
+
+void JIT::resetPatchGetById(RepatchBuffer& repatchBuffer, StructureStubInfo* stubInfo)
+{
+ repatchBuffer.relink(stubInfo->callReturnLocation, cti_op_get_by_id);
+ repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(stubInfo->patch.baseline.u.get.structureToCompare), reinterpret_cast<void*>(unusedPointer));
+ repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelCompactAtOffset(stubInfo->patch.baseline.u.get.displacementLabel1), 0);
+ repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelCompactAtOffset(stubInfo->patch.baseline.u.get.displacementLabel2), 0);
+ repatchBuffer.relink(stubInfo->hotPathBegin.jumpAtOffset(stubInfo->patch.baseline.u.get.structureCheck), stubInfo->callReturnLocation.labelAtOffset(-stubInfo->patch.baseline.u.get.coldPathBegin));
+}
+
+void JIT::resetPatchPutById(RepatchBuffer& repatchBuffer, StructureStubInfo* stubInfo)
+{
+ if (isDirectPutById(stubInfo))
+ repatchBuffer.relink(stubInfo->callReturnLocation, cti_op_put_by_id_direct);
+ else
+ repatchBuffer.relink(stubInfo->callReturnLocation, cti_op_put_by_id);
+ repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabelPtrAtOffset(stubInfo->patch.baseline.u.put.structureToCompare), reinterpret_cast<void*>(unusedPointer));
+ repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(stubInfo->patch.baseline.u.put.displacementLabel1), 0);
+ repatchBuffer.repatch(stubInfo->hotPathBegin.dataLabel32AtOffset(stubInfo->patch.baseline.u.put.displacementLabel2), 0);
+}
+
+} // namespace JSC
+
+#endif // USE(JSVALUE32_64)
+#endif // ENABLE(JIT)