diff --git a/src/codegen/compiler.cpp b/src/codegen/compiler.cpp index ee79e97a8f..5f1f9ab431 100644 --- a/src/codegen/compiler.cpp +++ b/src/codegen/compiler.cpp @@ -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) { diff --git a/src/codegen/compiler/event.cpp b/src/codegen/compiler/event.cpp index abb170bb1b..68d3bccfd6 100644 --- a/src/codegen/compiler/event.cpp +++ b/src/codegen/compiler/event.cpp @@ -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 diff --git a/src/codegen/compiler/event.h b/src/codegen/compiler/event.h index ecefcf85d6..c28fa6230b 100644 --- a/src/codegen/compiler/event.h +++ b/src/codegen/compiler/event.h @@ -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