713
|
1 |
"{ Package: 'stx:libjava' }"
|
|
2 |
|
621
|
3 |
JavaDecompiler subclass:#JavaByteCodeEnumerator
|
|
4 |
instanceVariableNames:'literalAction'
|
|
5 |
classVariableNames:''
|
|
6 |
poolDictionaries:''
|
713
|
7 |
category:'Languages-Java-Support-Decompiling'
|
621
|
8 |
!
|
|
9 |
|
|
10 |
|
|
11 |
!JavaByteCodeEnumerator methodsFor:'accessing'!
|
|
12 |
|
|
13 |
literalAction
|
|
14 |
"return the value of the instance variable 'literalAction' (automatically generated)"
|
|
15 |
|
|
16 |
^ literalAction
|
|
17 |
|
|
18 |
"Created: / 9.11.1999 / 15:27:37 / cg"
|
|
19 |
!
|
|
20 |
|
|
21 |
literalAction:something
|
|
22 |
"set the value of the instance variable 'literalAction' (automatically generated)"
|
|
23 |
|
|
24 |
literalAction := something.
|
|
25 |
|
|
26 |
"Created: / 9.11.1999 / 15:27:37 / cg"
|
|
27 |
! !
|
|
28 |
|
|
29 |
!JavaByteCodeEnumerator methodsFor:'operand decoding'!
|
|
30 |
|
|
31 |
constIndexByte
|
|
32 |
lastConstIndex := code at:pc.
|
|
33 |
pc := pc + 1.
|
|
34 |
|
|
35 |
lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil.
|
|
36 |
literalAction notNil ifTrue:[
|
|
37 |
literalAction value:pc-2 value:lastConstIndex value:lastConstant
|
|
38 |
].
|
|
39 |
|
|
40 |
"Created: / 9.11.1999 / 15:26:42 / cg"
|
|
41 |
"Modified: / 9.11.1999 / 15:29:24 / cg"
|
|
42 |
!
|
|
43 |
|
|
44 |
constIndexShort
|
|
45 |
lastConstIndex := code wordAt:pc MSB:true.
|
|
46 |
pc := pc + 2.
|
|
47 |
|
|
48 |
lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil.
|
|
49 |
|
|
50 |
literalAction notNil ifTrue:[
|
|
51 |
literalAction value:pc-3 value:lastConstIndex value:lastConstant
|
|
52 |
].
|
|
53 |
|
|
54 |
"Created: / 9.11.1999 / 15:27:32 / cg"
|
|
55 |
"Modified: / 9.11.1999 / 15:29:31 / cg"
|
|
56 |
! !
|
|
57 |
|
|
58 |
!JavaByteCodeEnumerator methodsFor:'processing'!
|
|
59 |
|
|
60 |
instructionHookPC:pc op:op spec:spec
|
|
61 |
"/ self halt.
|
|
62 |
|
|
63 |
"Created: / 9.11.1999 / 15:35:39 / cg"
|
625
|
64 |
"Modified: / 9.11.1999 / 17:21:18 / cg"
|
|
65 |
!
|
|
66 |
|
|
67 |
remember_invokeinterface
|
|
68 |
"/ self halt.
|
|
69 |
|
|
70 |
"Created: / 9.11.1999 / 17:20:58 / cg"
|
|
71 |
"Modified: / 9.11.1999 / 17:22:04 / cg"
|
|
72 |
!
|
|
73 |
|
|
74 |
remember_invokenonvirtual
|
|
75 |
"/ self halt.
|
|
76 |
|
|
77 |
"Created: / 9.11.1999 / 17:21:06 / cg"
|
|
78 |
"Modified: / 9.11.1999 / 17:21:51 / cg"
|
|
79 |
!
|
|
80 |
|
|
81 |
remember_invokestatic
|
|
82 |
"/ self halt.
|
|
83 |
|
|
84 |
"Modified: / 9.11.1999 / 17:22:00 / cg"
|
|
85 |
"Created: / 9.11.1999 / 17:22:14 / cg"
|
|
86 |
!
|
|
87 |
|
|
88 |
remember_invokevirtual
|
|
89 |
"/ self halt.
|
|
90 |
|
|
91 |
"Created: / 9.11.1999 / 17:21:08 / cg"
|
|
92 |
"Modified: / 9.11.1999 / 17:22:00 / cg"
|
621
|
93 |
! !
|
|
94 |
|
|
95 |
!JavaByteCodeEnumerator class methodsFor:'documentation'!
|
|
96 |
|
|
97 |
version
|
2108
|
98 |
^ '$Header: /cvs/stx/stx/libjava/JavaByteCodeEnumerator.st,v 1.3 2002-11-22 20:13:48 cg Exp $'
|
|
99 |
! !
|