Remove boilerplate code (general binaryOp methods in Compiler)

This commit is contained in:
Joshua Warner
2013-12-18 15:11:30 -07:00
parent b66a8549fd
commit d5c1a094ca
4 changed files with 60 additions and 141 deletions

View File

@ -112,6 +112,14 @@ inline bool isGeneralBranch(lir::TernaryOperation op) {
return isBranch(op) && !isFloatBranch(op);
}
inline bool isGeneralBinaryOp(lir::TernaryOperation op) {
return op < FloatAdd;
}
inline bool isFloatBinaryOp(lir::TernaryOperation op) {
return op > FloatAdd && op <= FloatMin;
}
class Operand { };
class Constant: public Operand {