mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 853394 - Enable ParallelArray tests, fix test failures. r=djvj
This commit is contained in:
parent
eedb10f1f3
commit
304b69accc
@ -5351,6 +5351,9 @@ TryAttachCallStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script, JSO
|
||||
if (!calleeScript->hasBaselineScript() && !calleeScript->hasIonScript())
|
||||
return true;
|
||||
|
||||
if (calleeScript->shouldCloneAtCallsite)
|
||||
return true;
|
||||
|
||||
// Check if this stub chain has already generalized scripted calls.
|
||||
if (stub->scriptedStubsAreGeneralized()) {
|
||||
IonSpew(IonSpew_BaselineIC, " Chain already has generalized scripted call stub!");
|
||||
@ -5415,6 +5418,28 @@ TryAttachCallStub(JSContext *cx, ICCall_Fallback *stub, HandleScript script, JSO
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
MaybeCloneFunctionAtCallsite(JSContext *cx, MutableHandleValue callee, HandleScript script,
|
||||
jsbytecode *pc)
|
||||
{
|
||||
RootedFunction fun(cx);
|
||||
if (!IsFunctionObject(callee, fun.address()))
|
||||
return true;
|
||||
|
||||
if (!fun->hasScript() || !fun->nonLazyScript()->shouldCloneAtCallsite)
|
||||
return true;
|
||||
|
||||
if (!cx->typeInferenceEnabled())
|
||||
return true;
|
||||
|
||||
fun = CloneFunctionAtCallsite(cx, fun, script, pc);
|
||||
if (!fun)
|
||||
return false;
|
||||
|
||||
callee.setObject(*fun);
|
||||
return true;
|
||||
}
|
||||
|
||||
static bool
|
||||
DoCallFallback(JSContext *cx, BaselineFrame *frame, ICCall_Fallback *stub, uint32_t argc,
|
||||
Value *vp, MutableHandleValue res)
|
||||
@ -5450,6 +5475,9 @@ DoCallFallback(JSContext *cx, BaselineFrame *frame, ICCall_Fallback *stub, uint3
|
||||
if (!TryAttachCallStub(cx, stub, script, op, argc, vp, constructing, newType))
|
||||
return false;
|
||||
|
||||
if (!MaybeCloneFunctionAtCallsite(cx, &callee, script, pc))
|
||||
return false;
|
||||
|
||||
if (op == JSOP_NEW) {
|
||||
if (!InvokeConstructor(cx, callee, argc, args, res.address()))
|
||||
return false;
|
||||
|
@ -25,6 +25,7 @@
|
||||
#include "jsworkers.h"
|
||||
|
||||
#ifdef JS_ION
|
||||
#include "ion/BaselineJIT.h"
|
||||
#include "ion/Ion.h"
|
||||
#include "ion/IonCompartment.h"
|
||||
#endif
|
||||
@ -2910,7 +2911,8 @@ TypeCompartment::addPendingRecompile(JSContext *cx, RawScript script, jsbytecode
|
||||
CancelOffThreadIonCompile(cx->compartment, script);
|
||||
|
||||
// Let the script warm up again before attempting another compile.
|
||||
script->resetUseCount();
|
||||
if (ion::IsBaselineEnabled(cx))
|
||||
script->resetUseCount();
|
||||
|
||||
if (script->hasIonScript())
|
||||
addPendingRecompile(cx, script->ionScript()->recompileInfo());
|
||||
|
@ -402,11 +402,7 @@ js::intrinsic_UnsafeSetElement(JSContext *cx, unsigned argc, Value *vp)
|
||||
static JSBool
|
||||
intrinsic_ParallelTestsShouldPass(JSContext *cx, unsigned argc, Value *vp)
|
||||
{
|
||||
//XXX: FIXME: disable parallel array tests for now on the BC branch.
|
||||
CallArgs args = CallArgsFromVp(argc, vp);
|
||||
args.rval().setBoolean(false);
|
||||
return true;
|
||||
|
||||
#if defined(JS_THREADSAFE) && defined(JS_ION)
|
||||
args.rval().setBoolean(ion::IsEnabled(cx) &&
|
||||
!ion::js_IonOptions.eagerCompilation);
|
||||
|
Loading…
Reference in New Issue
Block a user