mirror of
https://github.com/corda/corda.git
synced 2025-06-18 07:08:15 +00:00
Remove boilerplate code (unaryOp methods in Compiler)
This commit is contained in:
@ -99,7 +99,6 @@ const unsigned OperandTypeCount = MemoryOperand + 1;
|
||||
|
||||
const int NoRegister = -1;
|
||||
|
||||
|
||||
inline bool isBranch(lir::TernaryOperation op) {
|
||||
return op > FloatMin;
|
||||
}
|
||||
@ -120,6 +119,14 @@ inline bool isFloatBinaryOp(lir::TernaryOperation op) {
|
||||
return op >= FloatAdd && op <= FloatMin;
|
||||
}
|
||||
|
||||
inline bool isGeneralUnaryOp(lir::BinaryOperation op) {
|
||||
return op == Negate || op == Absolute;
|
||||
}
|
||||
|
||||
inline bool isFloatUnaryOp(lir::BinaryOperation op) {
|
||||
return op == FloatNegate || op == FloatSquareRoot || op == FloatAbsolute;
|
||||
}
|
||||
|
||||
class Operand { };
|
||||
|
||||
class Constant: public Operand {
|
||||
|
Reference in New Issue
Block a user