Remove boilerplate code (jump* methods in Compiler)

This commit is contained in:
Joshua Warner
2013-12-18 14:38:05 -07:00
parent fd5bd9d77e
commit b66a8549fd
5 changed files with 53 additions and 225 deletions

View File

@ -67,6 +67,13 @@ class Value: public Compiler::Operand {
};
inline bool isGeneralValue(Compiler::Operand* a) {
return static_cast<Value*>(a)->type == lir::ValueGeneral;
}
inline bool isFloatValue(Compiler::Operand* a) {
return static_cast<Value*>(a)->type == lir::ValueFloat;
}
Value* value(Context* c, lir::ValueType type, Site* site = 0, Site* target = 0);