diff --git a/js/js2/vmtypes.h b/js/js2/vmtypes.h index 373ba9cd78e..15dbef7e79f 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 373ba9cd78e..15dbef7e79f 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; }