1362
|
1 |
"
|
|
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger
|
|
3 |
|
|
4 |
New code and modifications done at SWING Research Group [1]:
|
|
5 |
|
|
6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
|
|
7 |
SWING Research Group, Czech Technical University in Prague
|
|
8 |
|
|
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.
|
|
15 |
|
|
16 |
[1] Code written at SWING Research Group contains a signature
|
|
17 |
of one of the above copright owners. For exact set of such code,
|
|
18 |
see the differences between this version and version stx:libjava
|
|
19 |
as of 1.9.2010
|
|
20 |
"
|
|
21 |
"{ Package: 'stx:libjava' }"
|
|
22 |
|
|
23 |
JavaByteCodeProcessorAdapter subclass:#JavaByteCodePreresolver
|
|
24 |
instanceVariableNames:''
|
|
25 |
classVariableNames:''
|
|
26 |
poolDictionaries:''
|
|
27 |
category:'Languages-Java-Bytecode'
|
|
28 |
!
|
|
29 |
|
|
30 |
!JavaByteCodePreresolver class methodsFor:'documentation'!
|
|
31 |
|
|
32 |
copyright
|
|
33 |
"
|
|
34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger
|
|
35 |
|
|
36 |
New code and modifications done at SWING Research Group [1]:
|
|
37 |
|
|
38 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko
|
|
39 |
SWING Research Group, Czech Technical University in Prague
|
|
40 |
|
|
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.
|
|
47 |
|
|
48 |
[1] Code written at SWING Research Group contains a signature
|
|
49 |
of one of the above copright owners. For exact set of such code,
|
|
50 |
see the differences between this version and version stx:libjava
|
|
51 |
as of 1.9.2010
|
|
52 |
|
|
53 |
"
|
|
54 |
! !
|
|
55 |
|
|
56 |
!JavaByteCodePreresolver methodsFor:'instructions'!
|
|
57 |
|
|
58 |
anewarray
|
1391
|
59 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
60 |
|
|
61 |
"Modified: / 09-02-2012 / 23:06:29 / mh <hlopik@gmail.com>"
|
1379
|
62 |
"Modified: / 23-02-2012 / 17:40:02 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
63 |
"Modified (comment): / 28-02-2012 / 22:14:00 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
64 |
!
|
|
65 |
|
|
66 |
checkcast
|
1391
|
67 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
68 |
|
|
69 |
"Modified: / 09-02-2012 / 23:06:34 / mh <hlopik@gmail.com>"
|
1379
|
70 |
"Modified: / 23-02-2012 / 17:40:09 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
71 |
"Modified (comment): / 28-02-2012 / 22:13:56 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
72 |
!
|
|
73 |
|
|
74 |
getfield
|
1391
|
75 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
76 |
|
|
77 |
"Modified: / 09-02-2012 / 23:06:45 / mh <hlopik@gmail.com>"
|
1379
|
78 |
"Modified: / 23-02-2012 / 17:40:13 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
79 |
"Modified (comment): / 28-02-2012 / 22:13:52 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
80 |
!
|
|
81 |
|
|
82 |
getstatic
|
1391
|
83 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
84 |
|
|
85 |
"Modified: / 09-02-2012 / 23:06:49 / mh <hlopik@gmail.com>"
|
1379
|
86 |
"Modified: / 23-02-2012 / 17:40:17 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
87 |
"Modified: / 28-02-2012 / 22:13:39 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
88 |
!
|
|
89 |
|
|
90 |
instanceof
|
1391
|
91 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
92 |
|
|
93 |
"Modified: / 09-02-2012 / 23:06:55 / mh <hlopik@gmail.com>"
|
1379
|
94 |
"Modified: / 23-02-2012 / 17:40:20 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
95 |
"Modified: / 28-02-2012 / 22:14:06 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
96 |
!
|
|
97 |
|
|
98 |
invinterface
|
1391
|
99 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
100 |
self fetchBytes2.
|
|
101 |
|
|
102 |
"Modified: / 09-02-2012 / 23:07:03 / mh <hlopik@gmail.com>"
|
1379
|
103 |
"Modified: / 23-02-2012 / 17:40:25 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
104 |
"Modified: / 28-02-2012 / 22:14:10 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
105 |
!
|
|
106 |
|
|
107 |
invnonvirt
|
1391
|
108 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
109 |
|
|
110 |
"Modified: / 09-02-2012 / 23:07:10 / mh <hlopik@gmail.com>"
|
1379
|
111 |
"Modified: / 23-02-2012 / 17:40:28 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
112 |
"Modified: / 28-02-2012 / 22:14:16 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
113 |
!
|
|
114 |
|
|
115 |
invstatic
|
1391
|
116 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
117 |
|
|
118 |
"Modified: / 09-02-2012 / 23:07:15 / mh <hlopik@gmail.com>"
|
1379
|
119 |
"Modified: / 23-02-2012 / 17:40:35 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
120 |
"Modified: / 28-02-2012 / 22:14:19 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
121 |
!
|
|
122 |
|
|
123 |
invvirt
|
1391
|
124 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
125 |
|
|
126 |
"Modified: / 09-02-2012 / 23:07:20 / mh <hlopik@gmail.com>"
|
1379
|
127 |
"Modified: / 23-02-2012 / 17:40:39 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
128 |
"Modified: / 28-02-2012 / 22:14:23 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
129 |
!
|
|
130 |
|
|
131 |
multianewarray
|
1391
|
132 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
133 |
self fetchByte.
|
|
134 |
|
|
135 |
"Modified: / 09-02-2012 / 23:07:24 / mh <hlopik@gmail.com>"
|
1379
|
136 |
"Modified: / 23-02-2012 / 17:40:42 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
137 |
"Modified: / 28-02-2012 / 22:14:30 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
138 |
!
|
|
139 |
|
|
140 |
new
|
1391
|
141 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
142 |
|
|
143 |
"Modified: / 09-02-2012 / 23:07:29 / mh <hlopik@gmail.com>"
|
1379
|
144 |
"Modified: / 23-02-2012 / 17:40:48 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
145 |
"Modified: / 28-02-2012 / 22:14:34 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
146 |
!
|
|
147 |
|
|
148 |
putfield
|
1391
|
149 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
150 |
|
|
151 |
"Modified: / 09-02-2012 / 23:07:33 / mh <hlopik@gmail.com>"
|
1379
|
152 |
"Modified: / 23-02-2012 / 17:40:51 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
153 |
"Modified: / 28-02-2012 / 22:14:37 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
154 |
!
|
|
155 |
|
|
156 |
putstatic
|
1391
|
157 |
(constantPool at: self fetchIndex2) resolve: false"do not call <clinit>".
|
1362
|
158 |
|
|
159 |
"Modified: / 09-02-2012 / 23:07:38 / mh <hlopik@gmail.com>"
|
1379
|
160 |
"Modified: / 23-02-2012 / 17:40:54 / Marcel Hlopko <hlopik@gmail.com>"
|
1391
|
161 |
"Modified: / 28-02-2012 / 22:14:42 / Jan Vrany <jan.vrany@fit.cvut.cz>"
|
1362
|
162 |
! !
|
|
163 |
|
|
164 |
!JavaByteCodePreresolver methodsFor:'processing'!
|
|
165 |
|
|
166 |
enterProcessingLoop
|
|
167 |
|
|
168 |
[ pc < byteCode size ] whileTrue: [
|
|
169 |
instrPointer := pc.
|
|
170 |
op := byteCode at: pc.
|
|
171 |
pc := pc + 1.
|
|
172 |
self switch: op.
|
|
173 |
].
|
|
174 |
|
|
175 |
"Created: / 09-02-2012 / 22:44:13 / mh <hlopik@gmail.com>"
|
|
176 |
!
|
|
177 |
|
|
178 |
preresolve: aJavaMethod
|
1395
|
179 |
|size argArray|
|
|
180 |
|
|
181 |
size := aJavaMethod javaNumArgs.
|
|
182 |
argArray := Array new: size.
|
|
183 |
self
|
1362
|
184 |
process: aJavaMethod
|
|
185 |
receiver: aJavaMethod javaClass
|
1395
|
186 |
arguments: argArray.
|
1362
|
187 |
|
|
188 |
"Created: / 09-02-2012 / 22:37:02 / mh <hlopik@gmail.com>"
|
|
189 |
! !
|
|
190 |
|
|
191 |
!JavaByteCodePreresolver class methodsFor:'documentation'!
|
|
192 |
|
1864
|
193 |
version_HG
|
|
194 |
|
|
195 |
^ '$Changeset: <not expanded> $'
|
|
196 |
!
|
|
197 |
|
1362
|
198 |
version_SVN
|
1864
|
199 |
^ '§Id§'
|
1362
|
200 |
! !
|