mirror of
https://github.com/corda/corda.git
synced 2025-06-17 22:58:19 +00:00
pair up stack for NativeCallingConvention
This commit is contained in:
@ -2460,7 +2460,7 @@ class MyCompiler: public Compiler {
|
||||
|
||||
unsigned footprint = 0;
|
||||
unsigned size = TargetBytesPerWord;
|
||||
RUNTIME_ARRAY(Value*, arguments, argumentCount);
|
||||
RUNTIME_ARRAY(ir::Value*, arguments, argumentCount);
|
||||
int index = 0;
|
||||
for (unsigned i = 0; i < argumentCount; ++i) {
|
||||
Value* o = va_arg(a, Value*);
|
||||
@ -2484,20 +2484,23 @@ class MyCompiler: public Compiler {
|
||||
|
||||
Stack* argumentStack = c.stack;
|
||||
for (int i = index - 1; i >= 0; --i) {
|
||||
argumentStack = compiler::stack
|
||||
(&c, RUNTIME_ARRAY_BODY(arguments)[i], argumentStack);
|
||||
argumentStack = compiler::stack(
|
||||
&c,
|
||||
static_cast<Value*>(RUNTIME_ARRAY_BODY(arguments)[i]),
|
||||
argumentStack);
|
||||
}
|
||||
|
||||
Value* result = value(&c, resultType);
|
||||
appendCall(&c,
|
||||
static_cast<Value*>(address),
|
||||
ir::NativeCallingConvention,
|
||||
flags,
|
||||
traceHandler,
|
||||
result,
|
||||
resultType.size(),
|
||||
argumentStack,
|
||||
index,
|
||||
util::Slice<ir::Value*>(0, 0));
|
||||
util::Slice<ir::Value*>(RUNTIME_ARRAY_BODY(arguments), index));
|
||||
|
||||
return result;
|
||||
}
|
||||
@ -2511,6 +2514,7 @@ class MyCompiler: public Compiler {
|
||||
Value* result = value(&c, resultType);
|
||||
appendCall(&c,
|
||||
static_cast<Value*>(address),
|
||||
ir::AvianCallingConvention,
|
||||
flags,
|
||||
traceHandler,
|
||||
result,
|
||||
|
Reference in New Issue
Block a user