--- a/ObjectFileHandle.st Tue Jul 17 11:34:23 2012 +0200
+++ b/ObjectFileHandle.st Tue Jul 17 13:49:41 2012 +0200
@@ -414,29 +414,6 @@
^ handleType == #classLibraryObject
!
-isForCollectedObject
- "return true, if my clases/method has already been garbage collected"
-
- |ref|
-
- handleType == #classLibraryObject ifTrue:[
- ^ (weakClassRefs findFirst:[:x | x notNil and:[x ~~ 0]]) == 0
- ].
- handleType == #methodObject ifTrue:[
- weakMethodRef isNil ifTrue:[^ true].
- ref := weakMethodRef at:1.
- ^ ref isNil or:[ref == 0]
- ].
- handleType == #functionObject ifTrue:[
- ^ (weakFunctionRefs findFirst:[:x | x notNil and:[x ~~ 0]]) == 0
- ].
-
- ^ false
-
- "Created: 6.12.1995 / 17:46:58 / cg"
- "Modified: 12.7.1996 / 15:42:38 / cg"
-!
-
isFunctionObjectHandle
"return true, if I am a handle for a c-code (or other) function object file"
@@ -460,14 +437,15 @@
moduleID notNil ifTrue:[
handleType == #classLibraryObject ifTrue:[
- ^ (weakClassRefs findFirst:[:x | x notNil and:[x ~~ 0]]) == 0
+ ^ weakClassRefs isNil or:[(weakClassRefs findFirst:[:x | x notNil and:[x ~~ 0]]) == 0]
].
handleType == #methodObject ifTrue:[
- ref := weakMethodRef at:1.
- ^ (ref isNil or:[ref == 0])
+ weakMethodRef isNil ifTrue:[^ true].
+ ref := weakMethodRef at:1.
+ ^ ref isNil or:[ref == 0]
].
handleType == #functionObject ifTrue:[
- ^ (weakFunctionRefs findFirst:[:x | x notNil and:[x ~~ 0]]) == 0
+ ^ weakFunctionRefs isNil or:[(weakFunctionRefs findFirst:[:x | x notNil and:[x ~~ 0]]) == 0]
].
].
^ false
@@ -511,9 +489,9 @@
!ObjectFileHandle class methodsFor:'documentation'!
version
- ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileHandle.st,v 1.39 2010-05-12 10:51:47 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileHandle.st,v 1.40 2012-07-17 11:49:41 stefan Exp $'
!
version_CVS
- ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileHandle.st,v 1.39 2010-05-12 10:51:47 stefan Exp $'
+ ^ '$Header: /cvs/stx/stx/libcomp/ObjectFileHandle.st,v 1.40 2012-07-17 11:49:41 stefan Exp $'
! !