mirror of
https://github.com/corda/corda.git
synced 2025-06-18 15:18:16 +00:00
move FrameSiteEvent out of compiler.cpp
This commit is contained in:
@ -1414,32 +1414,6 @@ register_(Context* c, int number)
|
|||||||
return value(c, type, s, s);
|
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
|
unsigned
|
||||||
frameFootprint(Context* c, Stack* s)
|
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));
|
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 compiler
|
||||||
} // namespace codegen
|
} // namespace codegen
|
||||||
} // namespace avian
|
} // namespace avian
|
||||||
|
@ -151,6 +151,9 @@ void
|
|||||||
appendBoundsCheck(Context* c, Value* object, unsigned lengthOffset,
|
appendBoundsCheck(Context* c, Value* object, unsigned lengthOffset,
|
||||||
Value* index, intptr_t handler);
|
Value* index, intptr_t handler);
|
||||||
|
|
||||||
|
void
|
||||||
|
appendFrameSite(Context* c, Value* value, int index);
|
||||||
|
|
||||||
} // namespace compiler
|
} // namespace compiler
|
||||||
} // namespace codegen
|
} // namespace codegen
|
||||||
} // namespace avian
|
} // namespace avian
|
||||||
|
Reference in New Issue
Block a user