author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 15 Aug 2013 22:31:51 +0100 | |
branch | development |
changeset 2655 | 4f6d57ffc179 |
parent 2429 | ebece4dcaab9 |
child 2711 | a00302fe5083 |
permissions | -rw-r--r-- |
2151 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
3 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
4 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
5 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
7 |
SWING Research Group, Czech Technical University in Prague |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
8 |
|
2151 | 9 |
This software is furnished under a license and may be used |
10 |
only in accordance with the terms of that license and with the |
|
11 |
inclusion of the above copyright notice. This software may not |
|
12 |
be provided or otherwise made available to, or used by, any |
|
13 |
other person. No title to or ownership of the software is |
|
14 |
hereby transferred. |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
15 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
16 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
17 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
18 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
19 |
as of 1.9.2010 |
2151 | 20 |
" |
713 | 21 |
"{ Package: 'stx:libjava' }" |
22 |
||
621 | 23 |
JavaDecompiler subclass:#JavaByteCodeEnumerator |
24 |
instanceVariableNames:'literalAction' |
|
25 |
classVariableNames:'' |
|
26 |
poolDictionaries:'' |
|
713 | 27 |
category:'Languages-Java-Support-Decompiling' |
621 | 28 |
! |
29 |
||
2151 | 30 |
!JavaByteCodeEnumerator class methodsFor:'documentation'! |
31 |
||
32 |
copyright |
|
33 |
" |
|
34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
35 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
36 |
New code and modifications done at SWING Research Group [1]: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
37 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
38 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
39 |
SWING Research Group, Czech Technical University in Prague |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
40 |
|
2151 | 41 |
This software is furnished under a license and may be used |
42 |
only in accordance with the terms of that license and with the |
|
43 |
inclusion of the above copyright notice. This software may not |
|
44 |
be provided or otherwise made available to, or used by, any |
|
45 |
other person. No title to or ownership of the software is |
|
46 |
hereby transferred. |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
47 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
48 |
[1] Code written at SWING Research Group contains a signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
49 |
of one of the above copright owners. For exact set of such code, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
50 |
see the differences between this version and version stx:libjava |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
51 |
as of 1.9.2010 |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
52 |
|
2151 | 53 |
" |
54 |
! ! |
|
621 | 55 |
|
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
56 |
|
621 | 57 |
!JavaByteCodeEnumerator methodsFor:'accessing'! |
58 |
||
59 |
literalAction |
|
60 |
"return the value of the instance variable 'literalAction' (automatically generated)" |
|
61 |
||
62 |
^ literalAction |
|
63 |
||
64 |
"Created: / 9.11.1999 / 15:27:37 / cg" |
|
65 |
! |
|
66 |
||
67 |
literalAction:something |
|
68 |
"set the value of the instance variable 'literalAction' (automatically generated)" |
|
69 |
||
70 |
literalAction := something. |
|
71 |
||
72 |
"Created: / 9.11.1999 / 15:27:37 / cg" |
|
73 |
! ! |
|
74 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
75 |
|
621 | 76 |
!JavaByteCodeEnumerator methodsFor:'operand decoding'! |
77 |
||
78 |
constIndexByte |
|
79 |
lastConstIndex := code at:pc. |
|
80 |
pc := pc + 1. |
|
81 |
||
82 |
lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil. |
|
83 |
literalAction notNil ifTrue:[ |
|
84 |
literalAction value:pc-2 value:lastConstIndex value:lastConstant |
|
85 |
]. |
|
86 |
||
87 |
"Created: / 9.11.1999 / 15:26:42 / cg" |
|
88 |
"Modified: / 9.11.1999 / 15:29:24 / cg" |
|
89 |
! |
|
90 |
||
91 |
constIndexShort |
|
92 |
lastConstIndex := code wordAt:pc MSB:true. |
|
93 |
pc := pc + 2. |
|
94 |
||
95 |
lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil. |
|
96 |
||
97 |
literalAction notNil ifTrue:[ |
|
98 |
literalAction value:pc-3 value:lastConstIndex value:lastConstant |
|
99 |
]. |
|
100 |
||
101 |
"Created: / 9.11.1999 / 15:27:32 / cg" |
|
102 |
"Modified: / 9.11.1999 / 15:29:31 / cg" |
|
103 |
! ! |
|
104 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
105 |
|
621 | 106 |
!JavaByteCodeEnumerator methodsFor:'processing'! |
107 |
||
108 |
instructionHookPC:pc op:op spec:spec |
|
109 |
"/ self halt. |
|
110 |
||
111 |
"Created: / 9.11.1999 / 15:35:39 / cg" |
|
625 | 112 |
"Modified: / 9.11.1999 / 17:21:18 / cg" |
113 |
! |
|
114 |
||
115 |
remember_invokeinterface |
|
116 |
"/ self halt. |
|
117 |
||
118 |
"Created: / 9.11.1999 / 17:20:58 / cg" |
|
119 |
"Modified: / 9.11.1999 / 17:22:04 / cg" |
|
120 |
! |
|
121 |
||
122 |
remember_invokenonvirtual |
|
123 |
"/ self halt. |
|
124 |
||
125 |
"Created: / 9.11.1999 / 17:21:06 / cg" |
|
126 |
"Modified: / 9.11.1999 / 17:21:51 / cg" |
|
127 |
! |
|
128 |
||
129 |
remember_invokestatic |
|
130 |
"/ self halt. |
|
131 |
||
132 |
"Modified: / 9.11.1999 / 17:22:00 / cg" |
|
133 |
"Created: / 9.11.1999 / 17:22:14 / cg" |
|
134 |
! |
|
135 |
||
136 |
remember_invokevirtual |
|
137 |
"/ self halt. |
|
138 |
||
139 |
"Created: / 9.11.1999 / 17:21:08 / cg" |
|
140 |
"Modified: / 9.11.1999 / 17:22:00 / cg" |
|
621 | 141 |
! ! |
142 |
||
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
143 |
|
621 | 144 |
!JavaByteCodeEnumerator class methodsFor:'documentation'! |
145 |
||
146 |
version |
|
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
147 |
^ '$Header: /cvs/stx/stx/libjava/JavaByteCodeEnumerator.st,v 1.8 2013-02-25 11:15:31 vrany Exp $' |
2295
e7ee060d44b9
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2167
diff
changeset
|
148 |
! |
e7ee060d44b9
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2167
diff
changeset
|
149 |
|
e7ee060d44b9
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2167
diff
changeset
|
150 |
version_CVS |
2396
fadc6d7a2f5b
Updated to rev 009a0df3afce
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2353
diff
changeset
|
151 |
^ '$Header: /cvs/stx/stx/libjava/JavaByteCodeEnumerator.st,v 1.8 2013-02-25 11:15:31 vrany Exp $' |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
152 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
153 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
154 |
version_HG |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
155 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
156 |
^ '$Changeset: <not expanded> $' |
2151 | 157 |
! |
158 |
||
159 |
version_SVN |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
160 |
^ '§Id§' |
2108 | 161 |
! ! |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
162 |