Various code cleanups.
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
#pragma once
|
||||
#include "ast.h"
|
||||
|
||||
#ifdef PASCAL
|
||||
#undef PASCAL
|
||||
#endif
|
||||
class QTextStream;
|
||||
|
||||
struct CConv {
|
||||
enum Type {
|
||||
UNKNOWN=0,
|
||||
C,
|
||||
PASCAL
|
||||
eUnknown=0,
|
||||
eCdecl,
|
||||
ePascal
|
||||
};
|
||||
virtual void processHLI(Function *func, Expr *_exp, iICODE picode)=0;
|
||||
virtual void writeComments(QTextStream &)=0;
|
||||
|
||||
@@ -100,7 +100,7 @@ protected:
|
||||
hasCase(false),liveAnal(0)
|
||||
{
|
||||
type = new FunctionType;
|
||||
callingConv(CConv::UNKNOWN);
|
||||
callingConv(CConv::eUnknown);
|
||||
}
|
||||
|
||||
public:
|
||||
|
||||
@@ -28,25 +28,25 @@ extern bundle cCode; /* Output C procedure's declaration and code */
|
||||
|
||||
extern QString asm1_name, asm2_name; /* Assembler output filenames */
|
||||
|
||||
typedef struct { /* Command line option flags */
|
||||
unsigned verbose : 1;
|
||||
unsigned VeryVerbose : 1;
|
||||
unsigned asm1 : 1; /* Early disassembly listing */
|
||||
unsigned asm2 : 1; /* Disassembly listing after restruct */
|
||||
unsigned Map : 1;
|
||||
unsigned Stats : 1;
|
||||
unsigned Interact : 1; /* Interactive mode */
|
||||
unsigned Calls : 1; /* Follow register indirect calls */
|
||||
/** Command line option flags */
|
||||
struct OPTION
|
||||
{
|
||||
bool verbose;
|
||||
bool VeryVerbose;
|
||||
bool asm1; /* Early disassembly listing */
|
||||
bool asm2; /* Disassembly listing after restruct */
|
||||
bool Map;
|
||||
bool Stats;
|
||||
bool Interact; /* Interactive mode */
|
||||
bool Calls; /* Follow register indirect calls */
|
||||
QString filename; /* The input filename */
|
||||
uint32_t CustomEntryPoint;
|
||||
} OPTION;
|
||||
};
|
||||
|
||||
extern OPTION option; /* Command line options */
|
||||
|
||||
#include "BinaryImage.h"
|
||||
|
||||
|
||||
|
||||
/* Memory map states */
|
||||
enum eAreaType
|
||||
{
|
||||
|
||||
@@ -165,8 +165,8 @@ struct AssignType : public HlTypeSupport
|
||||
/* for HLI_ASSIGN */
|
||||
protected:
|
||||
public:
|
||||
Expr *m_lhs;
|
||||
Expr *rhs;
|
||||
Expr * m_lhs;
|
||||
Expr * m_rhs;
|
||||
AssignType() {}
|
||||
Expr *lhs() const {return m_lhs;}
|
||||
void lhs(Expr *l);
|
||||
@@ -176,8 +176,8 @@ public:
|
||||
struct ExpType : public HlTypeSupport
|
||||
{
|
||||
/* for HLI_JCOND, HLI_RET, HLI_PUSH, HLI_POP*/
|
||||
Expr *v;
|
||||
ExpType() : v(0) {}
|
||||
Expr * v;
|
||||
ExpType() : v(nullptr) {}
|
||||
bool removeRegFromLong(eReg regi, LOCAL_ID *locId)
|
||||
{
|
||||
v=performLongRemoval(regi,locId,v);
|
||||
|
||||
@@ -170,9 +170,9 @@ public:
|
||||
void flagByteWordId(int off);
|
||||
void propLongId(uint8_t regL, uint8_t regH, const QString & name);
|
||||
size_t csym() const {return id_arr.size();}
|
||||
void newRegArg(iICODE picode, iICODE ticode) const;
|
||||
void processTargetIcode(iICODE picode, int &numHlIcodes, iICODE ticode, bool isLong) const;
|
||||
void forwardSubs(Expr *lhs, Expr *rhs, iICODE picode, iICODE ticode, int &numHlIcodes) const;
|
||||
void newRegArg(ICODE & picode, ICODE & ticode) const;
|
||||
void processTargetIcode(ICODE & picode, int &numHlIcodes, ICODE & ticode, bool isLong) const;
|
||||
void forwardSubs(Expr *lhs, Expr *rhs, ICODE & picode, ICODE & ticode, int &numHlIcodes) const;
|
||||
AstIdent *createId(const ID *retVal, iICODE ix_);
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user