[Scummvm-cvs-logs] SF.net SVN: scummvm:[54848] tools/branches/gsoc2010-decompiler/decompiler

pidgeot at users.sourceforge.net pidgeot at users.sourceforge.net
Thu Dec 9 23:02:03 CET 2010


Revision: 54848
          http://scummvm.svn.sourceforge.net/scummvm/?rev=54848&view=rev
Author:   pidgeot
Date:     2010-12-09 22:02:02 +0000 (Thu, 09 Dec 2010)

Log Message:
-----------
DECOMPILER: Add typedef for vector of instructions

Modified Paths:
--------------
    tools/branches/gsoc2010-decompiler/decompiler/control_flow.cpp
    tools/branches/gsoc2010-decompiler/decompiler/control_flow.h
    tools/branches/gsoc2010-decompiler/decompiler/decompiler.cpp
    tools/branches/gsoc2010-decompiler/decompiler/disassembler.cpp
    tools/branches/gsoc2010-decompiler/decompiler/disassembler.h
    tools/branches/gsoc2010-decompiler/decompiler/doc/disassembler.tex
    tools/branches/gsoc2010-decompiler/decompiler/engine.h
    tools/branches/gsoc2010-decompiler/decompiler/instruction.h
    tools/branches/gsoc2010-decompiler/decompiler/kyra/disassembler.cpp
    tools/branches/gsoc2010-decompiler/decompiler/kyra/disassembler.h
    tools/branches/gsoc2010-decompiler/decompiler/kyra/engine.cpp
    tools/branches/gsoc2010-decompiler/decompiler/kyra/engine.h
    tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp
    tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.h
    tools/branches/gsoc2010-decompiler/decompiler/scummv6/engine.cpp
    tools/branches/gsoc2010-decompiler/decompiler/scummv6/engine.h
    tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.cpp
    tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h
    tools/branches/gsoc2010-decompiler/decompiler/test/cfg_test.h
    tools/branches/gsoc2010-decompiler/decompiler/test/codegen.h
    tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/pasc.cpp
    tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/pasc.h
    tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/subopcode.cpp
    tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/subopcode.h
    tools/branches/gsoc2010-decompiler/decompiler/test/disassembler_test.h

Modified: tools/branches/gsoc2010-decompiler/decompiler/control_flow.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/control_flow.cpp	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/control_flow.cpp	2010-12-09 22:02:02 UTC (rev 54848)
@@ -35,7 +35,7 @@
 #define GET(vertex) (boost::get(boost::vertex_name, _g, vertex))
 #define GET_EDGE(edge) (boost::get(boost::edge_attribute, _g, edge))
 
