mirror of
https://github.com/corda/corda.git
synced 2025-01-09 06:23:04 +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;
|
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 {
|
class CallEvent: public Event {
|
||||||
public:
|
public:
|
||||||
CallEvent(Context* c, Value* address, unsigned flags,
|
CallEvent(Context* c, Value* address, unsigned flags,
|
||||||
@ -1397,9 +1410,7 @@ class CallEvent: public Event {
|
|||||||
apply(c, type, BytesPerWord, address->source);
|
apply(c, type, BytesPerWord, address->source);
|
||||||
|
|
||||||
if (traceHandler) {
|
if (traceHandler) {
|
||||||
traceHandler->handleTrace
|
traceHandler->handleTrace(codePromise(c, c->assembler->length()));
|
||||||
(new (c->zone->allocate(sizeof(CodePromise)))
|
|
||||||
CodePromise(c, c->assembler->length()));
|
|
||||||
}
|
}
|
||||||
|
|
||||||
cleanStack(c, stack, locals, reads);
|
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);
|
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 {
|
class BoundsCheckEvent: public Event {
|
||||||
public:
|
public:
|
||||||
BoundsCheckEvent(Context* c, Value* object, unsigned lengthOffset,
|
BoundsCheckEvent(Context* c, Value* object, unsigned lengthOffset,
|
||||||
|
Loading…
Reference in New Issue
Block a user