[Scummvm-cvs-logs] SF.net SVN: scummvm:[52312] tools/branches/gsoc2010-decompiler/decompiler
lordhoto at users.sourceforge.net
lordhoto at users.sourceforge.net
Mon Aug 23 23:30:52 CEST 2010
Revision: 52312
http://scummvm.svn.sourceforge.net/scummvm/?rev=52312&view=rev
Author: lordhoto
Date: 2010-08-23 21:30:51 +0000 (Mon, 23 Aug 2010)
Log Message:
-----------
DECOMP: Cleanup.
Modified Paths:
--------------
tools/branches/gsoc2010-decompiler/decompiler/codegen.cpp
tools/branches/gsoc2010-decompiler/decompiler/codegen.h
Modified: tools/branches/gsoc2010-decompiler/decompiler/codegen.cpp
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/codegen.cpp 2010-08-23 20:29:13 UTC (rev 52311)
+++ tools/branches/gsoc2010-decompiler/decompiler/codegen.cpp 2010-08-23 21:30:51 UTC (rev 52312)
@@ -286,8 +286,10 @@
for (InEdgeIterator ie = ier.first; ie != ier.second; ++ie) {
GraphVertex in = boost::source(*ie, _g);
GroupPtr inGroup = GET(in);
+
if (!boost::get(boost::edge_attribute, _g, *ie)._isJump || inGroup->_stackLevel == -1)
continue;
+
switch (inGroup->_type) {
case kDoWhileCondGroupType:
addOutputLine("do {", false, true);
@@ -301,7 +303,6 @@
break;
default:
break;
-
}
}
@@ -314,14 +315,12 @@
for (ElseEndIterator elseIt = _curGroup->_endElse.begin(); elseIt != _curGroup->_endElse.end(); ++elseIt) {
if (!(*elseIt)->_coalescedElse)
addOutputLine("}", true, false);
-
-
}
}
void CodeGenerator::processInst(const Instruction inst) {
switch (inst._type) {
- // We handle plain dups here because their behavior should be identical across instruction sets and this prevents implementation error.
+ // We handle plain dups here because their behavior should be identical across instruction sets and this prevents implementation error.
case kDupInstType:
{
std::stringstream s;
@@ -463,11 +462,12 @@
void CodeGenerator::processSpecialMetadata(const Instruction &inst, char c, int pos) {
switch (c) {
- case 'p':
- addArg(_stack.pop());
- break;
- default:
- std::cerr << boost::format("WARNING: Unknown character in metadata: %c\n") % c ;
- break;
+ case 'p':
+ addArg(_stack.pop());
+ break;
+ default:
+ std::cerr << boost::format("WARNING: Unknown character in metadata: %c\n") % c ;
+ break;
}
}
+
Modified: tools/branches/gsoc2010-decompiler/decompiler/codegen.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/codegen.h 2010-08-23 20:29:13 UTC (rev 52311)
+++ tools/branches/gsoc2010-decompiler/decompiler/codegen.h 2010-08-23 21:30:51 UTC (rev 52312)
@@ -384,7 +384,7 @@
*
* @param inst The instruction to process.
*/
- virtual void processInst(const Instruction inst) = 0;
+ virtual void processInst(const Instruction inst);
/**
* Indents a string according to the current indentation level.
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