--- a/JavaDecompiler.st Wed Apr 17 23:56:35 1996 +0000
+++ b/JavaDecompiler.st Thu Apr 18 00:15:44 1996 +0000
@@ -343,7 +343,12 @@
insn := code at:pc.
pc := pc + 1.
spec := DecoderTable at:(insn + 1).
- outStream show:(spec at:1); show:' '.
+ outStream
+ show:((pc - 1) printStringPaddedTo:4);
+ show:' ';
+ show:(spec at:1);
+ show:' '.
+
spec from:2 to:spec size do:[:what |
self perform:what
].
@@ -356,6 +361,42 @@
!JavaDecompiler methodsFor:'operand decoding'!
+arrayTypeByte
+ |hi low index type|
+
+ index := code at:pc.
+ pc := pc + 1.
+
+ type := #('T_ARRAY' 'invalid' 'invalid' 'T_BOOLEAN'
+ 'T_CHAR' 'T_FLOAT' 'T_DOUBLE' 'T_BYTE'
+ 'T_INT' 'T_LONG' ) at:index ifAbsent:'invalid'.
+
+ outStream
+ show:index;
+ show:' [';
+ show:type;
+ show:']'
+
+ "Created: 16.4.1996 / 15:00:04 / cg"
+ "Modified: 16.4.1996 / 15:30:55 / cg"
+!
+
+constIndexByte
+ |hi low index constants|
+
+ index := code at:pc.
+ pc := pc + 1.
+
+ outStream
+ show:index;
+ show:' [';
+ show:(javaMethod constantPool at:index) displayString;
+ show:']'
+
+ "Created: 16.4.1996 / 15:00:04 / cg"
+ "Modified: 16.4.1996 / 15:30:55 / cg"
+!
+
constIndexShort
|hi low index constants|
@@ -377,11 +418,49 @@
"Created: 16.4.1996 / 15:00:04 / cg"
"Modified: 16.4.1996 / 15:30:55 / cg"
+!
+
+localIndexByte
+ |hi low index constants|
+
+ index := code at:pc.
+ pc := pc + 1.
+
+ outStream
+ show:index;
+ show:' [';
+ show:']'
+
+ "Created: 16.4.1996 / 15:00:04 / cg"
+ "Modified: 16.4.1996 / 15:30:55 / cg"
+!
+
+signedBranchShort
+ |hi low index constants|
+
+ hi := code at:pc.
+ low := code at:pc + 1.
+ pc := pc + 2.
+
+ index := (hi bitShift:8) + low.
+ "change from unsigned 0..FFFF to signed -8000..7FFF"
+ index >= 16r8000 ifTrue:[
+ index := index - 16r10000
+ ].
+
+ outStream
+ show:index;
+ show:' [';
+ show:(pc + index);
+ show:']'
+
+ "Created: 16.4.1996 / 15:00:04 / cg"
+ "Modified: 16.4.1996 / 15:30:55 / cg"
! !
!JavaDecompiler class methodsFor:'documentation'!
version
- ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaDecompiler.st,v 1.3 1996/04/17 21:59:54 cg Exp $'
+ ^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaDecompiler.st,v 1.4 1996/04/18 00:15:44 cg Exp $'
! !
JavaDecompiler initialize!