diff --git a/components/interpreter/interpreter.cpp b/components/interpreter/interpreter.cpp index b64369e709..0b636092c3 100644 --- a/components/interpreter/interpreter.cpp +++ b/components/interpreter/interpreter.cpp @@ -28,22 +28,6 @@ namespace Interpreter return; } - case 1: - { - int opcode = (code>>24) & 0x3f; - unsigned int arg0 = (code>>16) & 0xfff; - unsigned int arg1 = code & 0xfff; - - std::map::iterator iter = mSegment1.find (opcode); - - if (iter==mSegment1.end()) - abortUnknownCode (1, opcode); - - iter->second->execute (mRuntime, arg0, arg1); - - return; - } - case 2: { int opcode = (code>>20) & 0x3ff; @@ -79,22 +63,6 @@ namespace Interpreter return; } - case 0x31: - { - int opcode = (code>>16) & 0x3ff; - unsigned int arg0 = (code>>8) & 0xff; - unsigned int arg1 = code & 0xff; - - std::map::iterator iter = mSegment4.find (opcode); - - if (iter==mSegment4.end()) - abortUnknownCode (4, opcode); - - iter->second->execute (mRuntime, arg0, arg1); - - return; - } - case 0x32: { int opcode = code & 0x3ffffff; @@ -161,10 +129,6 @@ namespace Interpreter iter!=mSegment0.end(); ++iter) delete iter->second; - for (std::map::iterator iter (mSegment1.begin()); - iter!=mSegment1.end(); ++iter) - delete iter->second; - for (std::map::iterator iter (mSegment2.begin()); iter!=mSegment2.end(); ++iter) delete iter->second; @@ -173,10 +137,6 @@ namespace Interpreter iter!=mSegment3.end(); ++iter) delete iter->second; - for (std::map::iterator iter (mSegment4.begin()); - iter!=mSegment4.end(); ++iter) - delete iter->second; - for (std::map::iterator iter (mSegment5.begin()); iter!=mSegment5.end(); ++iter) delete iter->second; @@ -188,12 +148,6 @@ namespace Interpreter mSegment0.insert (std::make_pair (code, opcode)); } - void Interpreter::installSegment1 (int code, Opcode2 *opcode) - { - assert(mSegment1.find(code) == mSegment1.end()); - mSegment1.insert (std::make_pair (code, opcode)); - } - void Interpreter::installSegment2 (int code, Opcode1 *opcode) { assert(mSegment2.find(code) == mSegment2.end()); @@ -206,12 +160,6 @@ namespace Interpreter mSegment3.insert (std::make_pair (code, opcode)); } - void Interpreter::installSegment4 (int code, Opcode2 *opcode) - { - assert(mSegment4.find(code) == mSegment4.end()); - mSegment4.insert (std::make_pair (code, opcode)); - } - void Interpreter::installSegment5 (int code, Opcode0 *opcode) { assert(mSegment5.find(code) == mSegment5.end()); diff --git a/components/interpreter/interpreter.hpp b/components/interpreter/interpreter.hpp index dd341e7092..ff3bcf7b7c 100644 --- a/components/interpreter/interpreter.hpp +++ b/components/interpreter/interpreter.hpp @@ -11,7 +11,6 @@ namespace Interpreter { class Opcode0; class Opcode1; - class Opcode2; class Interpreter { @@ -19,10 +18,8 @@ namespace Interpreter bool mRunning; Runtime mRuntime; std::map mSegment0; - std::map mSegment1; std::map mSegment2; std::map mSegment3; - std::map mSegment4; std::map mSegment5; // not implemented @@ -48,18 +45,12 @@ namespace Interpreter void installSegment0 (int code, Opcode1 *opcode); ///< ownership of \a opcode is transferred to *this. - void installSegment1 (int code, Opcode2 *opcode); - ///< ownership of \a opcode is transferred to *this. - void installSegment2 (int code, Opcode1 *opcode); ///< ownership of \a opcode is transferred to *this. void installSegment3 (int code, Opcode1 *opcode); ///< ownership of \a opcode is transferred to *this. - void installSegment4 (int code, Opcode2 *opcode); - ///< ownership of \a opcode is transferred to *this. - void installSegment5 (int code, Opcode0 *opcode); ///< ownership of \a opcode is transferred to *this. diff --git a/components/interpreter/opcodes.hpp b/components/interpreter/opcodes.hpp index c447e1f106..da266e8ffa 100644 --- a/components/interpreter/opcodes.hpp +++ b/components/interpreter/opcodes.hpp @@ -25,16 +25,6 @@ namespace Interpreter virtual ~Opcode1() {} }; - /// opcode for 2 arguments - class Opcode2 - { - public: - - virtual void execute (Runtime& runtime, unsigned int arg1, unsigned int arg2) = 0; - - virtual ~Opcode2() {} - }; - } #endif