ObjFHandle.st
author Stefan Vogel <sv@exept.de>
Fri, 06 Mar 1998 16:38:37 +0100
changeset 657 0ecf1ff6f6bf
parent 490 621a7283b926
permissions -rw-r--r--
Fix #makeMethod:
Ignore whitespace changes - Everywhere: Within whitespace: At end of lines:
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
     1
"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
     2
 COPYRIGHT (c) 1995 by Claus Gittinger
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
     3
	      All Rights Reserved
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
     4
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
     5
 This software is furnished under a license and may be used
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
     6
 only in accordance with the terms of that license and with the
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
     7
 inclusion of the above copyright notice.   This software may not
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
     8
 be provided or otherwise made available to, or used by, any
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
     9
 other person.  No title to or ownership of the software is
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    10
 hereby transferred.
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    11
"
114
claus
parents:
diff changeset
    12
claus
parents:
diff changeset
    13
Object subclass:#ObjectFileHandle
259
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
    14
	instanceVariableNames:'sysHandle1 sysHandle2 pathName moduleID handleType weakMethodRef
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    15
		weakClassRefs weakFunctionRefs'
259
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
    16
	classVariableNames:''
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
    17
	poolDictionaries:''
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
    18
	category:'System-Compiler'
120
claus
parents: 114
diff changeset
    19
!
claus
parents: 114
diff changeset
    20
368
26e9268bde0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
    21
!ObjectFileHandle class methodsFor:'documentation'!
120
claus
parents: 114
diff changeset
    22
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    23
copyright
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    24
"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    25
 COPYRIGHT (c) 1995 by Claus Gittinger
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    26
	      All Rights Reserved
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    27
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    28
 This software is furnished under a license and may be used
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    29
 only in accordance with the terms of that license and with the
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    30
 inclusion of the above copyright notice.   This software may not
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    31
 be provided or otherwise made available to, or used by, any
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    32
 other person.  No title to or ownership of the software is
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    33
 hereby transferred.
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
    34
"
114
claus
parents:
diff changeset
    35
!
claus
parents:
diff changeset
    36
120
claus
parents: 114
diff changeset
    37
documentation
claus
parents: 114
diff changeset
    38
"
123
claus
parents: 122
diff changeset
    39
    not for public use - used by ObjectFileLoader to keep track of loaded modules,
claus
parents: 122
diff changeset
    40
    associating objectFile names and moduleIDs to classes/methods.
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    41
    This is required to be able to fixup classes, methods and function references
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    42
    when an image is restarted and the dynamic objects are reloaded.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    43
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    44
    [see also:]
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    45
        ExternalFunction
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    46
        ObjectFileLoader
263
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    47
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    48
    [author:]
3b21d0991eff documentation
Claus Gittinger <cg@exept.de>
parents: 259
diff changeset
    49
        Claus Gittinger
120
claus
parents: 114
diff changeset
    50
"
114
claus
parents:
diff changeset
    51
! !
claus
parents:
diff changeset
    52
claus
parents:
diff changeset
    53
!ObjectFileHandle methodsFor:'accessing'!
claus
parents:
diff changeset
    54
122
claus
parents: 120
diff changeset
    55
classes
claus
parents: 120
diff changeset
    56
    "return the classes"
claus
parents: 120
diff changeset
    57
125
Claus Gittinger <cg@exept.de>
parents: 123
diff changeset
    58
    weakClassRefs isNil ifTrue:[^nil].
122
claus
parents: 120
diff changeset
    59
    ^ weakClassRefs asArray 
claus
parents: 120
diff changeset
    60
claus
parents: 120
diff changeset
    61
    "Created: 14.9.1995 / 21:13:13 / claus"
claus
parents: 120
diff changeset
    62
!
claus
parents: 120
diff changeset
    63
claus
parents: 120
diff changeset
    64
classes:aCollectionOfClasses 
claus
parents: 120
diff changeset
    65
    "set the classes collection"
claus
parents: 120
diff changeset
    66
claus
parents: 120
diff changeset
    67
    weakClassRefs := WeakArray withAll:aCollectionOfClasses.
151
7f46f760ba45 automatically unload modules for garbage collected methods/classes
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    68
    weakClassRefs addDependent:self.
122
claus
parents: 120
diff changeset
    69
    handleType := #classLibraryObject 
claus
parents: 120
diff changeset
    70
claus
parents: 120
diff changeset
    71
    "Created: 14.9.1995 / 21:13:13 / claus"
claus
parents: 120
diff changeset
    72
