[Scummvm-cvs-logs] SF.net SVN: scummvm:[51232] tools/branches/gsoc2010-decompiler/decompiler
pidgeot at users.sourceforge.net
pidgeot at users.sourceforge.net
Sat Jul 24 03:34:57 CEST 2010
Revision: 51232
http://scummvm.svn.sourceforge.net/scummvm/?rev=51232&view=rev
Author: pidgeot
Date: 2010-07-24 01:34:56 +0000 (Sat, 24 Jul 2010)
Log Message:
-----------
Remove obsolete TODO, add parenthesis to UnaryOp
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-07-24 01:33:40 UTC (rev 51231)
+++ tools/branches/gsoc2010-decompiler/decompiler/codegen.cpp 2010-07-24 01:34:56 UTC (rev 51232)
@@ -167,16 +167,15 @@
break;
case kBinaryOp:
case kComparison:
- //TODO: Allow specification of order in which operands appear on stack
- {
- EntryPtr op1 = _stack.pop();
- EntryPtr op2 = _stack.pop();
- if (_binOrder == kFIFO)
- _stack.push(new BinaryOpEntry(op2, op1, it->_codeGenData));
- else if (_binOrder == kLIFO)
- _stack.push(new BinaryOpEntry(op1, op2, it->_codeGenData));
- break;
- }
+ {
+ EntryPtr op1 = _stack.pop();
+ EntryPtr op2 = _stack.pop();
+ if (_binOrder == kFIFO)
+ _stack.push(new BinaryOpEntry(op2, op1, it->_codeGenData));
+ else if (_binOrder == kLIFO)
+ _stack.push(new BinaryOpEntry(op1, op2, it->_codeGenData));
+ break;
+ }
case kCondJump:
case kCondJumpRel:
{
Modified: tools/branches/gsoc2010-decompiler/decompiler/codegen.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/codegen.h 2010-07-24 01:33:40 UTC (rev 51231)
+++ tools/branches/gsoc2010-decompiler/decompiler/codegen.h 2010-07-24 01:34:56 UTC (rev 51232)
@@ -230,7 +230,7 @@
StackEntry(seUnaryOp), _operand(operand), _op(op) { }
virtual std::ostream &print(std::ostream &output) const {
- return output << _op << _operand;
+ return output << _op << "(" << _operand << ")";
}
};
@@ -265,7 +265,7 @@
class ArrayEntry : public StackEntry {
private:
const std::string _arrayName; ///< The name of the array.
- const EntryList _idxs; ///< std::deque of stack entries representing the indexes used (left-to-right).
+ const EntryList _idxs; ///< std::deque of stack entries representing the indexes used (left-to-right).
public:
/**
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