[Scummvm-cvs-logs] SF.net SVN: scummvm:[50698] tools/branches/gsoc2010-decompiler/decompiler
pidgeot at users.sourceforge.net
pidgeot at users.sourceforge.net
Mon Jul 5 20:18:40 CEST 2010
Revision: 50698
http://scummvm.svn.sourceforge.net/scummvm/?rev=50698&view=rev
Author: pidgeot
Date: 2010-07-05 18:18:40 +0000 (Mon, 05 Jul 2010)
Log Message:
-----------
Improve Doxygen comments
Modified Paths:
--------------
tools/branches/gsoc2010-decompiler/decompiler/control_flow.h
tools/branches/gsoc2010-decompiler/decompiler/graph.h
Modified: tools/branches/gsoc2010-decompiler/decompiler/control_flow.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/control_flow.h 2010-07-05 18:02:54 UTC (rev 50697)
+++ tools/branches/gsoc2010-decompiler/decompiler/control_flow.h 2010-07-05 18:18:40 UTC (rev 50698)
@@ -80,6 +80,7 @@
/**
* Detects while blocks.
+ * Do-while detection must be completed before running this method.
*/
void detectWhile();
@@ -90,11 +91,13 @@
/**
* Detects break statements.
+ * Do-while and while detection must be completed before running this method.
*/
void detectBreak();
/**
* Detects continue statements.
+ * Do-while and while detection must be completed before running this method.
*/
void detectContinue();
@@ -109,6 +112,7 @@
/**
* Detects if and else blocks.
+ * Must be performed after break and continue detection.
*/
void detectIf();
@@ -130,11 +134,14 @@
/**
* Creates groups suitable for a stack-based machine.
+ * Before group creation, the expected stack level for each instruction is determined.
+ * After group creation, short-circuit detection is applied to the groups.
*/
void createGroups();
/**
* Performs control flow analysis.
+ * The constructs are detected in the following order: do-while, while, break, continue, if/else.
*
* @returns The control flow graph after analysis.
*/
Modified: tools/branches/gsoc2010-decompiler/decompiler/graph.h
===================================================================
--- tools/branches/gsoc2010-decompiler/decompiler/graph.h 2010-07-05 18:02:54 UTC (rev 50697)
+++ tools/branches/gsoc2010-decompiler/decompiler/graph.h 2010-07-05 18:18:40 UTC (rev 50698)
@@ -51,12 +51,12 @@
struct Group {
ConstInstIterator _start; ///< First instruction in the group.
ConstInstIterator _end; ///< Last instruction in the group.
- int _stackLevel; ///< Level of the stack upon entry.
- GroupType _type; ///< Type of the group.
- bool _startElse; ///< Group is start of an else block.
- bool _endElse; ///< Group is end of an else block.
- Group *_prev; ///< Pointer to the previous group, when ordered by address. Used for short-circuit analysis.
- Group *_next; ///< Pointer to the next group, when ordered by address.
+ int _stackLevel; ///< Level of the stack upon entry.
+ GroupType _type; ///< Type of the group.
+ bool _startElse; ///< Group is start of an else block.
+ bool _endElse; ///< Group is end of an else block.
+ Group *_prev; ///< Pointer to the previous group, when ordered by address. Used for short-circuit analysis.
+ Group *_next; ///< Pointer to the next group, when ordered by address.
/**
* Parameterless constructor for Group. Required for use with STL and Boost, should not be called manually.
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