remove redundant Compiler::stackCall resultSize parameter

This commit is contained in:
Joshua Warner 2014-04-30 23:54:25 -06:00 committed by Joshua Warner
parent 1d466a800e
commit 8b1739dc0f
3 changed files with 19 additions and 22 deletions

View File

@ -91,7 +91,6 @@ class Compiler {
virtual Operand* stackCall(Operand* address,
unsigned flags,
TraceHandler* traceHandler,
unsigned resultSize,
ir::Type resultType,
unsigned argumentFootprint) = 0;

View File

@ -2497,13 +2497,19 @@ class MyCompiler: public Compiler {
virtual Operand* stackCall(Operand* address,
unsigned flags,
TraceHandler* traceHandler,
unsigned resultSize,
ir::Type resultType,
unsigned argumentFootprint)
{
Value* result = value(&c, resultType);
appendCall(&c, static_cast<Value*>(address), flags, traceHandler, result,
resultSize, c.stack, 0, argumentFootprint);
appendCall(&c,
static_cast<Value*>(address),
flags,
traceHandler,
result,
resultType.size(),
c.stack,
0,
argumentFootprint);
return result;
}

View File

@ -3162,9 +3162,12 @@ void compileSafePoint(MyThread* t, Compiler* c, Frame* frame) {
c->threadRegister());
}
Compiler::Operand*
compileDirectInvoke(MyThread* t, Frame* frame, object target, bool tailCall,
bool useThunk, unsigned rSize, avian::codegen::Promise* addressPromise)
Compiler::Operand* compileDirectInvoke(MyThread* t,
Frame* frame,
object target,
bool tailCall,
bool useThunk,
avian::codegen::Promise* addressPromise)
{
avian::codegen::Compiler* c = frame->c;
ir::Types types(TargetBytesPerWord);
@ -3199,7 +3202,6 @@ compileDirectInvoke(MyThread* t, Frame* frame, object target, bool tailCall,
c->promiseConstant(returnAddressPromise, types.address),
flags,
trace,
rSize,
operandTypeForFieldCode(t, methodReturnCode(t, target)),
methodParameterFootprint(t, target));
@ -3221,7 +3223,6 @@ compileDirectInvoke(MyThread* t, Frame* frame, object target, bool tailCall,
c->constant(defaultThunk(t), types.address),
flags,
frame->trace(target, traceFlags),
rSize,
operandTypeForFieldCode(t, methodReturnCode(t, target)),
methodParameterFootprint(t, target));
}
@ -3236,7 +3237,6 @@ compileDirectInvoke(MyThread* t, Frame* frame, object target, bool tailCall,
flags,
tailCall ? 0 : frame->trace
((methodFlags(t, target) & ACC_NATIVE) ? target : 0, 0),
rSize,
operandTypeForFieldCode(t, methodReturnCode(t, target)),
methodParameterFootprint(t, target));
}
@ -3269,20 +3269,16 @@ compileDirectInvoke(MyThread* t, Frame* frame, object target, bool tailCall)
object pointer = makePointer(t, p);
bc->calls = makeTriple(t, target, pointer, bc->calls);
result = compileDirectInvoke
(t, frame, target, tailCall, false, rSize, p);
result = compileDirectInvoke(t, frame, target, tailCall, false, p);
} else {
result = compileDirectInvoke
(t, frame, target, tailCall, true, rSize, 0);
result = compileDirectInvoke(t, frame, target, tailCall, true, 0);
}
} else if (unresolved(t, methodAddress(t, target))
or classNeedsInit(t, methodClass(t, target)))
{
result = compileDirectInvoke
(t, frame, target, tailCall, true, rSize, 0);
result = compileDirectInvoke(t, frame, target, tailCall, true, 0);
} else {
result = compileDirectInvoke
(t, frame, target, tailCall, false, rSize, 0);
result = compileDirectInvoke(t, frame, target, tailCall, false, 0);
}
}
@ -3332,7 +3328,6 @@ compileReferenceInvoke(MyThread* t, Frame* frame, Compiler::Operand* method,
(method,
tailCall ? Compiler::TailJump : 0,
frame->trace(0, 0),
rSize,
operandTypeForFieldCode(t, returnCode),
parameterFootprint);
@ -3383,7 +3378,6 @@ compileAbstractInvoke(MyThread* t, Frame* frame, Compiler::Operand* method,
(method,
tailCall ? Compiler::TailJump : 0,
frame->trace(0, 0),
rSize,
operandTypeForFieldCode(t, returnCode),
parameterFootprint);
@ -5055,7 +5049,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->peek(1, parameterFootprint - 1)),
tailCall ? Compiler::TailJump : 0,
frame->trace(0, 0),
rSize,
operandTypeForFieldCode(t, returnCode),
parameterFootprint);
@ -5164,7 +5157,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
offset),
tailCall ? Compiler::TailJump : 0,
frame->trace(0, 0),
rSize,
operandTypeForFieldCode(t, methodReturnCode(t, target)),
parameterFootprint);