-ControlFlow::ControlFlow(const std::vector<Instruction> &insts, Engine *engine) : _insts(insts) {
+ControlFlow::ControlFlow(const InstVec &insts, Engine *engine) : _insts(insts) {
 	_engine = engine;
 
 	// Automatically add a function if we're not supposed to look for more functions and no functions are defined

Modified: tools/branches/gsoc2010-decompiler/decompiler/control_flow.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/control_flow.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/control_flow.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -33,7 +33,7 @@
 private:
 	Graph _g;                               ///< The control flow graph.
 	Engine *_engine;                        ///< Pointer to the Engine used for the script.
-	const std::vector<Instruction> &_insts; ///< The instructions being analyzed
+	const InstVec &_insts;                  ///< The instructions being analyzed
 	std::map<uint32, GraphVertex> _addrMap; ///< Map between addresses and vertices.
 
 	/**
@@ -146,7 +146,7 @@
 	 * @param insts  std::vector containing the instructions to analyze control flow for.
 	 * @param engine Pointer to the Engine used for the script.
 	 */
-	ControlFlow(const std::vector<Instruction> &insts, Engine *engine);
+	ControlFlow(const InstVec &insts, Engine *engine);
 
 	/**
 	 * Creates groups suitable for a stack-based machine.

Modified: tools/branches/gsoc2010-decompiler/decompiler/decompiler.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/decompiler.cpp	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/decompiler.cpp	2010-12-09 22:02:02 UTC (rev 54848)
@@ -105,7 +105,7 @@
 		std::string inputFile = vm["input-file"].as<std::string>();
 
 		// Disassembly
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Disassembler *disassembler = engine->getDisassembler(insts);
 		disassembler->open(inputFile.c_str());
 

Modified: tools/branches/gsoc2010-decompiler/decompiler/disassembler.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/disassembler.cpp	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/disassembler.cpp	2010-12-09 22:02:02 UTC (rev 54848)
@@ -22,7 +22,7 @@
 
 #include "disassembler.h"
 
-Disassembler::Disassembler(std::vector<Instruction> &insts) : _insts(insts) {
+Disassembler::Disassembler(InstVec &insts) : _insts(insts) {
 	_addressBase = 0;
 }
 

Modified: tools/branches/gsoc2010-decompiler/decompiler/disassembler.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/disassembler.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/disassembler.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -36,7 +36,7 @@
 class Disassembler {
 protected:
 	Common::File _f;                  ///< Used to perform file I/O.
-	std::vector<Instruction> &_insts; ///< Container for disassembled instructions.
+	InstVec &_insts;                  ///< Container for disassembled instructions.
 	uint32 _addressBase;              ///< Base address where the script starts.
 
 	/**
@@ -59,7 +59,7 @@
 	 *
 	 * @param insts Reference to the vector in which disassembled instructions should be placed.
 	 */
-	Disassembler(std::vector<Instruction> &insts);
+	Disassembler(InstVec &insts);
 	virtual ~Disassembler() {}
 
 	/**

Modified: tools/branches/gsoc2010-decompiler/decompiler/doc/disassembler.tex
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/doc/disassembler.tex	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/doc/disassembler.tex	2010-12-09 22:02:02 UTC (rev 54848)
@@ -62,14 +62,14 @@
 class Disassembler {
 protected:
 	Common::File _f;
-	std::vector<Instruction> &_insts;
+	InstVec &_insts;
 	uint32 _addressBase;
 
 	virtual void doDisassemble() throw(std::exception) = 0;
 	virtual void doDumpDisassembly(std::ostream &output);
 
 public:
-	Disassembler(std::vector<Instruction> &insts);
+	Disassembler(InstVec &insts);
 	virtual ~Disassembler() {}
 
 	void open(const char *filename);

Modified: tools/branches/gsoc2010-decompiler/decompiler/engine.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/engine.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/engine.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -76,7 +76,7 @@
 	 * @param insts Reference to the std::vector to place the Instructions in.
 	 * @return Pointer to a Disassembler for the engine.
 	 */
-	virtual Disassembler *getDisassembler(std::vector<Instruction> &insts) = 0;
+	virtual Disassembler *getDisassembler(InstVec &insts) = 0;
 
 	/**
 	 * Decode a jump instruction to get the destination address.
@@ -107,7 +107,7 @@
 	 * @param insts Reference to the std::vector to place the Instructions in.
 	 * @param g Graph generated from the CFG analysis.
 	 */
-	virtual void postCFG(std::vector<Instruction> &insts, Graph g) { }
+	virtual void postCFG(InstVec &insts, Graph g) { }
 
 	/**
 	 * Whether or not code flow analysis is supported for this engine.

Modified: tools/branches/gsoc2010-decompiler/decompiler/instruction.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/instruction.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/instruction.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -154,13 +154,18 @@
 };
 
 /**
+ * Type representing a vector of Instructions.
+ */
+typedef std::vector<Instruction> InstVec;
+
+/**
  * Type representing an iterator over Instructions.
  */
-typedef std::vector<Instruction>::iterator InstIterator;
+typedef InstVec::iterator InstIterator;
 
 /**
  * Type representing a const_iterator over Instructions.
  */
-typedef std::vector<Instruction>::const_iterator ConstInstIterator;
+typedef InstVec::const_iterator ConstInstIterator;
 
 #endif

Modified: tools/branches/gsoc2010-decompiler/decompiler/kyra/disassembler.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/kyra/disassembler.cpp	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/kyra/disassembler.cpp	2010-12-09 22:02:02 UTC (rev 54848)
@@ -264,7 +264,7 @@
 	_data = NULL;
 }
 
-Kyra::Kyra2Disassembler::Kyra2Disassembler(Kyra2Engine *engine, std::vector<Instruction> &insts) : Disassembler(insts), _engine(engine) {
+Kyra::Kyra2Disassembler::Kyra2Disassembler(Kyra2Engine *engine, InstVec &insts) : Disassembler(insts), _engine(engine) {
 	setupKyra2Funcs();
 }
 

Modified: tools/branches/gsoc2010-decompiler/decompiler/kyra/disassembler.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/kyra/disassembler.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/kyra/disassembler.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -93,7 +93,7 @@
 	 * @param engine Pointer to the Kyra::Kyra2Engine used for this script.
 	 * @param insts Reference to the vector in which disassembled instructions should be placed.
 	 */
-	Kyra2Disassembler(Kyra2Engine *engine, std::vector<Instruction> &insts);
+	Kyra2Disassembler(Kyra2Engine *engine, InstVec &insts);
 	~Kyra2Disassembler();
 	void doDisassemble() throw(std::exception);
 };

Modified: tools/branches/gsoc2010-decompiler/decompiler/kyra/engine.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/kyra/engine.cpp	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/kyra/engine.cpp	2010-12-09 22:02:02 UTC (rev 54848)
@@ -28,7 +28,7 @@
 #include <sstream>
 #include <boost/format.hpp>
 
-Disassembler *Kyra::Kyra2Engine::getDisassembler(std::vector<Instruction> &insts) {
+Disassembler *Kyra::Kyra2Engine::getDisassembler(InstVec &insts) {
 	return new Kyra2Disassembler(this, insts);
 }
 
@@ -40,7 +40,7 @@
 	return new Kyra2CodeGenerator(this, output);
 }
 
-void Kyra::Kyra2Engine::postCFG(std::vector<Instruction> &insts, Graph g) {
+void Kyra::Kyra2Engine::postCFG(InstVec &insts, Graph g) {
 	// Add metadata to functions
 	for (FuncMap::iterator it = _functions.begin(); it != _functions.end(); ++it) {
 		std::stringstream s;

Modified: tools/branches/gsoc2010-decompiler/decompiler/kyra/engine.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/kyra/engine.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/kyra/engine.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -35,10 +35,10 @@
  */
 class Kyra2Engine : public Engine {
 public:
-	Disassembler *getDisassembler(std::vector<Instruction> &insts);
+	Disassembler *getDisassembler(InstVec &insts);
 	uint32 getDestAddress(const Instruction &inst) const;
 	CodeGenerator *getCodeGenerator(std::ostream &output);
-	void postCFG(std::vector<Instruction> &insts, Graph g);
+	void postCFG(InstVec &insts, Graph g);
 	bool detectMoreFuncs() const;
 
 	std::vector<std::string> _textStrings; ///< Container for strings from the TEXT chunk.

Modified: tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.cpp	2010-12-09 22:02:02 UTC (rev 54848)
@@ -27,7 +27,7 @@
 
 #include "disassembler.h"
 
-Scumm::v6::Scummv6Disassembler::Scummv6Disassembler(std::vector<Instruction> &insts) : SimpleDisassembler(insts) {
+Scumm::v6::Scummv6Disassembler::Scummv6Disassembler(InstVec &insts) : SimpleDisassembler(insts) {
 }
 
 void Scumm::v6::Scummv6Disassembler::doDisassemble() throw(std::exception) {

Modified: tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/scummv6/disassembler.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -39,7 +39,7 @@
 	 *
 	 * @param insts Reference to the vector in which disassembled instructions should be placed.
 	 */
-	Scummv6Disassembler(std::vector<Instruction> &insts);
+	Scummv6Disassembler(InstVec &insts);
 
 	void doDisassemble() throw(std::exception);
 

Modified: tools/branches/gsoc2010-decompiler/decompiler/scummv6/engine.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/scummv6/engine.cpp	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/scummv6/engine.cpp	2010-12-09 22:02:02 UTC (rev 54848)
@@ -24,7 +24,7 @@
 #include "disassembler.h"
 #include "codegen.h"
 
-Disassembler *Scumm::v6::Scummv6Engine::getDisassembler(std::vector<Instruction> &insts) {
+Disassembler *Scumm::v6::Scummv6Engine::getDisassembler(InstVec &insts) {
 	return new Scummv6Disassembler(insts);
 }
 

Modified: tools/branches/gsoc2010-decompiler/decompiler/scummv6/engine.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/scummv6/engine.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/scummv6/engine.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -34,7 +34,7 @@
  */
 class Scummv6Engine : public Engine {
 public:
-	Disassembler *getDisassembler(std::vector<Instruction> &insts);
+	Disassembler *getDisassembler(InstVec &insts);
 	uint32 getDestAddress(const Instruction &inst) const;
 	CodeGenerator *getCodeGenerator(std::ostream &output);
 };

Modified: tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.cpp	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.cpp	2010-12-09 22:02:02 UTC (rev 54848)
@@ -22,7 +22,7 @@
 
 #include "simple_disassembler.h"
 
-SimpleDisassembler::SimpleDisassembler(std::vector<Instruction> &insts) : Disassembler(insts) {
+SimpleDisassembler::SimpleDisassembler(InstVec &insts) : Disassembler(insts) {
 }
 
 void SimpleDisassembler::readParams(Instruction &inst, const char *typeString) {

Modified: tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -54,7 +54,7 @@
 	 *
 	 * @param insts Reference to the vector in which disassembled instructions should be placed.
 	 */
-	SimpleDisassembler(std::vector<Instruction> &insts);
+	SimpleDisassembler(InstVec &insts);
 };
 
 #define INC_ADDR _address++;

Modified: tools/branches/gsoc2010-decompiler/decompiler/test/cfg_test.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/test/cfg_test.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/test/cfg_test.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -34,7 +34,7 @@
 class CFGTestSuite : public CxxTest::TestSuite {
 public:
 	void testUnreachable() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/unreachable.dmp");
@@ -68,7 +68,7 @@
 	};
 
 	void testBranching() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/branches.dmp");
@@ -102,7 +102,7 @@
 	}
 
 	void testGrouping() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/branches.dmp");
@@ -136,7 +136,7 @@
 	}
 
 	void testShortCircuitDetection() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/short-circuit.dmp");
@@ -151,7 +151,7 @@
 	}
 
 	void testWhileDetection() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/while.dmp");
@@ -171,7 +171,7 @@
 	}
 
 	void testDoWhileDetection() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/while.dmp");
@@ -191,7 +191,7 @@
 	}
 
 	void testBreakDetection() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/break-while.dmp");
@@ -247,7 +247,7 @@
 	}
 
 	void testContinueDetection() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/continue-while.dmp");
@@ -305,7 +305,7 @@
 	}
 
 	void testIfDetection() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/if.dmp");
@@ -397,7 +397,7 @@
 	}
 
 	void testElseDetection() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/if-else.dmp");
@@ -439,7 +439,7 @@
 	}
 
 	void testNestedLoops() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/do-while-in-while.dmp");
