author | Claus Gittinger <cg@exept.de> |
Thu, 24 Nov 2011 12:54:34 +0100 | |
changeset 2295 | e7ee060d44b9 |
parent 2167 | 12a36e866d94 |
child 2353 | fa7400d022a0 |
permissions | -rw-r--r-- |
2151 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
3 |
||
4 |
This software is furnished under a license and may be used |
|
5 |
only in accordance with the terms of that license and with the |
|
6 |
inclusion of the above copyright notice. This software may not |
|
7 |
be provided or otherwise made available to, or used by, any |
|
8 |
other person. No title to or ownership of the software is |
|
9 |
hereby transferred. |
|
10 |
" |
|
713 | 11 |
"{ Package: 'stx:libjava' }" |
12 |
||
621 | 13 |
JavaDecompiler subclass:#JavaByteCodeEnumerator |
14 |
instanceVariableNames:'literalAction' |
|
15 |
classVariableNames:'' |
|
16 |
poolDictionaries:'' |
|
713 | 17 |
category:'Languages-Java-Support-Decompiling' |
621 | 18 |
! |
19 |
||
2151 | 20 |
!JavaByteCodeEnumerator class methodsFor:'documentation'! |
21 |
||
22 |
copyright |
|
23 |
" |
|
24 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
25 |
||
26 |
This software is furnished under a license and may be used |
|
27 |
only in accordance with the terms of that license and with the |
|
28 |
inclusion of the above copyright notice. This software may not |
|
29 |
be provided or otherwise made available to, or used by, any |
|
30 |
other person. No title to or ownership of the software is |
|
31 |
hereby transferred. |
|
32 |
" |
|
33 |
! ! |
|
621 | 34 |
|
35 |
!JavaByteCodeEnumerator methodsFor:'accessing'! |
|
36 |
||
37 |
literalAction |
|
38 |
"return the value of the instance variable 'literalAction' (automatically generated)" |
|
39 |
||
40 |
^ literalAction |
|
41 |
||
42 |
"Created: / 9.11.1999 / 15:27:37 / cg" |
|
43 |
! |
|
44 |
||
45 |
literalAction:something |
|
46 |
"set the value of the instance variable 'literalAction' (automatically generated)" |
|
47 |
||
48 |
literalAction := something. |
|
49 |
||
50 |
"Created: / 9.11.1999 / 15:27:37 / cg" |
|
51 |
! ! |
|
52 |
||
53 |
!JavaByteCodeEnumerator methodsFor:'operand decoding'! |
|
54 |
||
55 |
constIndexByte |
|
56 |
lastConstIndex := code at:pc. |
|
57 |
pc := pc + 1. |
|
58 |
||
59 |
lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil. |
|
60 |
literalAction notNil ifTrue:[ |
|
61 |
literalAction value:pc-2 value:lastConstIndex value:lastConstant |
|
62 |
]. |
|
63 |
||
64 |
"Created: / 9.11.1999 / 15:26:42 / cg" |
|
65 |
"Modified: / 9.11.1999 / 15:29:24 / cg" |
|
66 |
! |
|
67 |
||
68 |
constIndexShort |
|
69 |
lastConstIndex := code wordAt:pc MSB:true. |
|
70 |
pc := pc + 2. |
|
71 |
||
72 |
lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil. |
|
73 |
||
74 |
literalAction notNil ifTrue:[ |
|
75 |
literalAction value:pc-3 value:lastConstIndex value:lastConstant |
|
76 |
]. |
|
77 |
||
78 |
"Created: / 9.11.1999 / 15:27:32 / cg" |
|
79 |
"Modified: / 9.11.1999 / 15:29:31 / cg" |
|
80 |
! ! |
|
81 |
||
82 |
!JavaByteCodeEnumerator methodsFor:'processing'! |
|
83 |
||
84 |
instructionHookPC:pc op:op spec:spec |
|
85 |
"/ self halt. |
|
86 |
||
87 |
"Created: / 9.11.1999 / 15:35:39 / cg" |
|
625 | 88 |
"Modified: / 9.11.1999 / 17:21:18 / cg" |
89 |
! |
|
90 |
||
91 |
remember_invokeinterface |
|
92 |
"/ self halt. |
|
93 |
||
94 |
"Created: / 9.11.1999 / 17:20:58 / cg" |
|
95 |
"Modified: / 9.11.1999 / 17:22:04 / cg" |
|
96 |
! |
|
97 |
||
98 |
remember_invokenonvirtual |
|
99 |
"/ self halt. |
|
100 |
||
101 |
"Created: / 9.11.1999 / 17:21:06 / cg" |
|
102 |
"Modified: / 9.11.1999 / 17:21:51 / cg" |
|
103 |
! |
|
104 |
||
105 |
remember_invokestatic |
|
106 |
"/ self halt. |
|
107 |
||
108 |
"Modified: / 9.11.1999 / 17:22:00 / cg" |
|
109 |
"Created: / 9.11.1999 / 17:22:14 / cg" |
|
110 |
! |
|
111 |
||
112 |
remember_invokevirtual |
|
113 |
"/ self halt. |
|
114 |
||
115 |
"Created: / 9.11.1999 / 17:21:08 / cg" |
|
116 |
"Modified: / 9.11.1999 / 17:22:00 / cg" |
|
621 | 117 |
! ! |
118 |
||
119 |
!JavaByteCodeEnumerator class methodsFor:'documentation'! |
|
120 |
||
121 |
version |
|
2295
e7ee060d44b9
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2167
diff
changeset
|
122 |
^ '$Header: /cvs/stx/stx/libjava/JavaByteCodeEnumerator.st,v 1.6 2011-11-24 11:54:34 cg Exp $' |
e7ee060d44b9
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2167
diff
changeset
|
123 |
! |
e7ee060d44b9
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2167
diff
changeset
|
124 |
|
e7ee060d44b9
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2167
diff
changeset
|
125 |
version_CVS |
e7ee060d44b9
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2167
diff
changeset
|
126 |
^ '$Header: /cvs/stx/stx/libjava/JavaByteCodeEnumerator.st,v 1.6 2011-11-24 11:54:34 cg Exp $' |
2151 | 127 |
! |
128 |
||
129 |
version_SVN |
|
2167 | 130 |
^ '§Id: JavaByteCodeEnumerator.st,v 1.4 2011/08/18 18:42:48 vrany Exp §' |
2108 | 131 |
! ! |