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