[Scummvm-cvs-logs] SF.net SVN: scummvm:[51116] tools/branches/gsoc2010-decompiler/decompiler
pidgeot at users.sourceforge.net
pidgeot at users.sourceforge.net
Thu Jul 22 00:01:31 CEST 2010
Revision: 51116
http://scummvm.svn.sourceforge.net/scummvm/?rev=51116&view=rev
Author: pidgeot
Date: 2010-07-21 22:01:31 +0000 (Wed, 21 Jul 2010)
Log Message:
-----------
Rename _operator in Instruction to _codegenData
Modified Paths:
--------------
tools/branches/gsoc2010-decompiler/decompiler/instruction.h
tools/branches/gsoc2010-decompiler/decompiler/scummv6/codegen.cpp
tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h
Modified: tools/branches/gsoc2010-decompiler/decompiler/instruction.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/instruction.h 2010-07-21 22:00:52 UTC (rev 51115)
+++ tools/branches/gsoc2010-decompiler/decompiler/instruction.h 2010-07-21 22:01:31 UTC (rev 51116)
@@ -104,7 +104,7 @@
std::string _name; ///< The instruction name (opcode name).
InstType _type; ///< The instruction type.
std::vector<Parameter> _params; ///< Array of parameters used for the instruction.
- std::string _operator; ///< If instruction represents an operator, use this to contain the operator in question.
+ std::string _codeGenData; ///< String containing metadata for code generation. See the extended documentation for details.
};
/**
Modified: tools/branches/gsoc2010-decompiler/decompiler/scummv6/codegen.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/scummv6/codegen.cpp 2010-07-21 22:00:52 UTC (rev 51115)
+++ tools/branches/gsoc2010-decompiler/decompiler/scummv6/codegen.cpp 2010-07-21 22:01:31 UTC (rev 51116)
@@ -96,7 +96,7 @@
{
EntryPtr rhs = _stack.pop();
EntryPtr lhs = _stack.pop();
- _stack.push(new BinaryOpEntry(lhs, rhs, inst._operator));
+ _stack.push(new BinaryOpEntry(lhs, rhs, inst._codeGenData));
break;
}
case kCondJumpRel:
@@ -115,7 +115,7 @@
case kUnaryOp:
switch (inst._opcode) {
case 0x0D: // not
- _stack.push(new UnaryOpEntry(_stack.pop(), inst._operator));
+ _stack.push(new UnaryOpEntry(_stack.pop(), inst._codeGenData));
break;
case 0x4E: // byteVarInc
case 0x4F: // wordVarInc
@@ -123,7 +123,7 @@
case 0x57: // wordVarDec
{
std::stringstream s;
- EntryPtr p = new UnaryOpEntry(new VarEntry(decodeVarName(inst._params[0].getUnsigned())), inst._operator);
+ EntryPtr p = new UnaryOpEntry(new VarEntry(decodeVarName(inst._params[0].getUnsigned())), inst._codeGenData);
s << p;
addOutputLine(s.str());
break;
@@ -136,7 +136,7 @@
std::stringstream s;
ArrayIdxType idxs;
idxs.push_front(_stack.pop());
- EntryPtr p = new UnaryOpEntry(new ArrayEntry(decodeVarName(inst._params[0].getUnsigned()), idxs), inst._operator);
+ EntryPtr p = new UnaryOpEntry(new ArrayEntry(decodeVarName(inst._params[0].getUnsigned()), idxs), inst._codeGenData);
s << p;
addOutputLine(s.str());
break;
Modified: tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h 2010-07-21 22:00:52 UTC (rev 51115)
+++ tools/branches/gsoc2010-decompiler/decompiler/simple_disassembler.h 2010-07-21 22:01:31 UTC (rev 51116)
@@ -72,19 +72,19 @@
#define OPCODE_END break;
-#define OPCODE_BODY(name, category, stackChange, params, op) \
+#define OPCODE_BODY(name, category, stackChange, params, codeGenData) \
ADD_INST; \
LAST_INST._opcode = full_opcode; \
LAST_INST._address = _address; \
LAST_INST._stackChange = stackChange; \
LAST_INST._name = std::string(name); \
LAST_INST._type = category; \
- LAST_INST._operator = op; \
+ LAST_INST._codeGenData = codeGenData; \
readParams(&LAST_INST, (char*)params); \
-#define OPCODE_OP(val, name, category, stackChange, params, op) \
+#define OPCODE_OP(val, name, category, stackChange, params, codeGenData) \
OPCODE_BASE(val)\
- OPCODE_BODY(name, category, stackChange, params, op)\
+ OPCODE_BODY(name, category, stackChange, params, codeGenData)\
OPCODE_END;
#define OPCODE(val, name, category, stackChange, params) \
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