mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 829175 - Allow reentering JM code if Ion was compiled for a different OSR point, r=dvander.
This commit is contained in:
parent
4a18b30019
commit
55949198c6
@ -937,7 +937,7 @@ MakeJITScript(JSContext *cx, HandleScript script)
|
|||||||
}
|
}
|
||||||
|
|
||||||
static inline bool
|
static inline bool
|
||||||
IonGetsFirstChance(JSContext *cx, JSScript *script, CompileRequest request)
|
IonGetsFirstChance(JSContext *cx, JSScript *script, jsbytecode *pc, CompileRequest request)
|
||||||
{
|
{
|
||||||
#ifdef JS_ION
|
#ifdef JS_ION
|
||||||
if (!ion::IsEnabled(cx))
|
if (!ion::IsEnabled(cx))
|
||||||
@ -960,6 +960,11 @@ IonGetsFirstChance(JSContext *cx, JSScript *script, CompileRequest request)
|
|||||||
if (script->hasIonScript() && script->ion->bailoutExpected())
|
if (script->hasIonScript() && script->ion->bailoutExpected())
|
||||||
return false;
|
return false;
|
||||||
|
|
||||||
|
// If we cannot enter Ion because it was compiled for OSR at a different PC,
|
||||||
|
// let JM take over until the PC is reached.
|
||||||
|
if (script->hasIonScript() && pc && script->ionScript()->osrPc() != pc)
|
||||||
|
return false;
|
||||||
|
|
||||||
// If ion compilation is pending or in progress on another thread, continue
|
// If ion compilation is pending or in progress on another thread, continue
|
||||||
// using JM until that compilation finishes.
|
// using JM until that compilation finishes.
|
||||||
if (script->ion == ION_COMPILING_SCRIPT)
|
if (script->ion == ION_COMPILING_SCRIPT)
|
||||||
@ -998,7 +1003,7 @@ mjit::CanMethodJIT(JSContext *cx, HandleScript script, jsbytecode *pc,
|
|||||||
return Compile_Skipped;
|
return Compile_Skipped;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (IonGetsFirstChance(cx, script, request))
|
if (IonGetsFirstChance(cx, script, pc, request))
|
||||||
return Compile_Skipped;
|
return Compile_Skipped;
|
||||||
|
|
||||||
if (script->hasMJITInfo()) {
|
if (script->hasMJITInfo()) {
|
||||||
|
Loading…
Reference in New Issue
Block a user