From 45e50c92ec551a27ca103dda46b5f906760ed8e0 Mon Sep 17 00:00:00 2001 From: "norris%netscape.com" Date: Wed, 19 Jan 2000 18:38:42 +0000 Subject: [PATCH] Fix icode printing for call opcodes. --- js/rhino/org/mozilla/javascript/Interpreter.java | 8 +++++--- js/rhino/src/org/mozilla/javascript/Interpreter.java | 8 +++++--- 2 files changed, 10 insertions(+), 6 deletions(-) diff --git a/js/rhino/org/mozilla/javascript/Interpreter.java b/js/rhino/org/mozilla/javascript/Interpreter.java index 7c5cdcc63e3..ff018918167 100644 --- a/js/rhino/org/mozilla/javascript/Interpreter.java +++ b/js/rhino/org/mozilla/javascript/Interpreter.java @@ -1221,11 +1221,13 @@ public class Interpreter extends LabelTable { case TokenStream.CLOSURE : case TokenStream.NEW : case TokenStream.CALL : { - int count = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); + int count = (iCode[pc + 3] << 8) | (iCode[pc + 4] & 0xFF); out.println( TokenStream.tokenToName(iCode[pc] & 0xff) + - " " + count); - pc += 2; + " " + count + " \"" + + getString(theData.itsStringTable, iCode, + pc + 1) + "\""); + pc += 4; } break; case TokenStream.NUMBER : diff --git a/js/rhino/src/org/mozilla/javascript/Interpreter.java b/js/rhino/src/org/mozilla/javascript/Interpreter.java index 7c5cdcc63e3..ff018918167 100644 --- a/js/rhino/src/org/mozilla/javascript/Interpreter.java +++ b/js/rhino/src/org/mozilla/javascript/Interpreter.java @@ -1221,11 +1221,13 @@ public class Interpreter extends LabelTable { case TokenStream.CLOSURE : case TokenStream.NEW : case TokenStream.CALL : { - int count = (iCode[pc + 1] << 8) | (iCode[pc + 2] & 0xFF); + int count = (iCode[pc + 3] << 8) | (iCode[pc + 4] & 0xFF); out.println( TokenStream.tokenToName(iCode[pc] & 0xff) + - " " + count); - pc += 2; + " " + count + " \"" + + getString(theData.itsStringTable, iCode, + pc + 1) + "\""); + pc += 4; } break; case TokenStream.NUMBER :