Renamed non conforming member variables
This commit is contained in:
parent
60354f5e2d
commit
16aa0ac315
File diff suppressed because it is too large
Load Diff
|
@ -175,18 +175,18 @@ public:
|
||||||
class ByteCodeBasicBlock
|
class ByteCodeBasicBlock
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
DynamicArray<uint8> code;
|
DynamicArray<uint8> mCode;
|
||||||
int num;
|
int mIndex;
|
||||||
|
|
||||||
ByteCodeBasicBlock * trueJump, * falseJump;
|
ByteCodeBasicBlock * mTrueJump, * mFalseJump;
|
||||||
ByteCodeBasicBlock * trueLink, * falseLink;
|
ByteCodeBasicBlock * mTrueLink, * mFalseLink;
|
||||||
ByteCode branch;
|
ByteCode mBranch;
|
||||||
|
|
||||||
GrowingArray<ByteCodeInstruction> mIns;
|
GrowingArray<ByteCodeInstruction> mIns;
|
||||||
GrowingArray<ByteCodeRelocation> mRelocations;
|
GrowingArray<ByteCodeRelocation> mRelocations;
|
||||||
|
|
||||||
int mOffset, mSize;
|
int mOffset, mSize;
|
||||||
bool placed, copied, knownShortBranch, killed, bypassed, mAssembled;
|
bool mPlaced, mCopied, mKnownShortBranch, mBypassed, mAssembled;
|
||||||
|
|
||||||
ByteCodeBasicBlock(void);
|
ByteCodeBasicBlock(void);
|
||||||
|
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
|
@ -116,8 +116,8 @@ typedef GrowingArray<InterVariable> GrowingVariableArray;
|
||||||
class ValueSet
|
class ValueSet
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
InterInstructionPtr * instructions;
|
InterInstructionPtr * mInstructions;
|
||||||
int num, size;
|
int mNum, mSize;
|
||||||
public:
|
public:
|
||||||
ValueSet(void);
|
ValueSet(void);
|
||||||
ValueSet(const ValueSet& values);
|
ValueSet(const ValueSet& values);
|
||||||
|
@ -137,96 +137,96 @@ class TempForwardingTable
|
||||||
protected:
|
protected:
|
||||||
struct Assoc
|
struct Assoc
|
||||||
{
|
{
|
||||||
int assoc, succ, pred;
|
int mAssoc, mSucc, mPred;
|
||||||
|
|
||||||
Assoc(void) {}
|
Assoc(void) {}
|
||||||
Assoc(int assoc, int succ, int pred) { this->assoc = assoc; this->succ = succ; this->pred = pred; }
|
Assoc(int assoc, int succ, int pred) { this->mAssoc = assoc; this->mSucc = succ; this->mPred = pred; }
|
||||||
Assoc(const Assoc& assoc) { this->assoc = assoc.assoc; this->succ = assoc.succ; this->pred = assoc.pred; }
|
Assoc(const Assoc& assoc) { this->mAssoc = assoc.mAssoc; this->mSucc = assoc.mSucc; this->mPred = assoc.mPred; }
|
||||||
};
|
};
|
||||||
|
|
||||||
GrowingArray<Assoc> assoc;
|
GrowingArray<Assoc> mAssoc;
|
||||||
|
|
||||||
public:
|
public:
|
||||||
TempForwardingTable(void) : assoc(Assoc(-1, -1, -1))
|
TempForwardingTable(void) : mAssoc(Assoc(-1, -1, -1))
|
||||||
{
|
{
|
||||||
}
|
}
|
||||||
|
|
||||||
TempForwardingTable(const TempForwardingTable & table) : assoc(Assoc(-1, -1, -1))
|
TempForwardingTable(const TempForwardingTable & table) : mAssoc(Assoc(-1, -1, -1))
|
||||||
{
|
{
|
||||||
for (int i = 0; i < table.assoc.Size(); i++)
|
for (int i = 0; i < table.mAssoc.Size(); i++)
|
||||||
{
|
{
|
||||||
assoc[i].assoc = table.assoc[i].assoc;
|
mAssoc[i].mAssoc = table.mAssoc[i].mAssoc;
|
||||||
assoc[i].succ = table.assoc[i].succ;
|
mAssoc[i].mSucc = table.mAssoc[i].mSucc;
|
||||||
assoc[i].pred = table.assoc[i].pred;
|
mAssoc[i].mPred = table.mAssoc[i].mPred;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
void SetSize(int size)
|
void SetSize(int size)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
assoc.SetSize(size);
|
mAssoc.SetSize(size);
|
||||||
|
|
||||||
for (i = 0; i < size; i++)
|
for (i = 0; i < size; i++)
|
||||||
assoc[i] = Assoc(i, i, i);
|
mAssoc[i] = Assoc(i, i, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Reset(void)
|
void Reset(void)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
for (i = 0; i < assoc.Size(); i++)
|
for (i = 0; i < mAssoc.Size(); i++)
|
||||||
assoc[i] = Assoc(i, i, i);
|
mAssoc[i] = Assoc(i, i, i);
|
||||||
}
|
}
|
||||||
|
|
||||||
int operator[](int n)
|
int operator[](int n)
|
||||||
{
|
{
|
||||||
return assoc[n].assoc;
|
return mAssoc[n].mAssoc;
|
||||||
}
|
}
|
||||||
|
|
||||||
void Destroy(int n)
|
void Destroy(int n)
|
||||||
{
|
{
|
||||||
int i, j;
|
int i, j;
|
||||||
|
|
||||||
if (assoc[n].assoc == n)
|
if (mAssoc[n].mAssoc == n)
|
||||||
{
|
{
|
||||||
i = assoc[n].succ;
|
i = mAssoc[n].mSucc;
|
||||||
while (i != n)
|
while (i != n)
|
||||||
{
|
{
|
||||||
j = assoc[i].succ;
|
j = mAssoc[i].mSucc;
|
||||||
assoc[i] = Assoc(i, i, i);
|
mAssoc[i] = Assoc(i, i, i);
|
||||||
i = j;
|
i = j;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
assoc[assoc[n].pred].succ = assoc[n].succ;
|
mAssoc[mAssoc[n].mPred].mSucc = mAssoc[n].mSucc;
|
||||||
assoc[assoc[n].succ].pred = assoc[n].pred;
|
mAssoc[mAssoc[n].mSucc].mPred = mAssoc[n].mPred;
|
||||||
}
|
}
|
||||||
|
|
||||||
assoc[n] = Assoc(n, n, n);
|
mAssoc[n] = Assoc(n, n, n);
|
||||||
}
|
}
|
||||||
|
|
||||||
void Build(int from, int to)
|
void Build(int from, int to)
|
||||||
{
|
{
|
||||||
int i;
|
int i;
|
||||||
|
|
||||||
from = assoc[from].assoc;
|
from = mAssoc[from].mAssoc;
|
||||||
to = assoc[to].assoc;
|
to = mAssoc[to].mAssoc;
|
||||||
|
|
||||||
if (from != to)
|
if (from != to)
|
||||||
{
|
{
|
||||||
i = assoc[from].succ;
|
i = mAssoc[from].mSucc;
|
||||||
while (i != from)
|
while (i != from)
|
||||||
{
|
{
|
||||||
assoc[i].assoc = to;
|
mAssoc[i].mAssoc = to;
|
||||||
i = assoc[i].succ;
|
i = mAssoc[i].mSucc;
|
||||||
}
|
}
|
||||||
assoc[from].assoc = to;
|
mAssoc[from].mAssoc = to;
|
||||||
|
|
||||||
assoc[assoc[to].succ].pred = assoc[from].pred;
|
mAssoc[mAssoc[to].mSucc].mPred = mAssoc[from].mPred;
|
||||||
assoc[assoc[from].pred].succ = assoc[to].succ;
|
mAssoc[mAssoc[from].mPred].mSucc = mAssoc[to].mSucc;
|
||||||
assoc[to].succ = from;
|
mAssoc[to].mSucc = from;
|
||||||
assoc[from].pred = to;
|
mAssoc[from].mPred = to;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
@ -256,22 +256,18 @@ public:
|
||||||
class InterInstruction
|
class InterInstruction
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
InterCode code;
|
InterCode mCode;
|
||||||
InterType ttype, stype[3];
|
InterType mTType, mSType[3];
|
||||||
int ttemp, stemp[3];
|
int mTTemp, mSTemp[3];
|
||||||
bool sfinal[3];
|
bool mSFinal[3];
|
||||||
__int64 siconst[3];
|
__int64 mSIntConst[3];
|
||||||
double sfconst[3];
|
InterMemory mMemory;
|
||||||
int spconst[3];
|
InterOperator mOperator;
|
||||||
InterMemory mem;
|
int mOperandSize;
|
||||||
InterOperator oper;
|
int mVarIndex;
|
||||||
int opsize;
|
__int64 mIntValue;
|
||||||
int vindex;
|
double mFloatValue;
|
||||||
__int64 ivalue;
|
Location mLocation;
|
||||||
double fvalue;
|
|
||||||
bool zeroFrame;
|
|
||||||
Location loc;
|
|
||||||
InterCodeBasicBlock * exceptionJump;
|
|
||||||
|
|
||||||
InterInstruction(void);
|
InterInstruction(void);
|
||||||
void SetCode(const Location & loc, InterCode code);
|
void SetCode(const Location & loc, InterCode code);
|
||||||
|
@ -350,16 +346,15 @@ public:
|
||||||
class InterCodeBasicBlock
|
class InterCodeBasicBlock
|
||||||
{
|
{
|
||||||
public:
|
public:
|
||||||
int num, numEntries;
|
int mIndex, mNumEntries;
|
||||||
InterCodeBasicBlock* trueJump, * falseJump;
|
InterCodeBasicBlock* mTrueJump, * mFalseJump;
|
||||||
GrowingInstructionArray code;
|
GrowingInstructionArray mInstructions;
|
||||||
|
|
||||||
bool visited;
|
bool mVisited;
|
||||||
int entryISP, entryPSP, entryFSP;
|
|
||||||
|
|
||||||
NumberSet localRequiredTemps, localProvidedTemps;
|
NumberSet mLocalRequiredTemps, mLocalProvidedTemps;
|
||||||
NumberSet entryRequiredTemps, entryProvidedTemps;
|
NumberSet mEntryRequiredTemps, mEntryProvidedTemps;
|
||||||
NumberSet exitRequiredTemps, exitProvidedTemps;
|
NumberSet mExitRequiredTemps, exitProvidedTemps;
|
||||||
|
|
||||||
NumberSet mLocalRequiredVars, mLocalProvidedVars;
|
NumberSet mLocalRequiredVars, mLocalProvidedVars;
|
||||||
NumberSet mEntryRequiredVars, mEntryProvidedVars;
|
NumberSet mEntryRequiredVars, mEntryProvidedVars;
|
||||||
|
@ -389,8 +384,8 @@ public:
|
||||||
bool BuildGlobalRequiredVariableSet(const GrowingVariableArray& localVars, NumberSet& fromRequiredVars);
|
bool BuildGlobalRequiredVariableSet(const GrowingVariableArray& localVars, NumberSet& fromRequiredVars);
|
||||||
bool RemoveUnusedStoreInstructions(const GrowingVariableArray& localVars);
|
bool RemoveUnusedStoreInstructions(const GrowingVariableArray& localVars);
|
||||||
|
|
||||||
GrowingIntArray entryRenameTable;
|
GrowingIntArray mEntryRenameTable;
|
||||||
GrowingIntArray exitRenameTable;
|
GrowingIntArray mExitRenameTable;
|
||||||
|
|
||||||
void LocalRenameRegister(const GrowingIntArray& renameTable, int& num, int fixed);
|
void LocalRenameRegister(const GrowingIntArray& renameTable, int& num, int fixed);
|
||||||
void BuildGlobalRenameRegisterTable(const GrowingIntArray& renameTable, GrowingIntArray& globalRenameTable);
|
void BuildGlobalRenameRegisterTable(const GrowingIntArray& renameTable, GrowingIntArray& globalRenameTable);
|
||||||
|
@ -427,16 +422,16 @@ class InterCodeModule;
|
||||||
class InterCodeProcedure
|
class InterCodeProcedure
|
||||||
{
|
{
|
||||||
protected:
|
protected:
|
||||||
GrowingIntArray renameTable, renameUnionTable, globalRenameTable;
|
GrowingIntArray mRenameTable, mRenameUnionTable, mGlobalRenameTable;
|
||||||
TempForwardingTable tempForwardingTable;
|
TempForwardingTable mTempForwardingTable;
|
||||||
GrowingInstructionPtrArray valueForwardingTable;
|
GrowingInstructionPtrArray mValueForwardingTable;
|
||||||
int numFixedTemporaries;
|
int numFixedTemporaries;
|
||||||
NumberSet localAliasedSet;
|
NumberSet mLocalAliasedSet;
|
||||||
|
|
||||||
void ResetVisited(void);
|
void ResetVisited(void);
|
||||||
public:
|
public:
|
||||||
GrowingInterCodeBasicBlockPtrArray blocks;
|
GrowingInterCodeBasicBlockPtrArray mBlocks;
|
||||||
GrowingTypeArray temporaries;
|
GrowingTypeArray mTemporaries;
|
||||||
GrowingIntArray mTempOffset;
|
GrowingIntArray mTempOffset;
|
||||||
int mTempSize, mCommonFrameSize;
|
int mTempSize, mCommonFrameSize;
|
||||||
bool mLeafProcedure;
|
bool mLeafProcedure;
|
||||||
|
|
File diff suppressed because it is too large
Load Diff
Loading…
Reference in New Issue