mirror of
https://github.com/corda/corda.git
synced 2025-01-07 05:28:51 +00:00
add type asserts in appendReturn and appendCall
This commit is contained in:
parent
148d35bab5
commit
9282c78549
@ -606,6 +606,7 @@ void appendCall(Context* c,
|
|||||||
unsigned resultSize,
|
unsigned resultSize,
|
||||||
util::Slice<ir::Value*> arguments)
|
util::Slice<ir::Value*> arguments)
|
||||||
{
|
{
|
||||||
|
assert(c, resultSize == result->type.size());
|
||||||
append(c,
|
append(c,
|
||||||
new (c->zone) CallEvent(c,
|
new (c->zone) CallEvent(c,
|
||||||
address,
|
address,
|
||||||
@ -650,6 +651,7 @@ class ReturnEvent: public Event {
|
|||||||
};
|
};
|
||||||
|
|
||||||
void appendReturn(Context* c, unsigned size, Value* value) {
|
void appendReturn(Context* c, unsigned size, Value* value) {
|
||||||
|
assert(c, (value == 0 && size == 0) || size == value->type.size());
|
||||||
append(c, new(c->zone) ReturnEvent(c, size, value));
|
append(c, new(c->zone) ReturnEvent(c, size, value));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user