!
claus
parents: 120
diff changeset
    73
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    74
functions
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    75
    "return the functions which were already extracted from the module."
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    76
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    77
    weakFunctionRefs isNil ifTrue:[^nil].
490
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
    78
    ^ weakFunctionRefs asArray select:[:f | f notNil and:[f ~~ 0]]
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    79
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    80
    "Created: 12.7.1996 / 15:33:09 / cg"
490
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
    81
    "Modified: 30.1.1997 / 20:54:54 / cg"
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    82
!
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
    83
120
claus
parents: 114
diff changeset
    84
method
157
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
    85
    "return the method"
120
claus
parents: 114
diff changeset
    86
157
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
    87
    weakMethodRef isNil ifTrue:[^ nil].
120
claus
parents: 114
diff changeset
    88
    ^ weakMethodRef at:1 
claus
parents: 114
diff changeset
    89
claus
parents: 114
diff changeset
    90
    "Created: 14.9.1995 / 21:13:13 / claus"
claus
parents: 114
diff changeset
    91
!
claus
parents: 114
diff changeset
    92
claus
parents: 114
diff changeset
    93
method:something
157
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
    94
    "set the method"
120
claus
parents: 114
diff changeset
    95
claus
parents: 114
diff changeset
    96
    weakMethodRef := WeakArray with:something.
151
7f46f760ba45 automatically unload modules for garbage collected methods/classes
Claus Gittinger <cg@exept.de>
parents: 148
diff changeset
    97
    weakMethodRef addDependent:self.
122
claus
parents: 120
diff changeset
    98
    handleType := #methodObject.
120
claus
parents: 114
diff changeset
    99
claus
parents: 114
diff changeset
   100
    "Created: 14.9.1995 / 21:13:13 / claus"
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   101
!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   102
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   103
moduleID
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   104
    "return moduleID"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   105
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   106
    ^ moduleID
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   107
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   108
    "Created: 14.9.1995 / 21:13:12 / claus"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   109
!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   110
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   111
moduleID:something
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   112
    "set moduleID"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   113
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   114
    moduleID := something.
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   115
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   116
    "Created: 14.9.1995 / 21:13:12 / claus"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   117
!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   118
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   119
pathName
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   120
    "return pathName"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   121
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   122
    ^ pathName
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   123
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   124
    "Created: 14.9.1995 / 21:13:12 / claus"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   125
!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   126
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   127
pathName:something
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   128
    "set pathName"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   129
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   130
    pathName := something.
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   131
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   132
    "Created: 14.9.1995 / 21:13:12 / claus"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   133
!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   134
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   135
sysHandle1
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   136
    "return sysHandle1"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   137
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   138
    ^ sysHandle1
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   139
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   140
    "Created: 14.9.1995 / 21:13:12 / claus"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   141
!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   142
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   143
sysHandle1:something
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   144
    "set sysHandle1"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   145
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   146
    sysHandle1 := something.
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   147
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   148
    "Created: 14.9.1995 / 21:13:12 / claus"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   149
!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   150
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   151
sysHandle2
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   152
    "return sysHandle2"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   153
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   154
    ^ sysHandle2
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   155
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   156
    "Created: 14.9.1995 / 21:13:12 / claus"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   157
!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   158
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   159
sysHandle2:something
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   160
    "set sysHandle2"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   161
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   162
    sysHandle2 := something.
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   163
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   164
    "Created: 14.9.1995 / 21:13:12 / claus"
114
claus
parents:
diff changeset
   165
! !
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   166
259
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   167
!ObjectFileHandle methodsFor:'change & update'!
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   168
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   169
update:something with:aParameter from:changedObject
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   170
    "my method/class object was collected - unload the underlying objectfile"
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   171
490
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   172
    changedObject == weakMethodRef ifTrue:[
474
bf2345df4093 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 388
diff changeset
   173
        weakMethodRef nilAllCorpsesAndDo:[:idx |].
367
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   174
    ].
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   175
490
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   176
    changedObject == weakClassRefs ifTrue:[
474
bf2345df4093 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 388
diff changeset
   177
        weakClassRefs nilAllCorpsesAndDo:[:idx |].
367
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   178
    ].
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   179
259
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   180
    self isObsolete ifTrue:[
490
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   181
        weakFunctionRefs notNil ifTrue:[
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   182
            weakFunctionRefs removeDependent:self.
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   183
            weakFunctionRefs := nil.
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   184
        ].
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   185
        weakClassRefs notNil ifTrue:[
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   186
            weakClassRefs removeDependent:self.
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   187
            weakClassRefs := nil.
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   188
        ].
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   189
        weakMethodRef notNil ifTrue:[
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   190
            weakMethodRef removeDependent:self.
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   191
            weakMethodRef := nil.
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   192
        ].
474
bf2345df4093 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 388
diff changeset
   193
        ('ObjectFileHandle [info]: unloading ' , pathName , '  (method/classes were garbageCollected)') infoPrintCR.
bf2345df4093 new infoMessage scheme
Claus Gittinger <cg@exept.de>
parents: 388
diff changeset
   194
        ObjectFileLoader unloadObjectFile:pathName
259
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   195
    ].
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   196
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   197
    "Created: 5.12.1995 / 18:05:08 / cg"
