mirror of
https://github.com/corda/corda.git
synced 2025-01-07 13:38:47 +00:00
use codePromise helper function in CallEvent ctor
This commit is contained in:
parent
65830a76c5
commit
e68a18248c
@ -1342,6 +1342,19 @@ resetLocals(Context* c)
|
||||
c->locals = 0;
|
||||
}
|
||||
|
||||
CodePromise*
|
||||
codePromise(Context* c, Event* e)
|
||||
{
|
||||
return e->promises = new (c->zone->allocate(sizeof(CodePromise)))
|
||||
CodePromise(c, e->promises);
|
||||
}
|
||||
|
||||
CodePromise*
|
||||
codePromise(Context* c, int offset)
|
||||
{
|
||||
return new (c->zone->allocate(sizeof(CodePromise))) CodePromise(c, offset);
|
||||
}
|
||||
|
||||
class CallEvent: public Event {
|
||||
public:
|
||||
CallEvent(Context* c, Value* address, unsigned flags,
|
||||
@ -1397,9 +1410,7 @@ class CallEvent: public Event {
|
||||
apply(c, type, BytesPerWord, address->source);
|
||||
|
||||
if (traceHandler) {
|
||||
traceHandler->handleTrace
|
||||
(new (c->zone->allocate(sizeof(CodePromise)))
|
||||
CodePromise(c, c->assembler->length()));
|
||||
traceHandler->handleTrace(codePromise(c, c->assembler->length()));
|
||||
}
|
||||
|
||||
cleanStack(c, stack, locals, reads);
|
||||
@ -2175,19 +2186,6 @@ appendLocal(Context* c, unsigned size, Local* local)
|
||||
new (c->zone->allocate(sizeof(LocalEvent))) LocalEvent(c, size, local);
|
||||
}
|
||||
|
||||
CodePromise*
|
||||
codePromise(Context* c, Event* e)
|
||||
{
|
||||
return e->promises = new (c->zone->allocate(sizeof(CodePromise)))
|
||||
CodePromise(c, e->promises);
|
||||
}
|
||||
|
||||
CodePromise*
|
||||
codePromise(Context* c, int offset)
|
||||
{
|
||||
return new (c->zone->allocate(sizeof(CodePromise))) CodePromise(c, offset);
|
||||
}
|
||||
|
||||
class BoundsCheckEvent: public Event {
|
||||
public:
|
||||
BoundsCheckEvent(Context* c, Value* object, unsigned lengthOffset,
|
||||
|
Loading…
Reference in New Issue
Block a user