author | Claus Gittinger <cg@exept.de> |
Sun, 23 Feb 2020 14:03:15 +0100 | |
branch | cvs_MAIN |
changeset 3997 | 5bb44f7e1d20 |
parent 3971 | 8fbf867c86fc |
child 3999 | d7c199709abd |
permissions | -rw-r--r-- |
3953 | 1 |
"{ Encoding: utf8 }" |
2 |
||
454 | 3 |
" |
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3236
diff
changeset
|
4 |
COPYRIGHT (c) 1996-2015 by Claus Gittinger |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
5 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
6 |
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:
2204
diff
changeset
|
7 |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3236
diff
changeset
|
8 |
COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko |
3694 | 9 |
SWING Research Group, Czech Technical University in Prague |
454 | 10 |
|
11 |
This software is furnished under a license and may be used |
|
12 |
only in accordance with the terms of that license and with the |
|
13 |
inclusion of the above copyright notice. This software may not |
|
14 |
be provided or otherwise made available to, or used by, any |
|
15 |
other person. No title to or ownership of the software is |
|
16 |
hereby transferred. |
|
2151 | 17 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
18 |
[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:
2204
diff
changeset
|
19 |
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:
2204
diff
changeset
|
20 |
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:
2204
diff
changeset
|
21 |
as of 1.9.2010 |
2086 | 22 |
" |
678 | 23 |
"{ Package: 'stx:libjava' }" |
24 |
||
3519 | 25 |
"{ NameSpace: Smalltalk }" |
26 |
||
2551 | 27 |
CompiledCode variableSubclass:#JavaMethod |
2160 | 28 |
instanceVariableNames:'accessFlags selector javaClass descriptor signature lookupObject |
2716
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
29 |
lineNumberTable localVariableTable source annotations' |
2160 | 30 |
classVariableNames:'AbstractMethodInvokationSignal SignatureTypeCodes |
2726
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
31 |
ForceByteCodeDisplay ShowFullSource UnresolvedClassSignal |
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
32 |
A_PUBLIC A_PRIVATE A_PROTECTED A_STATIC A_FINAL A_SYNCHRONIZED |
2992
732f9db2a195
Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2902
diff
changeset
|
33 |
A_ABSTRACT A_NATIVE A_BREAKPOINT A_HASHANDLER A_BRIDGE A_VARARGS |
732f9db2a195
Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2902
diff
changeset
|
34 |
A_STRICT A_SYNTHETIC A_RESOLVED A_HASFINALLY' |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
35 |
poolDictionaries:'JavaConstants' |
2160 | 36 |
category:'Languages-Java-Classes' |
2 | 37 |
! |
38 |
||
454 | 39 |
!JavaMethod class methodsFor:'documentation'! |
40 |
||
41 |
copyright |
|
42 |
" |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3236
diff
changeset
|
43 |
COPYRIGHT (c) 1996-2015 by Claus Gittinger |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
44 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
45 |
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:
2204
diff
changeset
|
46 |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3236
diff
changeset
|
47 |
COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko |
3694 | 48 |
SWING Research Group, Czech Technical University in Prague |
454 | 49 |
|
50 |
This software is furnished under a license and may be used |
|
51 |
only in accordance with the terms of that license and with the |
|
52 |
inclusion of the above copyright notice. This software may not |
|
53 |
be provided or otherwise made available to, or used by, any |
|
54 |
other person. No title to or ownership of the software is |
|
55 |
hereby transferred. |
|
2151 | 56 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
57 |
[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:
2204
diff
changeset
|
58 |
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:
2204
diff
changeset
|
59 |
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:
2204
diff
changeset
|
60 |
as of 1.9.2010 |
2151 | 61 |
|
2086 | 62 |
" |
454 | 63 |
! ! |
2 | 64 |
|
129 | 65 |
!JavaMethod class methodsFor:'initialization'! |
8 | 66 |
|
67 |
initialize |
|
277 | 68 |
AbstractMethodInvokationSignal isNil ifTrue:[ |
3694 | 69 |
AbstractMethodInvokationSignal := ExecutionError newSignalMayProceed:true. |
70 |
AbstractMethodInvokationSignal nameClass:self message:#abstractMethodInvokationSignal. |
|
71 |
AbstractMethodInvokationSignal notifierString:'attempt to execute abstract method'. |
|
72 |
||
73 |
UnresolvedClassSignal := ExecutionError newSignalMayProceed:true. |
|
74 |
UnresolvedClassSignal nameClass:self message:#unresolvedClassSignal. |
|
75 |
UnresolvedClassSignal notifierString:'unresolved class'. |
|
277 | 76 |
]. |
77 |
||
2729
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
78 |
ShowFullSource := true. |
2726
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
79 |
ForceByteCodeDisplay := false. |
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
80 |
|
252 | 81 |
A_PUBLIC := 16r0001. |
82 |
A_PRIVATE := 16r0002. |
|
83 |
A_PROTECTED := 16r0004. |
|
84 |
A_STATIC := 16r0008. |
|
85 |
A_FINAL := 16r0010. |
|
86 |
A_SYNCHRONIZED := 16r0020. |
|
2145 | 87 |
A_BRIDGE := 16r0040. |
88 |
A_VARARGS := 16r0080. |
|
252 | 89 |
A_NATIVE := 16r0100. |
90 |
A_ABSTRACT := 16r0400. |
|
2145 | 91 |
A_STRICT := 16r0800. |
92 |
A_SYNTHETIC := 16r1000. |
|
252 | 93 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
94 |
A_BREAKPOINT := 16r10000000. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
95 |
A_HASHANDLER := 16r20000000. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
96 |
A_HASFINALLY := 16r00004000. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
97 |
A_RESOLVED := 16r00000200. |
255 | 98 |
|
173 | 99 |
self flags:(self flags bitOr:Behavior flagJavaMethod). |
100 |
||
8 | 101 |
SignatureTypeCodes := IdentityDictionary new. |
102 |
SignatureTypeCodes at:$B put:#byte. |
|
103 |
SignatureTypeCodes at:$C put:#char. |
|
104 |
SignatureTypeCodes at:$D put:#double. |
|
105 |
SignatureTypeCodes at:$F put:#float. |
|
106 |
SignatureTypeCodes at:$I put:#int. |
|
107 |
SignatureTypeCodes at:$J put:#long. |
|
108 |
SignatureTypeCodes at:$S put:#'unsigned short'. |
|
109 |
SignatureTypeCodes at:$Z put:#boolean. |
|
110 |
SignatureTypeCodes at:$L put:#object. |
|
111 |
SignatureTypeCodes at:$[ put:#array. |
|
2151 | 112 |
SignatureTypeCodes at:$T put:#typevar. |
8 | 113 |
|
207 | 114 |
ForceByteCodeDisplay := false. |
115 |
||
8 | 116 |
" |
378 | 117 |
JavaMethod initialize. |
118 |
JavaMethodWithHandler initialize. |
|
209 | 119 |
ForceByteCodeDisplay := true. |
255 | 120 |
ForceByteCodeDisplay := false. |
8 | 121 |
" |
173 | 122 |
|
2151 | 123 |
"Modified: / 16-10-1998 / 01:29:48 / cg" |
2992
732f9db2a195
Cleanup & refactoring of constant pool references (JavaRef2 hierarchy)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2902
diff
changeset
|
124 |
"Modified: / 31-01-2014 / 03:35:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2151 | 125 |
! |
126 |
||
127 |
reinitialize |
|
128 |
||
129 |
self flags:(self flags bitOr:Behavior flagJavaMethod). |
|
130 |
||
131 |
"Created: / 14-12-2010 / 20:58:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
378 | 132 |
! ! |
133 |
||
134 |
!JavaMethod class methodsFor:'instance creation'! |
|
135 |
||
136 |
fromMethod:aJavaMethod |
|
137 |
"create a new javaMethod, copying values from another javaMethod" |
|
138 |
||
139 |
^ self new fromMethod:aJavaMethod |
|
140 |
||
141 |
"Created: / 16.10.1998 / 01:25:12 / cg" |
|
142 |
! |
|
143 |
||
144 |
new |
|
145 |
"create a new javaMethod. |
|
146 |
Redefined, since constants are NOT stored in a literalArray, |
|
147 |
but my classes constantTable instead." |
|
148 |
||
149 |
^ self basicNew:0. |
|
150 |
||
151 |
"Created: / 16.10.1998 / 01:13:02 / cg" |
|
277 | 152 |
! ! |
153 |
||
154 |
!JavaMethod class methodsFor:'Signal constants'! |
|
155 |
||
156 |
abstractMethodInvokationSignal |
|
157 |
"return the signal raised when an abstract method is invoked" |
|
158 |
||
159 |
^ AbstractMethodInvokationSignal |
|
160 |
||
161 |
"Created: / 27.1.1998 / 21:50:05 / cg" |
|
594 | 162 |
! |
163 |
||
164 |
unresolvedClassSignal |
|
165 |
"return the signal raised when an unresolved class is referenced" |
|
166 |
||
167 |
^ UnresolvedClassSignal |
|
168 |
||
169 |
"Created: / 27.1.1998 / 21:50:05 / cg" |
|
8 | 170 |
! ! |
171 |
||
2729
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
172 |
!JavaMethod class methodsFor:'accessing'! |
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
173 |
|
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
174 |
showFullSource |
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
175 |
^ ShowFullSource |
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
176 |
|
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
177 |
"Created: / 14-09-2013 / 11:56:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
178 |
! ! |
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
179 |
|
169 | 180 |
!JavaMethod class methodsFor:'misc'! |
181 |
||
182 |
forceByteCodeDisplay |
|
183 |
^ ForceByteCodeDisplay |
|
184 |
||
185 |
"Created: 7.4.1997 / 20:11:39 / cg" |
|
309 | 186 |
! |
187 |
||
188 |
forceByteCodeDisplay:aBoolean |
|
189 |
ForceByteCodeDisplay := aBoolean |
|
190 |
||
191 |
" |
|
192 |
self forceByteCodeDisplay:true |
|
193 |
self forceByteCodeDisplay:false |
|
194 |
" |
|
195 |
||
196 |
"Created: / 4.2.1998 / 00:22:54 / cg" |
|
2151 | 197 |
! |
198 |
||
199 |
makeJavaMethod |
|
200 |
||
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
201 |
self flags:((self flags |
3694 | 202 |
bitOr:Behavior flagJavaMethod) |
203 |
bitClear:Behavior flagMetaMethod) |
|
2151 | 204 |
|
205 |
" |
|
3694 | 206 |
JavaMethod makeJavaMethod |
207 |
JavaMethod makeMetaMethod |
|
2151 | 208 |
" |
209 |
||
210 |
"Created: / 23-02-2011 / 12:56:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
211 |
! |
|
212 |
||
213 |
makeMetaMethod |
|
214 |
||
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
215 |
self flags:((self flags |
3694 | 216 |
bitOr:Behavior flagMetaMethod) |
217 |
bitClear:Behavior flagJavaMethod) |
|
2151 | 218 |
" |
3694 | 219 |
JavaMethod makeJavaMethod |
220 |
JavaMethod makeMetaMethod |
|
2151 | 221 |
" |
222 |
||
223 |
"Created: / 23-02-2011 / 12:56:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
169 | 224 |
! ! |
225 |
||
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
226 |
!JavaMethod class methodsFor:'others'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
227 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
228 |
version_HG |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
229 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
230 |
^ '$Changeset: <not expanded> $' |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
231 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
232 |
|
129 | 233 |
!JavaMethod class methodsFor:'signature parsing'! |
5 | 234 |
|
29 | 235 |
argSigArrayFromSignature:aSignature |
236 |
"given a signature, return a specArray for the arguments" |
|
237 |
||
238 | 238 |
|s| |
29 | 239 |
|
240 |
s := aSignature readStream. |
|
237 | 241 |
s next ~~ $( ifTrue:[self halt]. |
29 | 242 |
|
243 |
^ self argSigArrayFromStream:s. |
|
244 |
||
245 |
" |
|
246 |
JavaMethod argSigArrayFromSignature:'(LObject;)V' |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
247 |
JavaMethod argSigArrayFromSignature:'(BB)S' |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
248 |
JavaMethod argSigArrayFromSignature:'(LObject;LObject;II)V' |
29 | 249 |
" |
250 |
! |
|
251 |
||
252 |
argSigArrayFromStream:s |
|
253 |
"parse an argSpec, return an array of specs - see java doc" |
|
254 |
||
255 |
|argSpec spec| |
|
256 |
||
257 |
spec := #(). |
|
258 |
[s atEnd or:[s peek == $)]] whileFalse:[ |
|
259 |
"/ s peek == Character space ifTrue:[ |
|
260 |
"/ s next |
|
261 |
"/ ] ifFalse:[ |
|
3694 | 262 |
argSpec := self fieldTypeFromStream:s in:nil. |
263 |
spec := spec copyWith:argSpec. |
|
29 | 264 |
"/ ] |
265 |
]. |
|
266 |
^ spec |
|
267 |
||
255 | 268 |
"Modified: / 8.1.1998 / 19:10:20 / cg" |
29 | 269 |
! |
270 |
||
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
271 |
argSignatureFromArgTypeArray:arr |
2151 | 272 |
| sig | |
321 | 273 |
|
274 |
sig := ''. |
|
2151 | 275 |
arr do: |
3694 | 276 |
[:el | |
277 |
| jCLass | |
|
278 |
||
279 |
jCLass := el. |
|
280 |
jCLass isJavaClass |
|
281 |
ifFalse:[ jCLass := JavaVM reflection classForJavaClassObject:el ]. |
|
282 |
jCLass isJavaClass |
|
283 |
ifTrue: |
|
284 |
[ sig := sig , jCLass typeName. |
|
285 |
] |
|
286 |
ifFalse:[ self halt. ] ]. |
|
322 | 287 |
^ sig |
321 | 288 |
|
289 |
" |
|
290 |
self argSignatureFromArgTypeArray: |
|
2151 | 291 |
(Array |
292 |
with:(JavaVM javaClassObjectForClass:(Java at:'com.sun.java.swing.JComponent')))" |
|
293 |
||
294 |
"Modified: / 13-02-1998 / 14:57:58 / cg" |
|
295 |
"Modified: / 02-03-2011 / 22:49:24 / Marcel Hlopko <hlopik@gmail.com>" |
|
321 | 296 |
! |
297 |
||
113 | 298 |
argSpecFromSignature:aSignature withName:name |
299 |
"given a signature, return a spec" |
|
300 |
||
238 | 301 |
|s argSpec| |
113 | 302 |
|
303 |
s := aSignature readStream. |
|
304 |
s next ~~ $( ifTrue:[self halt. ^ name]. |
|
305 |
||
255 | 306 |
argSpec := self argSpecFromStream:s in:nil. |
113 | 307 |
|
308 |
s next ~~ $) ifTrue:[self halt. ^ name]. |
|
309 |
||
310 |
^ name , ' (' , argSpec , ')' |
|
311 |
||
312 |
" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
313 |
JavaMethod argSpecFromSignature:'(LObject;)V' withName:'foo' |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
314 |
JavaMethod argSpecFromSignature:'(BB)S' withName:'foo' |
113 | 315 |
" |
316 |
||
255 | 317 |
"Modified: / 8.1.1998 / 19:05:36 / cg" |
5 | 318 |
! |
319 |
||
142 | 320 |
argSpecFromStream:s in:aPackage |
321 |
"parse an argSpec - see java doc" |
|
322 |
||
323 |
|argSpec spec| |
|
324 |
||
325 |
spec := ''. |
|
326 |
[s atEnd or:[s peek == $)]] whileFalse:[ |
|
327 |
"/ s peek == Character space ifTrue:[ |
|
328 |
"/ s next |
|
329 |
"/ ] ifFalse:[ |
|
3694 | 330 |
argSpec := self fieldTypeFromStream:s in:aPackage. |
331 |
spec size ~~ 0 ifTrue:[ |
|
332 |
spec := spec , ', ' |
|
333 |
]. |
|
334 |
spec := spec , argSpec. |
|
142 | 335 |
"/ ] |
336 |
]. |
|
337 |
^ spec |
|
338 |
||
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
339 |
"Created: / 18-03-1997 / 11:06:44 / cg" |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
340 |
"Modified: / 04-10-2013 / 12:45:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
142 | 341 |
! |
342 |
||
154 | 343 |
argSpecWithArgsFromStream:s in:aPackage |
344 |
"parse an argSpec - see java doc" |
|
345 |
||
255 | 346 |
^ self argSpecWithArgsFromStream:s in:aPackage argNames:nil |
347 |
||
348 |
"Modified: / 8.1.1998 / 19:21:00 / cg" |
|
349 |
! |
|
350 |
||
351 |
argSpecWithArgsFromStream:s in:aPackage argNames:argNames |
|
352 |
"parse an argSpec - see java doc" |
|
353 |
||
354 |
|argSpec spec argNr nm| |
|
154 | 355 |
|
356 |
argNr := 1. |
|
357 |
spec := ''. |
|
358 |
[s atEnd or:[s peek == $)]] whileFalse:[ |
|
3694 | 359 |
argSpec := self fieldTypeFromStream:s in:aPackage. |
360 |
||
361 |
(argNames notNil |
|
362 |
and:[argNames size >= argNr |
|
363 |
and:[(nm := argNames at:argNr) notNil]]) ifFalse:[ |
|
364 |
nm := 'arg' , argNr printString. |
|
365 |
]. |
|
366 |
argSpec := argSpec , ' ' , nm. |
|
367 |
||
368 |
spec size ~~ 0 ifTrue:[ |
|
369 |
spec := spec , ', ' |
|
370 |
]. |
|
371 |
spec := spec , argSpec. |
|
372 |
||
373 |
argNr := argNr + 1. |
|
154 | 374 |
]. |
375 |
^ spec |
|
376 |
||
255 | 377 |
"Created: / 8.1.1998 / 19:20:36 / cg" |
378 |
"Modified: / 8.1.1998 / 21:14:33 / cg" |
|
8 | 379 |
! |
380 |
||
142 | 381 |
fieldTypeFromStream:s in:aPackage |
382 |
"parse a fieldTypeSpec - see java doc" |
|
383 |
||
2151 | 384 |
|typeChar typeSym elType size className nm out nangles | |
142 | 385 |
|
386 |
typeChar := s next. |
|
387 |
||
388 |
typeSym := SignatureTypeCodes at:typeChar ifAbsent:#unknown. |
|
389 |
||
390 |
typeSym == #unknown ifTrue:[ |
|
3694 | 391 |
^ typeSym |
142 | 392 |
]. |
2151 | 393 |
(typeSym == #object or: [typeSym == #typevar]) ifTrue:[ |
3694 | 394 |
"Take care about type variables" |
395 |
out := String new writeStream. |
|
396 |
[ s peek ~~ $; and:[ s peek ~~ $< ] ] whileTrue:[ |
|
397 |
out nextPut: s next. |
|
398 |
]. |
|
399 |
className := out contents. |
|
400 |
"Eat possible type variables" |
|
401 |
(s peek == $<) ifTrue:[ |
|
402 |
nangles := 1. s next. |
|
403 |
[ nangles ~~ 0 ] whileTrue:[ |
|
404 |
s peek == $< ifTrue:[nangles := nangles + 1]. |
|
405 |
s peek == $> ifTrue:[nangles := nangles - 1]. |
|
406 |
s next. |
|
407 |
] |
|
408 |
]. |
|
409 |
s peek ~~ $; ifTrue:[self error: 'Signature corrupted?']. |
|
410 |
s next. "/eat ; |
|
411 |
||
412 |
||
413 |
typeSym == #typevar ifTrue:[^className]. |
|
414 |
"/ strip off default |
|
415 |
nm := className. |
|
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
416 |
"/ aPackage notNil ifTrue:[ |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
417 |
"/ (nm startsWith:aPackage) ifTrue:[ |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
418 |
"/ nm := nm copyFrom:(aPackage size + 2). |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
419 |
"/ ]. |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
420 |
"/ ]. |
3694 | 421 |
"/ Show only local name, otherwise names are way too long... |
422 |
nm := nm copyFrom: (nm lastIndexOf: $/) + 1. |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
423 |
|
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
424 |
"/ nm := nm copyReplaceAll:$/ with:$.. |
3694 | 425 |
^ nm |
142 | 426 |
]. |
189 | 427 |
|
142 | 428 |
typeSym == #array ifTrue:[ |
3694 | 429 |
s peek isDigit ifTrue:[ |
430 |
size := Integer readFrom:s. |
|
431 |
elType := self fieldTypeFromStream:s in:aPackage. |
|
432 |
^ elType , '[' , size printString , ']' |
|
433 |
]. |
|
434 |
elType := self fieldTypeFromStream:s in:aPackage. |
|
435 |
^ elType , '[]' |
|
142 | 436 |
]. |
189 | 437 |
|
142 | 438 |
^ typeSym |
439 |
||
2151 | 440 |
"Created: / 18-03-1997 / 11:07:56 / cg" |
441 |
"Modified: / 18-07-1998 / 22:57:06 / cg" |
|
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
442 |
"Modified: / 04-10-2013 / 12:42:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
142 | 443 |
! |
444 |
||
3694 | 445 |
numArgsFromDescriptor:descriptor |
3197
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
446 |
"Given a method descriptor, return the number physical of args (number of arg slots)" |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
447 |
|
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
448 |
| i c numArgs | |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
449 |
|
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
450 |
"/ The following code is king of ugly, but it is optimized for speed as |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
451 |
"/ profiling shown that some 10% time was spent in descriptor parsing. |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
452 |
"/ Fillowing code is written upon assumption we get a proper method |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
453 |
"/ descriptor (i.e., descriptor, not signature with type parameters). |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
454 |
|
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
455 |
numArgs := 0. |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
456 |
i := descriptor indexOf: $(. |
3694 | 457 |
i ~~ 0 ifTrue:[ |
458 |
i := i + 1. |
|
459 |
[ (c := descriptor at: i) ~~ $) ] whileTrue:[ |
|
460 |
c == $D ifTrue:[ |
|
461 |
numArgs := numArgs + 2. |
|
462 |
] ifFalse:[ |
|
463 |
c == $J ifTrue:[ |
|
464 |
numArgs := numArgs + 2. |
|
465 |
] ifFalse:[ |
|
466 |
numArgs := numArgs + 1. |
|
467 |
c == $[ ifTrue:[ |
|
468 |
i := i + 1. |
|
469 |
[ (c := descriptor at: i) == $[ ] whileTrue:[ i := i + 1 ]. |
|
470 |
]. |
|
471 |
c == $L ifTrue:[ |
|
472 |
i := descriptor indexOf: $; startingAt: i + 1. |
|
473 |
i == 0 ifTrue:[ |
|
474 |
self error: 'Invalid descriptor' |
|
475 |
]. |
|
476 |
]. |
|
477 |
]. |
|
478 |
]. |
|
479 |
i := i + 1. |
|
480 |
]. |
|
481 |
^ numArgs |
|
3197
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
482 |
]. |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
483 |
self error: 'Invalid descriptor' |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
484 |
|
27 | 485 |
|
486 |
" |
|
3197
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
487 |
JavaMethod numArgsFromDescriptor:'(LObject;)V' |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
488 |
JavaMethod numArgsFromDescriptor:'(BB)S' |
3694 | 489 |
JavaMethod numArgsFromDescriptor:'()V' |
3197
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
490 |
JavaMethod numArgsFromDescriptor:'(Ljava/util/ArrayList<*>;)V' |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
491 |
JavaMethod numArgsFromDescriptor:'(LObject;J)V' |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
492 |
JavaMethod numArgsFromDescriptor:'([[LObject;J)V' |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
493 |
JavaMethod numArgsFromDescriptor:'([[J)V' |
27 | 494 |
" |
2151 | 495 |
|
3197
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
496 |
"/ Original (slow) code: |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
497 |
"/ | s | |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
498 |
"/ |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
499 |
"/ s := descriptor readStream. |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
500 |
"/ (descriptor includes:$() ifFalse:[ |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
501 |
"/ self error:'Invalid signature' |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
502 |
"/ ]. |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
503 |
"/ [ s next ~~ $( ] whileTrue. |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
504 |
"/ ^ self numArgsFromStream:s. |
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
505 |
|
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
506 |
"Modified: / 04-08-2014 / 16:39:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
27 | 507 |
! |
508 |
||
509 |
numArgsFromStream:s |
|
510 |
"parse an argSpec - see java doc" |
|
511 |
||
238 | 512 |
|n t| |
27 | 513 |
|
514 |
n := 0. |
|
515 |
[s atEnd or:[s peek == $)]] whileFalse:[ |
|
3694 | 516 |
t := self fieldTypeFromStream:s in:nil. |
517 |
"/ |
|
518 |
"/ some args count as 2 |
|
519 |
"/ |
|
520 |
t == #long ifTrue:[ |
|
521 |
n := n + 2. |
|
522 |
] ifFalse:[ |
|
523 |
t == #double ifTrue:[ |
|
524 |
n := n + 2 |
|
525 |
] ifFalse:[ |
|
526 |
n := n + 1. |
|
527 |
] |
|
528 |
] |
|
27 | 529 |
]. |
530 |
^ n |
|
531 |
||
255 | 532 |
"Modified: / 8.1.1998 / 19:10:25 / cg" |
29 | 533 |
! |
534 |
||
142 | 535 |
retValSpecFromSignature:aSignature in:aPackage |
536 |
"given a signature, return a spec" |
|
537 |
||
538 |
|s argSpec retvalSpec| |
|
539 |
||
540 |
s := aSignature readStream. |
|
237 | 541 |
s next ~~ $( ifTrue:[self halt]. |
142 | 542 |
|
543 |
argSpec := self argSpecFromStream:s in:aPackage. |
|
544 |
||
237 | 545 |
s next ~~ $) ifTrue:[self halt]. |
142 | 546 |
|
547 |
retvalSpec := self retvalSpecFromStream:s in:aPackage. |
|
548 |
||
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
549 |
^ retvalSpec |
142 | 550 |
|
551 |
" |
|
552 |
JavaMethod retValSpecFromSignature:'(LObject;)V' |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
553 |
JavaMethod retValSpecFromSignature:'(BB)S' |
142 | 554 |
" |
555 |
||
556 |
"Created: 18.3.1997 / 11:11:50 / cg" |
|
557 |
! |
|
558 |
||
189 | 559 |
returnTypeFromSignature:aSignature in:aPackage |
560 |
"given a signature, return its type as a string" |
|
561 |
||
238 | 562 |
|s c| |
189 | 563 |
|
564 |
s := aSignature readStream. |
|
565 |
(c := s peek) ~~ $( ifTrue:[ |
|
3694 | 566 |
c == $' ifTrue:[ |
567 |
[s peek ~= $'] whileTrue:[s next]. |
|
568 |
s next. |
|
569 |
^ (self retvalSpecFromStream:s in:aPackage) |
|
570 |
]. |
|
571 |
^ (self retvalSpecFromStream:s in:aPackage) |
|
189 | 572 |
]. |
573 |
||
574 |
s next. |
|
255 | 575 |
self argSpecFromStream:s in:aPackage. |
189 | 576 |
s next ~~ $) ifTrue:[self halt. ^ nil]. |
577 |
||
578 |
^ (self retvalSpecFromStream:s in:aPackage) |
|
579 |
||
580 |
" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
581 |
JavaMethod returnTypeFromSignature:'(LObject;)V' |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
582 |
JavaMethod returnTypeFromSignature:'(BB)S' |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
583 |
JavaMethod returnTypeFromSignature:'()J' |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
584 |
JavaMethod returnTypeFromSignature:'''first''J' |
189 | 585 |
" |
586 |
||
255 | 587 |
"Created: / 1.8.1997 / 10:54:31 / cg" |
588 |
"Modified: / 8.1.1998 / 19:09:06 / cg" |
|
72 | 589 |
! |
590 |
||
591 |
returnsVoidFromSignature:aSignature |
|
592 |
"given a signature, return true if it returns void, false if not" |
|
593 |
||
255 | 594 |
^ (self typeFromSignature:aSignature in:nil) = 'void' |
27 | 595 |
|
596 |
" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
597 |
JavaMethod returnsVoidFromSignature:'(LObject;)V' |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
598 |
JavaMethod returnsVoidFromSignature:'(BB)S' |
27 | 599 |
" |
600 |
||
255 | 601 |
"Modified: / 8.1.1998 / 19:13:53 / cg" |
10 | 602 |
! |
603 |
||
142 | 604 |
retvalSpecFromStream:s in:aPackage |
605 |
"parse a retvalSpec - see java doc" |
|
606 |
||
332 | 607 |
|spec| |
608 |
||
142 | 609 |
s atEnd ifTrue:[self halt. ^ #void]. |
610 |
s peek == $V ifTrue:[^ #void]. |
|
332 | 611 |
spec := self fieldTypeFromStream:s in:aPackage. |
612 |
spec knownAsSymbol ifTrue:[ |
|
3694 | 613 |
^ spec asSymbol |
332 | 614 |
]. |
615 |
^ spec |
|
142 | 616 |
|
332 | 617 |
"Created: / 18.3.1997 / 11:12:19 / cg" |
618 |
"Modified: / 7.4.1998 / 22:28:27 / cg" |
|
142 | 619 |
! |
620 |
||
189 | 621 |
specComponentsWithArgsFromSignature:aSignature withName:name in:aPackage |
622 |
"given a signature, return a spec" |
|
623 |
||
624 |
|s argSpec retvalSpec| |
|
625 |
||
626 |
s := aSignature readStream. |
|
627 |
s next ~~ $( ifTrue:[self halt. ^ name]. |
|
628 |
||
629 |
argSpec := self argSpecWithArgsFromStream:s in:aPackage. |
|
630 |
||
631 |
s next ~~ $) ifTrue:[self halt. ^ name]. |
|
632 |
||
633 |
retvalSpec := self retvalSpecFromStream:s in:aPackage. |
|
634 |
||
635 |
^ Array with:retvalSpec with:name with:argSpec |
|
636 |
||
637 |
" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
638 |
JavaMethod specWithArgsFromSignature:'(LObject;)V' withName:'foo' in:nil |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
639 |
JavaMethod specComponentsWithArgsFromSignature:'(LObject;)V' withName:'foo' in:nil |
189 | 640 |
" |
641 |
||
642 |
"Created: 18.3.1997 / 11:06:22 / cg" |
|
643 |
"Modified: 1.8.1997 / 11:03:50 / cg" |
|
644 |
! |
|
645 |
||
255 | 646 |
specFromSignature:aSignature withName:name argNames:argNames in:aPackage |
10 | 647 |
"given a signature, return a spec" |
648 |
||
649 |
|s argSpec retvalSpec| |
|
650 |
||
651 |
s := aSignature readStream. |
|
652 |
s next ~~ $( ifTrue:[self halt. ^ name]. |
|
653 |
||
255 | 654 |
argSpec := self argSpecWithArgsFromStream:s in:aPackage argNames:argNames. |
10 | 655 |
|
656 |
s next ~~ $) ifTrue:[self halt. ^ name]. |
|
657 |
||
255 | 658 |
retvalSpec := self retvalSpecFromStream:s in:aPackage. |
10 | 659 |
|
660 |
^ retvalSpec , ' ' , name , ' (' , argSpec , ')' |
|
661 |
||
662 |
" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
663 |
JavaMethod specFromSignature:'(LObject;)V' withName:'foo' argNames:#('a') in:nil |
255 | 664 |
JavaMethod specFromSignature:'(BB)S' withName:'foo' argNames:#('a' 'b') in:nil |
10 | 665 |
" |
255 | 666 |
|
667 |
"Created: / 18.3.1997 / 11:06:22 / cg" |
|
668 |
"Modified: / 8.1.1998 / 21:14:43 / cg" |
|
83 | 669 |
! |
670 |
||
142 | 671 |
specFromSignature:aSignature withName:name in:aPackage |
672 |
"given a signature, return a spec" |
|
673 |
||
674 |
|s argSpec retvalSpec| |
|
675 |
||
676 |
s := aSignature readStream. |
|
677 |
s next ~~ $( ifTrue:[self halt. ^ name]. |
|
678 |
||
679 |
argSpec := self argSpecFromStream:s in:aPackage. |
|
680 |
||
681 |
s next ~~ $) ifTrue:[self halt. ^ name]. |
|
682 |
||
683 |
retvalSpec := self retvalSpecFromStream:s in:aPackage. |
|
684 |
||
685 |
^ retvalSpec , ' ' , name , ' (' , argSpec , ')' |
|
686 |
||
687 |
" |
|
255 | 688 |
JavaMethod specFromSignature:'(LObject;)V' withName:'foo' in:nil |
689 |
JavaMethod specFromSignature:'(BB)S' withName:'foo' in:nil |
|
142 | 690 |
" |
691 |
||
255 | 692 |
"Created: / 18.3.1997 / 11:06:22 / cg" |
693 |
"Modified: / 8.1.1998 / 21:06:32 / cg" |
|
142 | 694 |
! |
695 |
||
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
696 |
specTextFromSignature:aSignature in:aPackage withName:name isConstructor: isCtor |
678 | 697 |
"given a signature, return a spec as boldified text" |
698 |
||
699 |
|s argSpec retvalSpec| |
|
700 |
||
701 |
s := aSignature readStream. |
|
702 |
s next ~~ $( ifTrue:[self halt. ^ name]. |
|
703 |
||
704 |
argSpec := self argSpecFromStream:s in:aPackage. |
|
705 |
||
706 |
s next ~~ $) ifTrue:[self halt. ^ name]. |
|
707 |
||
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
708 |
^ isCtor ifTrue:[ |
3694 | 709 |
name , ' (' , argSpec , ')' |
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
710 |
] ifFalse:[ |
3694 | 711 |
retvalSpec := self retvalSpecFromStream:s in:aPackage. |
712 |
name , ' (' , argSpec , ') : ' , retvalSpec |
|
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
713 |
] |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
714 |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
715 |
"/ ^ |
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
716 |
|
678 | 717 |
|
718 |
" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
719 |
JavaMethod specTextFromSignature:'(LObject;)V' withName:'foo' |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
720 |
JavaMethod specTextFromSignature:'(BB)S' withName:'foo' |
678 | 721 |
" |
722 |
||
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
723 |
"Created: / 04-10-2013 / 12:36:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
678 | 724 |
! |
725 |
||
175 | 726 |
specTextFromSignature:aSignature withName:name |
727 |
"given a signature, return a spec as boldified text" |
|
728 |
||
729 |
|s argSpec retvalSpec| |
|
730 |
||
731 |
s := aSignature readStream. |
|
732 |
s next ~~ $( ifTrue:[self halt. ^ name]. |
|
733 |
||
255 | 734 |
argSpec := self argSpecFromStream:s in:nil. |
175 | 735 |
|
736 |
s next ~~ $) ifTrue:[self halt. ^ name]. |
|
737 |
||
255 | 738 |
retvalSpec := self retvalSpecFromStream:s in:nil. |
175 | 739 |
|
2110
6188ec8713ea
no need for asText when sending allBold
Claus Gittinger <cg@exept.de>
parents:
2107
diff
changeset
|
740 |
^ retvalSpec , ' ' , (name allBold) , ' (' , argSpec , ')' |
175 | 741 |
|
742 |
" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
743 |
JavaMethod specTextFromSignature:'(LObject;)V' withName:'foo' |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
744 |
JavaMethod specTextFromSignature:'(BB)S' withName:'foo' |
175 | 745 |
" |
746 |
||
255 | 747 |
"Modified: / 8.1.1998 / 19:11:20 / cg" |
175 | 748 |
! |
749 |
||
189 | 750 |
specTextWithArgsFromSignature:aSignature withName:name in:aPackage |
751 |
"given a signature, return a spec" |
|
752 |
||
753 |
|s argSpec retvalSpec| |
|
754 |
||
755 |
s := aSignature readStream. |
|
756 |
s next ~~ $( ifTrue:[self halt. ^ name]. |
|
757 |
||
758 |
argSpec := self argSpecWithArgsFromStream:s in:aPackage. |
|
759 |
||
760 |
s next ~~ $) ifTrue:[self halt. ^ name]. |
|
761 |
||
762 |
retvalSpec := self retvalSpecFromStream:s in:aPackage. |
|
763 |
||
2110
6188ec8713ea
no need for asText when sending allBold
Claus Gittinger <cg@exept.de>
parents:
2107
diff
changeset
|
764 |
^ retvalSpec , ' ' , (name allBold) , ' (' , argSpec , ')' |
189 | 765 |
|
766 |
" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
767 |
JavaMethod specWithArgsFromSignature:'(LObject;)V' withName:'foo' in:nil |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
768 |
JavaMethod specWithArgsFromSignature:'(BB)S' withName:'foo' in:nil |
189 | 769 |
" |
770 |
||
771 |
"Modified: 20.3.1997 / 12:50:10 / cg" |
|
772 |
"Created: 1.8.1997 / 10:43:57 / cg" |
|
773 |
! |
|
774 |
||
154 | 775 |
specWithArgsFromSignature:aSignature withName:name in:aPackage |
776 |
"given a signature, return a spec" |
|
777 |
||
778 |
|s argSpec retvalSpec| |
|
779 |
||
780 |
s := aSignature readStream. |
|
781 |
s next ~~ $( ifTrue:[self halt. ^ name]. |
|
782 |
||
783 |
argSpec := self argSpecWithArgsFromStream:s in:aPackage. |
|
784 |
||
785 |
s next ~~ $) ifTrue:[self halt. ^ name]. |
|
786 |
||
787 |
retvalSpec := self retvalSpecFromStream:s in:aPackage. |
|
788 |
||
789 |
^ retvalSpec , ' ' , name , ' (' , argSpec , ')' |
|
790 |
||
791 |
" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
792 |
JavaMethod specWithArgsFromSignature:'(LObject;)V' withName:'foo' in:nil |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
793 |
JavaMethod specWithArgsFromSignature:'(BB)S' withName:'foo' in:nil |
154 | 794 |
" |
795 |
||
796 |
"Created: 18.3.1997 / 11:06:22 / cg" |
|
797 |
"Modified: 20.3.1997 / 12:50:10 / cg" |
|
798 |
! |
|
799 |
||
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
800 |
specWithArgsFromSignature:aSignature withName:name in:aPackage isConstructor: isCtor |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
801 |
"given a signature, return a spec" |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
802 |
|
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
803 |
|s argSpec retvalSpec| |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
804 |
|
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
805 |
s := aSignature readStream. |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
806 |
s next ~~ $( ifTrue:[self halt. ^ name]. |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
807 |
|
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
808 |
argSpec := self argSpecWithArgsFromStream:s in:aPackage. |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
809 |
|
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
810 |
s next ~~ $) ifTrue:[self halt. ^ name]. |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
811 |
|
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
812 |
retvalSpec := self retvalSpecFromStream:s in:aPackage. |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
813 |
|
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
814 |
^ retvalSpec , ' ' , name , ' (' , argSpec , ')' |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
815 |
|
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
816 |
" |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
817 |
JavaMethod specWithArgsFromSignature:'(LObject;)V' withName:'foo' in:nil |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
818 |
JavaMethod specWithArgsFromSignature:'(BB)S' withName:'foo' in:nil |
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
819 |
" |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
820 |
|
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
821 |
"Created: / 04-10-2013 / 12:33:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
822 |
! |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
823 |
|
189 | 824 |
typeFromSignature:aSignature in:package |
825 |
"given a signature, return its type as a string" |
|
826 |
||
238 | 827 |
|s c| |
189 | 828 |
|
829 |
s := aSignature readStream. |
|
830 |
(c := s peek) ~~ $( ifTrue:[ |
|
3694 | 831 |
c == $' ifTrue:[ |
832 |
s next. |
|
833 |
[s peek ~= $'] whileTrue:[s next]. |
|
834 |
s next. |
|
835 |
^ (self retvalSpecFromStream:s in:package) |
|
836 |
]. |
|
837 |
^ (self retvalSpecFromStream:s in:package) |
|
189 | 838 |
]. |
839 |
||
840 |
s next. |
|
255 | 841 |
self argSpecFromStream:s in:nil. |
189 | 842 |
s next ~~ $) ifTrue:[self halt. ^ nil]. |
843 |
||
844 |
^ (self retvalSpecFromStream:s in:package) |
|
845 |
||
846 |
" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
847 |
JavaMethod typeFromSignature:'(LObject;)Ljava/lang/Object' |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
848 |
JavaMethod typeFromSignature:'(LObject;)Ljava/lang/Object' in:'java.lang' |
189 | 849 |
" |
850 |
||
255 | 851 |
"Created: / 1.8.1997 / 10:50:38 / cg" |
852 |
"Modified: / 8.1.1998 / 19:09:31 / cg" |
|
10 | 853 |
! ! |
854 |
||
2151 | 855 |
!JavaMethod methodsFor:'* As yet uncategorized *'! |
856 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
857 |
annotationIndexOf:aSymbol |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
858 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
859 |
^nil |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
860 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
861 |
"Created: / 24-02-2012 / 16:06:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2151 | 862 |
! ! |
863 |
||
3236
c8b42e8c2d6c
Fix in reloading of a method with method-level breakpoint.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3197
diff
changeset
|
864 |
!JavaMethod methodsFor:'* uncategorized *'! |
c8b42e8c2d6c
Fix in reloading of a method with method-level breakpoint.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3197
diff
changeset
|
865 |
|
3694 | 866 |
annotationAt:aSymbol |
3236
c8b42e8c2d6c
Fix in reloading of a method with method-level breakpoint.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3197
diff
changeset
|
867 |
^ nil "/ There are no annotation is Smalltalk sense... |
c8b42e8c2d6c
Fix in reloading of a method with method-level breakpoint.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3197
diff
changeset
|
868 |
|
c8b42e8c2d6c
Fix in reloading of a method with method-level breakpoint.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3197
diff
changeset
|
869 |
"Created: / 17-08-2014 / 08:34:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c8b42e8c2d6c
Fix in reloading of a method with method-level breakpoint.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3197
diff
changeset
|
870 |
! ! |
c8b42e8c2d6c
Fix in reloading of a method with method-level breakpoint.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3197
diff
changeset
|
871 |
|
10 | 872 |
!JavaMethod methodsFor:'accessing'! |
873 |
||
334 | 874 |
accessFlags |
875 |
"java calls this the modifiers" |
|
876 |
||
877 |
^ accessFlags |
|
878 |
||
879 |
"Created: / 9.4.1998 / 17:49:44 / cg" |
|
880 |
! |
|
881 |
||
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
882 |
analyzer |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
883 |
"Returns an analyzer for the method which can be used |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
884 |
to query some statistics like sent messages or modified classvars" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
885 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
886 |
^ JavaMethodAnalyzer analyze: self. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
887 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
888 |
"Created: / 30-08-2013 / 13:47:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
889 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
890 |
|
2151 | 891 |
annotations |
3196
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3111
diff
changeset
|
892 |
annotations isNil ifTrue:[ |
3694 | 893 |
^ JavaMethodAnnotationContainer empty |
3196
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3111
diff
changeset
|
894 |
]. |
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3111
diff
changeset
|
895 |
^ annotations |
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3111
diff
changeset
|
896 |
|
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3111
diff
changeset
|
897 |
"Modified: / 04-08-2014 / 16:01:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2151 | 898 |
! |
899 |
||
900 |
annotations:something |
|
901 |
annotations := something. |
|
902 |
! |
|
903 |
||
29 | 904 |
argSignature |
2151 | 905 |
^ self class argSigArrayFromSignature:descriptor |
906 |
! |
|
907 |
||
908 |
asByteCodeMethod |
|
909 |
||
910 |
"JavaMethods are always bytecode methods" |
|
911 |
||
912 |
^self |
|
913 |
||
914 |
"Created: / 18-07-2011 / 20:48:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
29 | 915 |
! |
916 |
||
678 | 917 |
comment |
918 |
"should access the source here, and parse any method comment" |
|
919 |
||
920 |
^ nil |
|
921 |
! |
|
922 |
||
10 | 923 |
constantPool |
924 |
^ javaClass constantPool |
|
925 |
||
926 |
"Modified: 16.4.1996 / 12:36:27 / cg" |
|
927 |
"Created: 16.4.1996 / 15:28:50 / cg" |
|
928 |
! |
|
929 |
||
129 | 930 |
containingClass |
931 |
^ javaClass |
|
932 |
||
933 |
! |
|
934 |
||
169 | 935 |
decompiledBytecode |
936 |
|s| |
|
937 |
||
938 |
s := '' writeStream. |
|
939 |
JavaDecompiler decompile:self to:s. |
|
940 |
^ s contents |
|
941 |
||
942 |
"Created: 7.4.1997 / 20:10:37 / cg" |
|
943 |
! |
|
944 |
||
75 | 945 |
decompiledSource |
946 |
|s| |
|
947 |
||
948 |
s := '' writeStream. |
|
175 | 949 |
self decompileSourceTo:s. |
75 | 950 |
^ s contents |
175 | 951 |
|
952 |
"Modified: 30.7.1997 / 16:27:55 / cg" |
|
75 | 953 |
! |
954 |
||
2151 | 955 |
descriptor |
956 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
957 |
^ (JavaDescriptor fromString: descriptor) name: self name |
2151 | 958 |
|
959 |
"Created: / 16-04-1996 / 11:34:29 / cg" |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
960 |
"Modified: / 06-12-2011 / 21:53:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
961 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
962 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
963 |
descriptorSymbol |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
964 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
965 |
^descriptor |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
966 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
967 |
"Created: / 16-04-1996 / 11:34:29 / cg" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
968 |
"Created: / 06-12-2011 / 23:00:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2151 | 969 |
! |
970 |
||
971 |
ensureHasAnnotations |
|
3196
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3111
diff
changeset
|
972 |
annotations isNil ifTrue:[ |
3694 | 973 |
annotations := JavaMethodAnnotationContainer for:self |
3196
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3111
diff
changeset
|
974 |
]. |
2151 | 975 |
^ annotations |
976 |
||
977 |
"Created: / 25-02-2011 / 16:02:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
978 |
"Modified: / 28-02-2011 / 16:33:00 / Marcel Hlopko <hlopik@gmail.com>" |
|
3196
d617b4590431
(Class reading) optimization [2/4]: rewrite slow ifNil:... by faster isNil ifTrue:...
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3111
diff
changeset
|
979 |
"Modified: / 04-08-2014 / 15:55:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2151 | 980 |
! |
981 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
982 |
exceptionClasses |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
983 |
"Return a collection of declared exception classes that this method |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
984 |
throws" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
985 |
^#() |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
986 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
987 |
"Created: / 01-08-2012 / 10:06:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
988 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
989 |
|
135 | 990 |
exceptionHandlerTable |
378 | 991 |
^ nil |
135 | 992 |
|
378 | 993 |
"Created: / 16.10.1998 / 01:50:51 / cg" |
135 | 994 |
! |
995 |
||
83 | 996 |
exceptionTable |
378 | 997 |
^ nil |
83 | 998 |
|
378 | 999 |
"Created: / 16.10.1998 / 01:51:04 / cg" |
83 | 1000 |
! |
1001 |
||
2151 | 1002 |
firstInstructionLineNumber |
1003 |
ForceByteCodeDisplay == true ifTrue:[ ^ 1]. |
|
1004 |
lineNumberTable notNil ifTrue:[ ^ lineNumberTable at:2]. |
|
1005 |
^ 0. |
|
1006 |
||
1007 |
"Created: / 17-12-2010 / 17:02:46 / Jan Kurs <kurs.jan@post.cz>" |
|
1008 |
"Modified: / 08-01-2011 / 16:30:16 / Jan Kurs <kurs.jan@post.cz>" |
|
1009 |
! |
|
1010 |
||
1011 |
getExceptionTable |
|
1012 |
||
1013 |
^ nil |
|
1014 |
||
1015 |
"Created: / 04-02-2011 / 23:07:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1016 |
! |
|
1017 |
||
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1018 |
getMclass |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1019 |
^javaClass |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1020 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1021 |
"Created: / 15-04-2013 / 17:57:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1022 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1023 |
|
2729
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
1024 |
getSource |
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
1025 |
^ source |
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
1026 |
|
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
1027 |
"Created: / 13-09-2013 / 01:41:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
1028 |
! |
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
1029 |
|
2090 | 1030 |
getSourcePosition |
1031 |
^ 1 |
|
1032 |
! |
|
1033 |
||
90 | 1034 |
hasLineNumberInformation |
1035 |
^ lineNumberTable notNil |
|
1036 |
||
1037 |
"Created: 16.4.1996 / 12:34:04 / cg" |
|
1038 |
"Modified: 16.4.1996 / 12:49:06 / cg" |
|
1039 |
! |
|
1040 |
||
10 | 1041 |
javaByteCode |
184 | 1042 |
"/ ^ javaByteCode |
1043 |
^ byteCode |
|
10 | 1044 |
|
1045 |
"Created: 16.4.1996 / 14:55:44 / cg" |
|
184 | 1046 |
"Modified: 1.8.1997 / 00:08:45 / cg" |
8 | 1047 |
! |
1048 |
||
27 | 1049 |
javaClass |
1050 |
^ javaClass |
|
1051 |
||
1052 |
"Modified: 16.4.1996 / 12:36:27 / cg" |
|
1053 |
"Created: 16.4.1996 / 14:55:44 / cg" |
|
1054 |
! |
|
1055 |
||
2151 | 1056 |
javaExceptionTable |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1057 |
<resource: #obsolete> |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1058 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1059 |
self obsoleteMethodWarning: 'Use #exceptionClasses instead'. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1060 |
^ self exceptionClasses |
2151 | 1061 |
|
1062 |
"Created: / 04-06-2011 / 18:16:23 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1063 |
"Modified: / 01-08-2012 / 10:08:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2151 | 1064 |
! |
1065 |
||
1066 |
javaNumArgs |
|
1067 |
^ self argSignature size. |
|
1068 |
||
1069 |
"Created: / 14-03-2011 / 15:50:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1070 |
! |
|
1071 |
||
90 | 1072 |
lineNumber |
2888
5b492b74975f
Bugfix in JavaMethod>>lineNumber (missing return)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2870
diff
changeset
|
1073 |
^ self sourceLineNumber. |
2717
16564a7101b8
Initial support for displaying only selected method's source in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2716
diff
changeset
|
1074 |
|
16564a7101b8
Initial support for displaying only selected method's source in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2716
diff
changeset
|
1075 |
"Created: / 16-04-1996 / 12:34:04 / cg" |
2888
5b492b74975f
Bugfix in JavaMethod>>lineNumber (missing return)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2870
diff
changeset
|
1076 |
"Modified: / 23-10-2013 / 10:48:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
90 | 1077 |
! |
1078 |
||
50 | 1079 |
lineNumberTable |
2151 | 1080 |
"/ lineNumberTable ifNil:[ lineNumberTable := Dictionary new.]. |
50 | 1081 |
^ lineNumberTable |
1082 |
||
2151 | 1083 |
"Created: / 16-04-1996 / 12:34:04 / cg" |
1084 |
"Modified: / 13-12-2010 / 11:06:40 / Jan Kurs <kurs.jan@post.cz>" |
|
50 | 1085 |
! |
1086 |
||
618 | 1087 |
literalsDetect:aBlock ifNone:exceptionBlock |
1088 |
"execute a one arg block for each of our literals. |
|
1089 |
return the first literal for which aBlock returns true" |
|
1090 |
||
1091 |
"/ sigh - must first extract all accessed literals ... |
|
1092 |
"/ must deparse the byteCode in order to do this. |
|
1093 |
||
1094 |
|walker| |
|
1095 |
||
1096 |
walker := JavaByteCodeEnumerator new. |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1097 |
walker literalAction:[:pc :slotIndex :const | |
3694 | 1098 |
const isJavaMethodRef ifTrue:[ |
1099 |
(aBlock value:(const name)) ifTrue:[^ const name]. |
|
1100 |
] ifFalse:[ |
|
1101 |
const isJavaClassRef ifTrue:[ |
|
1102 |
(aBlock value:(const name)) ifTrue:[^ const name]. |
|
1103 |
] |
|
1104 |
] |
|
651 | 1105 |
]. |
618 | 1106 |
walker decompile:self to:nil. |
654 | 1107 |
^ nil |
618 | 1108 |
|
1109 |
"Created: / 9.11.1999 / 15:21:40 / cg" |
|
654 | 1110 |
"Modified: / 24.12.1999 / 02:55:55 / cg" |
618 | 1111 |
! |
1112 |
||
85 | 1113 |
localVariableTable |
1114 |
^ localVariableTable |
|
1115 |
||
1116 |
" |
|
1117 |
JavaMethod allInstancesDo:[:m| m localVariableTable notNil ifTrue:[self halt]] |
|
1118 |
" |
|
1119 |
! |
|
1120 |
||
2151 | 1121 |
mclass |
1122 |
^ self javaClass |
|
1123 |
! |
|
1124 |
||
1125 |
mclass: anObject |
|
1126 |
||
1127 |
javaClass := anObject |
|
1128 |
||
1129 |
"Created: / 18-10-2010 / 19:01:14 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1130 |
! |
|
1131 |
||
2086 | 1132 |
methodArgAndVarNames |
2151 | 1133 |
^ "((1 to:self numArgs) collect:[:i | 'arg' , i printString])" |
1134 |
self methodArgNames |
|
2086 | 1135 |
, |
2151 | 1136 |
"((1 to:self numVars) collect:[:i | 'local' , i printString])" |
1137 |
self methodVarNames |
|
1138 |
||
1139 |
"Modified: / 23-11-2010 / 19:32:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
31 | 1140 |
! |
1141 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1142 |
methodArgAndVarNamesInContext: context |
2902
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1143 |
| pc stop | |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1144 |
|
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1145 |
self isNative ifTrue:[ |
3694 | 1146 |
^ self methodArgNames |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1147 |
]. |
2902
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1148 |
|
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1149 |
context isJavaContext ifTrue:[ |
3694 | 1150 |
pc := context pc. |
2902
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1151 |
] ifFalse:[ |
3694 | 1152 |
"/ It may happen that the context for Java method is not |
1153 |
"/ a JavaContext. This is true for some code-saver functions |
|
1154 |
"/ such as __retInst1(), __retSelf1() and so on. In that case, |
|
1155 |
"/ method sould be simple enough to have no nested scopes |
|
1156 |
"/ or local variables. Forcing pc := 0 therefore works fine |
|
1157 |
pc := 0. |
|
2902
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1158 |
]. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1159 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1160 |
localVariableTable isNil ifTrue:[^self methodArgNames , self methodVarNames ]. |
2902
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1161 |
|
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1162 |
stop := context arg1Index - 1 + self numArgs + self numVars. |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1163 |
stop := stop min: context size. |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1164 |
|
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1165 |
^(1 to: stop) collect:[:i| |
3694 | 1166 |
(localVariableTable nameForSlot: i - 1 atPC: pc) ? '<inaccessible>'. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1167 |
]. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1168 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1169 |
"Created: / 18-12-2012 / 18:17:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2902
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1170 |
"Modified: / 05-11-2013 / 17:28:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1171 |
! |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1172 |
|
3942 | 1173 |
methodArgAndVarNamesInContextForInspector: context |
1174 |
^ self methodArgAndVarNamesInContext: context |
|
1175 |
! |
|
1176 |
||
2902
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1177 |
methodArgAndVarValuesInContext: context |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1178 |
| pc stop | |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1179 |
|
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1180 |
localVariableTable isNil ifTrue:[ |
3694 | 1181 |
| values | |
1182 |
||
1183 |
values := Array new: context size. |
|
1184 |
values replaceFrom: 1 count: context size with: context startingAt: 1. |
|
1185 |
^ values. |
|
2902
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1186 |
]. |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1187 |
context isJavaContext ifTrue:[ |
3694 | 1188 |
pc := context pc. |
2902
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1189 |
] ifFalse:[ |
3694 | 1190 |
"/ It may happen that the context for Java method is not |
1191 |
"/ a JavaContext. This is true for some code-saver functions |
|
1192 |
"/ such as __retInst1(), __retSelf1() and so on. In that case, |
|
1193 |
"/ method sould be simple enough to have no nested scopes |
|
1194 |
"/ or local variables. Forcing pc := 0 therefore works fine |
|
1195 |
pc := 0. |
|
2902
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1196 |
]. |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1197 |
|
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1198 |
stop := context arg1Index - 1 + self numArgs + self numVars. |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1199 |
stop := stop min: context size. |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1200 |
|
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1201 |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1202 |
^(1 to: stop) collect:[:i| |
3694 | 1203 |
(localVariableTable nameForSlot: i - 1 atPC: pc) notNil ifTrue:[ |
1204 |
context at: i |
|
1205 |
] ifFalse:[ |
|
1206 |
nil |
|
1207 |
]. |
|
2902
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1208 |
]. |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1209 |
|
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1210 |
"Created: / 04-11-2013 / 18:53:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
1211 |
"Modified: / 05-11-2013 / 17:28:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1212 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1213 |
|
31 | 1214 |
methodArgNames |
3083 | 1215 |
|nA "{ Class: SmallInteger }" isStatic| |
1216 |
||
1217 |
isStatic := self isStatic. |
|
252 | 1218 |
nA := self numArgs. |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1219 |
^ 1 to:nA collect: [:argIndex | |
3694 | 1220 |
|slot name| |
1221 |
||
1222 |
"/ search for an entry with that index (slot), |
|
1223 |
"/ which has is valid at PC 0 |
|
1224 |
||
1225 |
localVariableTable notNil ifTrue:[ |
|
1226 |
isStatic ifTrue:[ |
|
1227 |
slot := argIndex - 1 |
|
1228 |
] ifFalse:[ |
|
1229 |
slot := argIndex "/+ 1 |
|
1230 |
]. |
|
1231 |
name := localVariableTable nameForSlot:slot atPC:0. |
|
1232 |
]. |
|
1233 |
name isNil ifTrue:[ |
|
1234 |
name := 'arg' , argIndex printString |
|
1235 |
]. |
|
1236 |
name |
|
102 | 1237 |
]. |
2151 | 1238 |
|
1239 |
"Modified: / 23-11-2010 / 19:47:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1240 |
! |
|
1241 |
||
1242 |
methodVarNames |
|
1243 |
|nV| |
|
1244 |
||
1245 |
nV := self numVars. |
|
1246 |
localVariableTable notNil ifTrue:[ |
|
3694 | 1247 |
^ (self numArgs + 1 to: self numArgs + nV) collect: |
1248 |
[:argIndex | |
|
1249 |
|slot name| |
|
1250 |
"/ search for an entry with that index (slot), |
|
1251 |
"/ which has is valid at PC 0 |
|
1252 |
||
1253 |
self isStatic ifTrue:[ |
|
1254 |
slot := argIndex - 1 |
|
1255 |
] ifFalse:[ |
|
1256 |
slot := argIndex"/ + 1 |
|
1257 |
]. |
|
1258 |
name := localVariableTable nameForSlot:slot atPC:0. |
|
1259 |
name isNil ifTrue:[ |
|
1260 |
'local' , argIndex printString |
|
1261 |
] ifFalse:[ |
|
1262 |
name |
|
1263 |
]. |
|
1264 |
] |
|
2151 | 1265 |
]. |
1266 |
^ (1 to:nV) collect:[:i | 'local' , i printString] |
|
1267 |
||
1268 |
"Created: / 23-11-2010 / 19:28:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
31 | 1269 |
! |
1270 |
||
29 | 1271 |
name |
2555
655f39b36a10
Changed usage of deprecated #copyWithoutLast: to #copyButLast:
Stefan Vogel <sv@exept.de>
parents:
2551
diff
changeset
|
1272 |
^ (selector copyButLast:descriptor size) asSymbol |
29 | 1273 |
|
1274 |
"Created: 16.4.1996 / 11:34:22 / cg" |
|
1275 |
! |
|
1276 |
||
2151 | 1277 |
nameSpaceName |
1278 |
||
1279 |
^'' |
|
1280 |
||
1281 |
"Created: / 18-10-2010 / 19:10:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1282 |
! |
|
1283 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1284 |
numJArgs |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1285 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1286 |
^self numberOfJavaArgs |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1287 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1288 |
"Created: / 25-10-2011 / 10:50:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1289 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1290 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1291 |
numJavaArgs |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1292 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1293 |
^self numberOfJavaArgs |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1294 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1295 |
"Created: / 25-10-2011 / 10:50:31 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
118 | 1296 |
! |
1297 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1298 |
numberOfJavaArgs |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1299 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1300 |
^(accessFlags bitAnd: 16r00FF0000) rightShift: 16. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1301 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1302 |
"Created: / 25-10-2011 / 10:45:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1303 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1304 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1305 |
numberOfJavaArgs: nArgs |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1306 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1307 |
( nArgs > 16rFF ) ifTrue:[ |
3694 | 1308 |
ArgumentError raiseRequestWith:self errorString:'too many args method - ', nArgs printString. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1309 |
]. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1310 |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1311 |
accessFlags := accessFlags bitOr: |
3694 | 1312 |
((nArgs bitAnd: 16rFF) bitShift: 16) |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1313 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1314 |
"Created: / 25-10-2011 / 10:43:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
27 | 1315 |
! |
1316 |
||
2158
cf16fc148fb8
added: #originalMethodIfWrapped
Claus Gittinger <cg@exept.de>
parents:
2151
diff
changeset
|
1317 |
originalMethodIfWrapped |
cf16fc148fb8
added: #originalMethodIfWrapped
Claus Gittinger <cg@exept.de>
parents:
2151
diff
changeset
|
1318 |
"return the method the receiver is wrapping - none here" |
cf16fc148fb8
added: #originalMethodIfWrapped
Claus Gittinger <cg@exept.de>
parents:
2151
diff
changeset
|
1319 |
|
cf16fc148fb8
added: #originalMethodIfWrapped
Claus Gittinger <cg@exept.de>
parents:
2151
diff
changeset
|
1320 |
^ self |
cf16fc148fb8
added: #originalMethodIfWrapped
Claus Gittinger <cg@exept.de>
parents:
2151
diff
changeset
|
1321 |
|
cf16fc148fb8
added: #originalMethodIfWrapped
Claus Gittinger <cg@exept.de>
parents:
2151
diff
changeset
|
1322 |
"Created: / 22-10-2010 / 11:46:07 / cg" |
cf16fc148fb8
added: #originalMethodIfWrapped
Claus Gittinger <cg@exept.de>
parents:
2151
diff
changeset
|
1323 |
! |
cf16fc148fb8
added: #originalMethodIfWrapped
Claus Gittinger <cg@exept.de>
parents:
2151
diff
changeset
|
1324 |
|
175 | 1325 |
previousVersion |
1326 |
^ nil |
|
1327 |
||
1328 |
"Created: 30.7.1997 / 15:56:18 / cg" |
|
1329 |
! |
|
1330 |
||
2151 | 1331 |
previousVersionCode |
1332 |
||
1333 |
^nil |
|
1334 |
||
1335 |
"Created: / 18-10-2010 / 20:15:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1336 |
! |
|
1337 |
||
29 | 1338 |
retValSignature |
2151 | 1339 |
^ self class retValSpecFromSignature:descriptor in:nil |
29 | 1340 |
|
255 | 1341 |
"Modified: / 8.1.1998 / 19:06:40 / cg" |
29 | 1342 |
! |
1343 |
||
123 | 1344 |
returnType |
378 | 1345 |
"/ ^ returnType |
2151 | 1346 |
^ self class typeFromSignature:descriptor in:nil. |
378 | 1347 |
|
1348 |
"Modified: / 16.10.1998 / 00:17:43 / cg" |
|
123 | 1349 |
! |
1350 |
||
322 | 1351 |
returnTypeClass |
378 | 1352 |
|cls returnType| |
322 | 1353 |
|
378 | 1354 |
(returnType := self returnType) isNil ifTrue:[ |
3694 | 1355 |
self halt. |
322 | 1356 |
]. |
1357 |
cls := Java at:returnType. |
|
1358 |
cls notNil ifTrue:[^ cls]. |
|
1359 |
||
1360 |
returnType == #void ifTrue:[ |
|
3694 | 1361 |
^ nil |
322 | 1362 |
]. |
1363 |
returnType == #double ifTrue:[ |
|
3694 | 1364 |
'warning: no returnTypeClass for double' printCR. |
334 | 1365 |
"/ self halt:'no returnTypeClass for double'. |
3694 | 1366 |
^ nil |
322 | 1367 |
]. |
1368 |
returnType == #float ifTrue:[ |
|
3694 | 1369 |
'warning: no returnTypeClass for float' printCR. |
334 | 1370 |
"/ self halt:'no returnTypeClass for float'. |
3694 | 1371 |
^ nil |
322 | 1372 |
]. |
1373 |
returnType == #long ifTrue:[ |
|
3694 | 1374 |
'warning: no returnTypeClass for long' printCR. |
334 | 1375 |
"/ self halt:'no returnTypeClass for long'. |
3694 | 1376 |
^ nil |
334 | 1377 |
]. |
1378 |
returnType == #int ifTrue:[ |
|
3694 | 1379 |
'warning: no returnTypeClass for int' printCR. |
334 | 1380 |
"/ self halt:'no returnTypeClass for int'. |
3694 | 1381 |
^ nil |
334 | 1382 |
]. |
1383 |
returnType == #boolean ifTrue:[ |
|
3694 | 1384 |
'warning: no returnTypeClass for boolean' printCR. |
334 | 1385 |
"/ self halt:'no returnTypeClass for boolean'. |
3694 | 1386 |
^ nil |
322 | 1387 |
]. |
1388 |
self halt. |
|
1389 |
^ nil |
|
1390 |
||
1391 |
"Created: / 13.2.1998 / 15:08:26 / cg" |
|
378 | 1392 |
"Modified: / 16.10.1998 / 00:16:07 / cg" |
322 | 1393 |
! |
1394 |
||
116 | 1395 |
returnsDouble |
378 | 1396 |
^ self returnType == #double |
1397 |
||
1398 |
"Modified: / 16.10.1998 / 00:18:24 / cg" |
|
116 | 1399 |
! |
1400 |
||
72 | 1401 |
returnsLong |
378 | 1402 |
^ self returnType == #long |
1403 |
||
1404 |
"Modified: / 16.10.1998 / 00:18:41 / cg" |
|
72 | 1405 |
! |
1406 |
||
27 | 1407 |
returnsVoid |
378 | 1408 |
^ self returnType == #void |
1409 |
||
2151 | 1410 |
"Modified: / 16-10-1998 / 00:18:53 / cg" |
1411 |
"Modified: / 22-03-2011 / 12:27:02 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
27 | 1412 |
! |
1413 |
||
255 | 1414 |
selector |
378 | 1415 |
"/ could theoretically be extracted from my classes |
1416 |
"/ methodDictionary via: |
|
1417 |
"/ ^ javaClass methodDictionary keyAtValue:self ifAbsent:nil. |
|
1418 |
||
255 | 1419 |
^ selector |
1420 |
||
1421 |
"Created: / 7.1.1998 / 14:05:11 / cg" |
|
378 | 1422 |
"Modified: / 16.10.1998 / 13:41:06 / cg" |
255 | 1423 |
! |
1424 |
||
27 | 1425 |
signature |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1426 |
^ signature |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1427 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1428 |
"Modified: / 04-12-2011 / 19:39:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
31 | 1429 |
! |
1430 |
||
1431 |
source |
|
2716
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
1432 |
| sourceString | |
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
1433 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1434 |
(self isSynthetic or:[ForceByteCodeDisplay == true]) ifTrue:[ |
3694 | 1435 |
^ self decompiledBytecode |
169 | 1436 |
]. |
2716
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
1437 |
|
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
1438 |
sourceString := javaClass source. |
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
1439 |
sourceString isNil ifTrue:[ |
3694 | 1440 |
^ self decompiledSource. |
2716
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
1441 |
]. |
2729
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
1442 |
ShowFullSource ifTrue:[ ^ sourceString ]. |
2725
258b8c6de530
STC bug workaround in JavaMethod>>source.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2722
diff
changeset
|
1443 |
source notNil ifTrue:[ |
3694 | 1444 |
^ source readFrom: sourceString. |
2725
258b8c6de530
STC bug workaround in JavaMethod>>source.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2722
diff
changeset
|
1445 |
]. |
258b8c6de530
STC bug workaround in JavaMethod>>source.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2722
diff
changeset
|
1446 |
|
258b8c6de530
STC bug workaround in JavaMethod>>source.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2722
diff
changeset
|
1447 |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1448 |
"/ stx:libjava/tools may not be loaded... |
2725
258b8c6de530
STC bug workaround in JavaMethod>>source.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2722
diff
changeset
|
1449 |
JavaSourceDocument notNil ifTrue:[ |
3694 | 1450 |
"/ As a side effect, this fills in source references for all methods. |
1451 |
"/ see JavaSourceDocument |
|
1452 |
| document | |
|
1453 |
||
1454 |
((document := self sourceDocument) notNil and:[document sourceTreeOrNilIfParsing notNil]) ifTrue:[ |
|
1455 |
^ source readFrom: sourceString. |
|
1456 |
] |
|
2725
258b8c6de530
STC bug workaround in JavaMethod>>source.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2722
diff
changeset
|
1457 |
]. |
258b8c6de530
STC bug workaround in JavaMethod>>source.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2722
diff
changeset
|
1458 |
^ sourceString |
169 | 1459 |
|
2151 | 1460 |
"Modified: / 04-01-1998 / 13:48:35 / cg" |
1461 |
"Modified: / 13-12-2010 / 11:06:51 / Jan Kurs <kurs.jan@post.cz>" |
|
2729
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
1462 |
"Modified: / 14-09-2013 / 12:01:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2717
16564a7101b8
Initial support for displaying only selected method's source in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2716
diff
changeset
|
1463 |
! |
16564a7101b8
Initial support for displaying only selected method's source in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2716
diff
changeset
|
1464 |
|
16564a7101b8
Initial support for displaying only selected method's source in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2716
diff
changeset
|
1465 |
sourceDocument |
16564a7101b8
Initial support for displaying only selected method's source in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2716
diff
changeset
|
1466 |
| doc | |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1467 |
"/ stx:libjava/tools may not be loaded... |
2717
16564a7101b8
Initial support for displaying only selected method's source in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2716
diff
changeset
|
1468 |
JavaSourceDocument notNil ifTrue:[ |
3694 | 1469 |
doc := JavaSourceDocument cachedDocumentFor: javaClass. |
1470 |
doc isNil ifTrue:[ |
|
1471 |
doc := JavaSourceDocument for: javaClass. |
|
1472 |
JavaSourceDocument cachedDocumentFor: javaClass put: doc. |
|
1473 |
]. |
|
1474 |
^ doc |
|
2717
16564a7101b8
Initial support for displaying only selected method's source in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2716
diff
changeset
|
1475 |
] |
16564a7101b8
Initial support for displaying only selected method's source in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2716
diff
changeset
|
1476 |
|
16564a7101b8
Initial support for displaying only selected method's source in browser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2716
diff
changeset
|
1477 |
"Created: / 07-09-2013 / 02:29:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
31 | 1478 |
! |
1479 |
||
1480 |
sourceFilename |
|
1481 |
^ javaClass sourceFile |
|
175 | 1482 |
! |
1483 |
||
1484 |
sourceLineNumber |
|
2722
1527fdb0c92f
Return line number withing method source.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2720
diff
changeset
|
1485 |
"Return the line number of method declaration |
1527fdb0c92f
Return line number withing method source.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2720
diff
changeset
|
1486 |
withing method's source" |
1527fdb0c92f
Return line number withing method source.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2720
diff
changeset
|
1487 |
|
2726
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
1488 |
^ ShowFullSource ifFalse:[ |
3694 | 1489 |
"Showing only method's source..." |
1490 |
source notNil |
|
1491 |
ifTrue:[source line0 - source lineH + 1] |
|
1492 |
ifFalse:[1]. |
|
2726
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
1493 |
] ifTrue:[ |
3694 | 1494 |
"Showing full source..." |
1495 |
source notNil ifTrue:[ |
|
1496 |
source lineH |
|
1497 |
] ifFalse:[ |
|
1498 |
self firstInstructionLineNumber - 2. |
|
1499 |
] |
|
2151 | 1500 |
]. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1501 |
|
2151 | 1502 |
"Created: / 30-07-1997 / 15:40:45 / cg" |
1503 |
"Modified: / 13-12-2010 / 23:46:30 / Marcel Hlopko <hlopik@gmail.com>" |
|
1504 |
"Modified: / 08-01-2011 / 16:20:40 / Jan Kurs <kurs.jan@post.cz>" |
|
2726
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
1505 |
"Modified: / 11-09-2013 / 03:24:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2151 | 1506 |
! |
1507 |
||
1508 |
wrapper |
|
1509 |
||
1510 |
^nil |
|
1511 |
||
1512 |
"Created: / 18-10-2010 / 19:11:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1513 |
! ! |
|
1514 |
||
1515 |
!JavaMethod methodsFor:'compiler interface'! |
|
1516 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1517 |
flushCode |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1518 |
"Flushes jitted code, effectively cause a recompile" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1519 |
self code: nil. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1520 |
ObjectMemory flushCachesForSelector: selector. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1521 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1522 |
"Created: / 15-10-2012 / 21:03:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1523 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1524 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1525 |
mcompile |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1526 |
"__mcompile(OBJ aMethod, unsigned char *bytecode, int nBytes, int nArgs, OBJ receiver, OBJ selector, OBJ srchClass, OBJ *pArgsOrNull)" |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1527 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1528 |
| bytecode nBytes nArgs receiver mySelector srchClass pArgsOrNull retVal | |
3691 | 1529 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1530 |
bytecode := self byteCode. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1531 |
nBytes := self byteCode size. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1532 |
nArgs := self numArgs. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1533 |
receiver := nil. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1534 |
mySelector := self selector. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1535 |
srchClass := self mclass. |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1536 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1537 |
%{ |
3691 | 1538 |
OBJFUNC fn; |
3694 | 1539 |
OBJ *_pArgsOrNull = (OBJ*)0; |
1540 |
||
1541 |
fn = __mcompile(self, (unsigned char*)__ByteArrayInstPtr(bytecode), |
|
1542 |
__intVal(nBytes), __intVal(nArgs), |
|
3691 | 1543 |
receiver, mySelector, srchClass, _pArgsOrNull); |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1544 |
%}. |
3691 | 1545 |
self halt. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1546 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1547 |
"Created: / 24-02-2012 / 11:39:13 / m" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1548 |
"Modified: / 24-02-2012 / 14:00:04 / Marcel Hlopko <hlopik@gmail.com>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1549 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1550 |
|
2151 | 1551 |
programmingLanguage |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1552 |
"Returns a programming language of the method" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1553 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1554 |
"Do not return JavaLanguage unconditionally here. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1555 |
Consider another JVM-based languages (such as Groovy)" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1556 |
^javaClass programmingLanguage |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1557 |
|
2151 | 1558 |
"Created: / 26-10-2010 / 23:42:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1559 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1560 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1561 |
updateFrom: anotherMethod |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1562 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1563 |
self class allInstVarNames keysAndValuesDo:[:index :name| |
3694 | 1564 |
(#(#'code*' #'javaClass') includes: name) ifFalse:[ |
1565 |
self instVarAt: index put: (anotherMethod instVarAt: index) |
|
1566 |
] |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1567 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1568 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
1569 |
"Created: / 19-04-2013 / 00:08:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8 | 1570 |
! ! |
1571 |
||
255 | 1572 |
!JavaMethod methodsFor:'debugging'! |
1573 |
||
1574 |
breakPoint |
|
1575 |
Debugger enter:thisContext sender withMessage:'breakpoint' |
|
1576 |
||
1577 |
"Modified: / 9.1.1998 / 23:01:17 / cg" |
|
1578 |
! |
|
1579 |
||
1580 |
clearBreakPoint |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1581 |
| clsInEvent | |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1582 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1583 |
accessFlags := (accessFlags bitClear:A_BREAKPOINT). |
449 | 1584 |
self hasCode ifTrue:[ |
3694 | 1585 |
MessageTracer unwrapMethod:self |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1586 |
] ifFalse:[ |
3694 | 1587 |
clsInEvent := self isStatic |
1588 |
ifTrue:[ javaClass theMetaclass ] |
|
1589 |
ifFalse:[ javaClass ]. |
|
1590 |
Smalltalk changed:#methodTrap with:{ clsInEvent . selector } |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1591 |
] |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1592 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1593 |
"Modified: / 13-11-1998 / 23:31:00 / cg" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1594 |
"Modified: / 30-05-2012 / 19:31:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
255 | 1595 |
! |
1596 |
||
257 | 1597 |
isCounting |
1598 |
^ false. |
|
1599 |
||
1600 |
"Created: / 12.1.1998 / 20:02:23 / cg" |
|
1601 |
! |
|
1602 |
||
1603 |
isCountingMemoryUsage |
|
1604 |
^ false. |
|
1605 |
||
1606 |
"Created: / 12.1.1998 / 20:03:22 / cg" |
|
1607 |
! |
|
1608 |
||
255 | 1609 |
setBreakPoint |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1610 |
| clsInEvent | |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1611 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1612 |
accessFlags := (accessFlags bitOr:A_BREAKPOINT). |
449 | 1613 |
self hasCode ifTrue:[ |
3694 | 1614 |
MessageTracer trapMethod:self |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1615 |
] ifFalse:[ |
3694 | 1616 |
clsInEvent := self isStatic |
1617 |
ifTrue:[ javaClass theMetaclass ] |
|
1618 |
ifFalse:[ javaClass ]. |
|
1619 |
Smalltalk changed:#methodTrap with:{ clsInEvent . selector } |
|
449 | 1620 |
]. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1621 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1622 |
"Modified: / 13-11-1998 / 23:30:45 / cg" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1623 |
"Modified: / 30-05-2012 / 19:30:33 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
255 | 1624 |
! ! |
1625 |
||
18 | 1626 |
!JavaMethod methodsFor:'decompiling'! |
1627 |
||
175 | 1628 |
decompileSourceTo:aStream |
637 | 1629 |
|argNames| |
1630 |
||
1631 |
byteCode isNil ifTrue:[ |
|
3694 | 1632 |
self isPublic ifTrue:[ |
1633 |
aStream nextPutAll:'public '. |
|
1634 |
]. |
|
1635 |
self isProtected ifTrue:[ |
|
1636 |
aStream nextPutAll:'protected '. |
|
1637 |
]. |
|
1638 |
self isPrivate ifTrue:[ |
|
1639 |
aStream nextPutAll:'private '. |
|
1640 |
]. |
|
1641 |
self isStatic ifTrue:[ |
|
1642 |
aStream nextPutAll:'static '. |
|
1643 |
]. |
|
1644 |
||
1645 |
self isNative ifTrue:[ |
|
1646 |
aStream nextPutAll:'native '. |
|
1647 |
]. |
|
1648 |
self isAbstract ifTrue:[ |
|
1649 |
aStream nextPutAll:'abstract '. |
|
1650 |
]. |
|
1651 |
argNames := #('arg1' 'arg2' 'arg3' 'arg4' 'arg5' 'arg6' 'arg7' 'arg8' 'arg9'). |
|
1652 |
aStream nextPutAll:(self signatureNameWithArgNames:argNames). |
|
1653 |
aStream nextPutAll:';'; cr. |
|
1654 |
^ self |
|
637 | 1655 |
]. |
1656 |
||
2151 | 1657 |
" |
637 | 1658 |
JavaDeparser isNil ifTrue:[ |
3694 | 1659 |
aStream nextPutAll:'// Sorry - no decompiler'. |
1660 |
^ self |
|
637 | 1661 |
]. |
2151 | 1662 |
" |
637 | 1663 |
|
1664 |
||
252 | 1665 |
"/ self isNative ifFalse:[ |
1666 |
"/ self isAbstract ifFalse:[ |
|
3694 | 1667 |
aStream nextPutAll:'// source not available...'; cr. |
1668 |
SignalSet anySignal handle:[:ex | |
|
1669 |
ex creator == Object haltSignal ifTrue:[ex reject]. |
|
1670 |
ex creator == MessageTracer breakpointSignal ifTrue:[ex reject]. |
|
1671 |
ex creator == Signal noHandlerSignal ifTrue:[ex reject]. |
|
1672 |
||
1673 |
aStream nextPutAll:'error while decompiling:'. |
|
1674 |
aStream cr; cr; spaces:4. |
|
1675 |
aStream nextPutAll:ex errorString. |
|
1676 |
aStream cr. |
|
1677 |
aStream nextPutAll:ex suspendedContext printString. |
|
1678 |
aStream cr. |
|
1679 |
aStream nextPutAll:ex suspendedContext sender printString. |
|
1680 |
aStream cr. |
|
1681 |
aStream nextPutAll:ex suspendedContext sender sender printString. |
|
1682 |
aStream cr. |
|
1683 |
aStream nextPutAll:ex suspendedContext sender sender sender printString. |
|
1684 |
aStream cr. |
|
1685 |
aStream nextPutAll:ex suspendedContext sender sender sender sender printString. |
|
1686 |
aStream cr. |
|
1687 |
aStream nextPutAll:ex suspendedContext sender sender sender sender sender printString. |
|
1688 |
aStream cr. |
|
1689 |
aStream nextPutAll:ex suspendedContext sender sender sender sender sender sender printString. |
|
1690 |
aStream cr. |
|
1691 |
aStream nextPutAll:ex suspendedContext sender sender sender sender sender sender sender printString. |
|
1692 |
aStream cr. |
|
1693 |
aStream nextPutAll:ex suspendedContext sender sender sender sender sender sender sender sender printString. |
|
1694 |
aStream cr. |
|
1695 |
||
1696 |
" |
|
1697 |
JavaByteCodeDisassembler isNil ifTrue:[ |
|
1698 |
aStream nextPutAll:'// Sorry - no decompiler' |
|
1699 |
] ifFalse:[ |
|
1700 |
JavaByteCodeDisassembler diassemble:self to:aStream. |
|
1701 |
]. |
|
1702 |
" |
|
1703 |
ex return |
|
1704 |
] do:[ |
|
1705 |
"aStream nextPutAll:(JavaDeparser decompile:self)." |
|
1706 |
JavaByteCodeDisassembler diassemble:self to:aStream. |
|
1707 |
]. |
|
252 | 1708 |
"/ ]. |
1709 |
"/ ]. |
|
18 | 1710 |
|
2151 | 1711 |
"Created: / 30-07-1997 / 16:28:09 / cg" |
1712 |
"Modified: / 21-12-1999 / 14:31:54 / cg" |
|
1713 |
"Modified: / 22-03-2011 / 21:34:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
175 | 1714 |
! |
1715 |
||
1716 |
decompiler |
|
1717 |
^ JavaDecompiler |
|
1718 |
||
1719 |
"Created: 30.7.1997 / 16:36:48 / cg" |
|
261 | 1720 |
! |
1721 |
||
449 | 1722 |
isMethod |
1723 |
"return true, if the receiver is some kind of method; |
|
1724 |
true returned here - the method is redefined from Object." |
|
1725 |
||
1726 |
^ true |
|
1727 |
||
1728 |
"Created: / 13.11.1998 / 23:57:40 / cg" |
|
1729 |
! |
|
1730 |
||
261 | 1731 |
originalMethod |
1732 |
^ self |
|
1733 |
||
1734 |
"Created: / 13.1.1998 / 15:03:05 / cg" |
|
18 | 1735 |
! ! |
1736 |
||
277 | 1737 |
!JavaMethod methodsFor:'error handling'! |
1738 |
||
2151 | 1739 |
errorInvalidClassRefAt: index |
1740 |
||
1741 |
"Sent by the VM when an invalid entry in contant pool |
|
1742 |
is encountered - for instance when the VM expects |
|
1743 |
a classref but the entry is not a classref" |
|
1744 |
||
1745 |
" |
|
1746 |
javaClass constantPool at: index. |
|
1747 |
" |
|
1748 |
||
1749 |
JavaInvalidRefError new |
|
3694 | 1750 |
javaClass: javaClass; |
1751 |
index: index; |
|
1752 |
raiseRequest |
|
2151 | 1753 |
|
1754 |
"Created: / 18-07-2011 / 23:33:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1755 |
! |
|
1756 |
||
1757 |
errorInvalidFieldRefAt: index |
|
1758 |
||
1759 |
"Sent by the VM when an invalid entry in contant pool |
|
1760 |
is encountered - for instance when the VM expects |
|
1761 |
a classref but the entry is not a classref" |
|
1762 |
||
1763 |
" |
|
1764 |
javaClass constantPool at: index. |
|
1765 |
" |
|
1766 |
||
1767 |
JavaInvalidRefError new |
|
3694 | 1768 |
javaClass: javaClass; |
1769 |
index: index; |
|
1770 |
raiseRequest |
|
2151 | 1771 |
|
1772 |
"Created: / 18-07-2011 / 23:33:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1773 |
! |
|
1774 |
||
1775 |
errorInvalidMethodRefAt: index |
|
1776 |
||
1777 |
"Sent by the VM when an invalid entry in contant pool |
|
1778 |
is encountered - for instance when the VM expects |
|
1779 |
a classref but the entry is not a classref" |
|
1780 |
||
1781 |
" |
|
1782 |
javaClass constantPool at: index. |
|
1783 |
" |
|
1784 |
||
1785 |
JavaInvalidRefError new |
|
3694 | 1786 |
javaClass: javaClass; |
1787 |
index: index; |
|
1788 |
raiseRequest |
|
2151 | 1789 |
|
1790 |
"Created: / 18-07-2011 / 19:59:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1791 |
! |
|
1792 |
||
277 | 1793 |
invalidByteCode |
1794 |
self isAbstract ifTrue:[ |
|
3694 | 1795 |
^ AbstractMethodInvokationSignal raise. |
277 | 1796 |
]. |
3197
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
1797 |
((self class numArgsFromDescriptor:descriptor) > self class maxNumberOfArguments) ifTrue:[ |
3694 | 1798 |
^ self error:'method cannot be executed - too many args' |
309 | 1799 |
]. |
277 | 1800 |
^ super invalidByteCode |
1801 |
||
2151 | 1802 |
"Created: / 27-01-1998 / 21:48:01 / cg" |
1803 |
"Modified: / 14-08-2011 / 19:29:52 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
378 | 1804 |
! |
1805 |
||
1806 |
invalidMethodRef |
|
1807 |
self halt. |
|
1808 |
^ nil. |
|
1809 |
||
1810 |
"Modified: / 27.1.1998 / 21:50:19 / cg" |
|
1811 |
"Created: / 16.10.1998 / 11:27:21 / cg" |
|
594 | 1812 |
! |
1813 |
||
1814 |
nullClassPointer |
|
1815 |
JavaVM throwClassNotFoundException |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1816 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1817 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1818 |
wrongNumberOfArguments:numArgsGiven |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1819 |
"{ Pragma: +optSpace }" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1820 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1821 |
"this error is triggered by the VM, if a method is called with a wrong number |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1822 |
of arguments. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1823 |
This only applies to #valueWithReceiverXXX and #perform:withArguments: - sends. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1824 |
With a normal send, this error cannot happen." |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1825 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1826 |
^ JavaVM |
3694 | 1827 |
throwIllegalArgumentException:(' - %1 got %2 arg(s) where %3 expected' |
1828 |
bindWith:self class name |
|
1829 |
with:numArgsGiven |
|
1830 |
with:self numArgs) |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1831 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1832 |
" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1833 |
2 perform:#+ |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1834 |
" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1835 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1836 |
"Modified: / 01-08-1997 / 00:23:10 / cg" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1837 |
"Created: / 07-09-2011 / 14:17:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1838 |
! ! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1839 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1840 |
!JavaMethod methodsFor:'executing'! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1841 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1842 |
valueWithReceiver:anObject arguments:argArray selector:aSymbol search:aClass sender:virtualSender |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1843 |
self isStatic ifTrue:[ |
3694 | 1844 |
anObject == javaClass ifFalse:[ |
1845 |
self error: 'Invalid receiver - only owning class can be a receiver of static method invocation!!' |
|
1846 |
] |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1847 |
]. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1848 |
^super valueWithReceiver:anObject arguments:argArray selector:aSymbol search:aClass sender:virtualSender |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1849 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1850 |
"Created: / 31-10-2012 / 23:09:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
277 | 1851 |
! ! |
1852 |
||
2151 | 1853 |
!JavaMethod methodsFor:'initialization'! |
1854 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1855 |
resolve |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1856 |
"Called by VM to resolve all references used by this method. When |
3620 | 1857 |
successful (i.e., all references have been successfully resolved, a |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1858 |
A_RESOLVED flag is set (to prevent VM from subsequent calls |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1859 |
to this method) |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1860 |
|
3620 | 1861 |
Returns 1 if successful, 0 if not (at least one reference |
1862 |
could not be resolved) or -1 when some (unspecified) error |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1863 |
occurs." |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1864 |
"Marcel, continue here!! And ALWAYS commit ALL the code!! Sigh" |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1865 |
|
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1866 |
[ |
3694 | 1867 |
JavaByteCodePreresolver preresolve: self. |
1868 |
accessFlags := accessFlags bitOr: A_RESOLVED. |
|
1869 |
^1. |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1870 |
] on: Error do:[:ex| |
3694 | 1871 |
self breakPoint: #mh. "Marcel, please fix it" |
1872 |
^0. |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1873 |
]. |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1874 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1875 |
"/RETURN 1...OK, |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1876 |
"/ 0...Something could not be resolved |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1877 |
"/ -1...Some error |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1878 |
self breakPoint:#mh. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1879 |
^ 1. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1880 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1881 |
"Created: / 09-02-2012 / 20:59:22 / mh <hlopik@gmail.com>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1882 |
"Modified: / 11-02-2012 / 13:46:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1883 |
"Modified (format): / 23-02-2012 / 17:49:09 / Marcel Hlopko <hlopik@gmail.com>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1884 |
"Modified: / 24-02-2012 / 14:46:10 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1885 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1886 |
|
2151 | 1887 |
setAccessFlags:flags |
1888 |
accessFlags := flags. |
|
1889 |
||
1890 |
"Created: 16.4.1996 / 11:34:14 / cg" |
|
1891 |
! |
|
1892 |
||
1893 |
setCode:codeBytes maxStack:max_stack maxLocals:max_locals u1:unknown1 u2:unknown2 |
|
1894 |
"/ javaByteCode := codeBytes. |
|
1895 |
byteCode := codeBytes. |
|
1896 |
"/ numStack := max_stack. |
|
1897 |
"/ numLocals := max_locals. |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1898 |
super numberOfVars:max_locals - self numArgs - (self isStatic ifTrue:[0] ifFalse:[1]). |
2151 | 1899 |
super stackSize:max_stack. |
1900 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1901 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1902 |
|
2151 | 1903 |
"/ self displayString printNL. |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1904 |
"/ ' nStack: ' print. numStack print. |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1905 |
"/ ' nLocal: ' print. numLocals print. |
2151 | 1906 |
"/ ' u1: ' print. unknown1 print. |
1907 |
"/ ' u2: ' print. unknown2 printNL. |
|
1908 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1909 |
"Modified: / 01-08-1997 / 00:08:32 / cg" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1910 |
"Modified: / 12-10-2012 / 11:46:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2151 | 1911 |
! |
1912 |
||
1913 |
setDescriptor:aString |
|
1914 |
||
1915 |
descriptor := aString asSymbol. |
|
1916 |
||
1917 |
"Created: / 16-04-1996 / 11:34:29 / cg" |
|
1918 |
"Modified: / 16-10-1998 / 00:17:12 / cg" |
|
1919 |
"Modified: / 13-08-2011 / 01:21:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1920 |
"Created: / 14-08-2011 / 19:41:06 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1921 |
! |
|
1922 |
||
1923 |
setJavaClass:aJavaClass |
|
1924 |
javaClass := aJavaClass |
|
1925 |
||
1926 |
"Modified: 16.4.1996 / 12:36:27 / cg" |
|
1927 |
"Created: 16.4.1996 / 15:28:15 / cg" |
|
1928 |
! |
|
1929 |
||
1930 |
setLineNumberTable:anArrayOfPCtoLineAssociations |
|
1931 |
"since this uses up lots of memory, compress it" |
|
1932 |
||
1933 |
|allBytes allWords idx| |
|
1934 |
||
1935 |
allBytes := allWords := true. |
|
1936 |
||
1937 |
anArrayOfPCtoLineAssociations do:[:assoc | |
|
3694 | 1938 |
assoc key > 255 ifTrue:[ |
1939 |
allBytes := false. |
|
1940 |
assoc key > 16rFFFF ifTrue:[ |
|
1941 |
allWords := false. |
|
1942 |
]. |
|
1943 |
]. |
|
1944 |
assoc value > 255 ifTrue:[ |
|
1945 |
allBytes := false. |
|
1946 |
assoc value > 16rFFFF ifTrue:[ |
|
1947 |
allWords := false |
|
1948 |
]. |
|
1949 |
]. |
|
2151 | 1950 |
]. |
1951 |
allBytes ifTrue:[ |
|
3694 | 1952 |
lineNumberTable := ByteArray new:(anArrayOfPCtoLineAssociations size * 2). |
2151 | 1953 |
] ifFalse:[ |
3694 | 1954 |
allWords ifTrue:[ |
1955 |
lineNumberTable := WordArray new:(anArrayOfPCtoLineAssociations size * 2). |
|
1956 |
] ifFalse:[ |
|
1957 |
lineNumberTable := Array new:(anArrayOfPCtoLineAssociations size * 2). |
|
1958 |
] |
|
2151 | 1959 |
]. |
1960 |
||
1961 |
idx := 1. |
|
1962 |
anArrayOfPCtoLineAssociations do:[:assoc | |
|
3694 | 1963 |
lineNumberTable at:idx put:assoc key. |
1964 |
lineNumberTable at:idx+1 put:assoc value. |
|
1965 |
idx := idx + 2. |
|
2151 | 1966 |
]. |
1967 |
||
1968 |
"Created: 16.4.1996 / 12:34:04 / cg" |
|
1969 |
"Modified: 16.4.1996 / 12:49:06 / cg" |
|
1970 |
! |
|
1971 |
||
1972 |
setLocalVariableTable:anArray |
|
1973 |
localVariableTable := anArray. |
|
1974 |
! |
|
1975 |
||
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1976 |
setName:name descriptor:desc |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1977 |
| numArgs numJArgs returnTypeSignatureChar returnTypeIsPrimitiveArray | |
2151 | 1978 |
|
2791
6a57107d168a
Improvement in interop/java extensions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2790
diff
changeset
|
1979 |
"/ Force Symbol creation so Smalltalk syntax highlighter will not |
6a57107d168a
Improvement in interop/java extensions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2790
diff
changeset
|
1980 |
"/ mark them as unknown message (it detects this solely by existence |
6a57107d168a
Improvement in interop/java extensions.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2790
diff
changeset
|
1981 |
"/ of the symbol. |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1982 |
name asSymbol. |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1983 |
|
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1984 |
selector := (name , desc) asSymbol. |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1985 |
self setDescriptor:desc. |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1986 |
|
3197
d44f099dcff0
Classr reading optimization [3/4]: Optimize JavaMethod class>>numArgsFromDescriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3196
diff
changeset
|
1987 |
numJArgs := self class numArgsFromDescriptor:desc. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1988 |
(numJArgs > self class maxNumberOfArguments) ifTrue:[ |
3694 | 1989 |
numArgs := 1. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1990 |
] ifFalse:[ |
3694 | 1991 |
numArgs := numJArgs. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1992 |
]. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1993 |
self numberOfArgs:numArgs. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
1994 |
self numberOfJavaArgs:numJArgs. |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1995 |
returnTypeSignatureChar := descriptor last. |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
1996 |
|
2151 | 1997 |
|
1998 |
"/ for the convenience of the VM, also mirror the return type in |
|
1999 |
"/ the flags ... |
|
2000 |
||
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2001 |
|
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2002 |
returnTypeSignatureChar == $V ifTrue:[ |
3694 | 2003 |
accessFlags := accessFlags bitOr:ACX_R_VOID |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2004 |
] ifFalse:[ |
3694 | 2005 |
returnTypeIsPrimitiveArray := (descriptor at: (descriptor size - 1)) == $[. |
2006 |
returnTypeIsPrimitiveArray ifFalse:[ |
|
2007 |
returnTypeSignatureChar == $J ifTrue:[ |
|
2008 |
accessFlags := accessFlags bitOr:ACX_R_LONG |
|
2009 |
] ifFalse:[ |
|
2010 |
returnTypeSignatureChar == $D ifTrue:[ |
|
2011 |
accessFlags := accessFlags bitOr:ACX_R_DOUBLE |
|
2012 |
]. |
|
2013 |
]. |
|
2014 |
]. |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2015 |
]. |
2151 | 2016 |
|
2017 |
"Created: / 14-08-2011 / 19:41:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2018 |
"Modified: / 21-05-2014 / 20:47:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2151 | 2019 |
! |
2020 |
||
2021 |
setSignature:aString |
|
2022 |
||
2023 |
signature := aString asSymbol. |
|
2024 |
||
2025 |
"Created: / 16-04-1996 / 11:34:29 / cg" |
|
2026 |
"Modified: / 16-10-1998 / 00:17:12 / cg" |
|
2027 |
"Modified (format): / 14-08-2011 / 19:41:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2716
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
2028 |
! |
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
2029 |
|
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
2030 |
setSource:aJavaMethodSourceRef |
2729
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
2031 |
self assert: aJavaMethodSourceRef class == JavaSourceRef. |
2716
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
2032 |
source := aJavaMethodSourceRef |
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
2033 |
|
1cca77810e04
Initial support for source file partitioning using eclipse parser.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2708
diff
changeset
|
2034 |
"Created: / 07-09-2013 / 01:44:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2729
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
2035 |
"Modified: / 13-09-2013 / 02:19:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2151 | 2036 |
! ! |
2037 |
||
2038 |
!JavaMethod methodsFor:'inspecting'! |
|
2039 |
||
2040 |
inspectorExtraAttributes |
|
2041 |
"extra (pseudo instvar) entries to be shown in an inspector." |
|
2042 |
||
2043 |
^ Dictionary new |
|
3694 | 2044 |
declareAllNewFrom:(super inspectorExtraAttributes ? #()); |
2045 |
"/add:'-code' -> [ String streamContents:[:s | JavaDecompiler decompile: self to: s] ]; |
|
2046 |
add:'-code' -> [ String streamContents:[:s | JavaByteCodeDisassembler diassemble: self to: s] ]; |
|
2047 |
"/add:'-source' -> [ self source ]; |
|
2048 |
yourself |
|
2151 | 2049 |
|
2050 |
"Modified: / 22-03-2011 / 21:13:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2051 |
! ! |
|
2052 |
||
2053 |
!JavaMethod methodsFor:'interpretation'! |
|
2054 |
||
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2055 |
interpretWithReceiver: receiver |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2056 |
|
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2057 |
^self |
3694 | 2058 |
interpretWithReceiver: receiver |
2059 |
arguments: #() |
|
2151 | 2060 |
|
2061 |
"Created: / 24-02-2011 / 22:05:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2062 |
! |
|
2063 |
||
2064 |
interpretWithReceiver: receiver arg: a1 |
|
2065 |
||
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2066 |
^self |
3694 | 2067 |
interpretWithReceiver: receiver |
2068 |
arguments: (Array with: a1) |
|
2151 | 2069 |
|
2070 |
"Created: / 24-02-2011 / 22:05:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2071 |
! |
|
2072 |
||
2073 |
interpretWithReceiver: receiver arg: a1 arg: a2 |
|
2074 |
||
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2075 |
^self |
3694 | 2076 |
interpretWithReceiver: receiver |
2077 |
arguments: (Array with: a1 with: a2) |
|
2151 | 2078 |
|
2079 |
"Created: / 24-02-2011 / 22:05:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2080 |
! |
|
2081 |
||
2082 |
interpretWithReceiver: receiver arg: a1 arg: a2 arg: a3 |
|
2083 |
||
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2084 |
^self |
3694 | 2085 |
interpretWithReceiver: receiver |
2086 |
arguments: (Array with: a1 with: a2 with: a3) |
|
2151 | 2087 |
|
2088 |
"Created: / 24-02-2011 / 22:06:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2870
b8187695c8cd
Added JavaMethod>>#interpretWithReceiver:arguments:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
2089 |
! |
b8187695c8cd
Added JavaMethod>>#interpretWithReceiver:arguments:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
2090 |
|
b8187695c8cd
Added JavaMethod>>#interpretWithReceiver:arguments:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
2091 |
interpretWithReceiver:aReceiver arguments:argVector |
b8187695c8cd
Added JavaMethod>>#interpretWithReceiver:arguments:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
2092 |
"invoked by VM for non-Smalltalk-methods (MetaMethods)" |
b8187695c8cd
Added JavaMethod>>#interpretWithReceiver:arguments:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
2093 |
|
b8187695c8cd
Added JavaMethod>>#interpretWithReceiver:arguments:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
2094 |
^ JavaByteCodeInterpreter interpret: self receiver: aReceiver arguments: argVector |
b8187695c8cd
Added JavaMethod>>#interpretWithReceiver:arguments:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
2095 |
|
b8187695c8cd
Added JavaMethod>>#interpretWithReceiver:arguments:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2864
diff
changeset
|
2096 |
"Created: / 17-10-2013 / 01:56:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2151 | 2097 |
! ! |
2098 |
||
118 | 2099 |
!JavaMethod methodsFor:'methodref interchangability'! |
2100 |
||
673 | 2101 |
homeMethod |
2102 |
^ self |
|
2103 |
! |
|
2104 |
||
118 | 2105 |
method |
2106 |
^ self |
|
692 | 2107 |
! |
2108 |
||
2109 |
setPackage:newPackage |
|
2110 |
newPackage ~= javaClass package ifTrue:[ |
|
3694 | 2111 |
self halt:'java method cannot be in a package different from its class'. |
692 | 2112 |
] |
118 | 2113 |
! ! |
2114 |
||
148 | 2115 |
!JavaMethod methodsFor:'misc'! |
2116 |
||
378 | 2117 |
fromMethod:aJavaMethod |
2118 |
"copy values from another javaMethod" |
|
149 | 2119 |
|
378 | 2120 |
flags := aJavaMethod flags. |
2121 |
byteCode := aJavaMethod byteCode. |
|
2122 |
accessFlags := aJavaMethod accessFlags. |
|
2123 |
selector := aJavaMethod selector. |
|
2124 |
javaClass := aJavaMethod javaClass. |
|
2151 | 2125 |
descriptor := aJavaMethod instVarNamed:#descriptor. |
2126 |
signature := aJavaMethod instVarNamed:#signature. |
|
378 | 2127 |
lineNumberTable := aJavaMethod lineNumberTable. |
2128 |
localVariableTable := aJavaMethod localVariableTable. |
|
2151 | 2129 |
annotations := aJavaMethod annotations. |
2130 |
||
2131 |
"Modified: / 16-10-1998 / 01:27:19 / cg" |
|
2132 |
"Modified: / 14-08-2011 / 19:30:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
255 | 2133 |
! |
252 | 2134 |
|
255 | 2135 |
updateClassRefsFrom:oldClass to:newClass |
2136 |
javaClass == oldClass ifTrue:[ |
|
3694 | 2137 |
"/ invalidate |
2138 |
byteCode := nil. |
|
255 | 2139 |
] |
252 | 2140 |
|
255 | 2141 |
"Created: / 6.1.1998 / 18:19:48 / cg" |
252 | 2142 |
! ! |
2143 |
||
8 | 2144 |
!JavaMethod methodsFor:'printing & storing'! |
2145 |
||
29 | 2146 |
displayString |
168 | 2147 |
javaClass isNil ifTrue:[ |
3694 | 2148 |
^ self class name , '(???)' |
168 | 2149 |
]. |
611 | 2150 |
^ self class name , '(' , javaClass displayString , '::' , self signatureName , ')' |
423 | 2151 |
|
611 | 2152 |
"Modified: / 25.9.1999 / 23:04:01 / cg" |
29 | 2153 |
! |
2154 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2155 |
printOn: aStream |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2156 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2157 |
super printOn: aStream. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2158 |
aStream nextPut: $(. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2159 |
javaClass name printOn: aStream. |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2160 |
aStream nextPut: $.. |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2161 |
selector printOn: aStream. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2162 |
aStream nextPut: $). |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2163 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2164 |
"Created: / 05-12-2011 / 01:30:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2165 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2166 |
|
2864
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2167 |
printStringForBrowserWithSelector:dummySelector |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2168 |
"/ self isStatic ifTrue:[ |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2169 |
"/ ^ 'static ' , self signatureName |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2170 |
"/ ]. |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2171 |
"/ self isBreakpointed ifTrue:[ |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2172 |
"/ ^ (LabelAndIcon '!! ' , self signatureName |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2173 |
"/ ]. |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2174 |
|
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2175 |
self name = #'<clinit>' ifTrue:[ |
3694 | 2176 |
^ 'static {}' |
2864
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2177 |
]. |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2178 |
|
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2179 |
^ self name = #'<init>' ifTrue:[ |
3694 | 2180 |
self class specTextFromSignature:descriptor in:javaClass package withName:(javaClass lastName) isConstructor: true |
2864
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2181 |
] ifFalse:[ |
3694 | 2182 |
self class specTextFromSignature:descriptor in:javaClass package withName:(self name) isConstructor: false |
2864
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2183 |
] |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2184 |
|
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2185 |
"Created: / 16-10-2013 / 00:52:19 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2186 |
! |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2187 |
|
670 | 2188 |
printStringForBrowserWithSelector:dummySelector inClass:dummyClass |
43 | 2189 |
"/ self isStatic ifTrue:[ |
2190 |
"/ ^ 'static ' , self signatureName |
|
2191 |
"/ ]. |
|
168 | 2192 |
"/ self isBreakpointed ifTrue:[ |
2193 |
"/ ^ (LabelAndIcon '!! ' , self signatureName |
|
2194 |
"/ ]. |
|
175 | 2195 |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2196 |
self name = #'<clinit>' ifTrue:[ |
3694 | 2197 |
^ 'static {}' |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2198 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2199 |
|
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
2200 |
^ self name = #'<init>' ifTrue:[ |
3694 | 2201 |
self class specTextFromSignature:descriptor in:javaClass package withName:(javaClass lastName) isConstructor: true |
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
2202 |
] ifFalse:[ |
3694 | 2203 |
self class specTextFromSignature:descriptor in:javaClass package withName:(self name) isConstructor: false |
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
2204 |
] |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
2205 |
|
2864
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2206 |
"Created: / 16-10-2013 / 00:55:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2207 |
! |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2208 |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2209 |
selectorPrintStringInBrowserFor:dummySelector |
2864
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2210 |
^ self selectorPrintStringInBrowserFor:dummySelector class: javaClass |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2211 |
|
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2212 |
"Created: / 16-10-2013 / 01:02:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2213 |
! |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2214 |
|
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2215 |
selectorPrintStringInBrowserFor:dummySelector class: dummyClass |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2216 |
^ self printStringForBrowserWithSelector:dummySelector inClass:dummyClass |
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2217 |
|
50b4916dd8d2
Fixes for Java method tracing/counting.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2814
diff
changeset
|
2218 |
"Created: / 16-10-2013 / 01:03:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
10 | 2219 |
! |
2220 |
||
118 | 2221 |
shortDisplayString |
2222 |
^ javaClass name , '::' , self signatureNameWithoutReturnType |
|
2223 |
! |
|
2224 |
||
10 | 2225 |
signatureName |
2226 |
"return a string to be used when browsing" |
|
2227 |
||
2151 | 2228 |
^ self class specFromSignature:descriptor withName:(self name) in:nil |
255 | 2229 |
|
2230 |
"Modified: / 8.1.1998 / 19:15:33 / cg" |
|
113 | 2231 |
! |
2232 |
||
164 | 2233 |
signatureNameFor:name withArgsIn:aPackage |
2234 |
"return a string to be used when decompiling" |
|
2235 |
||
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
2236 |
^ name = '<init>' ifTrue:[ |
3694 | 2237 |
self class specWithArgsFromSignature:descriptor withName: javaClass lastName in:aPackage isConstructor: true. |
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
2238 |
] ifFalse:[ |
3694 | 2239 |
self class specWithArgsFromSignature:descriptor withName:(self name) in:aPackage isConstructor: false. |
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
2240 |
] |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
2241 |
|
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
2242 |
"Created: / 25-03-1997 / 18:49:45 / cg" |
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
2243 |
"Modified: / 04-10-2013 / 12:33:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
164 | 2244 |
! |
2245 |
||
142 | 2246 |
signatureNameIn:aPackage |
2247 |
"return a string to be used when browsing" |
|
2248 |
||
2151 | 2249 |
^ self class specFromSignature:descriptor withName:(self name) in:aPackage |
142 | 2250 |
|
2251 |
"Created: 18.3.1997 / 11:11:01 / cg" |
|
2252 |
! |
|
2253 |
||
175 | 2254 |
signatureNameText |
2255 |
"return a text to be used when browsing" |
|
2256 |
||
2151 | 2257 |
^ self class specTextFromSignature:descriptor withName:(self name) |
175 | 2258 |
|
2259 |
"Created: 30.7.1997 / 14:40:29 / cg" |
|
2260 |
! |
|
2261 |
||
189 | 2262 |
signatureNameTextFor:name withArgsIn:aPackage |
2263 |
"return a text to be used when decompiling" |
|
2264 |
||
2151 | 2265 |
^ self class specTextWithArgsFromSignature:descriptor withName:name in:aPackage |
189 | 2266 |
|
2267 |
"Created: 25.3.1997 / 18:49:45 / cg" |
|
2268 |
"Modified: 1.8.1997 / 10:44:28 / cg" |
|
2269 |
! |
|
2270 |
||
255 | 2271 |
signatureNameWithArgNames:argNames |
2272 |
"return a string to be used when browsing" |
|
2273 |
||
2274 |
|myName| |
|
2275 |
||
2276 |
myName := self name. |
|
2277 |
myName = '<init>' ifTrue:[ |
|
3694 | 2278 |
myName := javaClass name |
255 | 2279 |
]. |
2151 | 2280 |
^ self class specFromSignature:descriptor withName:myName argNames:argNames in:nil |
255 | 2281 |
|
2282 |
"Created: / 8.1.1998 / 21:04:03 / cg" |
|
2283 |
"Modified: / 8.1.1998 / 21:22:38 / cg" |
|
2284 |
! |
|
2285 |
||
2286 |
signatureNameWithArgNames:argNames in:package |
|
2287 |
"return a string to be used when browsing" |
|
2288 |
||
2289 |
|myName| |
|
2290 |
||
2291 |
myName := self name. |
|
2292 |
myName = '<init>' ifTrue:[ |
|
3694 | 2293 |
myName := javaClass name |
255 | 2294 |
]. |
2151 | 2295 |
^ self class specFromSignature:descriptor withName:myName argNames:argNames in:package |
255 | 2296 |
|
2297 |
"Modified: / 8.1.1998 / 21:05:52 / cg" |
|
2298 |
"Created: / 8.1.1998 / 21:23:03 / cg" |
|
2299 |
! |
|
2300 |
||
154 | 2301 |
signatureNameWithArgsIn:aPackage |
2302 |
"return a string to be used when browsing" |
|
2303 |
||
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
2304 |
^ self signatureNameFor: self name withArgsIn: aPackage |
2151 | 2305 |
|
2306 |
"Created: / 20-03-1997 / 12:44:17 / cg" |
|
2790
b530c3f48cd3
Changed display string for Java methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
2307 |
"Modified: / 04-10-2013 / 12:34:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2151 | 2308 |
! |
2309 |
||
2310 |
signatureNameWithModifiers |
|
2311 |
"return a string to be used when deassembling" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2312 |
|
2151 | 2313 |
| result | |
2314 |
||
2315 |
result := self signatureName. |
|
2316 |
self isFinal ifTrue: [ result := 'final ' , result ]. |
|
2317 |
self isStatic ifTrue: [ result := 'static ' , result ]. |
|
2318 |
self isSynchronized ifTrue: [ result := 'synchronized ' , result ]. |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2319 |
self isPrivate |
3694 | 2320 |
ifTrue: [ result := 'private ' , result ] |
2321 |
ifFalse: |
|
2322 |
[ self isProtected |
|
2323 |
ifTrue: [ result := 'protected ' , result ] |
|
2324 |
ifFalse: [ self isPublic ifTrue: [ result := 'public ' , result ] ] ]. |
|
2151 | 2325 |
self isAbstract ifTrue: [ result := 'abstract ' , result ]. |
2326 |
^ result. |
|
2327 |
||
2328 |
"Modified: / 08-01-1998 / 19:15:33 / cg" |
|
2329 |
"Created: / 22-03-2011 / 16:25:27 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
154 | 2330 |
! |
2331 |
||
113 | 2332 |
signatureNameWithoutReturnType |
2333 |
"return a string to be used when browsing" |
|
2334 |
||
2151 | 2335 |
^ self class argSpecFromSignature:descriptor withName:(self name) |
113 | 2336 |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2337 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2338 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2339 |
whoString |
3577 | 2340 |
"return a string as className>>selector. Used with debugging." |
2341 |
||
2342 |
"/ in order to not break existing code which parses those strings, |
|
3953 | 2343 |
"/ do not replace '>>' by ' » ' |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2344 |
^ javaClass name , '>>' , (self printStringForBrowserWithSelector:nil inClass:nil) |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2345 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2346 |
"Created: / 13-06-2013 / 08:52:51 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
8 | 2347 |
! ! |
2348 |
||
2349 |
!JavaMethod methodsFor:'queries'! |
|
2350 |
||
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2351 |
canBeUpdatedFrom: anotherMethod |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2352 |
"Return if receiver can be updated from given method, i.e., if it is safe |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2353 |
to just to take anotherMethod's bytecode. Used to implement fix & restart |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2354 |
workflow" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2355 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2356 |
"/ Allready jitted method cannot be updated - no way to restart existing context into |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2357 |
"/ new code |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2358 |
self code notNil ifTrue:[ ^ false ]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2359 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2360 |
"/ Args and their types must match |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2361 |
selector ~~ anotherMethod selector ifTrue: [ ^ false ]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2362 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2363 |
"/ max stack depth must be smaller or equal of the current |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2364 |
(self numVars + self stackSize) < (anotherMethod numVars + anotherMethod stackSize) ifTrue:[ ^ false ]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2365 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2366 |
^true |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2367 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2368 |
"Created: / 18-04-2013 / 23:43:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2369 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2370 |
|
111 | 2371 |
handlerFor:anException at:pc |
611 | 2372 |
"return an exceptionHandlers pc, for an exception of the given type, |
2373 |
occurring at pc. Returns nil, if there is none." |
|
2374 |
||
2375 |
|handlerTable| |
|
2376 |
||
2377 |
(handlerTable := self exceptionHandlerTable) isNil ifTrue:[^ nil]. |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2378 |
^handlerTable handlerPCFor:anException at:pc in:self. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2379 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2380 |
"Created: / 16-10-1998 / 01:18:40 / cg" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2381 |
"Modified: / 25-09-1999 / 23:07:01 / cg" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2382 |
"Modified: / 06-05-2013 / 21:49:18 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
31 | 2383 |
! |
2384 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2385 |
hasFinally |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2386 |
^ (accessFlags bitAnd:A_HASFINALLY) ~~ 0 |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2387 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2388 |
"Created: / 28-03-2012 / 20:35:11 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2389 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2390 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2391 |
hasFinallyBasedOnExceptionTable |
3573 | 2392 |
"Returns true if the exception table has at least one |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2393 |
entry for finally block" |
3694 | 2394 |
|
3573 | 2395 |
^ false |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2396 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2397 |
"Created: / 28-03-2012 / 23:18:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2398 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2399 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2400 |
hasHandler |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2401 |
^ (accessFlags bitAnd:A_HASHANDLER) ~~ 0 |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2402 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2403 |
"Created: / 28-03-2012 / 20:35:01 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2404 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2405 |
|
2151 | 2406 |
hasPrimitiveCode |
2407 |
||
2408 |
^false |
|
2409 |
||
2410 |
"Created: / 18-07-2011 / 20:45:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2411 |
! |
|
2412 |
||
127 | 2413 |
hasResource |
2414 |
^ false |
|
2415 |
! |
|
2416 |
||
19 | 2417 |
isAbstract |
252 | 2418 |
^ (accessFlags bitAnd:A_ABSTRACT) ~~ 0 |
19 | 2419 |
! |
2420 |
||
80 | 2421 |
isBreakpointed |
256 | 2422 |
^ (accessFlags bitAnd:A_BREAKPOINT) ~~ 0 |
2423 |
||
2424 |
"Modified: / 11.1.1998 / 13:28:43 / cg" |
|
80 | 2425 |
! |
2426 |
||
19 | 2427 |
isFinal |
252 | 2428 |
^ (accessFlags bitAnd:A_FINAL) ~~ 0 |
19 | 2429 |
! |
2430 |
||
175 | 2431 |
isIgnored |
2432 |
"not really a java attribute; |
|
2433 |
added to allow browsing" |
|
2434 |
||
2435 |
^ false. |
|
2436 |
||
2437 |
"Created: 30.7.1997 / 15:34:33 / cg" |
|
2438 |
! |
|
2439 |
||
625 | 2440 |
isJavaClassRef |
2441 |
^ false |
|
2442 |
||
2443 |
"Created: / 9.11.1999 / 17:16:20 / cg" |
|
2444 |
! |
|
2445 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2446 |
isJavaConstructor |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2447 |
^((selector first) == $<) and:[selector startsWith:'<init>('] |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2448 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2449 |
"Created: / 01-08-2012 / 00:21:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2450 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2451 |
|
431 | 2452 |
isJavaMethod |
2453 |
^ true |
|
2454 |
||
2455 |
"Created: / 10.11.1998 / 18:24:51 / cg" |
|
2456 |
! |
|
2457 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2458 |
isJavaStaticInitializer |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2459 |
^((selector first) == $<) and:[selector startsWith:'<clinit>('] |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2460 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2461 |
"Created: / 19-09-2012 / 16:26:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2462 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2463 |
|
19 | 2464 |
isNative |
252 | 2465 |
^ (accessFlags bitAnd:A_NATIVE) ~~ 0 |
19 | 2466 |
! |
2467 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2468 |
isPackagePrivate |
3953 | 2469 |
^ (accessFlags bitAnd:((A_PRIVATE bitOr: A_PUBLIC) bitOr: A_PROTECTED)) == 0 |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2470 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2471 |
"Created: / 05-07-2012 / 10:12:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2472 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2473 |
|
19 | 2474 |
isPrivate |
252 | 2475 |
^ (accessFlags bitAnd:A_PRIVATE) ~~ 0 |
19 | 2476 |
! |
2477 |
||
2478 |
isProtected |
|
252 | 2479 |
^ (accessFlags bitAnd:A_PROTECTED) ~~ 0 |
19 | 2480 |
! |
2481 |
||
2482 |
isPublic |
|
252 | 2483 |
^ (accessFlags bitAnd:A_PUBLIC) ~~ 0 |
19 | 2484 |
! |
2485 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2486 |
isResolved |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2487 |
"Return true, if the receiver is fully resolved, i.e., |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2488 |
if all references used by the method are resolved" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2489 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2490 |
^ (accessFlags bitAnd:A_RESOLVED) ~~ 0 |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2491 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2492 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2493 |
|
19 | 2494 |
isStatic |
252 | 2495 |
^ (accessFlags bitAnd:A_STATIC) ~~ 0 |
19 | 2496 |
! |
2497 |
||
2498 |
isSynchronized |
|
252 | 2499 |
^ (accessFlags bitAnd:A_SYNCHRONIZED) ~~ 0 |
18 | 2500 |
! |
2501 |
||
256 | 2502 |
isTraced |
2503 |
^ false |
|
2504 |
||
2505 |
"Modified: / 11.1.1998 / 13:28:43 / cg" |
|
2506 |
"Created: / 11.1.1998 / 13:38:11 / cg" |
|
2507 |
! |
|
2508 |
||
8 | 2509 |
isUnloaded |
2510 |
^ false |
|
18 | 2511 |
! |
2512 |
||
2151 | 2513 |
isUnresolved |
2514 |
"return true, if the receiver is unresolved;" |
|
2515 |
||
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2516 |
^ self isResolved not |
2151 | 2517 |
|
2518 |
"Created: / 06-03-2011 / 22:57:35 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
2519 |
! |
|
2520 |
||
256 | 2521 |
isWrapped |
2902
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
2522 |
^ super isWrapped |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
2523 |
"/ ^ self isBreakpointed |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
2524 |
|
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
2525 |
"Created: / 11-01-1998 / 13:38:04 / cg" |
b7070e447ed0
Fixes for displaying local variables in debugger.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2888
diff
changeset
|
2526 |
"Modified: / 05-11-2013 / 16:19:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
256 | 2527 |
! |
2528 |
||
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2529 |
lineNumberForPC0: pc |
2726
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2530 |
| last | |
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2531 |
|
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2532 |
lineNumberTable notNil ifTrue: [ |
3694 | 2533 |
lineNumberTable |
2534 |
pairWiseDo: [:lPc :lNr | |
|
2535 |
lPc >= pc ifTrue: [ |
|
2536 |
lPc == pc ifTrue: [ |
|
2537 |
^ lNr |
|
2538 |
]. |
|
2539 |
last isNil ifTrue: [ |
|
2540 |
^ lNr |
|
2541 |
]. |
|
2542 |
^ last. |
|
2543 |
]. |
|
2544 |
last := lNr. |
|
2545 |
]. |
|
2546 |
last notNil ifTrue: [ |
|
2547 |
^ last |
|
2548 |
]. |
|
2549 |
^ lineNumberTable at: 2 |
|
2726
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2550 |
]. |
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2551 |
^ nil |
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2552 |
|
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2553 |
"Modified: / 14.1.1998 / 13:30:54 / cg" |
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2554 |
"Created: / 10.11.1998 / 14:18:22 / cg" |
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2555 |
! |
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2556 |
|
31 | 2557 |
lineNumberForPC:pc |
2726
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2558 |
|num text| |
31 | 2559 |
|
2560 |
num := nil. |
|
2561 |
||
2726
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2562 |
ForceByteCodeDisplay ifFalse:[ |
3694 | 2563 |
| line0 | |
2564 |
||
2565 |
line0 := self lineNumberForPC0: pc. |
|
2566 |
ShowFullSource ifFalse:[ |
|
2567 |
source isNil ifTrue:[ |
|
2568 |
"/ Fetch the source ref... |
|
2569 |
self sourceDocument sourceTreeOrNilIfParsing. |
|
2570 |
source isNil ifTrue:[ |
|
2571 |
^ line0 - self firstInstructionLineNumber - 2. |
|
2572 |
]. |
|
2573 |
]. |
|
2574 |
^ line0 - source line0 + 1. |
|
2575 |
]. |
|
2576 |
^ line0 |
|
46 | 2577 |
]. |
31 | 2578 |
|
46 | 2579 |
"/ decompile and look which line the pc falls into |
209 | 2580 |
|
2726
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2581 |
ForceByteCodeDisplay ifTrue:[ |
3694 | 2582 |
text := self decompiledBytecode asCollectionOfLines. |
209 | 2583 |
] ifFalse:[ |
3694 | 2584 |
text := self decompiledSource asCollectionOfLines. |
209 | 2585 |
]. |
31 | 2586 |
|
46 | 2587 |
text keysAndValuesDo:[:lineNr :line | |
3694 | 2588 |
|nr| |
2589 |
||
2590 |
(line startsWith:' ') ifFalse:[ |
|
2591 |
nr := Integer readFrom:line onError:0. |
|
2592 |
nr >= pc ifTrue:[ |
|
2593 |
^ lineNr |
|
2594 |
] |
|
2595 |
] |
|
31 | 2596 |
]. |
2597 |
^ num |
|
141 | 2598 |
|
2726
6971720de5a4
More support for method's source only.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2725
diff
changeset
|
2599 |
"Modified: / 14-01-1998 / 13:30:54 / cg" |
2729
ac412f6ea6d4
More support for method's source display. Not yet working.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2726
diff
changeset
|
2600 |
"Modified: / 13-09-2013 / 02:11:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
31 | 2601 |
! |
2602 |
||
2087 | 2603 |
messagesSent |
3922 | 2604 |
"return a set-like collection with the message selectors sent by the receiver. |
3971 | 2605 |
Uses Parser to parse method's source and extract the names. |
3922 | 2606 |
The returned collection includes all used message selectors |
2607 |
(i.e. including super-send messages)" |
|
2608 |
||
2609 |
^ self analyzer messagesSent |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2610 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2611 |
"Modified: / 31-08-2013 / 10:43:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2087 | 2612 |
! |
2613 |
||
3629 | 2614 |
overwrites: anotherMethod |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2615 |
"Returns true, if the receiver overwrites anotherMethod. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2616 |
This method implements algorithm described in JVM spec, sec. 5.4.2.1" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2617 |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2618 |
anotherMethod isJavaMethod ifFalse:[ |
3694 | 2619 |
"It is questionable what to return here. Best seems to be |
2620 |
do following: if anotherMethod belongs to one of my superclasses |
|
2621 |
(either JavaObject or Object in current impl), then return true, |
|
2622 |
false otherwise" |
|
2623 |
^javaClass inheritsFrom: anotherMethod mclass. |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2624 |
]. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2625 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2626 |
"An instance method m1 (self) declared in class C overrides another instance method m2 |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2627 |
(anotherMethod) declared in class A iff all of the following are true:" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2628 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2629 |
" - m2 has the same name and descriptor as m1. " |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2630 |
selector == anotherMethod selector ifFalse:[ ^ false ]. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2631 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2632 |
" - C is a subclass of A." |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2633 |
(javaClass isSubclassOf: anotherMethod javaClass) ifFalse:[ ^ false ]. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2634 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2635 |
"- either: |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2636 |
- m2 is marked ACC_PUBLIC; or is marked ACC_PROTECTED; or is marked nei- |
3694 | 2637 |
ther ACC_PUBLIC nor ACC_PROTECTED nor ACC_PRIVATE and belongs to the |
2638 |
same runtime package as C, or" |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2639 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2640 |
(anotherMethod isPublic or:[anotherMethod isProtected]) ifTrue:[ ^ true ]. |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2641 |
(anotherMethod isPackagePrivate |
3694 | 2642 |
and:[javaClass package == anotherMethod javaClass package]) |
2643 |
ifTrue:[ ^ true ]. |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2644 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2645 |
^false. |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2646 |
|
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2647 |
"Created: / 05-07-2012 / 11:04:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2648 |
! |
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2649 |
|
156 | 2650 |
package |
685 | 2651 |
"in java, class extensions are not possible; |
2652 |
all methods MUST be in their classes package" |
|
156 | 2653 |
|
685 | 2654 |
^ javaClass package |
156 | 2655 |
! |
2656 |
||
625 | 2657 |
referencesGlobal:aGlobalName |
2658 |
"return true, if this method refers to a global named aGlobalName" |
|
2659 |
||
2660 |
|walker any| |
|
2661 |
||
2662 |
"/ quick check, if constantPool includes a methodRef for this |
|
2663 |
"/ selector. |
|
2664 |
||
2665 |
any := false. |
|
2666 |
self javaClass constantPool do:[:const | |
|
3694 | 2667 |
(const isNumber |
2668 |
or:[const isString |
|
2669 |
or:[const isNil]]) ifFalse:[ |
|
2670 |
const isJavaClass ifTrue:[ |
|
2671 |
any := any or:[const fullName = aGlobalName]. |
|
2672 |
] ifFalse:[ |
|
2673 |
const isJavaClassRef ifTrue:[ |
|
2674 |
any := any or:[const fullName = aGlobalName]. |
|
2675 |
] |
|
2676 |
]. |
|
2677 |
]. |
|
625 | 2678 |
]. |
2679 |
any ifFalse:[^ false]. |
|
2680 |
||
2681 |
"/ sigh - must extract all accessed literals ... |
|
2682 |
"/ must deparse the byteCode in order to do this. |
|
2683 |
||
2684 |
walker := JavaByteCodeEnumerator new. |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2685 |
walker |
3694 | 2686 |
literalAction: |
2687 |
[:pc :slotIndex :const | |
|
2688 |
|mSel| |
|
2689 |
||
2690 |
(const isNumber |
|
2691 |
or:[const isString |
|
2692 |
or:[const isNil]]) ifFalse:[ |
|
2693 |
const isJavaClass ifTrue:[ |
|
2694 |
mSel := const fullName. |
|
2695 |
] ifFalse:[ |
|
2696 |
const isJavaClassRef ifTrue:[ |
|
2697 |
mSel := const fullName. |
|
2698 |
] |
|
2699 |
]. |
|
2700 |
]. |
|
2701 |
mSel notNil ifTrue:[ |
|
2702 |
"/ Transcript showCR:mSel. |
|
2703 |
mSel = aGlobalName ifTrue:[ |
|
2704 |
^ true |
|
2705 |
] |
|
2706 |
]. |
|
2707 |
]. |
|
625 | 2708 |
walker decompile:self to:nil. |
2709 |
||
2710 |
"Created: / 9.11.1999 / 17:15:46 / cg" |
|
2711 |
"Modified: / 9.11.1999 / 17:18:02 / cg" |
|
2712 |
! |
|
2713 |
||
618 | 2714 |
sends:aSelectorSymbol |
2715 |
"return true, if this method contains a message-send |
|
2716 |
with aSelectorSymbol as selector." |
|
2717 |
||
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2718 |
^ self analyzer sends: aSelectorSymbol |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2719 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2720 |
"Created: / 09-11-1999 / 15:38:14 / cg" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2721 |
"Modified: / 09-11-1999 / 17:06:03 / cg" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2722 |
"Modified: / 31-08-2013 / 11:37:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
618 | 2723 |
! |
2724 |
||
2151 | 2725 |
shouldBeSkippedInDebuggersWalkBack |
2726 |
||
2727 |
^false |
|
2728 |
||
2729 |
"Created: / 30-11-2010 / 15:35:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2730 |
! |
|
2731 |
||
18 | 2732 |
who |
2733 |
"return the class and selector of where I am defined in." |
|
2734 |
||
64 | 2735 |
|sel| |
18 | 2736 |
|
252 | 2737 |
javaClass isNil ifTrue:[^ nil]. |
378 | 2738 |
sel := selector. |
2739 |
"/ sel := javaClass methodDictionary keyAtValue:self ifAbsent:nil. |
|
64 | 2740 |
sel isNil ifTrue:[^ nil]. |
129 | 2741 |
^ Method::MethodWhoInfo class:javaClass selector:sel. |
378 | 2742 |
|
2743 |
"Modified: / 16.10.1998 / 13:42:10 / cg" |
|
5 | 2744 |
! ! |
2745 |
||
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2746 |
!JavaMethod methodsFor:'queries-statistic'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2747 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2748 |
messagesPossiblySent |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2749 |
^ self analyzer messagesPossiblySent |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2750 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2751 |
"Created: / 30-08-2013 / 14:05:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2752 |
"Modified: / 30-08-2013 / 17:07:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2753 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2754 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2755 |
messagesSentToSelf |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2756 |
^ self analyzer messagesSentToSelf |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2757 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2758 |
"Created: / 31-08-2013 / 09:32:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2759 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2760 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2761 |
messagesSentToSuper |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2762 |
^ self analyzer messagesSentToSuper |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2763 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2764 |
"Created: / 30-03-2013 / 09:59:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2765 |
"Modified: / 30-08-2013 / 17:07:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2766 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2767 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2768 |
modifiedClassVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2769 |
^ #() |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2770 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2771 |
"Created: / 30-08-2013 / 13:16:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2772 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2773 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2774 |
modifiedGlobals |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2775 |
^ #() |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2776 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2777 |
"Created: / 05-09-2013 / 15:26:12 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2778 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2779 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2780 |
modifiedInstVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2781 |
^ self analyzer modifiedInstVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2782 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2783 |
"Created: / 30-08-2013 / 13:18:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2784 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2785 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2786 |
modifiedPoolVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2787 |
^ #() |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2788 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2789 |
"Created: / 05-09-2013 / 15:25:28 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2790 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2791 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2792 |
readClassVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2793 |
^ #() |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2794 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2795 |
"Created: / 05-09-2013 / 15:25:13 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2796 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2797 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2798 |
readGlobals |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2799 |
^ self analyzer readGlobals |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2800 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2801 |
"Created: / 05-09-2013 / 15:26:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2802 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2803 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2804 |
readInstVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2805 |
^ self analyzer readInstVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2806 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2807 |
"Created: / 05-09-2013 / 15:24:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2808 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2809 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2810 |
readPoolVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2811 |
^ #() |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2812 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2813 |
"Created: / 05-09-2013 / 15:25:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2814 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2815 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2816 |
sends:symbol1 or:symbol2 |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2817 |
^ self analyzer sends:symbol1 or:symbol2 |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2818 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2819 |
"Modified: / 30-08-2013 / 17:07:46 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2820 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2821 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2822 |
sendsAny: selectors |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2823 |
^ self analyzer sendsAny: selectors |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2824 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2825 |
"Created: / 02-12-2011 / 23:05:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2826 |
"Modified: / 30-08-2013 / 17:08:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2827 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2828 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2829 |
usedClassVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2830 |
^ #() "/ No class vars in Java |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2831 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2832 |
"Created: / 30-08-2013 / 13:18:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2833 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2834 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2835 |
usedGlobals |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2836 |
^ self analyzer usedGlobals |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2837 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2838 |
"Created: / 05-09-2013 / 15:26:25 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2839 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2840 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2841 |
usedInstVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2842 |
^ self analyzer usedInstVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2843 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2844 |
"Created: / 30-08-2013 / 13:18:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2845 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2846 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2847 |
usedPoolVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2848 |
^ #() |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2849 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2850 |
"Created: / 05-09-2013 / 15:25:32 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2851 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2852 |
|
154 | 2853 |
!JavaMethod methodsFor:'signature parsing'! |
2854 |
||
255 | 2855 |
XXXspecWithArgsFromSignature:aSignature withName:name in:aPackage |
154 | 2856 |
"given a signature, return a spec with args" |
2857 |
||
2858 |
|s argSpec retvalSpec| |
|
2859 |
||
2860 |
s := aSignature readStream. |
|
2861 |
s next ~~ $( ifTrue:[self halt. ^ name]. |
|
2862 |
||
2863 |
argSpec := self argSpecWithArgsFromStream:s in:aPackage. |
|
2864 |
||
2865 |
s next ~~ $) ifTrue:[self halt. ^ name]. |
|
2866 |
||
2867 |
retvalSpec := self retvalSpecFromStream:s in:aPackage. |
|
2868 |
||
2869 |
^ retvalSpec , ' ' , name , ' (' , argSpec , ')' |
|
2870 |
||
2871 |
" |
|
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2872 |
JavaMethod specFromSignature:'(LObject;)V' withName:'foo' |
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2873 |
JavaMethod specFromSignature:'(BB)S' withName:'foo' |
154 | 2874 |
" |
2875 |
||
255 | 2876 |
"Created: / 8.1.1998 / 19:17:58 / cg" |
154 | 2877 |
! ! |
2878 |
||
2151 | 2879 |
!JavaMethod methodsFor:'testing'! |
2880 |
||
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2881 |
isMethodWithBreakpoints |
3111
3119ced5d03c
[JavaClassReader optimization 3/3]: optimize JavaMethod>>setName:descriptor:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3088
diff
changeset
|
2882 |
^self isBreakpointed |
3694 | 2883 |
or:[(ConfigurableFeatures includesFeature: #VMBreakpointSupport) |
2884 |
and:[self breakpointTable notEmptyOrNil]] |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2885 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2886 |
"Created: / 11-04-2013 / 14:50:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2887 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2555
diff
changeset
|
2888 |
|
2151 | 2889 |
isSynthetic |
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2890 |
^ (accessFlags bitAnd:A_SYNTHETIC) ~~ 0 |
2151 | 2891 |
|
2892 |
"Created: / 18-10-2010 / 19:09:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
2893 |
! ! |
|
2894 |
||
129 | 2895 |
!JavaMethod class methodsFor:'documentation'! |
2 | 2896 |
|
2897 |
version |
|
3519 | 2898 |
^ '$Header$' |
2145 | 2899 |
! |
2900 |
||
2901 |
version_CVS |
|
3519 | 2902 |
^ '$Header$' |
2151 | 2903 |
! |
2904 |
||
2905 |
version_SVN |
|
3519 | 2906 |
^ '$Id$' |
2 | 2907 |
! ! |
2107 | 2908 |
|
2353
fa7400d022a0
Updated to https://swing.fit.cvut.cz/hg/stx.libjava/rev/31f8b995905e
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2204
diff
changeset
|
2909 |
|
2086 | 2910 |
JavaMethod initialize! |