490
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   198
    "Modified: 30.1.1997 / 20:57:56 / cg"
259
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   199
! !
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   200
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   201
!ObjectFileHandle methodsFor:'copying'!
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   202
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   203
postCopy
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   204
    "flush module handles of the copy"
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   205
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   206
    sysHandle1 := sysHandle2 := moduleID := nil
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   207
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   208
    "Created: 5.12.1995 / 21:10:49 / cg"
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   209
    "Modified: 25.4.1996 / 09:43:53 / cg"
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   210
! !
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   211
157
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   212
!ObjectFileHandle methodsFor:'printing'!
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   213
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   214
printOn:aStream
259
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   215
    "append a printed representation of the receiver to aStream"
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   216
157
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   217
    aStream nextPutAll:self class name; nextPutAll:'(handle=<'. 
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   218
    sysHandle1 printOn:aStream. 
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   219
    aStream nextPutAll:' '. 
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   220
    sysHandle2 printOn:aStream. 
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   221
    aStream nextPutAll:'> path='''. 
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   222
    pathName printOn:aStream. 
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   223
    aStream nextPutAll:''' id='. 
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   224
    moduleID printOn:aStream. 
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   225
    aStream nextPutAll:' type='. 
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   226
    handleType printOn:aStream.
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   227
    aStream nextPutAll:' method=<'.
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   228
    self method printOn:aStream.
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   229
    aStream nextPutAll:'> classes=<'.
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   230
    self classes printOn:aStream.
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   231
    aStream nextPutAll:'>'.
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   232
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   233
    aStream nextPutAll:')'.
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   234
259
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   235
    "Modified: 25.4.1996 / 09:44:08 / cg"
157
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   236
! !
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   237
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   238
!ObjectFileHandle methodsFor:'queries'!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   239
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   240
getFunction:aString
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   241
    "return a function object for an entry in the module represented by
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   242
     the receiver."
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   243
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   244
    |address f slot sz nW|
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   245
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   246
    address := ObjectFileLoader getFunction:aString from:self.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   247
    address isNil ifTrue:[
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   248
        ^ nil
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   249
    ].
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   250
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   251
    weakFunctionRefs isNil ifTrue:[
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   252
        handleType := #functionObject.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   253
        f := ExternalFunction basicNew code:address.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   254
        f setName:aString moduleHandle:self.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   255
        weakFunctionRefs := WeakArray with:f.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   256
        ^ f.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   257
    ].
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   258
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   259
    weakFunctionRefs nonNilElementsDo:[:anExternalFunction |
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   260
        anExternalFunction code = address ifTrue:[
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   261
            ^ anExternalFunction
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   262
        ]
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   263
    ].
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   264
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   265
    f := ExternalFunction basicNew code:address.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   266
    f setName:aString moduleHandle:self.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   267
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   268
    slot := weakFunctionRefs identityIndexOf:nil.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   269
    slot ~~ 0 ifTrue:[
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   270
        weakFunctionRefs at:slot put:f.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   271
        ^ f.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   272
    ].
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   273
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   274
    sz := weakFunctionRefs size.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   275
    nW := WeakArray new:(sz + 2).
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   276
    nW replaceFrom:1 to:sz with:weakFunctionRefs startingAt:1.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   277
    nW at:sz+1 put:f.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   278
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   279
    weakFunctionRefs := nW.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   280
    ^ f
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   281
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   282
    "Created: 12.7.1996 / 14:59:09 / cg"
368
26e9268bde0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   283
    "Modified: 18.10.1996 / 20:59:54 / cg"
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   284
!
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   285
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   286
hasUndefinedSymbols
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   287
    "return true, if the module has any undefined symbols.
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   288
     The only system, which allows modules with undefined symbols to be
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   289
     loaded is (currently) the linux a.out version."
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   290
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   291
    ^ ObjectFileLoader hasUndefinedSymbolsIn:self
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   292
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   293
    "Created: 12.7.1996 / 14:59:09 / cg"
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   294
!
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   295
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   296
isClassLibHandle
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   297
    "return true, if I am a handle for a class library"
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   298
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   299
    ^ handleType == #classLibraryObject 
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   300
!
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   301
157
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   302
isForCollectedObject
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   303
    "return true, if my clases/method has already been garbage collected"
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   304
367
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   305
    |ref|
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   306
157
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   307
    handleType == #classLibraryObject ifTrue:[
367
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   308
        ^ (weakClassRefs findFirst:[:x | x notNil and:[x ~~ 0]]) == 0
157
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   309
    ].
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   310
    handleType == #methodObject ifTrue:[
367
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   311
	ref := weakMethodRef at:1.
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   312
        ^ ref isNil or:[ref == 0]
157
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   313
    ].
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   314
    handleType == #functionObject ifTrue:[
367
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   315
        ^ (weakFunctionRefs findFirst:[:x | x notNil and:[x ~~ 0]]) == 0
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   316
    ].
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   317
157
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   318
    ^ false
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   319
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   320
    "Created: 6.12.1995 / 17:46:58 / cg"
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   321
    "Modified: 12.7.1996 / 15:42:38 / cg"
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   322
!
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   323
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   324
isFunctionObjectHandle
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   325
    "return true, if I am a handle for a c-code (or other) function object file"
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   326
304
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   327
    ^ handleType == #functionObject
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   328
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   329
    "Created: 12.7.1996 / 15:35:33 / cg"
304
Claus Gittinger <cg@exept.de>
parents: 302
diff changeset
   330
    "Modified: 12.7.1996 / 17:25:31 / cg"
157
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   331
!
d7f68808a258 reload objects in the previous order
Claus Gittinger <cg@exept.de>
parents: 154
diff changeset
   332
259
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   333
isMethodHandle
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   334
    "return true, if I am a handle for a single compiled method"
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   335
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   336
    ^ handleType == #methodObject
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   337
!
a469695d8d19 commentary
Claus Gittinger <cg@exept.de>
parents: 157
diff changeset
   338
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   339
isObsolete
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   340
    "return true, if my clases/method has already been removed from
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   341
     the image. I.e. if the object file can be unloaded without danger."
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   342
367
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   343
    |ref|
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   344
154
04716b86ad29 reloading compiled methods
Claus Gittinger <cg@exept.de>
parents: 152
diff changeset
   345
    moduleID notNil ifTrue:[
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   346
        handleType == #classLibraryObject ifTrue:[
367
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   347
            ^ (weakClassRefs findFirst:[:x | x notNil and:[x ~~ 0]]) == 0
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   348
        ].
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   349
        handleType == #methodObject ifTrue:[
367
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   350
	    ref := weakMethodRef at:1.
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   351
            ^ (ref isNil or:[ref == 0])
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   352
        ].
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   353
        handleType == #functionObject ifTrue:[
367
87d4673fbd06 changed WeakArray to set emptied slots to zero
Claus Gittinger <cg@exept.de>
parents: 304
diff changeset
   354
            ^ (weakFunctionRefs findFirst:[:x | x notNil and:[x ~~ 0]]) == 0
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   355
        ].
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   356
    ].
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   357
    ^ false
299
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   358
33a154508328 additional support for non-ST object files (function modules)
Claus Gittinger <cg@exept.de>
parents: 263
diff changeset
   359
    "Modified: 12.7.1996 / 15:42:21 / cg"
141
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   360
! !
d378d997aab0 checkin from browser
Claus Gittinger <cg@exept.de>
parents: 135
diff changeset
   361
368
26e9268bde0f checkin from browser
Claus Gittinger <cg@exept.de>
parents: 367
diff changeset
   362
!ObjectFileHandle class methodsFor:'documentation'!
148
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   363
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   364
version
490
621a7283b926 oops - changeArg is #ElementExpired; changedObject is the one we have to
Claus Gittinger <cg@exept.de>
parents: 474
diff changeset
   365
    ^ '$Header: /cvs/stx/stx/libcomp/Attic/ObjFHandle.st,v 1.22 1997-01-30 20:00:59 cg Exp $'
148
ef0e604209ec version method at the end
Claus Gittinger <cg@exept.de>
parents: 141
diff changeset
   366
! !