mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 958672 - Remove argslot from MCall LIR. r=h4writer
This commit is contained in:
parent
a5be4c554b
commit
ee63e44158
@ -1004,17 +1004,9 @@ class LStackArgV : public LInstructionHelper<0, BOX_PIECES, 0>
|
||||
template <size_t Defs, size_t Operands, size_t Temps>
|
||||
class LJSCallInstructionHelper : public LCallInstructionHelper<Defs, Operands, Temps>
|
||||
{
|
||||
// Slot below which %esp should be adjusted to make the call.
|
||||
// Zero for a function without arguments.
|
||||
uint32_t argslot_;
|
||||
|
||||
public:
|
||||
LJSCallInstructionHelper(uint32_t argslot)
|
||||
: argslot_(argslot)
|
||||
{ }
|
||||
|
||||
uint32_t argslot() const {
|
||||
return argslot_;
|
||||
return mir()->numStackArgs();
|
||||
}
|
||||
MCall *mir() const {
|
||||
return this->mir_->toCall();
|
||||
@ -1039,8 +1031,6 @@ class LJSCallInstructionHelper : public LCallInstructionHelper<Defs, Operands, T
|
||||
uint32_t numActualArgs() const {
|
||||
return mir()->numActualArgs();
|
||||
}
|
||||
|
||||
typedef LJSCallInstructionHelper<Defs, Operands, Temps> JSCallHelper;
|
||||
};
|
||||
|
||||
// Generates a polymorphic callsite, wherein the function being called is
|
||||
@ -1050,9 +1040,8 @@ class LCallGeneric : public LJSCallInstructionHelper<BOX_PIECES, 1, 2>
|
||||
public:
|
||||
LIR_HEADER(CallGeneric)
|
||||
|
||||
LCallGeneric(const LAllocation &func, uint32_t argslot,
|
||||
const LDefinition &nargsreg, const LDefinition &tmpobjreg)
|
||||
: JSCallHelper(argslot)
|
||||
LCallGeneric(const LAllocation &func, const LDefinition &nargsreg,
|
||||
const LDefinition &tmpobjreg)
|
||||
{
|
||||
setOperand(0, func);
|
||||
setTemp(0, nargsreg);
|
||||
@ -1076,8 +1065,7 @@ class LCallKnown : public LJSCallInstructionHelper<BOX_PIECES, 1, 1>
|
||||
public:
|
||||
LIR_HEADER(CallKnown)
|
||||
|
||||
LCallKnown(const LAllocation &func, uint32_t argslot, const LDefinition &tmpobjreg)
|
||||
: JSCallHelper(argslot)
|
||||
LCallKnown(const LAllocation &func, const LDefinition &tmpobjreg)
|
||||
{
|
||||
setOperand(0, func);
|
||||
setTemp(0, tmpobjreg);
|
||||
@ -1097,10 +1085,8 @@ class LCallNative : public LJSCallInstructionHelper<BOX_PIECES, 0, 4>
|
||||
public:
|
||||
LIR_HEADER(CallNative)
|
||||
|
||||
LCallNative(uint32_t argslot,
|
||||
const LDefinition &argContext, const LDefinition &argUintN,
|
||||
LCallNative(const LDefinition &argContext, const LDefinition &argUintN,
|
||||
const LDefinition &argVp, const LDefinition &tmpreg)
|
||||
: JSCallHelper(argslot)
|
||||
{
|
||||
// Registers used for callWithABI().
|
||||
setTemp(0, argContext);
|
||||
@ -1131,10 +1117,8 @@ class LCallDOMNative : public LJSCallInstructionHelper<BOX_PIECES, 0, 4>
|
||||
public:
|
||||
LIR_HEADER(CallDOMNative)
|
||||
|
||||
LCallDOMNative(uint32_t argslot,
|
||||
const LDefinition &argJSContext, const LDefinition &argObj,
|
||||
LCallDOMNative(const LDefinition &argJSContext, const LDefinition &argObj,
|
||||
const LDefinition &argPrivate, const LDefinition &argArgs)
|
||||
: JSCallHelper(argslot)
|
||||
{
|
||||
setTemp(0, argJSContext);
|
||||
setTemp(1, argObj);
|
||||
|
@ -404,7 +404,6 @@ LIRGenerator::visitCall(MCall *call)
|
||||
return false;
|
||||
|
||||
// Height of the current argument vector.
|
||||
uint32_t argslot = call->numStackArgs();
|
||||
JSFunction *target = call->getSingleTarget();
|
||||
|
||||
// Call DOM functions.
|
||||
@ -416,10 +415,9 @@ LIRGenerator::visitCall(MCall *call)
|
||||
GetTempRegForIntArg(2, 0, &privReg);
|
||||
mozilla::DebugOnly<bool> ok = GetTempRegForIntArg(3, 0, &argsReg);
|
||||
MOZ_ASSERT(ok, "How can we not have four temp registers?");
|
||||
LCallDOMNative *lir = new(alloc()) LCallDOMNative(argslot, tempFixed(cxReg),
|
||||
tempFixed(objReg), tempFixed(privReg),
|
||||
tempFixed(argsReg));
|
||||
return (defineReturn(lir, call) && assignSafepoint(lir, call));
|
||||
LCallDOMNative *lir = new(alloc()) LCallDOMNative(tempFixed(cxReg), tempFixed(objReg),
|
||||
tempFixed(privReg), tempFixed(argsReg));
|
||||
return defineReturn(lir, call) && assignSafepoint(lir, call);
|
||||
}
|
||||
|
||||
// Call known functions.
|
||||
@ -435,21 +433,20 @@ LIRGenerator::visitCall(MCall *call)
|
||||
mozilla::DebugOnly<bool> ok = GetTempRegForIntArg(3, 0, &tmpReg);
|
||||
MOZ_ASSERT(ok, "How can we not have four temp registers?");
|
||||
|
||||
LCallNative *lir = new(alloc()) LCallNative(argslot, tempFixed(cxReg),
|
||||
tempFixed(numReg),
|
||||
tempFixed(vpReg),
|
||||
tempFixed(tmpReg));
|
||||
LCallNative *lir = new(alloc()) LCallNative(tempFixed(cxReg), tempFixed(numReg),
|
||||
tempFixed(vpReg), tempFixed(tmpReg));
|
||||
return (defineReturn(lir, call) && assignSafepoint(lir, call));
|
||||
}
|
||||
|
||||
LCallKnown *lir = new(alloc()) LCallKnown(useFixed(call->getFunction(), CallTempReg0),
|
||||
argslot, tempFixed(CallTempReg2));
|
||||
return (defineReturn(lir, call) && assignSafepoint(lir, call));
|
||||
tempFixed(CallTempReg2));
|
||||
return defineReturn(lir, call) && assignSafepoint(lir, call);
|
||||
}
|
||||
|
||||
// Call anything, using the most generic code.
|
||||
LCallGeneric *lir = new(alloc()) LCallGeneric(useFixed(call->getFunction(), CallTempReg0),
|
||||
argslot, tempFixed(ArgumentsRectifierReg), tempFixed(CallTempReg2));
|
||||
tempFixed(ArgumentsRectifierReg),
|
||||
tempFixed(CallTempReg2));
|
||||
return defineReturn(lir, call) && assignSafepoint(lir, call);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user