Backed out changeset ced35810adb2 (bug 838014). Again.

This commit is contained in:
Steve Fink 2013-02-07 17:06:42 -08:00
parent 28c82bacd9
commit 57bee78e2f
7 changed files with 22 additions and 21 deletions

View File

@ -1508,7 +1508,9 @@ class ValueOperations
JSValueType extractNonDoubleType() const { return value()->extractNonDoubleType(); }
#ifdef DEBUG
JSWhyMagic whyMagic() const { return value()->whyMagic(); }
#endif
};
/*

View File

@ -1717,7 +1717,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());
RootedValue result(cx, Int32Value(numActualArgs));
Value result = Int32Value(numActualArgs);
{
AssertCompartmentUnchanged pcc(cx);
IonContext ictx(cx, cx->compartment, NULL);
@ -1725,7 +1725,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.address());
enter(jitcode, maxArgc, maxArgv, fp, calleeToken, &result);
}
if (result.isMagic() && result.whyMagic() == JS_ION_BAILOUT) {
@ -1853,12 +1853,12 @@ ion::FastInvoke(JSContext *cx, HandleFunction fun, CallArgsList &args)
EnterIonCode enter = cx->compartment->ionCompartment()->enterJIT();
void *calleeToken = CalleeToToken(fun);
RootedValue result(cx, Int32Value(args.length()));
Value result = 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.address());
enter(jitcode, args.length() + 1, args.array() - 1, fp, calleeToken, &result);
args.setInactive();
if (clearCallingIntoIon)

View File

@ -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, HandlePropertyName name)
const Value &idval, PropertyName *name)
{
RootedObject holder(cx);
RootedShape shape(cx);
@ -1732,8 +1732,7 @@ 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)) {
RootedPropertyName name(cx, JSID_TO_ATOM(id)->asPropertyName());
if (!cache.attachGetProp(cx, ion, obj, idval, name))
if (!cache.attachGetProp(cx, ion, obj, idval, JSID_TO_ATOM(id)->asPropertyName()))
return false;
attachedStub = true;
}

View File

@ -374,7 +374,7 @@ class IonCacheGetElement : public IonCache
u.getelem.hasDenseStub = true;
}
bool attachGetProp(JSContext *cx, IonScript *ion, HandleObject obj, const Value &idval, HandlePropertyName name);
bool attachGetProp(JSContext *cx, IonScript *ion, HandleObject obj, const Value &idval, PropertyName *name);
bool attachDenseElement(JSContext *cx, IonScript *ion, JSObject *obj, const Value &idval);
};

View File

@ -295,7 +295,7 @@ TypeInferenceOracle::elementReadIsDenseNative(RawScript script, jsbytecode *pc)
}
bool
TypeInferenceOracle::elementReadIsTypedArray(RawScript script, jsbytecode *pc, int *arrayType)
TypeInferenceOracle::elementReadIsTypedArray(HandleScript script, jsbytecode *pc, int *arrayType)
{
if (!elementAccessIsTypedArray(script->analysis()->poppedTypes(pc, 1),
script->analysis()->poppedTypes(pc, 0),
@ -443,7 +443,7 @@ TypeInferenceOracle::elementWriteNeedsDoubleConversion(UnrootedScript script, js
}
bool
TypeInferenceOracle::elementWriteHasExtraIndexedProperty(RawScript script, jsbytecode *pc)
TypeInferenceOracle::elementWriteHasExtraIndexedProperty(UnrootedScript script, jsbytecode *pc)
{
StackTypeSet *obj = script->analysis()->poppedTypes(pc, 2);
@ -454,7 +454,7 @@ TypeInferenceOracle::elementWriteHasExtraIndexedProperty(RawScript script, jsbyt
}
bool
TypeInferenceOracle::elementWriteIsPacked(RawScript script, jsbytecode *pc)
TypeInferenceOracle::elementWriteIsPacked(UnrootedScript script, jsbytecode *pc)
{
StackTypeSet *types = script->analysis()->poppedTypes(pc, 2);
return !types->hasObjectFlags(cx, types::OBJECT_FLAG_NON_PACKED);
@ -581,7 +581,7 @@ TypeInferenceOracle::canInlineCall(HandleScript caller, jsbytecode *pc)
}
bool
TypeInferenceOracle::canEnterInlinedFunction(RawScript caller, jsbytecode *pc, RawFunction target)
TypeInferenceOracle::canEnterInlinedFunction(HandleScript caller, jsbytecode *pc, JSFunction *target)
{
AssertCanGC();
RootedScript targetScript(cx, target->nonLazyScript());

View File

@ -85,7 +85,7 @@ class TypeOracle
virtual bool elementReadIsDenseNative(RawScript script, jsbytecode *pc) {
return false;
}
virtual bool elementReadIsTypedArray(RawScript script, jsbytecode *pc, int *arrayType) {
virtual bool elementReadIsTypedArray(HandleScript script, jsbytecode *pc, int *arrayType) {
return false;
}
virtual bool elementReadIsString(UnrootedScript script, jsbytecode *pc) {
@ -116,10 +116,10 @@ class TypeOracle
virtual bool elementWriteNeedsDoubleConversion(UnrootedScript script, jsbytecode *pc) {
return false;
}
virtual bool elementWriteHasExtraIndexedProperty(RawScript script, jsbytecode *pc) {
virtual bool elementWriteHasExtraIndexedProperty(UnrootedScript script, jsbytecode *pc) {
return false;
}
virtual bool elementWriteIsPacked(RawScript script, jsbytecode *pc) {
virtual bool elementWriteIsPacked(UnrootedScript script, jsbytecode *pc) {
return false;
}
virtual bool elementAccessIsDenseNative(types::StackTypeSet *obj, types::StackTypeSet *id) {
@ -162,7 +162,7 @@ class TypeOracle
virtual bool canInlineCall(HandleScript caller, jsbytecode *pc) {
return false;
}
virtual bool canEnterInlinedFunction(RawScript caller, jsbytecode *pc, RawFunction callee) {
virtual bool canEnterInlinedFunction(HandleScript caller, jsbytecode *pc, JSFunction *callee) {
return false;
}
@ -251,7 +251,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(RawScript script, jsbytecode *pc, int *atype);
bool elementReadIsTypedArray(HandleScript script, jsbytecode *pc, int *atype);
bool elementReadIsString(UnrootedScript script, jsbytecode *pc);
bool elementReadShouldAlwaysLoadDoubles(UnrootedScript script, jsbytecode *pc);
bool elementReadHasExtraIndexedProperty(UnrootedScript, jsbytecode *pc);
@ -262,8 +262,8 @@ class TypeInferenceOracle : public TypeOracle
bool elementWriteIsTypedArray(RawScript script, jsbytecode *pc, int *arrayType);
bool elementAccessIsTypedArray(types::StackTypeSet *obj, types::StackTypeSet *id, int *arrayType);
bool elementWriteNeedsDoubleConversion(UnrootedScript script, jsbytecode *pc);
bool elementWriteHasExtraIndexedProperty(RawScript script, jsbytecode *pc);
bool elementWriteIsPacked(RawScript script, jsbytecode *pc);
bool elementWriteHasExtraIndexedProperty(UnrootedScript script, jsbytecode *pc);
bool elementWriteIsPacked(UnrootedScript script, jsbytecode *pc);
bool arrayResultShouldHaveDoubleConversion(UnrootedScript script, jsbytecode *pc);
bool setElementHasWrittenHoles(UnrootedScript script, jsbytecode *pc);
bool propertyWriteCanSpecialize(UnrootedScript script, jsbytecode *pc);
@ -272,7 +272,7 @@ class TypeInferenceOracle : public TypeOracle
MIRType elementWrite(UnrootedScript script, jsbytecode *pc);
bool canInlineCalls();
bool canInlineCall(HandleScript caller, jsbytecode *pc);
bool canEnterInlinedFunction(RawScript caller, jsbytecode *pc, RawFunction callee);
bool canEnterInlinedFunction(HandleScript caller, jsbytecode *pc, JSFunction *callee);
types::StackTypeSet *aliasedVarBarrier(UnrootedScript script, jsbytecode *pc, types::StackTypeSet **barrier);
LazyArgumentsType isArgumentObject(types::StackTypeSet *obj);

View File

@ -112,7 +112,7 @@ class JS_PUBLIC_API(AutoGCRooter) {
enum {
JSVAL = -1, /* js::AutoValueRooter */
VALARRAY = -2, /* js::AutoValueArray */
VALARRAY = -2, /* js::AutoValueArrayRooter */
PARSER = -3, /* js::frontend::Parser */
SHAPEVECTOR = -4, /* js::AutoShapeVector */
IDARRAY = -6, /* js::AutoIdArray */