bool NodeBinaryOpEqualArith::doBinaryOperation(s32 lslot, s32 rslot, u32 slots) { assert(slots); if(m_state.isScalar(getNodeType())) //not an array { return doBinaryOperationImmediate(lslot, rslot, slots); } else { //array return doBinaryOperationArray(lslot, rslot, slots); } return false; } //end dobinaryop
bool NodeBinaryOpCompare::doBinaryOperation(s32 lslot, s32 rslot, u32 slots) { assert(slots); if(m_state.isScalar(getNodeType())) //not an array { return doBinaryOperationImmediate(lslot, rslot, slots); } else { //array #ifdef SUPPORT_ARITHMETIC_ARRAY_OPS return doBinaryOperationArray(lslot, rslot, slots); #else m_state.abortNotImplementedYet(); #endif //defined below... } return false; } //end dobinaryop
// third arg is the slots for the rtype; slots for the left is // rslot-lslot; they should be equal, unless one is a packed array // and the other isn't; however, currently, according to // CompilerState determinePackable, they should always be the same // since their types must be identical. bool NodeBinaryOpEqualShift::doBinaryOperation(s32 lslot, s32 rslot, u32 slots) { assert(slots); UTI nuti = getNodeType(); if(m_state.isScalar(nuti)) //not an array { return doBinaryOperationImmediate(lslot, rslot, slots); } else { //array // leverage case when both are packed, for logical shift operations if(m_state.determinePackable(nuti) == PACKEDLOADABLE) { return doBinaryOperationImmediate(lslot, rslot, slots); } else { return doBinaryOperationArray(lslot, rslot, slots); } } return false; } //end dobinaryop