From 9366e18dd54e4cd2fb7b24f93fb7d0e8fee9da77 Mon Sep 17 00:00:00 2001 From: "rginda%netscape.com" Date: Mon, 24 Apr 2000 20:08:16 +0000 Subject: [PATCH] NotARegister check in GenericBranch::print() --- js/js2/vmtypes.h | 8 ++++++-- js2/src/vmtypes.h | 8 ++++++-- 2 files changed, 12 insertions(+), 4 deletions(-) diff --git a/js/js2/vmtypes.h b/js/js2/vmtypes.h index 373ba9cd78e0..15dbef7e79fe 100644 --- a/js/js2/vmtypes.h +++ b/js/js2/vmtypes.h @@ -252,8 +252,12 @@ namespace VM { Register aR = NotARegister) : Instruction_2(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; } diff --git a/js2/src/vmtypes.h b/js2/src/vmtypes.h index 373ba9cd78e0..15dbef7e79fe 100644 --- a/js2/src/vmtypes.h +++ b/js2/src/vmtypes.h @@ -252,8 +252,12 @@ namespace VM { Register aR = NotARegister) : Instruction_2(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; }