remove redundant Compiler::call resultSize parameter

This commit is contained in:
Joshua Warner 2014-04-30 23:52:02 -06:00 committed by Joshua Warner
parent 9805ff94b4
commit 1d466a800e
3 changed files with 9 additions and 47 deletions

View File

@ -84,7 +84,6 @@ class Compiler {
virtual Operand* call(Operand* address, virtual Operand* call(Operand* address,
unsigned flags, unsigned flags,
TraceHandler* traceHandler, TraceHandler* traceHandler,
unsigned resultSize,
ir::Type resultType, ir::Type resultType,
unsigned argumentCount, unsigned argumentCount,
...) = 0; ...) = 0;

View File

@ -2442,7 +2442,6 @@ class MyCompiler: public Compiler {
virtual Operand* call(Operand* address, virtual Operand* call(Operand* address,
unsigned flags, unsigned flags,
TraceHandler* traceHandler, TraceHandler* traceHandler,
unsigned resultSize,
ir::Type resultType, ir::Type resultType,
unsigned argumentCount, unsigned argumentCount,
...) ...)
@ -2482,8 +2481,15 @@ class MyCompiler: public Compiler {
} }
Value* result = value(&c, resultType); Value* result = value(&c, resultType);
appendCall(&c, static_cast<Value*>(address), flags, traceHandler, result, appendCall(&c,
resultSize, argumentStack, index, 0); static_cast<Value*>(address),
flags,
traceHandler,
result,
resultType.size(),
argumentStack,
index,
0);
return result; return result;
} }

View File

