Skip to content

Commit

Permalink
When dumping icode, include string constants
Browse files Browse the repository at this point in the history
  • Loading branch information
andreabergia authored and gbrail committed Oct 12, 2024
1 parent 21645e8 commit 3199d9c
Showing 1 changed file with 24 additions and 0 deletions.
24 changes: 24 additions & 0 deletions rhino/src/main/java/org/mozilla/javascript/Interpreter.java
Original file line number Diff line number Diff line change
Expand Up @@ -671,6 +671,30 @@ static void dumpICode(InterpreterData idata) {
pc += 4;
break;
}
case Icode_REG_STR_C0:
{
String str = strings[0];
out.println(tname + " \"" + str + '"');
break;
}
case Icode_REG_STR_C1:
{
String str = strings[1];
out.println(tname + " \"" + str + '"');
break;
}
case Icode_REG_STR_C2:
{
String str = strings[2];
out.println(tname + " \"" + str + '"');
break;
}
case Icode_REG_STR_C3:
{
String str = strings[3];
out.println(tname + " \"" + str + '"');
break;
}
case Icode_REG_IND_C0:
indexReg = 0;
out.println(tname);
Expand Down

0 comments on commit 3199d9c

Please sign in to comment.