author | vranyj1 |
Fri, 25 Nov 2011 08:02:14 +0000 | |
branch | jk_new_structure |
changeset 1155 | d6f6d5fc0343 |
parent 1152 | 040cba55a7d2 |
child 1452 | 69dcb9c33742 |
permissions | -rw-r--r-- |
752 | 1 |
" |
877 | 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 |
||
752 | 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. |
|
877 | 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 |
752 | 20 |
" |
21 |
"{ Package: 'stx:libjava' }" |
|
22 |
||
23 |
Context variableSubclass:#JavaContext |
|
1093 | 24 |
instanceVariableNames:'exArg exPC byteCode constPool acqrMonitors' |
752 | 25 |
classVariableNames:'' |
26 |
poolDictionaries:'' |
|
27 |
category:'Languages-Java-Support' |
|
28 |
! |
|
29 |
||
30 |
!JavaContext class methodsFor:'documentation'! |
|
31 |
||
32 |
copyright |
|
33 |
" |
|
877 | 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 |
||
752 | 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. |
|
877 | 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 |
" |
|
752 | 54 |
! ! |
55 |
||
56 |
!JavaContext methodsFor:'* As yet uncategorized *'! |
|
57 |
||
58 |
markForException |
|
59 |
"set the exception handler flag in the receiver. |
|
60 |
The JVM needs this to enter an exception handler instead of restarting |
|
61 |
from the beginning (when the context is restarted). |
|
62 |
- a highly internal mechanism and not for public use." |
|
63 |
" |
|
64 |
%{ /* NOCONTEXT */ |
|
65 |
#ifdef __JAVA_EX_PEND |
|
66 |
/* actually no longer - only a non-nil exPC is now used as marker */ |
|
67 |
__INST(flags) = (OBJ)((INT)__INST(flags) | __MASKSMALLINT(__JAVA_EX_PEND)); |
|
68 |
#endif |
|
69 |
%} |
|
70 |
" |
|
71 |
||
72 |
"Modified: / 13-12-1995 / 19:05:22 / cg" |
|
73 |
"Modified: / 25-10-2010 / 17:19:23 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
74 |
! ! |
|
75 |
||
76 |
!JavaContext methodsFor:'ST context mimicri'! |
|
77 |
||
78 |
arg1Index |
|
79 |
"the java stack contains the receiver in a non-static |
|
80 |
method, as slot 0. Therefore, the first arg is found at slot2 |
|
81 |
if this is for a non-static method" |
|
82 |
||
83 |
self method isStatic ifTrue:[ |
|
84 |
^ 1 |
|
85 |
]. |
|
86 |
^ 2 |
|
87 |
! |
|
88 |
||
89 |
argAt:n |
|
90 |
"return the i'th argument (1..nArgs)" |
|
91 |
||
92 |
^ self at:(self arg1Index - 1 + n) |
|
93 |
||
94 |
"Created: / 2.1.1998 / 17:54:13 / cg" |
|
95 |
"Modified: / 2.1.1998 / 21:39:30 / cg" |
|
96 |
! |
|
97 |
||
98 |
argAt:n put:value |
|
99 |
"change the i'th argument (1..nArgs)" |
|
100 |
||
101 |
^ super argAt:(self arg1Index - 1 + n) put:value |
|
102 |
||
103 |
"Created: / 2.1.1998 / 17:54:34 / cg" |
|
104 |
"Modified: / 2.1.1998 / 21:35:19 / cg" |
|
105 |
! |
|
106 |
||
107 |
args |
|
108 |
"return an array filled with the arguments of this context" |
|
109 |
||
110 |
|n| |
|
111 |
||
112 |
n := self numArgs. |
|
113 |
n == 0 ifTrue:[ |
|
114 |
"/ little optimization here - avoid creating empty containers |
|
115 |
^ #() |
|
116 |
]. |
|
117 |
||
118 |
^ (Array new:n) replaceFrom:1 to:n with:self startingAt:(self arg1Index). |
|
119 |
||
120 |
"Created: / 2.1.1998 / 17:54:57 / cg" |
|
121 |
"Modified: / 2.1.1998 / 21:34:44 / cg" |
|
122 |
! |
|
123 |
||
124 |
argsAndVars |
|
125 |
"return an array filled with the arguments and variables of this context" |
|
126 |
||
127 |
|n| |
|
128 |
||
129 |
n := self numArgs + self numVars. |
|
130 |
n == 0 ifTrue:[ |
|
131 |
"/ little optimization here - avoid creating empty containers |
|
132 |
^ #() |
|
133 |
]. |
|
134 |
^ (Array new:n) replaceFrom:1 to:n with:self startingAt:(self arg1Index). |
|
135 |
||
136 |
"Created: / 2.1.1998 / 17:55:14 / cg" |
|
137 |
"Modified: / 13.1.1998 / 15:44:56 / cg" |
|
138 |
! |
|
139 |
||
140 |
lineNumber |
|
141 |
|nr pc| |
|
142 |
||
143 |
pc := self pc. |
|
144 |
||
145 |
"/ 'ask line for pc:' print. pc printCR. |
|
146 |
pc isNil ifTrue:[ |
|
147 |
nr := self lineNumberFromMethod. |
|
148 |
nr notNil ifTrue:[ |
|
149 |
^ nr |
|
150 |
]. |
|
151 |
" '-> 0 [a]' printCR. " |
|
152 |
^0 |
|
153 |
]. |
|
154 |
||
155 |
nr := self method lineNumberForPC:pc. |
|
156 |
nr isNil ifTrue:[ |
|
157 |
nr := self lineNumberFromMethod. |
|
158 |
nr notNil ifTrue:[ |
|
159 |
^ nr |
|
160 |
]. |
|
161 |
" '-> 0 [b]' printCR. " |
|
162 |
^ 0 |
|
163 |
]. |
|
164 |
"/ '-> ' print. nr printCR. |
|
165 |
^ nr. |
|
166 |
||
167 |
"Created: / 1.5.1996 / 15:05:47 / cg" |
|
168 |
"Modified: / 15.1.1998 / 15:25:29 / cg" |
|
169 |
! |
|
170 |
||
171 |
lineNumberFromMethod |
|
172 |
|m| |
|
173 |
||
174 |
m := self method. |
|
175 |
m notNil ifTrue:[ |
|
176 |
^ m lineNumber |
|
177 |
]. |
|
178 |
^ nil |
|
179 |
||
180 |
"Created: / 4.1.1998 / 23:34:45 / cg" |
|
181 |
"Modified: / 4.1.1998 / 23:35:55 / cg" |
|
182 |
! |
|
183 |
||
184 |
method |
|
185 |
"the method may be found in the interpreter temps ..." |
|
186 |
||
187 |
method isJavaMethod ifTrue:[^ method]. |
|
188 |
^ super method |
|
189 |
||
190 |
"Created: / 1.5.1996 / 15:03:43 / cg" |
|
191 |
"Modified: / 25.9.1999 / 23:26:40 / cg" |
|
192 |
! |
|
193 |
||
194 |
numArgs |
|
195 |
"return the number of args. |
|
196 |
Redefined since Java keeps the receiver of a non-static method |
|
197 |
at local slot 1." |
|
198 |
||
199 |
|n| |
|
200 |
||
201 |
n := super numArgs. |
|
202 |
self method isStatic ifFalse:[ |
|
203 |
n := n - 1 |
|
204 |
]. |
|
205 |
^ n |
|
206 |
||
207 |
"Created: / 2.1.1998 / 22:21:24 / cg" |
|
208 |
! |
|
209 |
||
210 |
numTemps |
|
211 |
"return the number of temporary variables of the Method. |
|
212 |
Redefined since Java keeps the receiver of a non-static method |
|
213 |
at local slot 1." |
|
214 |
||
215 |
|n| |
|
216 |
||
217 |
n := self size - super numVars - super numArgs. |
|
218 |
^ n |
|
219 |
||
220 |
"Created: / 13.1.1998 / 16:52:32 / cg" |
|
221 |
"Modified: / 13.1.1998 / 17:23:27 / cg" |
|
222 |
! |
|
223 |
||
224 |
numVars |
|
225 |
"return the number of locals. |
|
226 |
Redefined since Java keeps the receiver of a non-static method |
|
227 |
at local slot 0 and holds the args as locals." |
|
228 |
||
229 |
|n| |
|
230 |
||
231 |
n := super numVars. |
|
232 |
^ (n - self numArgs) max:0 |
|
233 |
||
234 |
"Created: / 13.1.1998 / 17:03:08 / cg" |
|
235 |
"Modified: / 13.1.1998 / 17:25:16 / cg" |
|
236 |
! |
|
237 |
||
238 |
pc |
|
239 |
lineNr isNil ifTrue:[^ nil]. |
|
240 |
^ lineNr bitAnd:16rFFFF |
|
241 |
||
242 |
"Created: / 4.1.1998 / 23:33:48 / cg" |
|
243 |
"Modified: / 10.11.1998 / 13:20:12 / cg" |
|
244 |
! |
|
245 |
||
246 |
quickLineNumber |
|
247 |
"the lineNumber - without decompiling" |
|
248 |
||
249 |
^ self method quickLineNumberForPC:self pc |
|
250 |
||
251 |
"Created: / 10.11.1998 / 14:20:30 / cg" |
|
252 |
! |
|
253 |
||
254 |
selector |
|
255 |
"the selector can be extracted from the method. |
|
256 |
the method may be found in the interpreter temps ..." |
|
257 |
||
258 |
|s m| |
|
259 |
||
260 |
selector isNil ifTrue:[ |
|
261 |
m := self method. |
|
262 |
m notNil ifTrue:[ |
|
263 |
^ m name |
|
264 |
] |
|
265 |
]. |
|
266 |
^ super selector |
|
267 |
||
268 |
"Modified: / 30.12.1997 / 17:22:06 / cg" |
|
269 |
"Created: / 30.12.1997 / 17:23:47 / cg" |
|
270 |
! |
|
271 |
||
272 |
setPC:newPC |
|
273 |
lineNr := newPC |
|
274 |
||
275 |
"Created: / 5.1.1998 / 00:09:02 / cg" |
|
276 |
! |
|
277 |
||
278 |
temporaries |
|
279 |
"return an array filled with the arguments and variables of this context" |
|
280 |
||
281 |
|n nSkipped| |
|
282 |
||
283 |
"/ the flas-numVars includes the receiver and args |
|
284 |
nSkipped := super numVars "self numArgs + self numVars". |
|
285 |
"/ but my context setup is args+numvars. |
|
286 |
nSkipped := super numArgs + super numVars. |
|
287 |
||
288 |
n := self size - nSkipped. |
|
289 |
n == 0 ifTrue:[ |
|
290 |
"/ little optimization here - avaoid creating empty containers |
|
291 |
^ #() |
|
292 |
]. |
|
293 |
||
294 |
^ (Array new:n) replaceFrom:1 to:n with:self startingAt:nSkipped+1. |
|
295 |
||
296 |
"Created: / 13.1.1998 / 15:44:12 / cg" |
|
297 |
"Modified: / 13.1.1998 / 17:22:54 / cg" |
|
298 |
! |
|
299 |
||
300 |
vars |
|
301 |
"return an array filled with the local variables of this context" |
|
302 |
||
303 |
|nonVars mySize| |
|
304 |
||
305 |
mySize := self numVars. |
|
306 |
mySize == 0 ifTrue:[ |
|
307 |
"/ little optimization here - avaoid creating empty containers |
|
308 |
^ #() |
|
309 |
]. |
|
310 |
nonVars := (self arg1Index-1) + self numArgs. |
|
311 |
^ (Array new:mySize) replaceFrom:1 to:mySize with:self startingAt:nonVars+1 |
|
312 |
||
313 |
"Created: / 13.1.1998 / 16:48:16 / cg" |
|
314 |
! ! |
|
315 |
||
316 |
!JavaContext methodsFor:'accessing'! |
|
317 |
||
1093 | 318 |
acquiredMonitors |
319 |
^acqrMonitors |
|
320 |
||
321 |
"Created: / 08-11-2011 / 12:23:18 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
322 |
! |
|
323 |
||
1096
c543f127c67a
fixed some stupid mistakes, but still not working
hlopkmar
parents:
1095
diff
changeset
|
324 |
acquiredMonitorsDo: aBlock |
1102
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
325 |
acqrMonitors isNil ifTrue: [ ^self ]. |
1097 | 326 |
acqrMonitors copy reverseDo: aBlock. |
1094 | 327 |
|
328 |
"Created: / 08-11-2011 / 15:03:31 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1102
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
329 |
"Modified: / 08-11-2011 / 21:46:07 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1094 | 330 |
! |
331 |
||
1095 | 332 |
addMonitor: mon |
1100 | 333 |
self assert: (acqrMonitors isNil or: [ acqrMonitors isOrderedCollection ]). |
334 |
acqrMonitors ifNil: [ acqrMonitors := Stack new ]. |
|
335 |
acqrMonitors push: mon. |
|
1122 | 336 |
self markForUnwind. |
1093 | 337 |
|
338 |
"Created: / 08-11-2011 / 14:19:21 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1098 | 339 |
"Modified: / 08-11-2011 / 21:40:30 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1122 | 340 |
"Modified: / 17-11-2011 / 19:13:15 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
1093 | 341 |
! |
342 |
||
752 | 343 |
programmingLanguage |
344 |
||
345 |
^JavaLanguage instance |
|
346 |
||
347 |
"Created: / 17-03-2011 / 10:17:45 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
1093 | 348 |
! |
349 |
||
350 |
removeMonitor: mon |
|
1122 | 351 |
| poppedObject | |
1095 | 352 |
acqrMonitors isNil ifTrue: [ |
1100 | 353 |
Logger |
354 |
log: ('removeMonitor: called but no monitors in acqrMonitors (%1)' |
|
355 |
bindWith: self) |
|
356 |
severity: #warn |
|
357 |
facility: #JVM. |
|
358 |
self breakPoint: #mh. |
|
359 |
^ self. |
|
1094 | 360 |
]. |
1100 | 361 |
poppedObject := acqrMonitors top. |
362 |
self assert: (poppedObject == mon). |
|
363 |
acqrMonitors remove: mon |
|
364 |
ifAbsent: [ |
|
365 |
Logger |
|
366 |
log: ('removeMonitor: called but no such monitor in acqrMonitors (%1)' |
|
367 |
bindWith: self) |
|
368 |
severity: #warn |
|
369 |
facility: #JVM. |
|
370 |
self breakPoint: #mh. |
|
371 |
^ self. |
|
1122 | 372 |
]. |
373 |
acqrMonitors isEmpty ifTrue: [self unmarkForUnwind]. |
|
1093 | 374 |
|
375 |
"Created: / 08-11-2011 / 14:19:58 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
|
1098 | 376 |
"Modified: / 08-11-2011 / 21:39:09 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
1122 | 377 |
"Modified: / 17-11-2011 / 19:14:29 / Marcel Hlopko <hlopkmar@fel.cvut.cz>" |
752 | 378 |
! ! |
379 |
||
380 |
!JavaContext methodsFor:'exception handler support'! |
|
381 |
||
382 |
exceptionArg:aJavaException |
|
383 |
exArg := aJavaException. |
|
384 |
||
385 |
"Created: / 7.1.1998 / 21:36:56 / cg" |
|
386 |
! |
|
387 |
||
388 |
exceptionArg:aJavaException pc:newPc |
|
389 |
exArg := aJavaException. |
|
390 |
exPC := newPc. |
|
391 |
||
392 |
"Created: / 7.1.1998 / 21:36:56 / cg" |
|
393 |
! ! |
|
394 |
||
1098 | 395 |
!JavaContext methodsFor:'non local control flow'! |
396 |
||
397 |
unwindAndRestartForJavaException |
|
1102
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
398 |
|
1098 | 399 |
"Called by JavaVM>>throwException: unwinds the stack |
400 |
up to this context and restarts it so an exception handler |
|
401 |
executes" |
|
1102
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
402 |
|
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
403 |
| con wasMarked | |
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
404 |
|
1098 | 405 |
"Each context that has a monitor acquired has |
406 |
and unwind action that release all monitors acquired. |
|
407 |
However, we DONT want my monitors to be released, |
|
408 |
so we temporarily unmark this context for unwind and |
|
409 |
then mark it again, eventually" |
|
1102
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
410 |
|
1098 | 411 |
wasMarked := self isUnwindContext. |
1102
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
412 |
wasMarked ifTrue:[self unmarkForUnwind]. |
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
413 |
self senderIsNil ifFalse:[ |
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
414 |
con := thisContext evaluateUnwindActionsUpTo:self. |
1098 | 415 |
]. |
1102
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
416 |
wasMarked ifTrue:[self markForUnwind]. |
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
417 |
|
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
418 |
"oops, if nil, I am not on the calling chain; |
1098 | 419 |
(bad bad, unwind action have already been performed. |
1102
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
420 |
should we check for this situation first and NOT evaluate |
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
421 |
the unwind actions in this case ?) |
1098 | 422 |
" |
1102
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
423 |
con isNil ifTrue:[ |
1098 | 424 |
" |
425 |
tried to return to a context which is already dead |
|
1102
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
426 |
(i.e. the method/block has already executed a return) |
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
427 |
" |
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
428 |
^ self invalidReturnOrRestartError:#'unwindAndRestart:' with:nil |
1098 | 429 |
]. |
1102
df54d5b34c6b
i broke something important in last commit - quickly reverting back :)
hlopkmar
parents:
1101
diff
changeset
|
430 |
" |
1098 | 431 |
now, that all unwind-actions are done, I can use the |
432 |
low-level restart ... |
|
433 |
" |
|
434 |
^ self restart |
|
435 |
||
436 |
"Created: / 08-11-2011 / 22:00:56 / Jan Vrany <jan.vrany@fit.cvut.cz>" |
|
437 |
! ! |
|
438 |
||
752 | 439 |
!JavaContext methodsFor:'printing & storing'! |
440 |
||
441 |
receiverPrintString |
|
442 |
"return a string describing the receiver of the context" |
|
443 |
||
444 |
|receiverClass receiverClassName newString implementorClass searchClass| |
|
445 |
||
446 |
"/ %{ |
|
447 |
"/ /* |
|
448 |
"/ * special handling for (invalid) free objects. |
|
449 |
"/ * these only appear if some primitiveCode does not correctly use SEND macros, |
|
450 |
"/ * which may lead to sends to free objects. In normal operation, this 'cannot' happen. |
|
451 |
"/ */ |
|
452 |
"/ if (__isNonNilObject(__INST(receiver)) && (__qClass(__INST(receiver))==nil)) { |
|
453 |
"/ receiverClassName = __MKSTRING("FreeObject"); |
|
454 |
"/ } |
|
455 |
"/ %}. |
|
456 |
"/ receiverClassName notNil ifTrue:[^ receiverClassName]. |
|
457 |
||
458 |
receiverClass := receiver class. |
|
459 |
"/ java has no class-methods ... |
|
460 |
receiverClass := receiverClass theNonMetaclass. |
|
461 |
||
462 |
receiverClassName := receiverClass nameInBrowser. |
|
463 |
(receiverClass == SmallInteger) ifTrue:[ |
|
464 |
newString := '(' , receiver printString , ') ' , receiverClassName |
|
465 |
] ifFalse:[ |
|
466 |
newString := receiverClassName |
|
467 |
]. |
|
468 |
||
469 |
" |
|
470 |
kludge to avoid slow search for containing class |
|
471 |
" |
|
472 |
(selector ~~ #doIt and:[selector ~~ #doIt:]) ifTrue:[ |
|
473 |
implementorClass := self methodClass. |
|
474 |
]. |
|
475 |
implementorClass notNil ifTrue: [ |
|
476 |
(implementorClass ~~ receiverClass) ifTrue: [ |
|
477 |
newString := newString , '>>>', |
|
478 |
implementorClass nameInBrowser printString |
|
479 |
] |
|
480 |
] ifFalse:[ |
|
481 |
searchClass := self searchClass. |
|
482 |
searchClass ~~ receiverClass ifTrue:[ |
|
483 |
newString := newString , '>>>' , searchClass nameInBrowser |
|
484 |
]. |
|
485 |
"/ " |
|
486 |
"/ kludge for doIt - these unbound methods are not |
|
487 |
"/ found in the classes methodDictionary |
|
488 |
"/ " |
|
489 |
"/ (selector ~~ #doIt and:[selector ~~ #doIt:]) ifTrue:[ |
|
490 |
"/ newString := newString , '>>>**NONE**' |
|
491 |
"/ ] |
|
492 |
]. |
|
493 |
||
494 |
^ newString |
|
495 |
! ! |
|
496 |
||
497 |
!JavaContext methodsFor:'queries'! |
|
498 |
||
499 |
hasStackToShow |
|
500 |
"private interface to the debugger. |
|
501 |
Smalltalk contexts return false here - other language frames |
|
502 |
(i.e. Java frames) may want to show the evaluation stack" |
|
503 |
||
504 |
^ true |
|
505 |
||
506 |
"Modified: / 13.5.1997 / 16:31:12 / cg" |
|
507 |
"Created: / 7.5.1998 / 01:23:57 / cg" |
|
508 |
! |
|
509 |
||
510 |
isJavaContext |
|
511 |
"return true, if this is a javaContext." |
|
512 |
||
513 |
^ true |
|
514 |
||
515 |
"Created: / 8.5.1998 / 21:23:47 / cg" |
|
516 |
! |
|
517 |
||
518 |
stackFrame |
|
519 |
"private interface to the debugger." |
|
520 |
||
521 |
^ (1 to:self size) collect:[:i | self at:i] |
|
522 |
||
523 |
"Created: / 7.5.1998 / 01:26:19 / cg" |
|
524 |
! ! |
|
525 |
||
526 |
!JavaContext class methodsFor:'documentation'! |
|
527 |
||
528 |
version |
|
1022 | 529 |
^ '$Id$' |
752 | 530 |
! |
531 |
||
532 |
version_SVN |
|
1022 | 533 |
^ '$Id$' |
1093 | 534 |
! ! |