mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 838014 - Rooting in ionmonkey. r=terrence
--HG-- extra : rebase_source : 02e1ababcd36ea3e044ab3d2dd96f89816046a47
This commit is contained in:
parent
5e26ad3163
commit
9b294957fc
@ -1571,7 +1571,7 @@ EnterIon(JSContext *cx, StackFrame *fp, void *jitcode)
|
||||
|
||||
// Caller must construct |this| before invoking the Ion function.
|
||||
JS_ASSERT_IF(fp->isConstructing(), fp->functionThis().isObject());
|
||||
Value result = Int32Value(numActualArgs);
|
||||
RootedValue result(cx, Int32Value(numActualArgs));
|
||||
{
|
||||
AssertCompartmentUnchanged pcc(cx);
|
||||
IonContext ictx(cx, cx->compartment, NULL);
|
||||
@ -1579,7 +1579,7 @@ EnterIon(JSContext *cx, StackFrame *fp, void *jitcode)
|
||||
JSAutoResolveFlags rf(cx, RESOLVE_INFER);
|
||||
AutoFlushInhibitor afi(cx->compartment->ionCompartment());
|
||||
// Single transition point from Interpreter to Ion.
|
||||
enter(jitcode, maxArgc, maxArgv, fp, calleeToken, &result);
|
||||
enter(jitcode, maxArgc, maxArgv, fp, calleeToken, result.address());
|
||||
}
|
||||
|
||||
if (result.isMagic() && result.whyMagic() == JS_ION_BAILOUT) {
|
||||
@ -1707,12 +1707,12 @@ ion::FastInvoke(JSContext *cx, HandleFunction fun, CallArgsList &args)
|
||||
EnterIonCode enter = cx->compartment->ionCompartment()->enterJIT();
|
||||
void *calleeToken = CalleeToToken(fun);
|
||||
|
||||
Value result = Int32Value(args.length());
|
||||
RootedValue result(cx, Int32Value(args.length()));
|
||||
JS_ASSERT(args.length() >= fun->nargs);
|
||||
|
||||
JSAutoResolveFlags rf(cx, RESOLVE_INFER);
|
||||
args.setActive();
|
||||
enter(jitcode, args.length() + 1, args.array() - 1, fp, calleeToken, &result);
|
||||
enter(jitcode, args.length() + 1, args.array() - 1, fp, calleeToken, result.address());
|
||||
args.setInactive();
|
||||
|
||||
if (clearCallingIntoIon)
|
||||
|
@ -1566,7 +1566,7 @@ js::ion::SetPropertyCache(JSContext *cx, size_t cacheIndex, HandleObject obj, Ha
|
||||
|
||||
bool
|
||||
IonCacheGetElement::attachGetProp(JSContext *cx, IonScript *ion, HandleObject obj,
|
||||
const Value &idval, PropertyName *name)
|
||||
const Value &idval, HandlePropertyName name)
|
||||
{
|
||||
RootedObject holder(cx);
|
||||
RootedShape shape(cx);
|
||||
@ -1732,7 +1732,8 @@ js::ion::GetElementCache(JSContext *cx, size_t cacheIndex, HandleObject obj, Han
|
||||
|
||||
uint32_t dummy;
|
||||
if (idval.isString() && JSID_IS_ATOM(id) && !JSID_TO_ATOM(id)->isIndex(&dummy)) {
|
||||
if (!cache.attachGetProp(cx, ion, obj, idval, JSID_TO_ATOM(id)->asPropertyName()))
|
||||
RootedPropertyName name(cx, JSID_TO_ATOM(id)->asPropertyName());
|
||||
if (!cache.attachGetProp(cx, ion, obj, idval, name))
|
||||
return false;
|
||||
attachedStub = true;
|
||||
}
|
||||
|
@ -374,7 +374,7 @@ class IonCacheGetElement : public IonCache
|
||||
u.getelem.hasDenseStub = true;
|
||||
}
|
||||
|
||||
bool attachGetProp(JSContext *cx, IonScript *ion, HandleObject obj, const Value &idval, PropertyName *name);
|
||||
bool attachGetProp(JSContext *cx, IonScript *ion, HandleObject obj, const Value &idval, HandlePropertyName name);
|
||||
bool attachDenseElement(JSContext *cx, IonScript *ion, JSObject *obj, const Value &idval);
|
||||
};
|
||||
|
||||
|
@ -303,11 +303,11 @@ TypeInferenceOracle::elementReadIsDenseNative(RawScript script, jsbytecode *pc)
|
||||
}
|
||||
|
||||
bool
|
||||
TypeInferenceOracle::elementReadIsTypedArray(HandleScript script, jsbytecode *pc, int *arrayType)
|
||||
TypeInferenceOracle::elementReadIsTypedArray(RawScript script, jsbytecode *pc, int *arrayType)
|
||||
{
|
||||
// Check whether the object is a typed array and index is int32 or double.
|
||||
StackTypeSet *obj = script->analysis()->poppedTypes(pc, 1);
|
||||
StackTypeSet *id = DropUnrooted(script)->analysis()->poppedTypes(pc, 0);
|
||||
StackTypeSet *id = script->analysis()->poppedTypes(pc, 0);
|
||||
|
||||
JSValueType idType = id->getKnownTypeTag();
|
||||
if (idType != JSVAL_TYPE_INT32 && idType != JSVAL_TYPE_DOUBLE)
|
||||
@ -447,7 +447,7 @@ TypeInferenceOracle::elementWriteNeedsDoubleConversion(UnrootedScript script, js
|
||||
}
|
||||
|
||||
bool
|
||||
TypeInferenceOracle::elementWriteHasExtraIndexedProperty(UnrootedScript script, jsbytecode *pc)
|
||||
TypeInferenceOracle::elementWriteHasExtraIndexedProperty(RawScript script, jsbytecode *pc)
|
||||
{
|
||||
StackTypeSet *obj = script->analysis()->poppedTypes(pc, 2);
|
||||
|
||||
@ -458,7 +458,7 @@ TypeInferenceOracle::elementWriteHasExtraIndexedProperty(UnrootedScript script,
|
||||
}
|
||||
|
||||
bool
|
||||
TypeInferenceOracle::elementWriteIsPacked(UnrootedScript script, jsbytecode *pc)
|
||||
TypeInferenceOracle::elementWriteIsPacked(RawScript script, jsbytecode *pc)
|
||||
{
|
||||
StackTypeSet *types = script->analysis()->poppedTypes(pc, 2);
|
||||
return !types->hasObjectFlags(cx, types::OBJECT_FLAG_NON_PACKED);
|
||||
@ -585,7 +585,7 @@ TypeInferenceOracle::canInlineCall(HandleScript caller, jsbytecode *pc)
|
||||
}
|
||||
|
||||
bool
|
||||
TypeInferenceOracle::canEnterInlinedFunction(HandleScript caller, jsbytecode *pc, JSFunction *target)
|
||||
TypeInferenceOracle::canEnterInlinedFunction(RawScript caller, jsbytecode *pc, RawFunction target)
|
||||
{
|
||||
AssertCanGC();
|
||||
RootedScript targetScript(cx, target->nonLazyScript());
|
||||
|
@ -84,7 +84,7 @@ class TypeOracle
|
||||
virtual bool elementReadIsDenseNative(RawScript script, jsbytecode *pc) {
|
||||
return false;
|
||||
}
|
||||
virtual bool elementReadIsTypedArray(HandleScript script, jsbytecode *pc, int *arrayType) {
|
||||
virtual bool elementReadIsTypedArray(RawScript script, jsbytecode *pc, int *arrayType) {
|
||||
return false;
|
||||
}
|
||||
virtual bool elementReadIsString(UnrootedScript script, jsbytecode *pc) {
|
||||
@ -115,10 +115,10 @@ class TypeOracle
|
||||
virtual bool elementWriteNeedsDoubleConversion(UnrootedScript script, jsbytecode *pc) {
|
||||
return false;
|
||||
}
|
||||
virtual bool elementWriteHasExtraIndexedProperty(UnrootedScript script, jsbytecode *pc) {
|
||||
virtual bool elementWriteHasExtraIndexedProperty(RawScript script, jsbytecode *pc) {
|
||||
return false;
|
||||
}
|
||||
virtual bool elementWriteIsPacked(UnrootedScript script, jsbytecode *pc) {
|
||||
virtual bool elementWriteIsPacked(RawScript script, jsbytecode *pc) {
|
||||
return false;
|
||||
}
|
||||
virtual bool arrayResultShouldHaveDoubleConversion(UnrootedScript script, jsbytecode *pc) {
|
||||
@ -155,7 +155,7 @@ class TypeOracle
|
||||
virtual bool canInlineCall(HandleScript caller, jsbytecode *pc) {
|
||||
return false;
|
||||
}
|
||||
virtual bool canEnterInlinedFunction(HandleScript caller, jsbytecode *pc, JSFunction *callee) {
|
||||
virtual bool canEnterInlinedFunction(RawScript caller, jsbytecode *pc, RawFunction callee) {
|
||||
return false;
|
||||
}
|
||||
|
||||
@ -244,7 +244,7 @@ class TypeInferenceOracle : public TypeOracle
|
||||
bool inObjectIsDenseNativeWithoutExtraIndexedProperties(HandleScript script, jsbytecode *pc);
|
||||
bool inArrayIsPacked(UnrootedScript script, jsbytecode *pc);
|
||||
bool elementReadIsDenseNative(RawScript script, jsbytecode *pc);
|
||||
bool elementReadIsTypedArray(HandleScript script, jsbytecode *pc, int *atype);
|
||||
bool elementReadIsTypedArray(RawScript script, jsbytecode *pc, int *atype);
|
||||
bool elementReadIsString(UnrootedScript script, jsbytecode *pc);
|
||||
bool elementReadShouldAlwaysLoadDoubles(UnrootedScript script, jsbytecode *pc);
|
||||
bool elementReadHasExtraIndexedProperty(UnrootedScript, jsbytecode *pc);
|
||||
@ -253,8 +253,8 @@ class TypeInferenceOracle : public TypeOracle
|
||||
bool elementWriteIsDenseNative(HandleScript script, jsbytecode *pc);
|
||||
bool elementWriteIsTypedArray(RawScript script, jsbytecode *pc, int *arrayType);
|
||||
bool elementWriteNeedsDoubleConversion(UnrootedScript script, jsbytecode *pc);
|
||||
bool elementWriteHasExtraIndexedProperty(UnrootedScript script, jsbytecode *pc);
|
||||
bool elementWriteIsPacked(UnrootedScript script, jsbytecode *pc);
|
||||
bool elementWriteHasExtraIndexedProperty(RawScript script, jsbytecode *pc);
|
||||
bool elementWriteIsPacked(RawScript script, jsbytecode *pc);
|
||||
bool arrayResultShouldHaveDoubleConversion(UnrootedScript script, jsbytecode *pc);
|
||||
bool setElementHasWrittenHoles(UnrootedScript script, jsbytecode *pc);
|
||||
bool propertyWriteCanSpecialize(UnrootedScript script, jsbytecode *pc);
|
||||
@ -263,7 +263,7 @@ class TypeInferenceOracle : public TypeOracle
|
||||
MIRType elementWrite(UnrootedScript script, jsbytecode *pc);
|
||||
bool canInlineCalls();
|
||||
bool canInlineCall(HandleScript caller, jsbytecode *pc);
|
||||
bool canEnterInlinedFunction(HandleScript caller, jsbytecode *pc, JSFunction *callee);
|
||||
bool canEnterInlinedFunction(RawScript caller, jsbytecode *pc, RawFunction callee);
|
||||
types::StackTypeSet *aliasedVarBarrier(UnrootedScript script, jsbytecode *pc, types::StackTypeSet **barrier);
|
||||
|
||||
LazyArgumentsType isArgumentObject(types::StackTypeSet *obj);
|
||||
|
@ -112,7 +112,7 @@ class JS_PUBLIC_API(AutoGCRooter) {
|
||||
|
||||
enum {
|
||||
JSVAL = -1, /* js::AutoValueRooter */
|
||||
VALARRAY = -2, /* js::AutoValueArrayRooter */
|
||||
VALARRAY = -2, /* js::AutoValueArray */
|
||||
PARSER = -3, /* js::frontend::Parser */
|
||||
SHAPEVECTOR = -4, /* js::AutoShapeVector */
|
||||
IDARRAY = -6, /* js::AutoIdArray */
|
||||
|
Loading…
Reference in New Issue
Block a user