[muparser] Remove some unused "optimized" opcodes

This commit is contained in:
ridiculousfish 2017-12-18 09:45:36 -08:00
parent 3f21fb64de
commit e675a66504
3 changed files with 0 additions and 48 deletions

View file

@ -145,13 +145,6 @@ enum ECmdCode {
cmVAR = 20, ///< variable item
cmVAL = 21, ///< value item
// For optimization purposes
cmVARPOW2,
cmVARPOW3,
cmVARPOW4,
cmVARMUL,
cmPOW2,
// operators and functions
cmFUNC, ///< Code for a generic function item
cmFUNC_STR, ///< Code for a function with a string parameter

View file

@ -868,25 +868,6 @@ ValueOrError ParserBase::ExecuteRPN() const {
Stack[++sidx] = pTok->Val.data2;
continue;
case cmVARPOW2:
buf = *(pTok->Val.ptr);
Stack[++sidx] = buf * buf;
continue;
case cmVARPOW3:
buf = *(pTok->Val.ptr);
Stack[++sidx] = buf * buf * buf;
continue;
case cmVARPOW4:
buf = *(pTok->Val.ptr);
Stack[++sidx] = buf * buf * buf * buf;
continue;
case cmVARMUL:
Stack[++sidx] = *(pTok->Val.ptr) * pTok->Val.data + pTok->Val.data2;
continue;
// Next is treatment of numeric functions
case cmFUNC: {
int iArgCount = pTok->Fun.argc;

View file

@ -255,28 +255,6 @@ void ParserByteCode::AsciiDump() {
mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]\n");
break;
case cmVARPOW2:
mu::console() << _T("VARPOW2 \t");
mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]\n");
break;
case cmVARPOW3:
mu::console() << _T("VARPOW3 \t");
mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]\n");
break;
case cmVARPOW4:
mu::console() << _T("VARPOW4 \t");
mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]\n");
break;
case cmVARMUL:
mu::console() << _T("VARMUL \t");
mu::console() << _T("[ADDR: 0x") << std::hex << m_vRPN[i].Val.ptr << _T("]");
mu::console() << _T(" * [") << m_vRPN[i].Val.data << _T("]");
mu::console() << _T(" + [") << m_vRPN[i].Val.data2 << _T("]\n");
break;
case cmFUNC:
mu::console() << _T("CALL\t");
mu::console() << _T("[ARG:") << std::dec << m_vRPN[i].Fun.argc << _T("]");