author | Claus Gittinger <cg@exept.de> |
Wed, 18 Dec 2019 22:53:05 +0100 | |
branch | cvs_MAIN |
changeset 3992 | 7497ea71f268 |
parent 3412 | df11bb428463 |
permissions | -rw-r--r-- |
2151 | 1 |
" |
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
2 |
COPYRIGHT (c) 1996-2015 by Claus Gittinger |
2151 | 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 |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
6 |
COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko |
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
|
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 |
" |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
34 |
COPYRIGHT (c) 1996-2015 by Claus Gittinger |
2151 | 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 |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2731
diff
changeset
|
38 |
COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko |
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
|
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 |
|
56 |
!JavaByteCodeEnumerator methodsFor:'accessing'! |
|
57 |
||
58 |
literalAction |
|
59 |
"return the value of the instance variable 'literalAction' (automatically generated)" |
|
60 |
||
61 |
^ literalAction |
|
62 |
||
63 |
"Created: / 9.11.1999 / 15:27:37 / cg" |
|
64 |
! |
|
65 |
||
66 |
literalAction:something |
|
67 |
"set the value of the instance variable 'literalAction' (automatically generated)" |
|
68 |
||
69 |
literalAction := something. |
|
70 |
||
71 |
"Created: / 9.11.1999 / 15:27:37 / cg" |
|
72 |
! ! |
|
73 |
||
74 |
!JavaByteCodeEnumerator methodsFor:'operand decoding'! |
|
75 |
||
76 |
constIndexByte |
|
77 |
lastConstIndex := code at:pc. |
|
78 |
pc := pc + 1. |
|
79 |
||
80 |
lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil. |
|
81 |
literalAction notNil ifTrue:[ |
|
82 |
literalAction value:pc-2 value:lastConstIndex value:lastConstant |
|
83 |
]. |
|
84 |
||
85 |
"Created: / 9.11.1999 / 15:26:42 / cg" |
|
86 |
"Modified: / 9.11.1999 / 15:29:24 / cg" |
|
87 |
! |
|
88 |
||
89 |
constIndexShort |
|
90 |
lastConstIndex := code wordAt:pc MSB:true. |
|
91 |
pc := pc + 2. |
|
92 |
||
93 |
lastConstant := javaMethod constantPool at:lastConstIndex ifAbsent:nil. |
|
94 |
||
95 |
literalAction notNil ifTrue:[ |
|
96 |
literalAction value:pc-3 value:lastConstIndex value:lastConstant |
|
97 |
]. |
|
98 |
||
99 |
"Created: / 9.11.1999 / 15:27:32 / cg" |
|
100 |
"Modified: / 9.11.1999 / 15:29:31 / cg" |
|
101 |
! ! |
|
102 |
||
103 |
!JavaByteCodeEnumerator methodsFor:'processing'! |
|
104 |
||
105 |
instructionHookPC:pc op:op spec:spec |
|
106 |
"/ self halt. |
|
107 |
||
108 |
"Created: / 9.11.1999 / 15:35:39 / cg" |
|
625 | 109 |
"Modified: / 9.11.1999 / 17:21:18 / cg" |
110 |
! |
|
111 |
||
112 |
remember_invokeinterface |
|
113 |
"/ self halt. |
|
114 |
||
115 |
"Created: / 9.11.1999 / 17:20:58 / cg" |
|
116 |
"Modified: / 9.11.1999 / 17:22:04 / cg" |
|
117 |
! |
|
118 |
||
119 |
remember_invokenonvirtual |
|
120 |
"/ self halt. |
|
121 |
||
122 |
"Created: / 9.11.1999 / 17:21:06 / cg" |
|
123 |
"Modified: / 9.11.1999 / 17:21:51 / cg" |
|
124 |
! |
|
125 |
||
126 |
remember_invokestatic |
|
127 |
"/ self halt. |
|
128 |
||
129 |
"Modified: / 9.11.1999 / 17:22:00 / cg" |
|
130 |
"Created: / 9.11.1999 / 17:22:14 / cg" |
|
131 |
! |
|
132 |
||
133 |
remember_invokevirtual |
|
134 |
"/ self halt. |
|
135 |
||
136 |
"Created: / 9.11.1999 / 17:21:08 / cg" |
|
137 |
"Modified: / 9.11.1999 / 17:22:00 / cg" |
|
621 | 138 |
! ! |
139 |
||
140 |
!JavaByteCodeEnumerator class methodsFor:'documentation'! |
|
141 |
||
142 |
version |
|
3412
df11bb428463
Merged with mercurial revision 4f3cc813be4 (8 changesets total)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3360
diff
changeset
|
143 |
^ '$Header: /cvs/stx/stx/libjava/JavaByteCodeEnumerator.st,v 1.11 2015-03-20 12:07:59 vrany Exp $' |
2295
e7ee060d44b9
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2167
diff
changeset
|
144 |
! |
e7ee060d44b9
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2167
diff
changeset
|
145 |
|
e7ee060d44b9
fixed: #version_SVN ($ to §)
Claus Gittinger <cg@exept.de>
parents:
2167
diff
changeset
|
146 |
version_CVS |
3412
df11bb428463
Merged with mercurial revision 4f3cc813be4 (8 changesets total)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3360
diff
changeset
|
147 |
^ '$Header: /cvs/stx/stx/libjava/JavaByteCodeEnumerator.st,v 1.11 2015-03-20 12:07:59 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
|
148 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
149 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2295
diff
changeset
|
150 |
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
|
151 |
|
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 |
^ '$Changeset: <not expanded> $' |
2151 | 153 |
! |
154 |
||
155 |
version_SVN |
|
2731
13f5be2bf83b
Merged d87e89dd5276 and fe83a843a7bf (branch default - CVS HEAD)
Jan Vrany <jan.vrany@fit.cvut.cz>
diff
changeset
|
156 |
^ 'Id' |
2108 | 157 |
! ! |
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
|
158 |