mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Skip next OSR in case forbidOSR flag is GC-ed. (Bug 751383, r=dvander)
This commit is contained in:
parent
3b4de3be38
commit
d2d5b6761f
@ -473,6 +473,18 @@ ion::ThunkToInterpreter(Value *vp)
|
||||
IonActivation *activation = cx->runtime->ionActivation;
|
||||
BailoutClosure *br = activation->takeBailout();
|
||||
|
||||
// By default we set the forbidOsr flag on the ion script, but if a GC
|
||||
// happens just after we re-enter the interpreter, the ion script get
|
||||
// invalidated and we do not see the forbidOsr flag. This may cause a loop
|
||||
// which apear with eager compilation and gc zeal enabled. This code is a
|
||||
// workaround to avoid recompiling with OSR just after a bailout followed by
|
||||
// a GC. (see Bug 746691 & Bug 751383)
|
||||
jsbytecode *pc = cx->regs().pc;
|
||||
while (JSOp(*pc) == JSOP_GOTO)
|
||||
pc += GET_JUMP_OFFSET(pc);
|
||||
if (JSOp(*pc) == JSOP_LOOPENTRY)
|
||||
cx->regs().pc = GetNextPc(pc);
|
||||
|
||||
bool ok = Interpret(cx, br->entryfp(), JSINTERP_BAILOUT);
|
||||
|
||||
if (ok)
|
||||
|
Loading…
Reference in New Issue
Block a user