mirror of
https://github.com/corda/corda.git
synced 2025-01-21 03:55:00 +00:00
move FrameSiteEvent out of compiler.cpp
This commit is contained in:
parent
be86d26512
commit
94ddb62b5f
@ -1414,32 +1414,6 @@ register_(Context* c, int number)
|
||||
return value(c, type, s, s);
|
||||
}
|
||||
|
||||
class FrameSiteEvent: public Event {
|
||||
public:
|
||||
FrameSiteEvent(Context* c, Value* value, int index):
|
||||
Event(c), value(value), index(index)
|
||||
{ }
|
||||
|
||||
virtual const char* name() {
|
||||
return "FrameSiteEvent";
|
||||
}
|
||||
|
||||
virtual void compile(Context* c) {
|
||||
if (live(c, value)) {
|
||||
value->addSite(c, frameSite(c, index));
|
||||
}
|
||||
}
|
||||
|
||||
Value* value;
|
||||
int index;
|
||||
};
|
||||
|
||||
void
|
||||
appendFrameSite(Context* c, Value* value, int index)
|
||||
{
|
||||
append(c, new(c->zone) FrameSiteEvent(c, value, index));
|
||||
}
|
||||
|
||||
unsigned
|
||||
frameFootprint(Context* c, Stack* s)
|
||||
{
|
||||
|
@ -1578,6 +1578,33 @@ appendBoundsCheck(Context* c, Value* object, unsigned lengthOffset,
|
||||
append(c, new(c->zone) BoundsCheckEvent(c, object, lengthOffset, index, handler));
|
||||
}
|
||||
|
||||
|
||||
class FrameSiteEvent: public Event {
|
||||
public:
|
||||
FrameSiteEvent(Context* c, Value* value, int index):
|
||||
Event(c), value(value), index(index)
|
||||
{ }
|
||||
|
||||
virtual const char* name() {
|
||||
return "FrameSiteEvent";
|
||||
}
|
||||
|
||||
virtual void compile(Context* c) {
|
||||
if (live(c, value)) {
|
||||
value->addSite(c, frameSite(c, index));
|
||||
}
|
||||
}
|
||||
|
||||
Value* value;
|
||||
int index;
|
||||
};
|
||||
|
||||
void
|
||||
appendFrameSite(Context* c, Value* value, int index)
|
||||
{
|
||||
append(c, new(c->zone) FrameSiteEvent(c, value, index));
|
||||
}
|
||||
|
||||
} // namespace compiler
|
||||
} // namespace codegen
|
||||
} // namespace avian
|
||||
|
@ -151,6 +151,9 @@ void
|
||||
appendBoundsCheck(Context* c, Value* object, unsigned lengthOffset,
|
||||
Value* index, intptr_t handler);
|
||||
|
||||
void
|
||||
appendFrameSite(Context* c, Value* value, int index);
|
||||
|
||||
} // namespace compiler
|
||||
} // namespace codegen
|
||||
} // namespace avian
|
||||
|
Loading…
Reference in New Issue
Block a user