Skip to content

Commit

Permalink
Remove Icode_SWAP as it was unused
Browse files Browse the repository at this point in the history
  • Loading branch information
szegedi authored and gbrail committed Jul 26, 2024
1 parent b7ece52 commit b845d14
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
5 changes: 0 additions & 5 deletions rhino/src/main/java/org/mozilla/javascript/Icode.java
Original file line number Diff line number Diff line change
Expand Up @@ -20,9 +20,6 @@ abstract class Icode {
// Stack: ... value2 value1 -> ... value2 value1 value2 value1
Icode_DUP2 = -2,

// Stack: ... value2 value1 -> ... value1 value2
Icode_SWAP = -3,

// Stack: ... value1 -> ...
Icode_POP = -4,

Expand Down Expand Up @@ -167,8 +164,6 @@ static String bytecodeName(int bytecode) {
return "DUP";
case Icode_DUP2:
return "DUP2";
case Icode_SWAP:
return "SWAP";
case Icode_POP:
return "POP";
case Icode_POP_RESULT:
Expand Down
10 changes: 0 additions & 10 deletions rhino/src/main/java/org/mozilla/javascript/Interpreter.java
Original file line number Diff line number Diff line change
Expand Up @@ -1467,16 +1467,6 @@ private static Object interpretLoop(Context cx, CallFrame frame, Object throwabl
sDbl[stackTop + 2] = sDbl[stackTop];
stackTop += 2;
continue Loop;
case Icode_SWAP:
{
Object o = stack[stackTop];
stack[stackTop] = stack[stackTop - 1];
stack[stackTop - 1] = o;
double d = sDbl[stackTop];
sDbl[stackTop] = sDbl[stackTop - 1];
sDbl[stackTop - 1] = d;
continue Loop;
}
case Token.RETURN:
frame.result = stack[stackTop];
frame.resultDbl = sDbl[stackTop];
Expand Down

0 comments on commit b845d14

Please sign in to comment.