summaryrefslogtreecommitdiffstats
path: root/microbe/optimizer.cpp
diff options
context:
space:
mode:
Diffstat (limited to 'microbe/optimizer.cpp')
-rw-r--r--microbe/optimizer.cpp24
1 files changed, 12 insertions, 12 deletions
diff --git a/microbe/optimizer.cpp b/microbe/optimizer.cpp
index 33b0bcd..7b8d059 100644
--- a/microbe/optimizer.cpp
+++ b/microbe/optimizer.cpp
@@ -18,10 +18,10 @@
using namespace std;
-QString binary( uchar val )
+TQString binary( uchar val )
{
- QString bin = QString::number( val, 2 );
- QString pad;
+ TQString bin = TQString::number( val, 2 );
+ TQString pad;
pad.fill( '0', 8-bin.length() );
return pad + bin;
}
@@ -143,7 +143,7 @@ bool Optimizer::pruneInstructions()
//BEGIN remove labels without any reference to them
// First: build up a list of labels which are referenced
- QStringList referencedLabels;
+ TQStringList referencedLabels;
for ( it = m_pCode->begin(); it != end; ++it )
{
if ( Instr_goto * ins = dynamic_cast<Instr_goto*>(*it) )
@@ -155,12 +155,12 @@ bool Optimizer::pruneInstructions()
// Now remove labels from instructions that aren't in the referencedLabels list
for ( it = m_pCode->begin(); it != end; ++it )
{
- QStringList labels = (*it)->labels();
+ TQStringList labels = (*it)->labels();
- QStringList::iterator labelsEnd = labels.end();
- for ( QStringList::iterator labelsIt = labels.begin(); labelsIt != labelsEnd; )
+ TQStringList::iterator labelsEnd = labels.end();
+ for ( TQStringList::iterator labelsIt = labels.begin(); labelsIt != labelsEnd; )
{
- if ( !referencedLabels.contains( *labelsIt ) )
+ if ( !referencedLabels.tqcontains( *labelsIt ) )
{
labelsIt = labels.erase( labelsIt );
removed = true;
@@ -386,8 +386,8 @@ bool Optimizer::optimizeInstructions()
{
// If we are testing STATUS, then we assume that the bits changed
// are only those that are marked as independent.
- uchar bitmask = ( i == 1 ) ? behaviour.reg( Register::STATUS ).indep : 0xff;
- if ( !canRemove( *it, (i == 0) ? regSet : Register::STATUS, bitmask ) )
+ uchar bittqmask = ( i == 1 ) ? behaviour.reg( Register::STATUS ).indep : 0xff;
+ if ( !canRemove( *it, (i == 0) ? regSet : Register::STATUS, bittqmask ) )
{
ok = false;
break;
@@ -409,7 +409,7 @@ bool Optimizer::optimizeInstructions()
}
-bool Optimizer::redirectGotos( Instruction * current, const QString & label )
+bool Optimizer::redirectGotos( Instruction * current, const TQString & label )
{
if ( current->isUsed() )
return false;
@@ -479,7 +479,7 @@ bool Optimizer::canRemove( Instruction * ins, const Register & reg, uchar bitMas
// The bits that are depended upon in the future for this register
uchar depends = generateRegisterDepends( ins, reg );
- // Only interested in those bits allowed by the bit mask
+ // Only interested in those bits allowed by the bit tqmask
depends &= bitMask;
RegisterState inputState = ins->inputState().reg( reg );