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"
|
625
|
62 |
"Modified: / 9.11.1999 / 17:21:18 / cg"
|
|
63 |
!
|
|
64 |
|
|
65 |
remember_invokeinterface
|
|
66 |
"/ self halt.
|
|
67 |
|
|
68 |
"Created: / 9.11.1999 / 17:20:58 / cg"
|
|
69 |
"Modified: / 9.11.1999 / 17:22:04 / cg"
|
|
70 |
!
|
|
71 |
|
|
72 |
remember_invokenonvirtual
|
|
73 |
"/ self halt.
|
|
74 |
|
|
75 |
"Created: / 9.11.1999 / 17:21:06 / cg"
|
|
76 |
"Modified: / 9.11.1999 / 17:21:51 / cg"
|
|
77 |
!
|
|
78 |
|
|
79 |
remember_invokestatic
|
|
80 |
"/ self halt.
|
|
81 |
|
|
82 |
"Modified: / 9.11.1999 / 17:22:00 / cg"
|
|
83 |
"Created: / 9.11.1999 / 17:22:14 / cg"
|
|
84 |
!
|
|
85 |
|
|
86 |
remember_invokevirtual
|
|
87 |
"/ self halt.
|
|
88 |
|
|
89 |
"Created: / 9.11.1999 / 17:21:08 / cg"
|
|
90 |
"Modified: / 9.11.1999 / 17:22:00 / cg"
|
621
|
91 |
! !
|
|
92 |
|
|
93 |
!JavaByteCodeEnumerator class methodsFor:'documentation'!
|
|
94 |
|
|
95 |
version
|
625
|
96 |
^ '$Header: /home/jv/Projects/SmalltalkX/repositories/cvs/stx/libjava/JavaByteCodeEnumerator.st,v 1.2 1999/11/09 16:58:16 cg Exp $'
|
621
|
97 |
! !
|