@@ -563,7 +563,7 @@
 	// This test requires script-30.dmp from Sam & Max: Hit The Road.
 	// 6e48faca13e1f6df9341567608962744 *script-30.dmp
 	void testSamAndMaxScript30() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/script-30.dmp");
@@ -623,7 +623,7 @@
 	// Extract using extract_kyra from the scummvm-tools-cli bundle.
 	// ba2821ac6da96394ce0af75a3cbe48eb *_START04.EMC
 	void testFunctionDetection() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Kyra::Kyra2Engine *engine = new Kyra::Kyra2Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/_START04.EMC");

Modified: tools/branches/gsoc2010-decompiler/decompiler/test/codegen.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/test/codegen.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/test/codegen.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -73,7 +73,7 @@
 class CodeGenTestSuite : public CxxTest::TestSuite {
 public:
 	void testContinue() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/continue-do-while.dmp");
@@ -117,7 +117,7 @@
 	}
 
 	void testBreak() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/break-while.dmp");
@@ -161,7 +161,7 @@
 	}
 
 	void testElse() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/if-else.dmp");
@@ -207,7 +207,7 @@
 	// 6e48faca13e1f6df9341567608962744 *script-30.dmp
 	// afd7dc5d377894b3b9d0504927adf1b1 *script-48.dmp
 	void testCoalescing() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Scumm::v6::Scummv6Engine *engine = new Scumm::v6::Scummv6Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/script-30.dmp");
