Fix enums in debug output
This commit is contained in:
parent
7d3dc493c0
commit
a4faf204cb
|
@ -1183,11 +1183,14 @@ bool Compiler::WriteDbjFile(const char* filename)
|
||||||
Declaration* mdec = dec->mParams;
|
Declaration* mdec = dec->mParams;
|
||||||
while (mdec)
|
while (mdec)
|
||||||
{
|
{
|
||||||
if (!tfirst)
|
if (mdec->mIdent)
|
||||||
fprintf(file, ",\n");
|
{
|
||||||
tfirst = false;
|
if (!tfirst)
|
||||||
|
fprintf(file, ",\n");
|
||||||
|
tfirst = false;
|
||||||
|
|
||||||
fprintf(file, "\t\t\t{\"name\": \"%s\", \"value\": %d}", mdec->mIdent->mString, int(mdec->mInteger));
|
fprintf(file, "\t\t\t{\"name\": \"%s\", \"value\": %d}", mdec->mIdent->mString, int(mdec->mInteger));
|
||||||
|
}
|
||||||
|
|
||||||
mdec = mdec->mNext;
|
mdec = mdec->mNext;
|
||||||
}
|
}
|
||||||
|
|
|
@ -28173,6 +28173,9 @@ bool NativeCodeBasicBlock::OptimizeSimpleLoopInvariant(NativeCodeProcedure* proc
|
||||||
{
|
{
|
||||||
if (!prevBlock)
|
if (!prevBlock)
|
||||||
return OptimizeSimpleLoopInvariant(proc, full);
|
return OptimizeSimpleLoopInvariant(proc, full);
|
||||||
|
mExitRequiredRegs += CPU_REG_Y;
|
||||||
|
exitBlock->mEntryRequiredRegs += CPU_REG_Y;
|
||||||
|
|
||||||
exitBlock->mIns.Insert(0, mIns[ei]);
|
exitBlock->mIns.Insert(0, mIns[ei]);
|
||||||
mIns.Remove(ei);
|
mIns.Remove(ei);
|
||||||
|
|
||||||
|
@ -29500,6 +29503,10 @@ bool NativeCodeBasicBlock::OptimizeSimpleLoop(NativeCodeProcedure * proc, bool f
|
||||||
assert(mBranch != ASMIT_JMP || mFalseJump == nullptr);
|
assert(mBranch != ASMIT_JMP || mFalseJump == nullptr);
|
||||||
|
|
||||||
CheckLive();
|
CheckLive();
|
||||||
|
if (mTrueJump)
|
||||||
|
mTrueJump->CheckLive();
|
||||||
|
if (mFalseJump)
|
||||||
|
mFalseJump->CheckLive();
|
||||||
|
|
||||||
#if 1
|
#if 1
|
||||||
if (sz > 3 &&
|
if (sz > 3 &&
|
||||||
|
@ -30226,6 +30233,8 @@ bool NativeCodeBasicBlock::OptimizeInnerLoop(NativeCodeProcedure* proc, NativeCo
|
||||||
tail->mEntryRequiredRegs += CPU_REG_Y;
|
tail->mEntryRequiredRegs += CPU_REG_Y;
|
||||||
tail->mExitRequiredRegs += CPU_REG_Y;
|
tail->mExitRequiredRegs += CPU_REG_Y;
|
||||||
head->mExitRequiredRegs += CPU_REG_Y;
|
head->mExitRequiredRegs += CPU_REG_Y;
|
||||||
|
eblock->mEntryRequiredRegs = tail->mExitRequiredRegs;
|
||||||
|
eblock->mEntryRequiredRegs += CPU_REG_Y;
|
||||||
|
|
||||||
lblock->CheckLive();
|
lblock->CheckLive();
|
||||||
|
|
||||||
|
@ -39225,7 +39234,7 @@ void NativeCodeProcedure::Compile(InterCodeProcedure* proc)
|
||||||
{
|
{
|
||||||
mInterProc = proc;
|
mInterProc = proc;
|
||||||
|
|
||||||
CheckFunc = !strcmp(mInterProc->mIdent->mString, "iec_read");
|
CheckFunc = !strcmp(mInterProc->mIdent->mString, "rirq_build");
|
||||||
|
|
||||||
int nblocks = proc->mBlocks.Size();
|
int nblocks = proc->mBlocks.Size();
|
||||||
tblocks = new NativeCodeBasicBlock * [nblocks];
|
tblocks = new NativeCodeBasicBlock * [nblocks];
|
||||||
|
|
|
@ -333,13 +333,13 @@ Declaration* Parser::ParseBaseTypeDeclaration(uint64 flags)
|
||||||
else if (cdec->mInteger > maxValue)
|
else if (cdec->mInteger > maxValue)
|
||||||
maxValue = cdec->mInteger;
|
maxValue = cdec->mInteger;
|
||||||
|
|
||||||
|
cdec->mNext = dec->mParams;
|
||||||
|
dec->mParams = cdec;
|
||||||
|
|
||||||
if (mScanner->mToken == TK_COMMA)
|
if (mScanner->mToken == TK_COMMA)
|
||||||
mScanner->NextToken();
|
mScanner->NextToken();
|
||||||
else
|
else
|
||||||
break;
|
break;
|
||||||
|
|
||||||
cdec->mNext = dec->mParams;
|
|
||||||
dec->mParams = cdec;
|
|
||||||
}
|
}
|
||||||
|
|
||||||
dec->mMinValue = minValue;
|
dec->mMinValue = minValue;
|
||||||
|
|
Loading…
Reference in New Issue