author | convert-repo |
Tue, 31 Dec 2019 04:28:27 +0000 | |
changeset 3995 | d65488cfad3c |
parent 3605 | da57f13e6a23 |
permissions | -rw-r--r-- |
3605
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
1 |
"{ Encoding: utf8 }" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
2 |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
3 |
" |
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
4 |
COPYRIGHT (c) 1996-2015 by Claus Gittinger |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
5 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
6 |
New code and modifications done at SWING Research Group [1]: |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
7 |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
8 |
COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
9 |
SWING Research Group, Czech Technical University in Prague |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
10 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
11 |
This software is furnished under a license and may be used |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
12 |
only in accordance with the terms of that license and with the |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
13 |
inclusion of the above copyright notice. This software may not |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
14 |
be provided or otherwise made available to, or used by, any |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
15 |
other person. No title to or ownership of the software is |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
16 |
hereby transferred. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
17 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
18 |
[1] Code written at SWING Research Group contains a signature |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
19 |
of one of the above copright owners. For exact set of such code, |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
20 |
see the differences between this version and version stx:libjava |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
21 |
as of 1.9.2010 |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
22 |
" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
23 |
"{ Package: 'stx:libjava' }" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
24 |
|
3605
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
25 |
"{ NameSpace: Smalltalk }" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
26 |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
27 |
JavaByteCodeProcessorAdapter subclass:#JavaMethodAnalyzer |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
28 |
instanceVariableNames:'fieldsAccessed fieldsRead fieldsWritten staticsAccessed |
3605
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
29 |
staticsRead staticsWritten methodsInvoked refdClasses |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
30 |
constantsAccessed' |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
31 |
classVariableNames:'' |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
32 |
poolDictionaries:'' |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
33 |
category:'Languages-Java-Support-Decompiling' |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
34 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
35 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
36 |
!JavaMethodAnalyzer class methodsFor:'documentation'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
37 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
38 |
copyright |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
39 |
" |
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
40 |
COPYRIGHT (c) 1996-2015 by Claus Gittinger |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
41 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
42 |
New code and modifications done at SWING Research Group [1]: |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
43 |
|
3324
a58245c0e83a
Updated copyright notices.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2732
diff
changeset
|
44 |
COPYRIGHT (c) 2010-2015 by Jan Vrany, Jan Kurs and Marcel Hlopko |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
45 |
SWING Research Group, Czech Technical University in Prague |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
46 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
47 |
This software is furnished under a license and may be used |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
48 |
only in accordance with the terms of that license and with the |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
49 |
inclusion of the above copyright notice. This software may not |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
50 |
be provided or otherwise made available to, or used by, any |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
51 |
other person. No title to or ownership of the software is |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
52 |
hereby transferred. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
53 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
54 |
[1] Code written at SWING Research Group contains a signature |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
55 |
of one of the above copright owners. For exact set of such code, |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
56 |
see the differences between this version and version stx:libjava |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
57 |
as of 1.9.2010 |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
58 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
59 |
" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
60 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
61 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
62 |
documentation |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
63 |
" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
64 |
A helper class to analyze method's bytecode and keep some statistics |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
65 |
like read/written fields, sent messages, referenced classes... |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
66 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
67 |
[author:] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
68 |
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:
diff
changeset
|
69 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
70 |
[instance variables:] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
71 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
72 |
[class variables:] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
73 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
74 |
[see also:] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
75 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
76 |
" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
77 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
78 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
79 |
!JavaMethodAnalyzer class methodsFor:'analyzing'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
80 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
81 |
analyze: aJavaMethod |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
82 |
"Analyzes the given method and return the analyzer, |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
83 |
which can be in turn asked for various informstion" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
84 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
85 |
^ self new |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
86 |
process: aJavaMethod |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
87 |
receiver: nil |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
88 |
arguments: (Array new: aJavaMethod javaNumArgs); |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
89 |
yourself |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
90 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
91 |
"Created: / 30-08-2013 / 13:33:39 / 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:
diff
changeset
|
92 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
93 |
|
3605
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
94 |
!JavaMethodAnalyzer methodsFor:'enumerating'! |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
95 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
96 |
literalsDo: aBlock |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
97 |
constantsAccessed do:aBlock. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
98 |
refdClasses do:[:ref | |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
99 |
| nameSym | |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
100 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
101 |
nameSym := ref name asSymbolIfInterned. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
102 |
nameSym notNil ifTrue:[ |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
103 |
aBlock value: nameSym. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
104 |
]. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
105 |
]. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
106 |
methodsInvoked do:[:ref | |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
107 |
| selectorSym | |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
108 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
109 |
selectorSym := (ref name , ref descriptor) asSymbolIfInterned. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
110 |
selectorSym notNil ifTrue:[ |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
111 |
aBlock value: selectorSym |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
112 |
]. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
113 |
] |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
114 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
115 |
"Created: / 29-07-2016 / 09:42:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
116 |
! ! |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
117 |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
118 |
!JavaMethodAnalyzer methodsFor:'instructions'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
119 |
|
2690
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
120 |
anewarray |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
121 |
| classRef | |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
122 |
|
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
123 |
classRef := constantPool at: self fetchIndex2. |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
124 |
refdClasses add: classRef. |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
125 |
|
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
126 |
"Created: / 09-09-2013 / 12:21:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
127 |
! |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
128 |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
129 |
getfield |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
130 |
| fieldRef | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
131 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
132 |
fieldRef := constantPool at: self fetchIndex2. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
133 |
fieldsRead add: fieldRef. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
134 |
fieldsAccessed add: fieldRef. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
135 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
136 |
"Created: / 30-08-2013 / 13: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:
diff
changeset
|
137 |
"Modified: / 05-09-2013 / 16:19: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:
diff
changeset
|
138 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
139 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
140 |
getstatic |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
141 |
| fieldRef | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
142 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
143 |
fieldRef := constantPool at: self fetchIndex2. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
144 |
staticsRead add: fieldRef. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
145 |
staticsAccessed add: fieldRef. |
2690
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
146 |
refdClasses add: fieldRef classRef. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
147 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
148 |
"Created: / 05-09-2013 / 16:19:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2690
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
149 |
"Modified: / 09-09-2013 / 12:16:05 / 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:
diff
changeset
|
150 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
151 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
152 |
invinterface |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
153 |
methodsInvoked add: (constantPool at: self fetchBytes2). |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
154 |
self fetchBytes2 "/ count |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
155 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
156 |
"Created: / 30-08-2013 / 17:05:04 / 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:
diff
changeset
|
157 |
"Modified: / 30-08-2013 / 20:28: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:
diff
changeset
|
158 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
159 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
160 |
invnonvirt |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
161 |
methodsInvoked add: (constantPool at: self fetchBytes2) |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
162 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
163 |
"Created: / 30-08-2013 / 17:05:19 / 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:
diff
changeset
|
164 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
165 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
166 |
invstatic |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
167 |
methodsInvoked add: (constantPool at: self fetchBytes2) |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
168 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
169 |
"Created: / 30-08-2013 / 17:05: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:
diff
changeset
|
170 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
171 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
172 |
invvirt |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
173 |
methodsInvoked add: (constantPool at: self fetchBytes2) |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
174 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
175 |
"Created: / 30-08-2013 / 17:05:59 / 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:
diff
changeset
|
176 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
177 |
|
3605
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
178 |
ldc1 |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
179 |
self ldc: self fetchIndex. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
180 |
" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
181 |
Operation |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
182 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
183 |
Push item from run-time constant pool |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
184 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
185 |
Format |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
186 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
187 |
ldc |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
188 |
index |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
189 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
190 |
Forms |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
191 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
192 |
ldc = 18 (0x12) |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
193 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
194 |
Operand Stack |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
195 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
196 |
... → |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
197 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
198 |
..., value |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
199 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
200 |
Description |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
201 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
202 |
The index is an unsigned byte that must be a valid index into |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
203 |
the run-time constant pool of the current class ([384]§2.6). |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
204 |
The run-time constant pool entry at index either must be a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
205 |
run-time constant of type int or float, or a reference to a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
206 |
string literal, or a symbolic reference to a class, method |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
207 |
type, or method handle ([385]§5.1). |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
208 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
209 |
If the run-time constant pool entry is a run-time constant of |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
210 |
type int or float, the numeric value of that run-time constant |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
211 |
is pushed onto the operand stack as an int or float, |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
212 |
respectively. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
213 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
214 |
Otherwise, if the run-time constant pool entry is a reference |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
215 |
to an instance of class String representing a string literal |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
216 |
([386]§5.1), then a reference to that instance, value, is |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
217 |
pushed onto the operand stack. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
218 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
219 |
Otherwise, if the run-time constant pool entry is a symbolic |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
220 |
reference to a class ([387]§5.1), then the named class is |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
221 |
resolved ([388]§5.4.3.1) and a reference to the Class object |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
222 |
representing that class, value, is pushed onto the operand |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
223 |
stack. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
224 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
225 |
Otherwise, the run-time constant pool entry must be a symbolic |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
226 |
reference to a method type or a method handle ([389]§5.1). The |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
227 |
method type or method handle is resolved ([390]§5.4.3.5) and a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
228 |
reference to the resulting instance of |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
229 |
java.lang.invoke.MethodType or java.lang.invoke.MethodHandle, |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
230 |
value, is pushed onto the operand stack. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
231 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
232 |
Linking Exceptions |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
233 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
234 |
During resolution of a symbolic reference to a class, any of |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
235 |
the exceptions pertaining to class resolution ([391]§5.4.3.1) |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
236 |
can be thrown. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
237 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
238 |
During resolution of a symbolic reference to a method type or |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
239 |
method handle, any of the exception pertaining to method type |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
240 |
or method handle resolution ([392]§5.4.3.5) can be thrown. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
241 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
242 |
Notes |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
243 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
244 |
The ldc instruction can only be used to push a value of type |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
245 |
float taken from the float value set ([393]§2.3.2) because a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
246 |
constant of type float in the constant pool ([394]§4.4.4) must |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
247 |
be taken from the float value set. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
248 |
" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
249 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
250 |
"Created: / 29-07-2016 / 09:14:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
251 |
"Modified: / 29-07-2016 / 10:18:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
252 |
! |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
253 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
254 |
ldc2 |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
255 |
self ldc: self fetchIndex2 |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
256 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
257 |
" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
258 |
ldc_w |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
259 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
260 |
Operation |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
261 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
262 |
Push item from run-time constant pool (wide index) |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
263 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
264 |
Format |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
265 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
266 |
ldc_w |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
267 |
indexbyte1 |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
268 |
indexbyte2 |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
269 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
270 |
Forms |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
271 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
272 |
ldc_w = 19 (0x13) |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
273 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
274 |
Operand Stack |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
275 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
276 |
... → |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
277 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
278 |
..., value |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
279 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
280 |
Description |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
281 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
282 |
The unsigned indexbyte1 and indexbyte2 are assembled into an |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
283 |
unsigned 16-bit index into the run-time constant pool of the |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
284 |
current class ([395]§2.6), where the value of the index is |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
285 |
calculated as (indexbyte1 << 8) | indexbyte2. The index must be |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
286 |
a valid index into the run-time constant pool of the current |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
287 |
class. The run-time constant pool entry at the index either |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
288 |
must be a run-time constant of type int or float, or a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
289 |
reference to a string literal, or a symbolic reference to a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
290 |
class, method type, or method handle ([396]§5.1). |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
291 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
292 |
If the run-time constant pool entry is a run-time constant of |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
293 |
type int or float, the numeric value of that run-time constant |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
294 |
is pushed onto the operand stack as an int or float, |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
295 |
respectively. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
296 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
297 |
Otherwise, if the run-time constant pool entry is a reference |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
298 |
to an instance of class String representing a string literal |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
299 |
([397]§5.1), then a reference to that instance, value, is |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
300 |
pushed onto the operand stack. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
301 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
302 |
Otherwise, if the run-time constant pool entry is a symbolic |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
303 |
reference to a class ([398]§4.4.1). The named class is resolved |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
304 |
([399]§5.4.3.1) and a reference to the Class object |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
305 |
representing that class, value, is pushed onto the operand |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
306 |
stack. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
307 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
308 |
Otherwise, the run-time constant pool entry must be a symbolic |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
309 |
reference to a method type or a method handle ([400]§5.1). The |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
310 |
method type or method handle is resolved ([401]§5.4.3.5) and a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
311 |
reference to the resulting instance of |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
312 |
java.lang.invoke.MethodType or java.lang.invoke.MethodHandle, |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
313 |
value, is pushed onto the operand stack. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
314 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
315 |
Linking Exceptions |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
316 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
317 |
During resolution of the symbolic reference to a class, any of |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
318 |
the exceptions pertaining to class resolution ([402]§5.4.3.1) |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
319 |
can be thrown. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
320 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
321 |
During resolution of a symbolic reference to a method type or |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
322 |
method handle, any of the exception pertaining to method type |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
323 |
or method handle resolution ([403]§5.4.3.5) can be thrown. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
324 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
325 |
Notes |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
326 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
327 |
The ldc_w instruction is identical to the ldc instruction |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
328 |
([404]§ldc) except for its wider run-time constant pool index. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
329 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
330 |
The ldc_w instruction can only be used to push a value of type |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
331 |
float taken from the float value set ([405]§2.3.2) because a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
332 |
constant of type float in the constant pool ([406]§4.4.4) must |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
333 |
be taken from the float value set. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
334 |
" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
335 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
336 |
"Created: / 29-07-2016 / 09:15:05 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
337 |
"Modified: / 29-07-2016 / 10:18:24 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
338 |
! |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
339 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
340 |
ldc2w |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
341 |
constantsAccessed add: (constantPool at: self fetchIndex2). |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
342 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
343 |
" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
344 |
ldc2_w |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
345 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
346 |
Operation |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
347 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
348 |
Push long or double from run-time constant pool (wide index) |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
349 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
350 |
Format |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
351 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
352 |
ldc2_w |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
353 |
indexbyte1 |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
354 |
indexbyte2 |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
355 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
356 |
Forms |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
357 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
358 |
ldc2_w = 20 (0x14) |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
359 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
360 |
Operand Stack |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
361 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
362 |
... → |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
363 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
364 |
..., value |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
365 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
366 |
Description |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
367 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
368 |
The unsigned indexbyte1 and indexbyte2 are assembled into an |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
369 |
unsigned 16-bit index into the run-time constant pool of the |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
370 |
current class ([407]§2.6), where the value of the index is |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
371 |
calculated as (indexbyte1 << 8) | indexbyte2. The index must be |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
372 |
a valid index into the run-time constant pool of the current |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
373 |
class. The run-time constant pool entry at the index must be a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
374 |
run-time constant of type long or double ([408]§5.1). The |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
375 |
numeric value of that run-time constant is pushed onto the |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
376 |
operand stack as a long or double, respectively. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
377 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
378 |
Notes |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
379 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
380 |
Only a wide-index version of the ldc2_w instruction exists; |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
381 |
there is no ldc2 instruction that pushes a long or double with |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
382 |
a single-byte index. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
383 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
384 |
The ldc2_w instruction can only be used to push a value of type |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
385 |
double taken from the double value set ([409]§2.3.2) because a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
386 |
constant of type double in the constant pool ([410]§4.4.5) must |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
387 |
be taken from the double value set. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
388 |
" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
389 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
390 |
"Created: / 29-07-2016 / 09:16:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
391 |
! |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
392 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
393 |
ldc: index |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
394 |
| constantOrRef | |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
395 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
396 |
constantOrRef := constantPool at: index. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
397 |
constantOrRef isJavaRef ifTrue:[ |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
398 |
constantOrRef isJavaClassRef ifTrue:[ |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
399 |
refdClasses add: constantOrRef. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
400 |
]. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
401 |
constantOrRef isJavaStringRef ifTrue:[ |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
402 |
(constantOrRef isResolved or:[ JavaVM booted ]) ifTrue:[ |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
403 |
constantsAccessed add: constantOrRef resolve. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
404 |
]. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
405 |
] |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
406 |
] ifFalse:[ |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
407 |
constantsAccessed add: constantOrRef |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
408 |
]. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
409 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
410 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
411 |
" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
412 |
Operation |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
413 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
414 |
Push item from run-time constant pool |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
415 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
416 |
Format |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
417 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
418 |
ldc |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
419 |
index |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
420 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
421 |
Forms |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
422 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
423 |
ldc = 18 (0x12) |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
424 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
425 |
Operand Stack |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
426 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
427 |
... → |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
428 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
429 |
..., value |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
430 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
431 |
Description |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
432 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
433 |
The index is an unsigned byte that must be a valid index into |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
434 |
the run-time constant pool of the current class ([384]§2.6). |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
435 |
The run-time constant pool entry at index either must be a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
436 |
run-time constant of type int or float, or a reference to a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
437 |
string literal, or a symbolic reference to a class, method |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
438 |
type, or method handle ([385]§5.1). |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
439 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
440 |
If the run-time constant pool entry is a run-time constant of |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
441 |
type int or float, the numeric value of that run-time constant |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
442 |
is pushed onto the operand stack as an int or float, |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
443 |
respectively. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
444 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
445 |
Otherwise, if the run-time constant pool entry is a reference |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
446 |
to an instance of class String representing a string literal |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
447 |
([386]§5.1), then a reference to that instance, value, is |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
448 |
pushed onto the operand stack. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
449 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
450 |
Otherwise, if the run-time constant pool entry is a symbolic |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
451 |
reference to a class ([387]§5.1), then the named class is |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
452 |
resolved ([388]§5.4.3.1) and a reference to the Class object |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
453 |
representing that class, value, is pushed onto the operand |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
454 |
stack. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
455 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
456 |
Otherwise, the run-time constant pool entry must be a symbolic |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
457 |
reference to a method type or a method handle ([389]§5.1). The |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
458 |
method type or method handle is resolved ([390]§5.4.3.5) and a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
459 |
reference to the resulting instance of |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
460 |
java.lang.invoke.MethodType or java.lang.invoke.MethodHandle, |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
461 |
value, is pushed onto the operand stack. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
462 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
463 |
Linking Exceptions |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
464 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
465 |
During resolution of a symbolic reference to a class, any of |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
466 |
the exceptions pertaining to class resolution ([391]§5.4.3.1) |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
467 |
can be thrown. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
468 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
469 |
During resolution of a symbolic reference to a method type or |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
470 |
method handle, any of the exception pertaining to method type |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
471 |
or method handle resolution ([392]§5.4.3.5) can be thrown. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
472 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
473 |
Notes |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
474 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
475 |
The ldc instruction can only be used to push a value of type |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
476 |
float taken from the float value set ([393]§2.3.2) because a |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
477 |
constant of type float in the constant pool ([394]§4.4.4) must |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
478 |
be taken from the float value set. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
479 |
" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
480 |
|
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
481 |
"Created: / 29-07-2016 / 10:17:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
482 |
! |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
483 |
|
2690
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
484 |
multianewarray |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
485 |
| classRef | |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
486 |
|
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
487 |
classRef := constantPool at: self fetchIndex2. |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
488 |
self fetchIndex. "/ dimensions |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
489 |
refdClasses add: classRef. |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
490 |
|
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
491 |
"Created: / 09-09-2013 / 12:21:38 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
492 |
! |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
493 |
|
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
494 |
new |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
495 |
| classRef | |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
496 |
|
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
497 |
classRef := constantPool at: self fetchIndex2. |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
498 |
refdClasses add: classRef. |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
499 |
|
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
500 |
"Created: / 09-09-2013 / 12:18:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
501 |
! |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
502 |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
503 |
putfield |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
504 |
| fieldRef | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
505 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
506 |
fieldRef := constantPool at: self fetchIndex2. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
507 |
fieldsAccessed add: fieldRef. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
508 |
fieldsWritten add: fieldRef. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
509 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
510 |
"Created: / 30-08-2013 / 13:26: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:
diff
changeset
|
511 |
"Modified: / 30-08-2013 / 17:02: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:
diff
changeset
|
512 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
513 |
|
2690
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
514 |
putstatic |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
515 |
| fieldRef | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
516 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
517 |
fieldRef := constantPool at: self fetchIndex2. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
518 |
staticsWritten add: fieldRef. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
519 |
staticsAccessed add: fieldRef. |
2690
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
520 |
refdClasses add: fieldRef classRef. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
521 |
|
2690
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
522 |
"Created: / 09-09-2013 / 12:16:21 / 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:
diff
changeset
|
523 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
524 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
525 |
!JavaMethodAnalyzer methodsFor:'processing loop'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
526 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
527 |
process: aMethod receiver: aReceiver arguments: args |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
528 |
fieldsAccessed := Set new. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
529 |
fieldsRead := Set new. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
530 |
fieldsWritten := Set new. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
531 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
532 |
staticsAccessed := Set new. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
533 |
staticsRead := Set new. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
534 |
staticsWritten := Set new. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
535 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
536 |
methodsInvoked := Set new. |
2690
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
537 |
refdClasses := Set new. |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
538 |
|
3605
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
539 |
constantsAccessed := Set new. |
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
540 |
|
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
541 |
"/ Abstract, native or other funny method |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
542 |
aMethod byteCode isNil ifTrue:[ ^ self ]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
543 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
544 |
^ super process: aMethod receiver: aReceiver arguments: args. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
545 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
546 |
"Created: / 30-08-2013 / 13:23:04 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
3605
da57f13e6a23
Fixed JavaMethod>>referencesLiteral: and other literal-access methods
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
3324
diff
changeset
|
547 |
"Modified: / 29-07-2016 / 09:20:13 / 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:
diff
changeset
|
548 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
549 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
550 |
!JavaMethodAnalyzer methodsFor:'queries'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
551 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
552 |
sends: selector |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
553 |
^ self sendsAny: (Array with: selector) |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
554 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
555 |
"Created: / 31-08-2013 / 11:38:52 / 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:
diff
changeset
|
556 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
557 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
558 |
sends:selector1 or:selector2 |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
559 |
^ self sendsAny: (Array with: selector1 with: selector2) |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
560 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
561 |
"Modified: / 31-08-2013 / 11:39: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:
diff
changeset
|
562 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
563 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
564 |
sendsAny: selectors |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
565 |
selectors do:[:pair| |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
566 |
methodsInvoked do:[:methodRef | |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
567 |
methodRef selector = pair first ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
568 |
^ true |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
569 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
570 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
571 |
]. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
572 |
^ false |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
573 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
574 |
"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:
diff
changeset
|
575 |
"Modified: / 31-08-2013 / 21:33: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:
diff
changeset
|
576 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
577 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
578 |
!JavaMethodAnalyzer methodsFor:'queries-statistic'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
579 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
580 |
messagesPossiblySent |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
581 |
^ #() |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
582 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
583 |
"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:
diff
changeset
|
584 |
"Modified: / 31-08-2013 / 10:44:34 / 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:
diff
changeset
|
585 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
586 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
587 |
messagesSent |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
588 |
^ methodsInvoked collect:[:methodRef |methodRef selector ] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
589 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
590 |
"Created: / 31-08-2013 / 10:44:26 / 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:
diff
changeset
|
591 |
"Modified: / 31-08-2013 / 21:32: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:
diff
changeset
|
592 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
593 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
594 |
messagesSentToSelf |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
595 |
^#() |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
596 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
597 |
"Created: / 31-08-2013 / 09:31: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:
diff
changeset
|
598 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
599 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
600 |
messagesSentToSuper |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
601 |
^#() |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
602 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
603 |
"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:
diff
changeset
|
604 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
605 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
606 |
modifiedClassVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
607 |
^#() "/ No class vars in Java |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
608 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
609 |
"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:
diff
changeset
|
610 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
611 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
612 |
modifiedInstVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
613 |
^ method isStatic ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
614 |
staticsWritten collect:[:ref | ref name ] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
615 |
] ifFalse:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
616 |
fieldsWritten collect:[:ref | ref name ] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
617 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
618 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
619 |
"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:
diff
changeset
|
620 |
"Modified: / 05-09-2013 / 16:23: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:
diff
changeset
|
621 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
622 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
623 |
readGlobals |
2690
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
624 |
| names | |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
625 |
|
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
626 |
names := refdClasses collect:[:ref | ref name ]. |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
627 |
"/ (names includes: 'sun/misc/Unsafe') ifTrue:[ |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
628 |
"/ self halt. |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
629 |
"/ ]. |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
630 |
^ names |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
631 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
632 |
"Created: / 05-09-2013 / 15:27:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
2690
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
633 |
"Modified: / 09-09-2013 / 12:33:01 / 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:
diff
changeset
|
634 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
635 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
636 |
readInstVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
637 |
^ method isStatic ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
638 |
staticsRead collect:[:ref | ref name ] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
639 |
] ifFalse:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
640 |
fieldsRead collect:[:ref | ref name ] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
641 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
642 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
643 |
"Created: / 05-09-2013 / 15:27: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:
diff
changeset
|
644 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
645 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
646 |
usedClassVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
647 |
^ #() "/ No class vars in Java |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
648 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
649 |
"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:
diff
changeset
|
650 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
651 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
652 |
usedGlobals |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
653 |
^ self readGlobals |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
654 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
655 |
"Created: / 05-09-2013 / 15:27:35 / 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:
diff
changeset
|
656 |
! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
657 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
658 |
usedInstVars |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
659 |
^ method isStatic ifTrue:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
660 |
staticsAccessed collect:[:ref | ref name ] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
661 |
] ifFalse:[ |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
662 |
fieldsAccessed collect:[:ref | ref name ] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
663 |
] |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
664 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
665 |
"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:
diff
changeset
|
666 |
"Modified: / 05-09-2013 / 16:22:50 / 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:
diff
changeset
|
667 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
668 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
669 |
!JavaMethodAnalyzer methodsFor:'queries-statistic-Java'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
670 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
671 |
methodsInvoked |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
672 |
"Return a set of method invoked by the analyzed |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
673 |
method. |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
674 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
675 |
Unlike #messagesSent, which return only |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
676 |
selectors, this method returns a list of method refs, |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
677 |
so the receivers' declared class is also accessible |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
678 |
(through ref classRef)" |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
679 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
680 |
^ methodsInvoked |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
681 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
682 |
"Created: / 31-08-2013 / 23:22: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:
diff
changeset
|
683 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
684 |
|
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
685 |
!JavaMethodAnalyzer class methodsFor:'documentation'! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
686 |
|
2690
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
687 |
version_HG |
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
688 |
|
ec14b1703279
Fix in JavaMethodAnalyzer>>readGlobals.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2678
diff
changeset
|
689 |
^ '$Changeset: <not expanded> $' |
2678
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
690 |
! ! |
c865275e48a7
Updated to match Mercurial revision a00302fe5083 with two tweaks:
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
diff
changeset
|
691 |