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