621
|
1 |
JavaDecompiler subclass:#JavaByteCodeEnumerator
|
|
2 |
instanceVariableNames:'literalAction'
|
|
3 |
classVariableNames:''
|
|
4 |
poolDictionaries:''
|
|
5 |
category:'Java-Support-Decompiling'
|
|
6 |
!
|
|
7 |
|
|
8 |
|
|
9 |
!JavaByteCodeEnumerator methodsFor:'accessing'!
|
|
10 |
|
|
11 |
literalAction
|
|
12 |
"return the value of the instance variable 'literalAction' (automatically generated)"
|
|
13 |
|
|
14 |
^ literalAction
|
|
15 |
|
|
16 |
"Created: / 9.11.1999 / 15:27:37 / cg"
|
|
17 |
!
|
|
18 |
|
|
19 |
literalAction:something
|
|
20 |
"set the value of the instance variable 'literalAction' (automatically generated)"
|
|
21 |
|
|
22 |
literalAction := something.
|
|
23 |
|
|
24 |
"Created: / 9.11.1999 / 15:27:37 / cg"
|
|
25 |
! !
|
|
26 |
|
|
27 |
!JavaByteCodeEnumerator methodsFor:'operand decoding'!
|
|
28 |
|
|
29 |
constIndexByte
|
|
30 |
lastConstIndex := code at:pc.
|
|
31 |
pc := pc + 1.
|
|
32 |
|
|
33 |
lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil.
|
|
34 |
literalAction notNil ifTrue:[
|
|
35 |
literalAction value:pc-2 value:lastConstIndex value:lastConstant
|
|
36 |
].
|
|
37 |
|
|
38 |
"Created: / 9.11.1999 / 15:26:42 / cg"
|
|
39 |
"Modified: / 9.11.1999 / 15:29:24 / cg"
|
|
40 |
!
|
|
41 |
|
|
42 |
constIndexShort
|
|
43 |
lastConstIndex := code wordAt:pc MSB:true.
|
|
44 |
pc := pc + 2.
|
|
45 |
|
|
46 |
lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil.
|
|
47 |
|
|
48 |
literalAction notNil ifTrue:[
|
|
49 |
literalAction value:pc-3 value:lastConstIndex value:lastConstant
|
|
50 |
].
|
|
51 |
|
|
52 |
"Created: / 9.11.1999 / 15:27:32 / cg"
|
|
53 |
"Modified: / 9.11.1999 / 15:29:31 / cg"
|
|
54 |
! !
|
|
55 |
|
|
56 |
!JavaByteCodeEnumerator methodsFor:'processing'!
|
|
57 |
|
|
58 |
instructionHookPC:pc op:op spec:spec
|
|
59 |
"/ self halt.
|
|
60 |
|
|
61 |
"Created: / 9.11.1999 / 15:35:39 / cg"
|
|
62 |
"Modified: / 9.11.1999 / 15:36:49 / cg"
|
|
63 |
! !
|
|
64 |
|
|
65 |
!JavaByteCodeEnumerator class methodsFor:'documentation'!
|
|
66 |
|
|
67 |
version
|
|
68 |
^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaByteCodeEnumerator.st,v 1.1 1999/11/09 14:57:16 cg Exp $'
|
|
69 |
! !
|