author | Jan Vrany <jan.vrany@fit.cvut.cz> |
Thu, 31 Jan 2013 13:08:59 +0000 | |
branch | refactoring-vmdata |
changeset 2016 | 6afb298c7403 |
parent 2010 | 9bacff8c53de |
child 2019 | e1291a81f215 |
permissions | -rw-r--r-- |
877 | 1 |
" |
2 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
1152 | 3 |
|
1155 | 4 |
New code and modifications done at SWING Research Group [1]: |
1152 | 5 |
|
877 | 6 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
7 |
SWING Research Group, Czech Technical University in Prague |
|
8 |
||
9 |
This software is furnished under a license and may be used |
|
10 |
only in accordance with the terms of that license and with the |
|
11 |
inclusion of the above copyright notice. This software may not |
|
12 |
be provided or otherwise made available to, or used by, any |
|
13 |
other person. No title to or ownership of the software is |
|
14 |
hereby transferred. |
|
15 |
||
1155 | 16 |
[1] Code written at SWING Research Group contains a signature |
17 |
of one of the above copright owners. For exact set of such code, |
|
18 |
see the differences between this version and version stx:libjava |
|
1152 | 19 |
as of 1.9.2010 |
877 | 20 |
" |
752 | 21 |
"{ Package: 'stx:libjava' }" |
22 |
||
23 |
JavaMethodWithHandler variableSubclass:#JavaNativeMethod |
|
1749 | 24 |
instanceVariableNames:'nativeImplementation nCalls' |
1075
927aeb3649fc
Fix in native method imp -> class loading java tests all pass.. I'm getting drunk tonight :)
hlopkmar
parents:
1073
diff
changeset
|
25 |
classVariableNames:'CacheNativeImplementation Verbose' |
752 | 26 |
poolDictionaries:'' |
27 |
category:'Languages-Java-Classes' |
|
28 |
! |
|
29 |
||
877 | 30 |
!JavaNativeMethod class methodsFor:'documentation'! |
31 |
||
32 |
copyright |
|
33 |
" |
|
34 |
COPYRIGHT (c) 1996-2011 by Claus Gittinger |
|
1152 | 35 |
|
1155 | 36 |
New code and modifications done at SWING Research Group [1]: |
1152 | 37 |
|
877 | 38 |
COPYRIGHT (c) 2010-2011 by Jan Vrany, Jan Kurs and Marcel Hlopko |
39 |
SWING Research Group, Czech Technical University in Prague |
|
40 |
||
41 |
This software is furnished under a license and may be used |
|
42 |
only in accordance with the terms of that license and with the |
|
43 |
inclusion of the above copyright notice. This software may not |
|
44 |
be provided or otherwise made available to, or used by, any |
|
45 |
other person. No title to or ownership of the software is |
|
46 |
hereby transferred. |
|
47 |
||
1155 | 48 |
[1] Code written at SWING Research Group contains a signature |
49 |
of one of the above copright owners. For exact set of such code, |
|
50 |
see the differences between this version and version stx:libjava |
|
1152 | 51 |
as of 1.9.2010 |
877 | 52 |
|
53 |
" |
|
54 |
! ! |
|
752 | 55 |
|
56 |
!JavaNativeMethod class methodsFor:'initialization'! |
|
57 |
||
761 | 58 |
cacheNativeImplementation |
59 |
||
60 |
"For details, see #cacheNativeImplementation:" |
|
61 |
||
62 |
^CacheNativeImplementation |
|
63 |
||
64 |
"Created: / 30-04-2011 / 23:38:21 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
65 |
! |
|
66 |
||
67 |
cacheNativeImplementation: aBoolean |
|
68 |
||
69 |
"If set, native implementations are cached, resulting |
|
70 |
in better performance when calling native methods. |
|
71 |
Hower, no change in native method implemenetaion will |
|
72 |
not be visible then, unless #flushAllCachedNativeMethods |
|
73 |
is explictely called" |
|
74 |
||
75 |
CacheNativeImplementation := aBoolean |
|
76 |
||
77 |
"Created: / 30-04-2011 / 23:38:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
78 |
! |
|
79 |
||
752 | 80 |
initialize |
2016
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
81 |
self flags: ((self flags bitClear: Behavior flagMethod) bitOr: Behavior flagJavaMethod). |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
82 |
" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
83 |
self flags: ((self flags bitClear: Behavior flagJavaMethod) bitOr: Behavior flagMethod). |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
84 |
" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
85 |
"By default, do not cache native impls while developing" |
761 | 86 |
CacheNativeImplementation := Smalltalk isStandAloneApp. |
1075
927aeb3649fc
Fix in native method imp -> class loading java tests all pass.. I'm getting drunk tonight :)
hlopkmar
parents:
1073
diff
changeset
|
87 |
Verbose := false. |
927aeb3649fc
Fix in native method imp -> class loading java tests all pass.. I'm getting drunk tonight :)
hlopkmar
parents:
1073
diff
changeset
|
88 |
" |
2016
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
89 |
Verbose := true. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
90 |
" |
761 | 91 |
|
1075
927aeb3649fc
Fix in native method imp -> class loading java tests all pass.. I'm getting drunk tonight :)
hlopkmar
parents:
1073
diff
changeset
|
92 |
"Modified (comment): / 03-11-2011 / 10:48:12 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
2016
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
93 |
"Modified: / 31-01-2013 / 13:06:39 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
752 | 94 |
! ! |
95 |
||
96 |
!JavaNativeMethod class methodsFor:'cleanup'! |
|
97 |
||
98 |
flushAllCachedNativeMethods |
|
99 |
self allInstancesDo:[:aNativeMethod | |
|
100 |
aNativeMethod nativeImplementation:nil |
|
101 |
]. |
|
102 |
||
103 |
" |
|
104 |
self flushAllCachedNativeMethods |
|
105 |
" |
|
106 |
||
107 |
"Created: / 24.12.1999 / 03:10:38 / cg" |
|
108 |
"Modified: / 24.12.1999 / 03:10:51 / cg" |
|
109 |
! ! |
|
110 |
||
111 |
!JavaNativeMethod methodsFor:'accessing'! |
|
112 |
||
1749 | 113 |
nCalls |
114 |
^ nCalls ? 0 |
|
115 |
||
116 |
"Modified: / 27-10-2012 / 18:05:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
117 |
! |
|
118 |
||
1754
b3cde0c1c2b1
- do not enforce Java native code optimization off
vranyj1
parents:
1749
diff
changeset
|
119 |
nCallsReset |
b3cde0c1c2b1
- do not enforce Java native code optimization off
vranyj1
parents:
1749
diff
changeset
|
120 |
nCalls := 0 |
b3cde0c1c2b1
- do not enforce Java native code optimization off
vranyj1
parents:
1749
diff
changeset
|
121 |
|
b3cde0c1c2b1
- do not enforce Java native code optimization off
vranyj1
parents:
1749
diff
changeset
|
122 |
"Modified: / 27-10-2012 / 18:05:49 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
b3cde0c1c2b1
- do not enforce Java native code optimization off
vranyj1
parents:
1749
diff
changeset
|
123 |
! |
b3cde0c1c2b1
- do not enforce Java native code optimization off
vranyj1
parents:
1749
diff
changeset
|
124 |
|
752 | 125 |
nativeImplementation |
126 |
"return the value of the instance variable 'nativeImplementation' (automatically generated)" |
|
127 |
||
128 |
^ nativeImplementation |
|
129 |
||
130 |
"Created: / 25.9.1999 / 23:08:00 / cg" |
|
131 |
! |
|
132 |
||
133 |
nativeImplementation:something |
|
134 |
"set the value of the instance variable 'nativeImplementation' (automatically generated)" |
|
135 |
||
136 |
nativeImplementation := something. |
|
137 |
||
138 |
"Created: / 25.9.1999 / 23:08:00 / cg" |
|
139 |
! |
|
140 |
||
141 |
sourceLineNumber |
|
1213
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1155
diff
changeset
|
142 |
|
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1155
diff
changeset
|
143 |
^super sourceLineNumber |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1155
diff
changeset
|
144 |
|
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1155
diff
changeset
|
145 |
"/ ForceByteCodeDisplay == true ifTrue:[ ^ 1]. |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1155
diff
changeset
|
146 |
"/ lineNumberTable notNil ifTrue:[ ^ lineNumberTable at:2]. |
fc90769151e8
- fix in reflection over methods (signature is nil for non-generic methods)
vranyj1
parents:
1155
diff
changeset
|
147 |
"/ ^1 |
752 | 148 |
|
149 |
||
150 |
" |
|
151 |
^ (JavaSourceCodeCache new) |
|
152 |
findLineForMethod:(self selector) |
|
153 |
inClass:javaClass. |
|
154 |
" |
|
155 |
||
156 |
"Modified: / 13-12-2010 / 13:55:55 / Jan Kurs <kurs.jan@post.cz>" |
|
157 |
"Modified: / 13-12-2010 / 23:46:30 / Marcel Hlopko <hlopik@gmail.com>" |
|
158 |
"Created: / 17-12-2010 / 10:34:43 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
159 |
! ! |
|
160 |
||
761 | 161 |
!JavaNativeMethod methodsFor:'private'! |
162 |
||
163 |
compileNativeImplementation: sel dispatchingTo: oldSel |
|
164 |
||
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
165 |
| src arg converted header | |
761 | 166 |
src := (JavaVM class compiledMethodAt: oldSel) source. |
167 |
src := src asStringCollection. |
|
168 |
(src first includesString: 'aJavaContext') ifTrue:[ |
|
169 |
arg := 'aJavaContext' |
|
170 |
] ifFalse:[ |
|
171 |
(src first includesString: 'nativeContext') ifTrue:[ |
|
172 |
arg := 'nativeContext' |
|
173 |
] |
|
174 |
]. |
|
175 |
arg ifNotNil:[ |
|
176 |
src removeFirst asString. |
|
177 |
converted := true. |
|
178 |
] ifNil:[ |
|
179 |
arg := 'nativeContext'. |
|
180 |
src := ' self breakPoint: #jv info: ''Convert it to new-style natives''. |
|
181 |
||
182 |
^ self ', oldSel, ' nativeContext'. |
|
183 |
converted := false. |
|
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
184 |
]. |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
185 |
|
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
186 |
header := String streamContents:[:s| |
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
187 |
sel numArgs == 2 ifTrue:[ |
2010
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
188 |
s nextPutAll: sel; space; nextPutAll: 'this '. |
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
189 |
] ifFalse:[ |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
190 |
| kw | |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
191 |
|
2010
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
192 |
kw := sel keywords. |
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
193 |
s nextPutAll: kw first. |
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
194 |
s nextPutAll: ' this '. |
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
195 |
2 to: kw size - 1 do:[:i| |
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
196 |
sel nextPutAll: (kw at: i); space; nextPut:$a; nextPutAll: i printString; space. |
2010
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
197 |
]. |
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
198 |
] |
761 | 199 |
]. |
200 |
||
201 |
(JavaVM class |
|
202 |
compile: |
|
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
203 |
(self nativeMethodTemplate bindWith:header with: arg with: src asString) |
761 | 204 |
classified: |
205 |
'native - ', ((javaClass javaPackage upTo:$$) replaceAll:$/ with:$. )) |
|
206 |
package: JavaVM package. |
|
207 |
||
208 |
converted ifTrue:[ |
|
209 |
(JavaVM class compiledMethodAt: oldSel) category: 'native - old-style (converted)' |
|
210 |
] ifFalse:[ |
|
211 |
(JavaVM class compiledMethodAt: oldSel) category: 'native - old-style (FAILED to convert)' |
|
212 |
] |
|
213 |
||
214 |
"Created: / 01-05-2011 / 00:08:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
215 |
"Modified: / 19-01-2013 / 23:29:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
761 | 216 |
! |
217 |
||
218 |
compileNativeImplementationStub: sel |
|
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
219 |
| header | |
761 | 220 |
|
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
221 |
header := String streamContents:[:s| |
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
222 |
sel numArgs == 2 ifTrue:[ |
2010
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
223 |
s nextPutAll: sel keywords first. |
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
224 |
] ifFalse:[ |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
225 |
| kw | |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
226 |
|
2010
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
227 |
kw := sel keywords. |
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
228 |
s nextPutAll: kw first. |
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
229 |
s nextPutAll: ' this '. |
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
230 |
2 to: kw size - 1 do:[:i| |
1990
f37fb2129089
Fixed natives. Java VM boots & Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1986
diff
changeset
|
231 |
s nextPutAll: (kw at: i); space; nextPut:$a; nextPutAll: (i - 1) printString; space. |
2010
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
232 |
]. |
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
233 |
] |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
234 |
]. |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
235 |
|
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
236 |
(JavaVM natives class |
761 | 237 |
compile: |
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
238 |
(self nativeMethodTemplate bindWith:header with: 'nativeContext' with:('^ JavaVM unimplementedNativeMethodSignal raise')) |
761 | 239 |
classified: |
240 |
'native - ', ((javaClass javaPackage upTo:$$) replaceAll:$/ with:$.)) |
|
241 |
package: JavaVM package |
|
242 |
||
243 |
"Created: / 01-05-2011 / 00:08:59 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1990
f37fb2129089
Fixed natives. Java VM boots & Groovy 1+1 works.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1986
diff
changeset
|
244 |
"Modified: / 20-01-2013 / 20:56:44 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
761 | 245 |
! |
246 |
||
247 |
nativeMethodTemplate |
|
248 |
||
249 |
^'%1 %2 |
|
250 |
||
251 |
<javanative: ''', javaClass name , ''' name: ''', (selector copyWithoutLast:signature size), '''> |
|
252 |
||
253 |
%3' |
|
254 |
||
255 |
"Created: / 01-05-2011 / 00:12:42 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
256 |
"Modified: / 19-01-2013 / 22:20:41 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
761 | 257 |
! |
258 |
||
259 |
searchNativeImplementation |
|
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
260 |
<resource: #obsolete> |
761 | 261 |
|
262 |
"Returns a SELECTOR of native method implementation. |
|
263 |
For now, two naming schemes are used. The onld one uses |
|
264 |
just a class name and selector as a name for native method impl. |
|
265 |
The new one uses fully qualified class name. |
|
266 |
" |
|
267 |
||
268 |
| nm newStyleSel oldStyleSel | |
|
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
269 |
|
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
270 |
self error: 'Should no longer be called!!'. |
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
271 |
|
912
e651488f5741
Many fixes in reflection, expecially for generic types support
vranyj1
parents:
877
diff
changeset
|
272 |
nm := selector upTo: $(. |
761 | 273 |
newStyleSel := ('_' , ((javaClass name copyReplaceAll:$/ with:$_) replaceAll:$$ with:$_), '_' , nm , ':') asSymbol. |
1974 | 274 |
(JavaVM natives class canUnderstand: newStyleSel) ifTrue:[ |
275 |
"Good, a JavaVM understands new style native selectors" |
|
276 |
^newStyleSel |
|
277 |
]. |
|
761 | 278 |
|
279 |
oldStyleSel := ('_' , (javaClass lastName copyReplaceAll:$$ with:$_) , '_' , nm , ':') asSymbol. |
|
1974 | 280 |
(JavaVM natives canUnderstand: oldStyleSel) ifTrue:[ |
761 | 281 |
"Convert method on the fly only if Im Jan Vrany |
282 |
(to avoid confusion of other developers :-)" |
|
283 |
OperatingSystem getLoginName = 'jv' ifTrue:[ |
|
284 |
"OK, old style method has not yet been converted to a newstyle one. |
|
285 |
Converts old-style method to a new-style one" |
|
286 |
self compileNativeImplementation: newStyleSel dispatchingTo: oldStyleSel. |
|
287 |
^newStyleSel |
|
288 |
] ifFalse:[ |
|
289 |
^oldStyleSel |
|
1974 | 290 |
] |
291 |
]. |
|
761 | 292 |
self compileNativeImplementationStub: newStyleSel. |
293 |
^newStyleSel |
|
294 |
||
295 |
"Created: / 30-04-2011 / 23:50:29 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
296 |
"Modified: / 19-01-2013 / 23:31:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
297 |
! |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
298 |
|
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
299 |
searchNativeImplementation: numArgs |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
300 |
|
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
301 |
"Returns a SELECTOR of native method implementation." |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
302 |
|
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
303 |
|
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
304 |
| nm newStyleSel args | |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
305 |
nm := selector upTo: $(. |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
306 |
|
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
307 |
args := #( |
2010
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
308 |
"0" '' |
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
309 |
"1" '_:' |
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
310 |
"2" '_:_:' |
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
311 |
"3" '_:_:_:' |
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
312 |
"4" '_:_:_:_:' |
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
313 |
"5" '_:_:_:_:_:' |
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
314 |
"6" '_:_:_:_:_:_:' |
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
315 |
"7" '_:_:_:_:_:_:_:' |
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
316 |
"8" '_:_:_:_:_:_:_:_:' |
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
317 |
"9" '_:_:_:_:_:_:_:_:_:' |
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
318 |
"10" '_:_:_:_:_:_:_:_:_:_:' |
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
319 |
"11" '_:_:_:_:_:_:_:_:_:_:_:' |
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
320 |
"12" '_:_:_:_:_:_:_:_:_:_:_:_:' |
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
321 |
) at: numArgs + 1. |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
322 |
|
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
323 |
newStyleSel := ('_' , ((javaClass name copyReplaceAll:$/ with:$_) replaceAll:$$ with:$_), '_' , nm , ':' , args) asSymbol. |
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
324 |
(JavaVM natives class canUnderstand: newStyleSel) ifTrue:[ |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
325 |
"Good, a JavaVM understands new style native selectors" |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
326 |
^newStyleSel |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
327 |
]. |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
328 |
|
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
329 |
self compileNativeImplementationStub: newStyleSel. |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
330 |
^newStyleSel |
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
331 |
|
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
332 |
"Created: / 19-01-2013 / 22:11:40 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
333 |
"Modified: / 19-01-2013 / 23:39:17 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
761 | 334 |
! ! |
335 |
||
2016
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
336 |
!JavaNativeMethod methodsFor:'private-compiler interface'! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
337 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
338 |
numberOfArgs:aNumber |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
339 |
| sel m | |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
340 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
341 |
super numberOfArgs:aNumber. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
342 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
343 |
(self class flags bitAnd:Behavior flagJavaMethod) ~~ 0 ifTrue:[ ^ self ]. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
344 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
345 |
"Now, install the trampoline..." |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
346 |
sel := #( |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
347 |
"00" #trampolineUncached: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
348 |
"01" #trampolineUncached: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
349 |
"02" #trampolineUncached:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
350 |
"03" #trampolineUncached:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
351 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
352 |
"04" #trampolineUncached:_:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
353 |
"05" #trampolineUncached:_:_:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
354 |
"06" #trampolineUncached:_:_:_:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
355 |
"07" #trampolineUncached:_:_:_:_:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
356 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
357 |
"08" #trampolineUncached:_:_:_:_:_:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
358 |
"09" #trampolineUncached:_:_:_:_:_:_:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
359 |
"10" #trampolineUncached:_:_:_:_:_:_:_:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
360 |
"11" #trampolineUncached:_:_:_:_:_:_:_:_:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
361 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
362 |
"12" #trampolineUncached:_:_:_:_:_:_:_:_:_:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
363 |
"13" #trampolineUncached:_:_:_:_:_:_:_:_:_:_:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
364 |
"14" #trampolineUncached:_:_:_:_:_:_:_:_:_:_:_:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
365 |
"15" #trampolineUncached:_:_:_:_:_:_:_:_:_:_:_:_:_:_: |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
366 |
) at: aNumber + 1. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
367 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
368 |
m := self class compiledMethodAt: sel. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
369 |
m isNil ifTrue:[ |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
370 |
self error: 'Cannot find trampoline method'. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
371 |
]. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
372 |
self byteCode: m byteCode. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
373 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
374 |
"Created: / 31-01-2013 / 12:44:16 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
375 |
! ! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
376 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
377 |
!JavaNativeMethod methodsFor:'private-trampolines'! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
378 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
379 |
trampolineUncached |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
380 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
381 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
382 |
"Created: / 31-01-2013 / 12:55:02 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
383 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
384 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
385 |
trampolineUncached: a1 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
386 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
387 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
388 |
"Created: / 31-01-2013 / 12:55:20 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
389 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
390 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
391 |
trampolineUncached: a1 _: a2 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
392 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
393 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
394 |
"Created: / 31-01-2013 / 12:55:26 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
395 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
396 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
397 |
trampolineUncached: a1 _: a2 _: a3 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
398 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
399 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
400 |
"Created: / 31-01-2013 / 12:55:34 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
401 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
402 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
403 |
trampolineUncached: a1 _: a2 _: a3 _: a4 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
404 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
405 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
406 |
"Created: / 31-01-2013 / 12:55:47 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
407 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
408 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
409 |
trampolineUncached: a1 _: a2 _: a3 _: a4 _: a5 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
410 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
411 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
412 |
"Created: / 31-01-2013 / 12:55:50 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
413 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
414 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
415 |
trampolineUncached: a1 _: a2 _: a3 _: a4 _: a5 _: a6 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
416 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
417 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
418 |
"Created: / 31-01-2013 / 12:55:53 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
419 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
420 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
421 |
trampolineUncached: a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
422 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
423 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
424 |
"Created: / 31-01-2013 / 12:55:55 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
425 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
426 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
427 |
trampolineUncached: a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
428 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
429 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
430 |
"Created: / 31-01-2013 / 12:56:00 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
431 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
432 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
433 |
trampolineUncached: a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 _: a9 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
434 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
435 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
436 |
"Created: / 31-01-2013 / 12:56:03 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
437 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
438 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
439 |
trampolineUncached: a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 _: a9 _: a10 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
440 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
441 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
442 |
"Created: / 31-01-2013 / 12:56:08 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
443 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
444 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
445 |
trampolineUncached: a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 _: a9 _: a10 _: a11 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
446 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
447 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
448 |
"Created: / 31-01-2013 / 12:56:10 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
449 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
450 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
451 |
trampolineUncached: a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 _: a9 _: a10 _: a11 _: a12 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
452 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
453 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
454 |
"Created: / 31-01-2013 / 12:56:15 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
455 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
456 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
457 |
trampolineUncached: a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 _: a9 _: a10 _: a11 _: a12 _: a13 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
458 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
459 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
460 |
"Created: / 31-01-2013 / 12:56:22 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
461 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
462 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
463 |
trampolineUncached: a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 _: a9 _: a10 _: a11 _: a12 _: a13 _: a14 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
464 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
465 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
466 |
"Created: / 31-01-2013 / 12:56:48 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
467 |
! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
468 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
469 |
trampolineUncached: a1 _: a2 _: a3 _: a4 _: a5 _: a6 _: a7 _: a8 _: a9 _: a10 _: a11 _: a12 _: a13 _: a14 _: a15 |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
470 |
^self nativeMethodInvokation: thisContext. |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
471 |
|
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
472 |
"Created: / 31-01-2013 / 12:56:36 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
473 |
! ! |
6afb298c7403
Added simple trampoline methods to JavaNativeMethod.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
2010
diff
changeset
|
474 |
|
752 | 475 |
!JavaNativeMethod methodsFor:'vm support'! |
476 |
||
477 |
nativeMethodInvokation |
|
761 | 478 |
"Called by the VM when a native method is |
1748 | 479 |
to be executed - old (slow) implementation" |
480 |
||
481 |
^self nativeMethodInvokation: thisContext sender. |
|
482 |
||
483 |
" |
|
484 |
JavaNativeMethod flushAllCachedNativeMethods" |
|
485 |
||
486 |
"Modified: / 27-01-2000 / 13:34:53 / cg" |
|
487 |
"Modified: / 03-11-2011 / 10:47:48 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
488 |
"Modified: / 27-10-2012 / 15:15:54 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
489 |
! |
|
490 |
||
491 |
nativeMethodInvokation: context |
|
492 |
"Called by the VM when a native method is |
|
493 |
to be executed. |
|
494 |
||
495 |
'context' is the context of being-invoked native method" |
|
1073
e842ab17fe16
quite big class loaders rewrite.. javavm/groovy boots, almost all tests pass.. hope you will like it..
hlopkmar
parents:
1022
diff
changeset
|
496 |
|
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
497 |
| sel mthd sender nArgs receiverAndArgsAndContext | |
1749 | 498 |
nCalls := (nCalls ? 0) + 1. |
2010
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
499 |
receiverAndArgsAndContext := Array new: (nArgs := context numArgs) + 1"receiver". |
1993
6cb676a913a8
Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1990
diff
changeset
|
500 |
receiverAndArgsAndContext replaceFrom:2 to:1 + nArgs with: context startingAt: context arg1Index. |
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
501 |
receiverAndArgsAndContext at: 1 put: context receiver. |
2010
9bacff8c53de
The 'nativeContext' argument removed from all native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1993
diff
changeset
|
502 |
|
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
503 |
|
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
504 |
|
1073
e842ab17fe16
quite big class loaders rewrite.. javavm/groovy boots, almost all tests pass.. hope you will like it..
hlopkmar
parents:
1022
diff
changeset
|
505 |
(mthd := nativeImplementation) isNil ifTrue: [ |
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
506 |
sel := self searchNativeImplementation: nArgs. |
1971
e75c1790521c
Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1864
diff
changeset
|
507 |
mthd := (JavaVM natives class compiledMethodAt: sel). |
1073
e842ab17fe16
quite big class loaders rewrite.. javavm/groovy boots, almost all tests pass.. hope you will like it..
hlopkmar
parents:
1022
diff
changeset
|
508 |
(mthd isNil or: [ mthd isLazyMethod ]) ifTrue: [ |
1748 | 509 |
sender := context. |
1073
e842ab17fe16
quite big class loaders rewrite.. javavm/groovy boots, almost all tests pass.. hope you will like it..
hlopkmar
parents:
1022
diff
changeset
|
510 |
sender sender selector == #noByteCode ifTrue: [ |
752 | 511 |
sender := sender sender. |
512 |
sender := sender sender. |
|
513 |
sender := sender sender. |
|
514 |
]. |
|
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
515 |
^ JavaVM natives perform: sel withArguments: receiverAndArgsAndContext |
752 | 516 |
]. |
1073
e842ab17fe16
quite big class loaders rewrite.. javavm/groovy boots, almost all tests pass.. hope you will like it..
hlopkmar
parents:
1022
diff
changeset
|
517 |
CacheNativeImplementation ifTrue: [ nativeImplementation := mthd. ] |
752 | 518 |
]. |
1075
927aeb3649fc
Fix in native method imp -> class loading java tests all pass.. I'm getting drunk tonight :)
hlopkmar
parents:
1073
diff
changeset
|
519 |
Verbose ifTrue: [Logger log: 'Native method invokation: ' , sel severity: #debug facility: #JVM]. |
1073
e842ab17fe16
quite big class loaders rewrite.. javavm/groovy boots, almost all tests pass.. hope you will like it..
hlopkmar
parents:
1022
diff
changeset
|
520 |
^ mthd |
1971
e75c1790521c
Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1864
diff
changeset
|
521 |
valueWithReceiver: JavaVM natives |
1986
9e63ab553922
JavaNativeMethod & their implementation transformed to pass a reveiver.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1985
diff
changeset
|
522 |
arguments: receiverAndArgsAndContext |
1073
e842ab17fe16
quite big class loaders rewrite.. javavm/groovy boots, almost all tests pass.. hope you will like it..
hlopkmar
parents:
1022
diff
changeset
|
523 |
selector: selector |
1971
e75c1790521c
Java native implementation refactoring (phase 1)
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1864
diff
changeset
|
524 |
search: JavaVM natives class |
1073
e842ab17fe16
quite big class loaders rewrite.. javavm/groovy boots, almost all tests pass.. hope you will like it..
hlopkmar
parents:
1022
diff
changeset
|
525 |
sender: nil |
752 | 526 |
|
1073
e842ab17fe16
quite big class loaders rewrite.. javavm/groovy boots, almost all tests pass.. hope you will like it..
hlopkmar
parents:
1022
diff
changeset
|
527 |
" |
e842ab17fe16
quite big class loaders rewrite.. javavm/groovy boots, almost all tests pass.. hope you will like it..
hlopkmar
parents:
1022
diff
changeset
|
528 |
JavaNativeMethod flushAllCachedNativeMethods" |
752 | 529 |
|
1748 | 530 |
"Created: / 27-10-2012 / 15:13:35 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1993
6cb676a913a8
Native methods now use arguments instead of fetching them from context.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1990
diff
changeset
|
531 |
"Modified: / 21-01-2013 / 17:35:27 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
752 | 532 |
! ! |
533 |
||
534 |
!JavaNativeMethod class methodsFor:'documentation'! |
|
535 |
||
536 |
version |
|
1864 | 537 |
^ '$Header$' |
538 |
! |
|
539 |
||
540 |
version_HG |
|
541 |
||
542 |
^ '$Changeset: <not expanded> $' |
|
752 | 543 |
! |
544 |
||
545 |
version_SVN |
|
1864 | 546 |
^ '§Id§' |
923 | 547 |
|
752 | 548 |
! ! |
549 |
||
1985
7c5a14d663ba
Temporary commit. JavaNativeMethod refactored to use new-style native methods.
Jan Vrany <jan.vrany@fit.cvut.cz>
parents:
1974
diff
changeset
|
550 |
|
752 | 551 |
JavaNativeMethod initialize! |