mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Sync undefined properly, avoid unnecessary syncs at function entry, bug 586544. r=dvander
This commit is contained in:
parent
383caddd9a
commit
93e944674e
@ -197,7 +197,7 @@ mjit::Compiler::generatePrologue()
|
||||
saveReturnAddress();
|
||||
|
||||
/* Set locals to undefined. */
|
||||
for (uint32 i = 0; i < script->nslots; i++) {
|
||||
for (uint32 i = 0; i < script->nfixed; i++) {
|
||||
Address local(JSFrameReg, sizeof(JSStackFrame) + i * sizeof(Value));
|
||||
masm.storeValue(UndefinedValue(), local);
|
||||
}
|
||||
@ -295,7 +295,6 @@ mjit::Compiler::finishThisUp()
|
||||
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.dataConst = mics[i].u.name.dataConst;
|
||||
script->mics[i].u.name.dataWrite = mics[i].u.name.dataWrite;
|
||||
#if defined JS_PUNBOX64
|
||||
script->mics[i].patchValueOffset = mics[i].patchValueOffset;
|
||||
#endif
|
||||
@ -3567,7 +3566,6 @@ mjit::Compiler::jsop_setgname(uint32 index)
|
||||
|
||||
mic.u.name.typeConst = fe->isTypeKnown();
|
||||
mic.u.name.dataConst = fe->isConstant();
|
||||
mic.u.name.dataWrite = !mic.u.name.dataConst || !fe->getValue().isUndefined();
|
||||
|
||||
if (!mic.u.name.dataConst) {
|
||||
dataReg = frame.ownRegForData(fe);
|
||||
|
@ -101,7 +101,6 @@ class Compiler
|
||||
struct {
|
||||
bool typeConst;
|
||||
bool dataConst;
|
||||
bool dataWrite;
|
||||
} name;
|
||||
struct {
|
||||
uint32 pcOffs;
|
||||
|
@ -179,7 +179,6 @@ ic::SetGlobalName(VMFrame &f, uint32 index)
|
||||
dataOffset = MICInfo::SET_DATA_CONST_TYPE_OFFSET;
|
||||
else
|
||||
dataOffset = MICInfo::SET_DATA_TYPE_OFFSET;
|
||||
if (mic.u.name.dataWrite)
|
||||
stores.repatch(mic.load.dataLabel32AtOffset(dataOffset), slot);
|
||||
#elif defined JS_CPU_ARM
|
||||
// mic.load actually points to the LDR instruction which fetches the offset, but 'repatch'
|
||||
|
@ -108,7 +108,6 @@ struct MICInfo {
|
||||
bool touched : 1;
|
||||
bool typeConst : 1;
|
||||
bool dataConst : 1;
|
||||
bool dataWrite : 1;
|
||||
} name;
|
||||
/* Used by CALL. */
|
||||
bool generated;
|
||||
|
@ -159,7 +159,6 @@ class Assembler : public BaseAssembler
|
||||
jv.asBits = JSVAL_BITS(Jsvalify(v));
|
||||
|
||||
store32(ImmTag(jv.s.tag), tagOf(address));
|
||||
if (!v.isUndefined())
|
||||
store32(Imm32(jv.s.payload.u32), payloadOf(address));
|
||||
}
|
||||
|
||||
@ -168,7 +167,6 @@ class Assembler : public BaseAssembler
|
||||
jv.asBits = JSVAL_BITS(Jsvalify(v));
|
||||
|
||||
store32(ImmTag(jv.s.tag), tagOf(address));
|
||||
if (!v.isUndefined())
|
||||
store32(Imm32(jv.s.payload.u32), payloadOf(address));
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user