@@ -271,7 +271,7 @@
 	// Extract using extract_kyra from the scummvm-tools-cli bundle.
 	// ba2821ac6da96394ce0af75a3cbe48eb *_START04.EMC
 	void testKyra2Start04CodeGen() {
-		std::vector<Instruction> insts;
+		InstVec insts;
 		Kyra::Kyra2Engine *engine = new Kyra::Kyra2Engine();
 		Disassembler *d = engine->getDisassembler(insts);
 		d->open("decompiler/test/_START04.EMC");

Modified: tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/pasc.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/pasc.cpp	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/pasc.cpp	2010-12-09 22:02:02 UTC (rev 54848)
@@ -22,7 +22,7 @@
 
 #include "pasc.h"
 
-PasCDisassembler::PasCDisassembler(std::vector<Instruction> &insts) : ::SimpleDisassembler(insts) {
+PasCDisassembler::PasCDisassembler(InstVec &insts) : ::SimpleDisassembler(insts) {
 }
 
 void PasCDisassembler::doDisassemble() throw(std::exception) {

Modified: tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/pasc.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/pasc.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/pasc.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -27,7 +27,7 @@
 
 class PasCDisassembler : public SimpleDisassembler {
 public:
-	PasCDisassembler(std::vector<Instruction> &insts);
+	PasCDisassembler(InstVec &insts);
 	void doDisassemble() throw(std::exception);
 };
 #endif

Modified: tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/subopcode.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/subopcode.cpp	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/subopcode.cpp	2010-12-09 22:02:02 UTC (rev 54848)
@@ -22,7 +22,7 @@
 
 #include "subopcode.h"
 
-SubOpcodeDisassembler::SubOpcodeDisassembler(std::vector<Instruction> &insts) : ::SimpleDisassembler(insts) {
+SubOpcodeDisassembler::SubOpcodeDisassembler(InstVec &insts) : ::SimpleDisassembler(insts) {
 }
 
 void SubOpcodeDisassembler::doDisassemble() throw(std::exception) {

Modified: tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/subopcode.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/subopcode.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/test/disassembler/subopcode.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -27,7 +27,7 @@
 
 class SubOpcodeDisassembler : public SimpleDisassembler {
 public:
-	SubOpcodeDisassembler(std::vector<Instruction> &insts);
+	SubOpcodeDisassembler(InstVec &insts);
 	void doDisassemble() throw(std::exception);
 };
 #endif

Modified: tools/branches/gsoc2010-decompiler/decompiler/test/disassembler_test.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/test/disassembler_test.h	2010-12-09 21:59:06 UTC (rev 54847)
+++ tools/branches/gsoc2010-decompiler/decompiler/test/disassembler_test.h	2010-12-09 22:02:02 UTC (rev 54848)
@@ -31,7 +31,7 @@
 public:
 	void testDisassembly() {
 		try {
-			std::vector<Instruction> insts;
+			InstVec insts;
 			PasCDisassembler p(insts);
 			p.open("decompiler/test/hanoi20.pasb");
 			p.disassemble();
@@ -52,7 +52,7 @@
 
 	void testSubOpcodeDisassembly() {
 		try {
-			std::vector<Instruction> insts;
+			InstVec insts;
 			SubOpcodeDisassembler s(insts);
 			s.open("decompiler/test/subopcode_test.bin");
 			s.disassemble();
@@ -65,7 +65,7 @@
 
 	void testUnknownOpcodeException() {
 		try {
-			std::vector<Instruction> insts;
+			InstVec insts;
 			SubOpcodeDisassembler s(insts);
 			s.open("decompiler/test/unknownopcode_test.bin");
 			s.disassemble();
@@ -81,7 +81,7 @@
 	// 1ab08298c9c8fb4c77953756989c7449 *script-15.dmp
 	void testScummv6DisassemblerScript15() {
 		try {
-			std::vector<Instruction> insts;
+			InstVec insts;
 			Scumm::v6::Scummv6Disassembler s(insts);
 			s.open("decompiler/test/script-15.dmp");
 			s.disassemble();
@@ -136,7 +136,7 @@
 	// f75f7ce110f378735d449f8eeb4a68e5 *script-31.dmp
 	void testScummv6DisassemblerScript31() {
 		try {
-			std::vector<Instruction> insts;
+			InstVec insts;
 			Scumm::v6::Scummv6Disassembler s(insts);
 			s.open("decompiler/test/script-31.dmp");
 			s.disassemble();
@@ -169,7 +169,7 @@
 	// 9f09418bf34abbdec0ec54f388d8dca4 *script-33.dmp
 	void testScummv6DisassemblerScript33() {
 		try {
-			std::vector<Instruction> insts;
+			InstVec insts;
 			Scumm::v6::Scummv6Disassembler s(insts);
 			s.open("decompiler/test/script-33.dmp");
 			s.disassemble();
@@ -221,7 +221,7 @@
 	// f010dc659264674a2b6da298acd0b88b *room-9-202.dmp
 	void testScummv6StackChangeFixRoom9202() {
 		try {
-			std::vector<Instruction> insts;
+			InstVec insts;
 			Scumm::v6::Scummv6Disassembler s(insts);
 			s.open("decompiler/test/room-9-202.dmp");
 			s.disassemble();
@@ -237,7 +237,7 @@
 	// 6e48faca13e1f6df9341567608962744 *script-30.dmp
 	void testScummv6StackChangeFixScript30() {
 		try {
-			std::vector<Instruction> insts;
+			InstVec insts;
 			Scumm::v6::Scummv6Disassembler s(insts);
 			s.open("decompiler/test/script-30.dmp");
 			s.disassemble();
@@ -255,7 +255,7 @@
 	// ba2821ac6da96394ce0af75a3cbe48eb *_START04.EMC
 	void testKyra2Start04() {
 		try {
-			std::vector<Instruction> insts;
+			InstVec insts;
 			Kyra::Kyra2Engine engine;
 			Disassembler* s = engine.getDisassembler(insts);
 			s->open("decompiler/test/_START04.EMC");


This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site.




More information about the Scummvm-git-logs mailing list