author | Claus Gittinger <cg@exept.de> |
Tue, 09 Nov 1999 18:01:02 +0100 | |
changeset 4977 | 17a819360ad5 |
parent 3932 | bbfde2a0eef1 |
child 5284 | 37c436edfa71 |
permissions | -rw-r--r-- |
84 | 1 |
" |
2 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
159 | 3 |
All Rights Reserved |
84 | 4 |
|
5 |
This software is furnished under a license and may be used |
|
6 |
only in accordance with the terms of that license and with the |
|
7 |
inclusion of the above copyright notice. This software may not |
|
8 |
be provided or otherwise made available to, or used by, any |
|
9 |
other person. No title to or ownership of the software is |
|
10 |
hereby transferred. |
|
11 |
" |
|
12 |
||
13 |
Object subclass:#ExecutableFunction |
|
1180
7f4a68385ac7
only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents:
1133
diff
changeset
|
14 |
instanceVariableNames:'code*' |
7f4a68385ac7
only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents:
1133
diff
changeset
|
15 |
classVariableNames:'ExecutionErrorSignal InvalidCodeSignal' |
7f4a68385ac7
only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents:
1133
diff
changeset
|
16 |
poolDictionaries:'' |
7f4a68385ac7
only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents:
1133
diff
changeset
|
17 |
category:'Kernel-Methods' |
84 | 18 |
! |
19 |
||
20 |
!ExecutableFunction class methodsFor:'documentation'! |
|
21 |
||
88 | 22 |
copyright |
23 |
" |
|
24 |
COPYRIGHT (c) 1994 by Claus Gittinger |
|
159 | 25 |
All Rights Reserved |
88 | 26 |
|
27 |
This software is furnished under a license and may be used |
|
28 |
only in accordance with the terms of that license and with the |
|
29 |
inclusion of the above copyright notice. This software may not |
|
30 |
be provided or otherwise made available to, or used by, any |
|
31 |
other person. No title to or ownership of the software is |
|
32 |
hereby transferred. |
|
33 |
" |
|
34 |
! |
|
35 |
||
84 | 36 |
documentation |
37 |
" |
|
88 | 38 |
This is an abstract class, to merge common attributes of all kinds of |
357 | 39 |
executable code objects; i.e. non-ST functions, Blocks and Methods |
40 |
and whatever there might be in the future. |
|
84 | 41 |
|
2244 | 42 |
Instances of ExecutableCode are not meant to be created by user code - |
1254 | 43 |
the compilers create instances of Method & Block, while compiling. |
2244 | 44 |
(the VM would not even know what to do with such an instance, and triggered |
45 |
and exception, if ever encountered during block/method execution). |
|
46 |
||
1254 | 47 |
|
1669 | 48 |
NOTICE: layout known by runtime system and compiler - do not change |
49 |
||
1254 | 50 |
|
1293 | 51 |
[Instance variables:] |
225 | 52 |
code <not_an_object> the function pointer to the machine code. |
1254 | 53 |
Not accessable from smalltalk code. |
54 |
(notice the '*' in the instVarNames definition) |
|
225 | 55 |
|
56 |
||
1293 | 57 |
[Class variables:] |
225 | 58 |
ExecutionErrorSignal parent of all execution errors |
1254 | 59 |
(not raised itself) |
225 | 60 |
|
61 |
InvalidCodeSignal codeObject is not executable |
|
84 | 62 |
|
1293 | 63 |
|
64 |
[author:] |
|
65 |
Claus Gittinger |
|
84 | 66 |
" |
67 |
! ! |
|
68 |
||
107 | 69 |
!ExecutableFunction class methodsFor:'initialization'! |
70 |
||
71 |
initialize |
|
1254 | 72 |
"create signals raised by various errors" |
73 |
||
107 | 74 |
InvalidCodeSignal isNil ifTrue:[ |
1254 | 75 |
ExecutionErrorSignal := ErrorSignal newSignalMayProceed:true. |
76 |
ExecutionErrorSignal nameClass:self message:#executionErrorSignal. |
|
77 |
ExecutionErrorSignal notifierString:'execution error'. |
|
159 | 78 |
|
1254 | 79 |
InvalidCodeSignal := ExecutionErrorSignal newSignalMayProceed:true. |
80 |
InvalidCodeSignal nameClass:self message:#invalidCodeSignal. |
|
81 |
InvalidCodeSignal notifierString:'invalid code-object - not executable'. |
|
107 | 82 |
] |
1254 | 83 |
|
84 |
"Modified: 22.4.1996 / 16:34:13 / cg" |
|
107 | 85 |
! ! |
86 |
||
345 | 87 |
!ExecutableFunction class methodsFor:'Signal constants'! |
159 | 88 |
|
89 |
executionErrorSignal |
|
90 |
"return the parent-signal of all execution errors" |
|
91 |
||
92 |
^ ExecutionErrorSignal |
|
93 |
! ! |
|
94 |
||
623 | 95 |
!ExecutableFunction class methodsFor:'queries'! |
84 | 96 |
|
623 | 97 |
isBuiltInClass |
1264 | 98 |
"return true if this class is known by the run-time-system. |
99 |
Here, true is returned for myself, false for subclasses." |
|
84 | 100 |
|
2244 | 101 |
^ self == ExecutableFunction |
1180
7f4a68385ac7
only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents:
1133
diff
changeset
|
102 |
|
2244 | 103 |
"Modified: 23.1.1997 / 13:47:58 / cg" |
623 | 104 |
! ! |
84 | 105 |
|
623 | 106 |
!ExecutableFunction methodsFor:'accessing'! |
84 | 107 |
|
108 |
code |
|
109 |
"return the code field. This is not an object but the address of the machine instructions. |
|
110 |
Therefore an integer representing the code-address is returned" |
|
111 |
||
112 |
%{ /* NOCONTEXT */ |
|
2870 | 113 |
unsigned INT addr; |
84 | 114 |
|
1133 | 115 |
if (__INST(code_) != nil) { |
3421
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
116 |
|
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
117 |
RETURN (__MKEXTERNALADDRESS(__INST(code_))); |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
118 |
#ifdef OLD |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
119 |
addr = (unsigned INT)__INST(code_); |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
120 |
if (addr <= _MAX_INT) { |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
121 |
RETURN ( __MKSMALLINT(addr) ); |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
122 |
} |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
123 |
RETURN ( __MKUINT(addr)); |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
124 |
#endif |
84 | 125 |
} |
328 | 126 |
%}. |
84 | 127 |
^ nil |
623 | 128 |
! |
129 |
||
130 |
instVarAt:index |
|
131 |
"have to catch instVar access to code - since its no object" |
|
132 |
||
133 |
(index == 1) ifTrue:[^ self code]. |
|
134 |
^ super instVarAt:index |
|
135 |
! |
|
136 |
||
137 |
instVarAt:index put:value |
|
138 |
"have to catch instVar access to code - since its no object" |
|
139 |
||
140 |
(index == 1) ifTrue:[^ self code:value]. |
|
141 |
^ super instVarAt:index put:value |
|
84 | 142 |
! ! |
143 |
||
623 | 144 |
!ExecutableFunction methodsFor:'binary storage'! |
84 | 145 |
|
623 | 146 |
readBinaryContentsFrom: stream manager: manager |
147 |
"make certain, that no invalid function addresses are created." |
|
84 | 148 |
|
623 | 149 |
super readBinaryContentsFrom: stream manager: manager. |
150 |
self code:nil. |
|
84 | 151 |
! ! |
152 |
||
153 |
!ExecutableFunction methodsFor:'error handling'! |
|
154 |
||
155 |
invalidCode |
|
1871 | 156 |
"{ Pragma: +optSpace }" |
157 |
||
84 | 158 |
"this error is triggered by the interpreter when something is wrong |
107 | 159 |
with the code object (any error not handled by Method-signals). |
84 | 160 |
In this case, the VM sends this to the bad method/block (the receiver). |
161 |
Can only happen when the Compiler/runtime system is broken or |
|
162 |
someone played around." |
|
163 |
||
131 | 164 |
^ InvalidCodeSignal raise. |
1871 | 165 |
|
166 |
"Modified: 4.11.1996 / 22:47:21 / cg" |
|
84 | 167 |
! ! |
168 |
||
357 | 169 |
!ExecutableFunction methodsFor:'printing & storing'! |
170 |
||
171 |
printOn:aStream |
|
1254 | 172 |
"append a printed representation of the receiver to aStream" |
173 |
||
357 | 174 |
|addr| |
175 |
||
176 |
addr := self code. |
|
177 |
addr isNil ifTrue:[^ super printOn:aStream]. |
|
178 |
||
3193 | 179 |
aStream nextPutAll:self class name; nextPutAll:'(address: 0x'. |
180 |
addr printOn:aStream base:16. |
|
181 |
aStream nextPut:$) |
|
1254 | 182 |
|
3193 | 183 |
"Modified: / 22.4.1996 / 16:36:05 / cg" |
184 |
"Modified: / 20.1.1998 / 14:10:46 / stefan" |
|
1195
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
185 |
! |
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
186 |
|
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
187 |
printStringForBrowserWithSelector:selector |
1254 | 188 |
"return a printString to represent myself to the user in a browser." |
1195
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
189 |
|
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
190 |
^ selector |
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
191 |
|
1254 | 192 |
"Modified: 22.4.1996 / 16:36:18 / cg" |
357 | 193 |
! ! |
194 |
||
623 | 195 |
!ExecutableFunction methodsFor:'private accessing'! |
196 |
||
197 |
code:anAddress |
|
198 |
"set the code field - DANGER ALERT. |
|
199 |
This is not an object but the address of the machine instructions. |
|
200 |
Therefore the argument must be an integer representing this address. |
|
201 |
You can crash Smalltalk very badly when playing around here ... |
|
202 |
This method is for compiler support and very special cases (debugging) only |
|
203 |
- do not use" |
|
84 | 204 |
|
623 | 205 |
%{ /* NOCONTEXT */ |
84 | 206 |
|
3421
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
207 |
if (__isExternalAddress(anAddress)) { |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
208 |
__INST(code_) = (OBJ)(__externalAddressVal(anAddress)); |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
209 |
} else { |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
210 |
if (__isSmallInteger(anAddress)) |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
211 |
__INST(code_) = (OBJ)(__intVal(anAddress)); |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
212 |
else { |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
213 |
if (anAddress == nil) { |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
214 |
__INST(code_) = nil; |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
215 |
} else { |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
216 |
__INST(code_) = (OBJ)(__longIntVal(anAddress)); |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
217 |
} |
78a276e71115
present code as an external function (for security & style)
Claus Gittinger <cg@exept.de>
parents:
3193
diff
changeset
|
218 |
} |
623 | 219 |
} |
220 |
%} |
|
84 | 221 |
! ! |
623 | 222 |
|
1190
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
223 |
!ExecutableFunction methodsFor:'queries'! |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
224 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
225 |
category |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
226 |
"return the category of this codeObject. |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
227 |
Return nil here, to alow alien codeObjects to be handled by the |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
228 |
browsers." |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
229 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
230 |
^ nil |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
231 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
232 |
"Created: 16.4.1996 / 16:31:15 / cg" |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
233 |
! |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
234 |
|
3932 | 235 |
hasCode |
236 |
"return true, if this codeObject has code to execute." |
|
237 |
%{ |
|
238 |
if (__INST(code_)) { |
|
239 |
RETURN (true); |
|
240 |
} |
|
241 |
RETURN (false); |
|
242 |
%} |
|
243 |
||
244 |
"Created: / 13.11.1998 / 23:13:29 / cg" |
|
245 |
! |
|
246 |
||
2532
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
247 |
isBreakpointed |
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
248 |
"return true, if this is a wrapper method for a breakpoint. |
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
249 |
False is returned here - this method is redefined in WrappedMethod" |
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
250 |
|
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
251 |
^ false |
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
252 |
|
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
253 |
"Created: 7.4.1997 / 17:24:40 / cg" |
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
254 |
! |
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
255 |
|
1195
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
256 |
isExecutable |
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
257 |
"return true, if this codeObject is executable." |
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
258 |
|
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
259 |
self isInvalid ifTrue:[^ false]. |
3932 | 260 |
^ self hasCode |
1195
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
261 |
|
3932 | 262 |
"Created: / 16.4.1996 / 20:13:32 / cg" |
263 |
"Modified: / 13.11.1998 / 23:16:32 / cg" |
|
1195
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
264 |
! |
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
265 |
|
1190
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
266 |
isInvalid |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
267 |
"return true, if this codeObject is invalidated. |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
268 |
Return false here, to alow alien codeObjects to be handled by the |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
269 |
browsers." |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
270 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
271 |
^ false |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
272 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
273 |
"Created: 16.4.1996 / 16:31:42 / cg" |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
274 |
! |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
275 |
|
3924 | 276 |
isJavaMethod |
277 |
^ false |
|
278 |
||
279 |
"Created: / 10.11.1998 / 18:26:44 / cg" |
|
280 |
! |
|
281 |
||
1190
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
282 |
isLazyMethod |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
283 |
"return true, if this is a lazy method. |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
284 |
False is returned here - this method is redefined in LazyMethod" |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
285 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
286 |
^ false |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
287 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
288 |
"Created: 16.4.1996 / 16:32:11 / cg" |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
289 |
"Modified: 16.4.1996 / 16:32:36 / cg" |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
290 |
! |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
291 |
|
2536 | 292 |
isTimed |
293 |
"return true, if this is a wrapper method for a time measurement. |
|
294 |
False is returned here - this method is redefined in WrappedMethod" |
|
295 |
||
296 |
^ false |
|
297 |
||
298 |
"Created: 11.4.1997 / 17:06:32 / cg" |
|
299 |
! |
|
300 |
||
2532
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
301 |
isTraced |
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
302 |
"return true, if this is a wrapper method for a trace point. |
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
303 |
False is returned here - this method is redefined in WrappedMethod" |
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
304 |
|
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
305 |
^ false |
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
306 |
|
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
307 |
"Created: 7.4.1997 / 17:24:50 / cg" |
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
308 |
! |
e555281237f1
moved isBreakPointed / isTrapped queries into method
Claus Gittinger <cg@exept.de>
parents:
2244
diff
changeset
|
309 |
|
1195
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
310 |
isUnloaded |
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
311 |
"return true, if the objects machine code has been unloaded |
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
312 |
from the system (i.e. it is not executable)." |
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
313 |
|
3932 | 314 |
^ self hasCode not |
1195
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
315 |
|
3932 | 316 |
"Created: / 16.4.1996 / 20:15:52 / cg" |
317 |
"Modified: / 13.11.1998 / 23:19:52 / cg" |
|
1195
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
318 |
! |
618e2cf3fb56
moved some protocol to upper levels; generalized queries
Claus Gittinger <cg@exept.de>
parents:
1190
diff
changeset
|
319 |
|
1190
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
320 |
isWrapped |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
321 |
"return true, if this is a wrapper method. |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
322 |
False is returned here - this method is redefined in WrappedMethod" |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
323 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
324 |
^ false |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
325 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
326 |
"Created: 16.4.1996 / 16:33:24 / cg" |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
327 |
! |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
328 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
329 |
privacy |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
330 |
"return a symbol describing the methods access rights (privacy); |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
331 |
Currently, this is one of #private, #protected, #public or #ignored. |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
332 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
333 |
Here we unconditionally return #public, to allow alien code objects |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
334 |
to be handled by the browsers." |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
335 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
336 |
^ #public |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
337 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
338 |
"Created: 16.4.1996 / 16:35:18 / cg" |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
339 |
! |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
340 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
341 |
referencesGlobal:aGlobalSymbol |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
342 |
"return true, if this method references the global |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
343 |
bound to aGlobalSymbol. |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
344 |
Return false (we dont know) here, to allow alien code objects to be |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
345 |
handled by the browsers." |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
346 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
347 |
^ false |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
348 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
349 |
"Created: 16.4.1996 / 16:37:48 / cg" |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
350 |
! |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
351 |
|
4977 | 352 |
referencesGlobalMatching:aMatchPattern |
353 |
"return true, if this method references a global |
|
354 |
whose name matches aMatchPattern. |
|
355 |
Return false (we dont know) here, to allow alien code objects to be |
|
356 |
handled by the browsers." |
|
357 |
||
358 |
^ false |
|
359 |
||
360 |
"Created: / 9.11.1999 / 16:58:48 / cg" |
|
361 |
! |
|
362 |
||
1190
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
363 |
sends:aSelectorSymbol |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
364 |
"return true, if this method contains a message-send |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
365 |
with aSelectorSymbol as selector. |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
366 |
- due to the simple check in the literal array, also simple uses |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
367 |
of aSelectorSymbol as symbol will return true. |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
368 |
Should ask compiler, if there is really a send." |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
369 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
370 |
^ self referencesGlobal:aSelectorSymbol |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
371 |
|
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
372 |
"Created: 16.4.1996 / 16:35:53 / cg" |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
373 |
! ! |
4ad1c8d6d94d
moved & added some query methods (from method) to upper abstract classes
Claus Gittinger <cg@exept.de>
parents:
1180
diff
changeset
|
374 |
|
1180
7f4a68385ac7
only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents:
1133
diff
changeset
|
375 |
!ExecutableFunction class methodsFor:'documentation'! |
7f4a68385ac7
only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents:
1133
diff
changeset
|
376 |
|
7f4a68385ac7
only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents:
1133
diff
changeset
|
377 |
version |
4977 | 378 |
^ '$Header: /cvs/stx/stx/libbasic/ExecutableFunction.st,v 1.39 1999-11-09 17:01:02 cg Exp $' |
1180
7f4a68385ac7
only ExecutableFunction is fixed - subclasses may look different
Claus Gittinger <cg@exept.de>
parents:
1133
diff
changeset
|
379 |
! ! |
623 | 380 |
ExecutableFunction initialize! |