[JAEGER] Merge.

This commit is contained in:
David Anderson 2010-08-13 02:22:03 -07:00
commit 55218d7e55
4 changed files with 6 additions and 1 deletions

View File

@ -294,6 +294,7 @@ mjit::Compiler::finishThisUp()
script->mics[i].stubEntry = stubCode.locationOf(mics[i].stubEntry); script->mics[i].stubEntry = stubCode.locationOf(mics[i].stubEntry);
script->mics[i].u.name.typeConst = mics[i].u.name.typeConst; script->mics[i].u.name.typeConst = mics[i].u.name.typeConst;
script->mics[i].u.name.dataConst = mics[i].u.name.dataConst; script->mics[i].u.name.dataConst = mics[i].u.name.dataConst;
script->mics[i].u.name.dataWrite = mics[i].u.name.dataWrite;
#if defined JS_PUNBOX64 #if defined JS_PUNBOX64
script->mics[i].patchValueOffset = mics[i].patchValueOffset; script->mics[i].patchValueOffset = mics[i].patchValueOffset;
#endif #endif
@ -3565,6 +3566,7 @@ mjit::Compiler::jsop_setgname(uint32 index)
mic.u.name.typeConst = fe->isTypeKnown(); mic.u.name.typeConst = fe->isTypeKnown();
mic.u.name.dataConst = fe->isConstant(); mic.u.name.dataConst = fe->isConstant();
mic.u.name.dataWrite = !mic.u.name.dataConst || !fe->getValue().isUndefined();
if (!mic.u.name.dataConst) { if (!mic.u.name.dataConst) {
dataReg = frame.ownRegForData(fe); dataReg = frame.ownRegForData(fe);

View File

@ -101,6 +101,7 @@ class Compiler
struct { struct {
bool typeConst; bool typeConst;
bool dataConst; bool dataConst;
bool dataWrite;
} name; } name;
struct { struct {
uint32 pcOffs; uint32 pcOffs;

View File

@ -175,7 +175,8 @@ ic::SetGlobalName(VMFrame &f, uint32 index)
dataOffset = MICInfo::SET_DATA_CONST_TYPE_OFFSET; dataOffset = MICInfo::SET_DATA_CONST_TYPE_OFFSET;
else else
dataOffset = MICInfo::SET_DATA_TYPE_OFFSET; dataOffset = MICInfo::SET_DATA_TYPE_OFFSET;
stores.repatch(mic.load.dataLabel32AtOffset(dataOffset), slot); if (mic.u.name.dataWrite)
stores.repatch(mic.load.dataLabel32AtOffset(dataOffset), slot);
#elif defined JS_PUNBOX64 #elif defined JS_PUNBOX64
stores.repatch(mic.load.dataLabel32AtOffset(mic.patchValueOffset), slot); stores.repatch(mic.load.dataLabel32AtOffset(mic.patchValueOffset), slot);
#endif #endif

View File

@ -107,6 +107,7 @@ struct MICInfo {
bool touched : 1; bool touched : 1;
bool typeConst : 1; bool typeConst : 1;
bool dataConst : 1; bool dataConst : 1;
bool dataWrite : 1;
} name; } name;
/* Used by CALL. */ /* Used by CALL. */
bool generated; bool generated;