--- a/JavaContext.st Fri Oct 09 16:25:28 2009 +0200
+++ b/JavaContext.st Tue Apr 13 13:26:06 2010 +0200
@@ -15,7 +15,7 @@
"{ Package: 'stx:libjava' }"
Context variableSubclass:#JavaContext
- instanceVariableNames:'exArg exPC byteCode constPool method'
+ instanceVariableNames:'exArg exPC byteCode constPool'
classVariableNames:''
poolDictionaries:''
category:'Languages-Java-Support'
@@ -114,7 +114,7 @@
nr notNil ifTrue:[
^ nr
].
- " '-> 0 [a]' printCR. "
+ " '-> 0 [a]' printCR. "
^0
].
@@ -124,7 +124,7 @@
nr notNil ifTrue:[
^ nr
].
- " '-> 0 [b]' printCR. "
+ " '-> 0 [b]' printCR. "
^ 0
].
"/ '-> ' print. nr printCR.
@@ -263,7 +263,7 @@
"Modified: / 13.1.1998 / 17:22:54 / cg"
!
-vars
+vars
"return an array filled with the local variables of this context"
|nonVars mySize|
@@ -300,11 +300,12 @@
from the beginning (when the context is restarted).
- a highly internal mechanism and not for public use."
- flags := flags bitOr:16r08000000.
-
-"/ %{ /* NOCONTEXT */
-"/ __INST(flags) = (OBJ)((INT)__INST(flags) | __MASKSMALLINT(__JAVA_EX_PEND));
-"/ %}
+%{ /* NOCONTEXT */
+#ifdef __JAVA_EX_PEND
+ /* actually no longer - only a non-nil exPC is now used as marker */
+ __INST(flags) = (OBJ)((INT)__INST(flags) | __MASKSMALLINT(__JAVA_EX_PEND));
+#endif
+%}
"Modified: 13.12.1995 / 19:05:22 / cg"
! !
@@ -312,7 +313,7 @@
!JavaContext methodsFor:'printing & storing'!
receiverPrintString
- "return a string describing the receiver of the context"
+ "return a string describing the receiver of the context"
|receiverClass receiverClassName newString implementorClass searchClass|
@@ -321,7 +322,7 @@
"/ * special handling for (invalid) free objects.
"/ * these only appear if some primitiveCode does not correctly use SEND macros,
"/ * which may lead to sends to free objects. In normal operation, this 'cannot' happen.
-"/ */
+"/ */
"/ if (__isNonNilObject(__INST(receiver)) && (__qClass(__INST(receiver))==nil)) {
"/ receiverClassName = __MKSTRING("FreeObject");
"/ }
@@ -334,27 +335,27 @@
receiverClassName := receiverClass nameInBrowser.
(receiverClass == SmallInteger) ifTrue:[
- newString := '(' , receiver printString , ') ' , receiverClassName
+ newString := '(' , receiver printString , ') ' , receiverClassName
] ifFalse:[
- newString := receiverClassName
+ newString := receiverClassName
].
"
kludge to avoid slow search for containing class
"
(selector ~~ #doIt and:[selector ~~ #doIt:]) ifTrue:[
- implementorClass := self methodClass.
+ implementorClass := self methodClass.
].
implementorClass notNil ifTrue: [
- (implementorClass ~~ receiverClass) ifTrue: [
- newString := newString , '>>>',
- implementorClass nameInBrowser printString
- ]
+ (implementorClass ~~ receiverClass) ifTrue: [
+ newString := newString , '>>>',
+ implementorClass nameInBrowser printString
+ ]
] ifFalse:[
- searchClass := self searchClass.
- searchClass ~~ receiverClass ifTrue:[
- newString := newString , '>>>' , searchClass nameInBrowser
- ].
+ searchClass := self searchClass.
+ searchClass ~~ receiverClass ifTrue:[
+ newString := newString , '>>>' , searchClass nameInBrowser
+ ].
"/ "
"/ kludge for doIt - these unbound methods are not
"/ found in the classes methodDictionary
@@ -399,5 +400,5 @@
!JavaContext class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libjava/JavaContext.st,v 1.34 2002-11-22 20:12:40 cg Exp $'
+ ^ '$Header: /cvs/stx/stx/libjava/JavaContext.st,v 1.35 2010-04-13 11:26:06 cg Exp $'
! !