From 9c102bc1a861a19c5efd7189725d8c9f299df221 Mon Sep 17 00:00:00 2001 From: Joshua Warner Date: Wed, 13 Feb 2013 20:33:33 -0700 Subject: [PATCH] move OperationEvent out of compiler.cpp --- src/codegen/compiler.cpp | 23 ----------------------- src/codegen/compiler/event.cpp | 23 +++++++++++++++++++++++ src/codegen/compiler/event.h | 3 +++ 3 files changed, 26 insertions(+), 23 deletions(-) diff --git a/src/codegen/compiler.cpp b/src/codegen/compiler.cpp index e747e5668a..8265fc3a58 100644 --- a/src/codegen/compiler.cpp +++ b/src/codegen/compiler.cpp @@ -1595,29 +1595,6 @@ register_(Context* c, int number) return value(c, type, s, s); } -class OperationEvent: public Event { - public: - OperationEvent(Context* c, lir::Operation op): - Event(c), op(op) - { } - - virtual const char* name() { - return "OperationEvent"; - } - - virtual void compile(Context* c) { - c->assembler->apply(op); - } - - lir::Operation op; -}; - -void -appendOperation(Context* c, lir::Operation op) -{ - append(c, new(c->zone) OperationEvent(c, op)); -} - void moveIfConflict(Context* c, Value* v, MemorySite* s) { diff --git a/src/codegen/compiler/event.cpp b/src/codegen/compiler/event.cpp index c98cbacbf3..b0ccd3a48e 100644 --- a/src/codegen/compiler/event.cpp +++ b/src/codegen/compiler/event.cpp @@ -1045,6 +1045,29 @@ appendTranslate(Context* c, lir::BinaryOperation type, unsigned firstSize, } } +class OperationEvent: public Event { + public: + OperationEvent(Context* c, lir::Operation op): + Event(c), op(op) + { } + + virtual const char* name() { + return "OperationEvent"; + } + + virtual void compile(Context* c) { + c->assembler->apply(op); + } + + lir::Operation op; +}; + +void +appendOperation(Context* c, lir::Operation op) +{ + append(c, new(c->zone) OperationEvent(c, op)); +} + } // namespace compiler } // namespace codegen } // namespace avian diff --git a/src/codegen/compiler/event.h b/src/codegen/compiler/event.h index a87619e0a7..22a812657b 100644 --- a/src/codegen/compiler/event.h +++ b/src/codegen/compiler/event.h @@ -132,6 +132,9 @@ void appendTranslate(Context* c, lir::BinaryOperation type, unsigned firstSize, Value* first, unsigned resultSize, Value* result); +void +appendOperation(Context* c, lir::Operation op); + } // namespace compiler } // namespace codegen } // namespace avian