NotARegister check in GenericBranch::print()

This commit is contained in:
rginda%netscape.com 2000-04-24 20:08:16 +00:00
parent 600d365e30
commit 9366e18dd5
2 changed files with 12 additions and 4 deletions

View File

@ -252,8 +252,12 @@ namespace VM {
Register aR = NotARegister) :
Instruction_2<Label*, Register>(aOpcode, aLabel, aR) {}
virtual Formatter& print (Formatter& f) {
f << opcodeNames[mOpcode] << "\tOffset " << mOp1->mOffset <<
", R" << mOp2;
f << opcodeNames[mOpcode] << "\tOffset " << mOp1->mOffset;
if (mOp2 == NotARegister) {
f << ", R~";
} else {
f << ", R" << mOp2;
}
return f;
}
void resolveTo (uint32 aOffset) { mOp1->mOffset = aOffset; }

View File

@ -252,8 +252,12 @@ namespace VM {
Register aR = NotARegister) :
Instruction_2<Label*, Register>(aOpcode, aLabel, aR) {}
virtual Formatter& print (Formatter& f) {
f << opcodeNames[mOpcode] << "\tOffset " << mOp1->mOffset <<
", R" << mOp2;
f << opcodeNames[mOpcode] << "\tOffset " << mOp1->mOffset;
if (mOp2 == NotARegister) {
f << ", R~";
} else {
f << ", R" << mOp2;
}
return f;
}
void resolveTo (uint32 aOffset) { mOp1->mOffset = aOffset; }