mirror of
https://github.com/corda/corda.git
synced 2025-01-19 03:06:36 +00:00
remove stack manipulation from AvianCallingConvention loop
This commit is contained in:
parent
9f36a8e0ec
commit
d62d083733
@ -2502,6 +2502,7 @@ class MyCompiler: public Compiler {
|
||||
Slice<ir::Value*> arguments)
|
||||
{
|
||||
Value* result = value(&c, resultType);
|
||||
Stack* b UNUSED = c.stack;
|
||||
appendCall(&c,
|
||||
static_cast<Value*>(address),
|
||||
ir::AvianCallingConvention,
|
||||
@ -2510,6 +2511,7 @@ class MyCompiler: public Compiler {
|
||||
result,
|
||||
resultType.size(),
|
||||
arguments);
|
||||
assert(&c, c.stack == b);
|
||||
return result;
|
||||
}
|
||||
|
||||
|
@ -386,13 +386,11 @@ class CallEvent: public Event {
|
||||
Stack* stack = stackBefore;
|
||||
|
||||
if (callingConvention == ir::AvianCallingConvention) {
|
||||
Stack* s2 = stack;
|
||||
for (size_t i = 0; i < arguments.count; i++) {
|
||||
s2 = s2->next;
|
||||
stack = stack->next;
|
||||
}
|
||||
for (int i = stackArgumentFootprint - 1; i >= 0; --i) {
|
||||
Value* v = static_cast<Value*>(arguments[i]);
|
||||
stack = stack->next;
|
||||
|
||||
if ((vm::TargetBytesPerWord == 8
|
||||
&& (v == 0 || (i >= 1 && arguments[i - 1] == 0)))
|
||||
@ -403,13 +401,10 @@ class CallEvent: public Event {
|
||||
|
||||
arguments[i] = arguments[i - 1];
|
||||
--i;
|
||||
stack = stack->next;
|
||||
}
|
||||
arguments[i] = v;
|
||||
}
|
||||
|
||||
assert(c, s2 == stack);
|
||||
|
||||
int returnAddressIndex;
|
||||
int framePointerIndex;
|
||||
int frameOffset;
|
||||
|
@ -2033,7 +2033,7 @@ class Frame {
|
||||
}
|
||||
}
|
||||
|
||||
Slice<ir::Value*> peekMethodArguments(unsigned footprint UNUSED)
|
||||
Slice<ir::Value*> peekMethodArguments(unsigned footprint)
|
||||
{
|
||||
ir::Value** ptr = context->argumentBuffer.items;
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user