mirror of
https://github.com/mozilla/gecko-dev.git
synced 2025-02-03 12:35:58 +00:00
Bug 922134 - Remove unused JSContext parameter from MIR infer() operations, r=jandem.
This commit is contained in:
parent
fabbda59f5
commit
e2ce995d6f
@ -3102,7 +3102,7 @@ IonBuilder::processCondSwitchCase(CFGState &state)
|
||||
MDefinition *caseOperand = current->pop();
|
||||
MDefinition *switchOperand = current->peek(-1);
|
||||
MCompare *cmpResult = MCompare::New(switchOperand, caseOperand, JSOP_STRICTEQ);
|
||||
cmpResult->infer(cx, inspector, pc);
|
||||
cmpResult->infer(inspector, pc);
|
||||
JS_ASSERT(!cmpResult->isEffectful());
|
||||
current->add(cmpResult);
|
||||
current->end(MTest::New(cmpResult, bodyBlock, caseBlock));
|
||||
@ -3215,7 +3215,7 @@ IonBuilder::jsop_andor(JSOp op)
|
||||
MTest *test = (op == JSOP_AND)
|
||||
? MTest::New(lhs, evalRhs, join)
|
||||
: MTest::New(lhs, join, evalRhs);
|
||||
test->infer(cx);
|
||||
test->infer();
|
||||
current->end(test);
|
||||
|
||||
if (!cfgStack_.append(CFGState::AndOr(joinStart, join)))
|
||||
@ -5332,7 +5332,7 @@ IonBuilder::jsop_compare(JSOp op)
|
||||
current->add(ins);
|
||||
current->push(ins);
|
||||
|
||||
ins->infer(cx, inspector, pc);
|
||||
ins->infer(inspector, pc);
|
||||
|
||||
if (ins->isEffectful() && !resumeAfter(ins))
|
||||
return false;
|
||||
@ -7676,7 +7676,7 @@ IonBuilder::jsop_not()
|
||||
MNot *ins = new MNot(value);
|
||||
current->add(ins);
|
||||
current->push(ins);
|
||||
ins->infer(cx);
|
||||
ins->infer();
|
||||
return true;
|
||||
}
|
||||
|
||||
@ -9194,7 +9194,7 @@ IonBuilder::jsop_typeof()
|
||||
MDefinition *input = current->pop();
|
||||
MTypeOf *ins = MTypeOf::New(input, input->type());
|
||||
|
||||
ins->infer(cx);
|
||||
ins->infer();
|
||||
|
||||
current->add(ins);
|
||||
current->push(ins);
|
||||
|
@ -198,7 +198,7 @@ MDefinition::analyzeEdgeCasesBackward()
|
||||
}
|
||||
|
||||
static bool
|
||||
MaybeEmulatesUndefined(JSContext *cx, MDefinition *op)
|
||||
MaybeEmulatesUndefined(MDefinition *op)
|
||||
{
|
||||
if (!op->mightBeType(MIRType_Object))
|
||||
return false;
|
||||
@ -211,7 +211,7 @@ MaybeEmulatesUndefined(JSContext *cx, MDefinition *op)
|
||||
}
|
||||
|
||||
static bool
|
||||
MaybeCallable(JSContext *cx, MDefinition *op)
|
||||
MaybeCallable(MDefinition *op)
|
||||
{
|
||||
if (!op->mightBeType(MIRType_Object))
|
||||
return false;
|
||||
@ -224,11 +224,11 @@ MaybeCallable(JSContext *cx, MDefinition *op)
|
||||
}
|
||||
|
||||
void
|
||||
MTest::infer(JSContext *cx)
|
||||
MTest::infer()
|
||||
{
|
||||
JS_ASSERT(operandMightEmulateUndefined());
|
||||
|
||||
if (!MaybeEmulatesUndefined(cx, getOperand(0)))
|
||||
if (!MaybeEmulatesUndefined(getOperand(0)))
|
||||
markOperandCantEmulateUndefined();
|
||||
}
|
||||
|
||||
@ -1555,7 +1555,7 @@ ObjectOrSimplePrimitive(MDefinition *op)
|
||||
}
|
||||
|
||||
static bool
|
||||
CanDoValueBitwiseCmp(JSContext *cx, MDefinition *lhs, MDefinition *rhs, bool looseEq)
|
||||
CanDoValueBitwiseCmp(MDefinition *lhs, MDefinition *rhs, bool looseEq)
|
||||
{
|
||||
// Only primitive (not double/string) or objects are supported.
|
||||
// I.e. Undefined/Null/Boolean/Int32 and Object
|
||||
@ -1563,7 +1563,7 @@ CanDoValueBitwiseCmp(JSContext *cx, MDefinition *lhs, MDefinition *rhs, bool loo
|
||||
return false;
|
||||
|
||||
// Objects that emulate undefined are not supported.
|
||||
if (MaybeEmulatesUndefined(cx, lhs) || MaybeEmulatesUndefined(cx, rhs))
|
||||
if (MaybeEmulatesUndefined(lhs) || MaybeEmulatesUndefined(rhs))
|
||||
return false;
|
||||
|
||||
// In the loose comparison more values could be the same,
|
||||
@ -1671,11 +1671,11 @@ MBinaryInstruction::tryUseUnsignedOperands()
|
||||
}
|
||||
|
||||
void
|
||||
MCompare::infer(JSContext *cx, BaselineInspector *inspector, jsbytecode *pc)
|
||||
MCompare::infer(BaselineInspector *inspector, jsbytecode *pc)
|
||||
{
|
||||
JS_ASSERT(operandMightEmulateUndefined());
|
||||
|
||||
if (!MaybeEmulatesUndefined(cx, getOperand(0)) && !MaybeEmulatesUndefined(cx, getOperand(1)))
|
||||
if (!MaybeEmulatesUndefined(getOperand(0)) && !MaybeEmulatesUndefined(getOperand(1)))
|
||||
markNoOperandEmulatesUndefined();
|
||||
|
||||
MIRType lhs = getOperand(0)->type();
|
||||
@ -1780,7 +1780,7 @@ MCompare::infer(JSContext *cx, BaselineInspector *inspector, jsbytecode *pc)
|
||||
}
|
||||
|
||||
// Determine if we can do the compare based on a quick value check.
|
||||
if (!relationalEq && CanDoValueBitwiseCmp(cx, getOperand(0), getOperand(1), looseEq)) {
|
||||
if (!relationalEq && CanDoValueBitwiseCmp(getOperand(0), getOperand(1), looseEq)) {
|
||||
compareType_ = Compare_Value;
|
||||
return;
|
||||
}
|
||||
@ -1874,11 +1874,11 @@ MTypeOf::foldsTo(bool useValueNumbers)
|
||||
}
|
||||
|
||||
void
|
||||
MTypeOf::infer(JSContext *cx)
|
||||
MTypeOf::infer()
|
||||
{
|
||||
JS_ASSERT(inputMaybeCallableOrEmulatesUndefined());
|
||||
|
||||
if (!MaybeEmulatesUndefined(cx, input()) && !MaybeCallable(cx, input()))
|
||||
if (!MaybeEmulatesUndefined(input()) && !MaybeCallable(input()))
|
||||
markInputNotCallableOrEmulatesUndefined();
|
||||
}
|
||||
|
||||
@ -2321,11 +2321,11 @@ MCompare::foldsTo(bool useValueNumbers)
|
||||
}
|
||||
|
||||
void
|
||||
MNot::infer(JSContext *cx)
|
||||
MNot::infer()
|
||||
{
|
||||
JS_ASSERT(operandMightEmulateUndefined());
|
||||
|
||||
if (!MaybeEmulatesUndefined(cx, getOperand(0)))
|
||||
if (!MaybeEmulatesUndefined(getOperand(0)))
|
||||
markOperandCantEmulateUndefined();
|
||||
}
|
||||
|
||||
|
@ -1280,7 +1280,7 @@ class MTest
|
||||
AliasSet getAliasSet() const {
|
||||
return AliasSet::None();
|
||||
}
|
||||
void infer(JSContext *cx);
|
||||
void infer();
|
||||
MDefinition *foldsTo(bool useValueNumbers);
|
||||
|
||||
void markOperandCantEmulateUndefined() {
|
||||
@ -2138,7 +2138,7 @@ class MCompare
|
||||
bool evaluateConstantOperands(bool *result);
|
||||
MDefinition *foldsTo(bool useValueNumbers);
|
||||
|
||||
void infer(JSContext *cx, BaselineInspector *inspector, jsbytecode *pc);
|
||||
void infer(BaselineInspector *inspector, jsbytecode *pc);
|
||||
CompareType compareType() const {
|
||||
return compareType_;
|
||||
}
|
||||
@ -3018,7 +3018,7 @@ class MTypeOf
|
||||
}
|
||||
|
||||
MDefinition *foldsTo(bool useValueNumbers);
|
||||
void infer(JSContext *cx);
|
||||
void infer();
|
||||
|
||||
bool inputMaybeCallableOrEmulatesUndefined() const {
|
||||
return inputMaybeCallableOrEmulatesUndefined_;
|
||||
@ -5032,7 +5032,7 @@ class MNot
|
||||
|
||||
INSTRUCTION_HEADER(Not);
|
||||
|
||||
void infer(JSContext *cx);
|
||||
void infer();
|
||||
MDefinition *foldsTo(bool useValueNumbers);
|
||||
|
||||
void markOperandCantEmulateUndefined() {
|
||||
|
Loading…
x
Reference in New Issue
Block a user