@ -3157,7 +3157,6 @@ void compileSafePoint(MyThread* t, Compiler* c, Frame* frame) {
c->call(c->constant(getThunk(t, idleIfNecessaryThunk), types.address), c->call(c->constant(getThunk(t, idleIfNecessaryThunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
1, 1,
c->threadRegister()); c->threadRegister());
@ -3360,7 +3359,6 @@ compileDirectReferenceInvoke(MyThread* t, Frame* frame, Thunk thunk,
c->call(c->constant(getThunk(t, thunk), types.address), c->call(c->constant(getThunk(t, thunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
TargetBytesPerWord,
types.address, types.address,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -3408,7 +3406,6 @@ compileDirectAbstractInvoke(MyThread* t, Frame* frame, Thunk thunk,
c->call(c->constant(getThunk(t, thunk), types.address), c->call(c->constant(getThunk(t, thunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
TargetBytesPerWord,
types.address, types.address,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -3437,7 +3434,6 @@ handleMonitorEvent(MyThread* t, Frame* frame, intptr_t function)
c->call(c->constant(function, types.address), c->call(c->constant(function, types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -4068,7 +4064,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->call(c->constant(getThunk(t, gcIfNecessaryThunk), types.address), c->call(c->constant(getThunk(t, gcIfNecessaryThunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
1, 1,
c->threadRegister()); c->threadRegister());
@ -4194,7 +4189,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->call(c->constant(getThunk(t, setMaybeNullThunk), types.address), c->call(c->constant(getThunk(t, setMaybeNullThunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
4, 4,
c->threadRegister(), c->threadRegister(),
@ -4304,7 +4298,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
frame->pushObject(c->call(c->constant(getThunk(t, thunk), types.address), frame->pushObject(c->call(c->constant(getThunk(t, thunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
TargetBytesPerWord,
types.object, types.object,
3, 3,
c->threadRegister(), c->threadRegister(),
@ -4350,7 +4343,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->call(c->constant(getThunk(t, throw_Thunk), types.address), c->call(c->constant(getThunk(t, throw_Thunk), types.address),
Compiler::NoReturn, Compiler::NoReturn,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -4389,7 +4381,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->call(c->constant(getThunk(t, thunk), types.address), c->call(c->constant(getThunk(t, thunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
3, 3,
c->threadRegister(), c->threadRegister(),
@ -4432,7 +4423,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->constant(getThunk(t, compareDoublesGThunk), types.address), c->constant(getThunk(t, compareDoublesGThunk), types.address),
0, 0,
0, 0,
4,
types.i4, types.i4,
4, 4,
static_cast<Compiler::Operand*>(0), static_cast<Compiler::Operand*>(0),
@ -4453,7 +4443,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->constant(getThunk(t, compareDoublesLThunk), types.address), c->constant(getThunk(t, compareDoublesLThunk), types.address),
0, 0,
0, 0,
4,
types.i4, types.i4,
4, 4,
static_cast<Compiler::Operand*>(0), static_cast<Compiler::Operand*>(0),
@ -4534,7 +4523,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->constant(getThunk(t, compareFloatsGThunk), types.address), c->constant(getThunk(t, compareFloatsGThunk), types.address),
0, 0,
0, 0,
4,
types.i4, types.i4,
2, 2,
a, a,
@ -4553,7 +4541,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->constant(getThunk(t, compareFloatsLThunk), types.address), c->constant(getThunk(t, compareFloatsLThunk), types.address),
0, 0,
0, 0,
4,
types.i4, types.i4,
2, 2,
a, a,
@ -4600,7 +4587,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -4618,7 +4604,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->call(c->constant(getThunk(t, tryInitClassThunk), types.address), c->call(c->constant(getThunk(t, tryInitClassThunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -4716,7 +4701,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -4731,7 +4715,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
object pair = makePair(t, context->method, reference); object pair = makePair(t, context->method, reference);
unsigned rSize = resultSize(t, fieldCode);
ir::Type rType = operandTypeForFieldCode(t, fieldCode); ir::Type rType = operandTypeForFieldCode(t, fieldCode);
Compiler::Operand* result; Compiler::Operand* result;
@ -4741,7 +4724,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
rSize,
rType, rType,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -4754,7 +4736,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
rSize,
rType, rType,
3, 3,
c->threadRegister(), c->threadRegister(),
@ -5018,7 +4999,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
frame->pushInt(c->call(c->constant(getThunk(t, thunk), types.address), frame->pushInt(c->call(c->constant(getThunk(t, thunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
4,
types.i4, types.i4,
3, 3,
c->threadRegister(), c->threadRegister(),
@ -5068,7 +5048,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
= c->stackCall(c->call(c->constant(getThunk(t, thunk), types.address), = c->stackCall(c->call(c->constant(getThunk(t, thunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
TargetBytesPerWord,
types.address, types.address,
3, 3,
c->threadRegister(), c->threadRegister(),
@ -5215,7 +5194,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
TargetBytesPerWord,
types.address, types.address,
3, 3,
c->threadRegister(), c->threadRegister(),
@ -5338,7 +5316,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->call(c->constant(getThunk(t, compareLongsThunk), types.address), c->call(c->constant(getThunk(t, compareLongsThunk), types.address),
0, 0,
0, 0,
4,
types.i4, types.i4,
4, 4,
static_cast<Compiler::Operand*>(0), static_cast<Compiler::Operand*>(0),
@ -5385,7 +5362,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
TargetBytesPerWord,
types.object, types.object,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -5399,7 +5375,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->constant(getThunk(t, getJClass64Thunk), types.address), c->constant(getThunk(t, getJClass64Thunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
TargetBytesPerWord,
types.object, types.object,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -5510,7 +5485,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->constant(getThunk(t, lookUpAddressThunk), types.address), c->constant(getThunk(t, lookUpAddressThunk), types.address),
0, 0,
0, 0,
TargetBytesPerWord,
types.address, types.address,
4, 4,
key, key,
@ -5601,7 +5575,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->constant(getThunk(t, acquireMonitorForObjectThunk), types.address), c->constant(getThunk(t, acquireMonitorForObjectThunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -5614,7 +5587,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->constant(getThunk(t, releaseMonitorForObjectThunk), types.address), c->constant(getThunk(t, releaseMonitorForObjectThunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -5651,7 +5623,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
= c->call(c->constant(getThunk(t, thunk), types.address), = c->call(c->constant(getThunk(t, thunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
TargetBytesPerWord,
types.object, types.object,
4, 4,
c->threadRegister(), c->threadRegister(),
@ -5690,7 +5661,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
frame->pushObject(c->call(c->constant(getThunk(t, thunk), types.address), frame->pushObject(c->call(c->constant(getThunk(t, thunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
TargetBytesPerWord,
types.object, types.object,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -5706,7 +5676,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->call(c->constant(getThunk(t, makeBlankArrayThunk), types.address), c->call(c->constant(getThunk(t, makeBlankArrayThunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
TargetBytesPerWord,
types.object, types.object,
3, 3,
c->threadRegister(), c->threadRegister(),
@ -5749,7 +5718,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->call(c->constant(getThunk(t, tryInitClassThunk), types.address), c->call(c->constant(getThunk(t, tryInitClassThunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -5776,7 +5744,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -5854,7 +5821,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
c->call(c->constant(getThunk(t, setMaybeNullThunk), types.address), c->call(c->constant(getThunk(t, setMaybeNullThunk), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
4, 4,
c->threadRegister(), c->threadRegister(),
@ -5863,7 +5829,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
value); value);
} else { } else {
c->call(c->constant(getThunk(t, setThunk), types.address), c->call(c->constant(getThunk(t, setThunk), types.address),
0,
0, 0,
0, 0,
types.void_, types.void_,
@ -5886,7 +5851,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
0,
types.void_, types.void_,
2, 2,
c->threadRegister(), c->threadRegister(),
@ -5900,7 +5864,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
(t, byteArrayBody(t, referenceSpec(t, reference), 0)); (t, byteArrayBody(t, referenceSpec(t, reference), 0));
Compiler::Operand* value = popField(t, frame, fieldCode); Compiler::Operand* value = popField(t, frame, fieldCode);
unsigned rSize = resultSize(t, fieldCode);
ir::Type rType = operandTypeForFieldCode(t, fieldCode); ir::Type rType = operandTypeForFieldCode(t, fieldCode);
object pair = makePair(t, context->method, reference); object pair = makePair(t, context->method, reference);
@ -5918,7 +5881,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
rSize,
rType, rType,
3, 3,
c->threadRegister(), c->threadRegister(),
@ -5931,7 +5893,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
rSize,
rType, rType,
4, 4,
c->threadRegister(), c->threadRegister(),
@ -5949,7 +5910,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
rSize,
rType, rType,
4, 4,
c->threadRegister(), c->threadRegister(),
@ -5964,7 +5924,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
rSize,
rType, rType,
5, 5,
c->threadRegister(), c->threadRegister(),
@ -5983,7 +5942,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
rSize,
rType, rType,
3, 3,
c->threadRegister(), c->threadRegister(),
@ -5997,7 +5955,6 @@ compile(MyThread* t, Frame* initialFrame, unsigned initialIp,
types.address), types.address),
0, 0,
frame->trace(0, 0), frame->trace(0, 0),
rSize,
rType, rType,
4, 4,
c->threadRegister(), c->threadRegister(),