mirror of
https://github.com/corda/corda.git
synced 2025-01-22 12:28:11 +00:00
remove redundant CallEvent::argumentCount parameter
This commit is contained in:
parent
f9cbca8f7d
commit
1318b9ca2a
@ -2499,7 +2499,6 @@ class MyCompiler: public Compiler {
|
|||||||
result,
|
result,
|
||||||
resultType.size(),
|
resultType.size(),
|
||||||
argumentStack,
|
argumentStack,
|
||||||
index,
|
|
||||||
util::Slice<ir::Value*>(RUNTIME_ARRAY_BODY(arguments), index));
|
util::Slice<ir::Value*>(RUNTIME_ARRAY_BODY(arguments), index));
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
@ -2520,7 +2519,6 @@ class MyCompiler: public Compiler {
|
|||||||
result,
|
result,
|
||||||
resultType.size(),
|
resultType.size(),
|
||||||
c.stack,
|
c.stack,
|
||||||
0,
|
|
||||||
arguments);
|
arguments);
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
@ -293,7 +293,6 @@ class CallEvent: public Event {
|
|||||||
Value* result,
|
Value* result,
|
||||||
unsigned resultSize,
|
unsigned resultSize,
|
||||||
Stack* argumentStack,
|
Stack* argumentStack,
|
||||||
unsigned argumentCount,
|
|
||||||
util::Slice<ir::Value*> arguments)
|
util::Slice<ir::Value*> arguments)
|
||||||
: Event(c),
|
: Event(c),
|
||||||
address(address),
|
address(address),
|
||||||
@ -311,11 +310,7 @@ class CallEvent: public Event {
|
|||||||
{
|
{
|
||||||
uint32_t registerMask = c->regFile->generalRegisters.mask;
|
uint32_t registerMask = c->regFile->generalRegisters.mask;
|
||||||
|
|
||||||
assert(c,
|
if (callingConvention == ir::NativeCallingConvention) {
|
||||||
callingConvention == ir::AvianCallingConvention
|
|
||||||
|| argumentCount == arguments.count);
|
|
||||||
|
|
||||||
if (argumentCount) {
|
|
||||||
assert(c, (flags & Compiler::TailJump) == 0);
|
assert(c, (flags & Compiler::TailJump) == 0);
|
||||||
assert(c, stackArgumentFootprint == 0);
|
assert(c, stackArgumentFootprint == 0);
|
||||||
|
|
||||||
@ -325,9 +320,10 @@ class CallEvent: public Event {
|
|||||||
|
|
||||||
while (true) {
|
while (true) {
|
||||||
unsigned footprint
|
unsigned footprint
|
||||||
= (argumentIndex + 1 < argumentCount
|
= (argumentIndex + 1 < arguments.count and s->value->nextWord
|
||||||
and s->value->nextWord == s->next->value)
|
== s->next->value)
|
||||||
? 2 : 1;
|
? 2
|
||||||
|
: 1;
|
||||||
|
|
||||||
if (index % (c->arch->argumentAlignment() ? footprint : 1)) {
|
if (index % (c->arch->argumentAlignment() ? footprint : 1)) {
|
||||||
++ index;
|
++ index;
|
||||||
@ -363,7 +359,7 @@ class CallEvent: public Event {
|
|||||||
|
|
||||||
++ index;
|
++ index;
|
||||||
|
|
||||||
if ((++ argumentIndex) < argumentCount) {
|
if ((++argumentIndex) < arguments.count) {
|
||||||
s = s->next;
|
s = s->next;
|
||||||
} else {
|
} else {
|
||||||
break;
|
break;
|
||||||
@ -389,7 +385,7 @@ class CallEvent: public Event {
|
|||||||
|
|
||||||
Stack* stack = stackBefore;
|
Stack* stack = stackBefore;
|
||||||
|
|
||||||
if (stackArgumentFootprint) {
|
if (callingConvention == ir::AvianCallingConvention) {
|
||||||
for (int i = stackArgumentFootprint - 1; i >= 0; --i) {
|
for (int i = stackArgumentFootprint - 1; i >= 0; --i) {
|
||||||
Value* v = static_cast<Value*>(arguments[i]);
|
Value* v = static_cast<Value*>(arguments[i]);
|
||||||
stack = stack->next;
|
stack = stack->next;
|
||||||
@ -413,7 +409,7 @@ class CallEvent: public Event {
|
|||||||
int frameOffset;
|
int frameOffset;
|
||||||
|
|
||||||
if (TailCalls and (flags & Compiler::TailJump)) {
|
if (TailCalls and (flags & Compiler::TailJump)) {
|
||||||
assert(c, argumentCount == 0);
|
assert(c, arguments.count == 0);
|
||||||
|
|
||||||
int base = frameBase(c);
|
int base = frameBase(c);
|
||||||
returnAddressIndex = base + c->arch->returnAddressOffset();
|
returnAddressIndex = base + c->arch->returnAddressOffset();
|
||||||
@ -612,7 +608,6 @@ void appendCall(Context* c,
|
|||||||
Value* result,
|
Value* result,
|
||||||
unsigned resultSize,
|
unsigned resultSize,
|
||||||
Stack* argumentStack,
|
Stack* argumentStack,
|
||||||
unsigned argumentCount,
|
|
||||||
util::Slice<ir::Value*> arguments)
|
util::Slice<ir::Value*> arguments)
|
||||||
{
|
{
|
||||||
append(c,
|
append(c,
|
||||||
@ -624,7 +619,6 @@ void appendCall(Context* c,
|
|||||||
result,
|
result,
|
||||||
resultSize,
|
resultSize,
|
||||||
argumentStack,
|
argumentStack,
|
||||||
argumentCount,
|
|
||||||
arguments));
|
arguments));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1072,7 +1066,6 @@ appendCombine(Context* c, lir::TernaryOperation type,
|
|||||||
resultValue,
|
resultValue,
|
||||||
resultSize,
|
resultSize,
|
||||||
argumentStack,
|
argumentStack,
|
||||||
stackSize,
|
|
||||||
slice);
|
slice);
|
||||||
} else {
|
} else {
|
||||||
append
|
append
|
||||||
@ -1198,7 +1191,6 @@ appendTranslate(Context* c, lir::BinaryOperation type, unsigned firstSize,
|
|||||||
resultValue,
|
resultValue,
|
||||||
resultSize,
|
resultSize,
|
||||||
argumentStack,
|
argumentStack,
|
||||||
ceilingDivide(firstSize, vm::TargetBytesPerWord),
|
|
||||||
slice);
|
slice);
|
||||||
} else {
|
} else {
|
||||||
append(c, new(c->zone)
|
append(c, new(c->zone)
|
||||||
@ -1567,7 +1559,6 @@ appendBranch(Context* c, lir::TernaryOperation type, unsigned size, Value* first
|
|||||||
result,
|
result,
|
||||||
4,
|
4,
|
||||||
argumentStack,
|
argumentStack,
|
||||||
ceilingDivide(size, vm::TargetBytesPerWord) * 2,
|
|
||||||
slice);
|
slice);
|
||||||
|
|
||||||
appendBranch(c,
|
appendBranch(c,
|
||||||
|
@ -121,7 +121,6 @@ void appendCall(Context* c,
|
|||||||
Value* result,
|
Value* result,
|
||||||
unsigned resultSize,
|
unsigned resultSize,
|
||||||
Stack* argumentStack,
|
Stack* argumentStack,
|
||||||
unsigned argumentCount,
|
|
||||||
util::Slice<ir::Value*> arguments);
|
util::Slice<ir::Value*> arguments);
|
||||||
|
|
||||||
void
|
void
|
||||||
|
Loading…
Reference in New Issue
Block a user