void JSActivation::copyRegisters() { int numLocals = d()->functionBody->generatedByteCode().numLocals; if (!numLocals) return; copyRegisterArray(d()->registers - numLocals, numLocals); }
void JSGlobalObject::copyGlobalsFrom(RegisterFile& registerFile) { ASSERT(!d()->registerArray); ASSERT(!d()->registerArraySize); int numGlobals = registerFile.numGlobals(); if (!numGlobals) { d()->registers = 0; return; } Register* registerArray = copyRegisterArray(registerFile.lastGlobal(), numGlobals); setRegisters(registerArray + numGlobals, registerArray, numGlobals); }
void JSGlobalObject::copyGlobalsFrom(RegisterFile& registerFile) { ASSERT(!m_registerArray); ASSERT(!m_registerArraySize); int numGlobals = registerFile.numGlobals(); if (!numGlobals) { m_registers = 0; return; } OwnArrayPtr<WriteBarrier<Unknown> > registerArray = copyRegisterArray(globalData(), reinterpret_cast<WriteBarrier<Unknown>*>(registerFile.lastGlobal()), numGlobals, numGlobals); WriteBarrier<Unknown>* registers = registerArray.get() + numGlobals; setRegisters(registers, registerArray.release(), numGlobals); }