equal
deleted
inserted
replaced
19 |
19 |
20 Method comment:' |
20 Method comment:' |
21 COPYRIGHT (c) 1989 by Claus Gittinger |
21 COPYRIGHT (c) 1989 by Claus Gittinger |
22 All Rights Reserved |
22 All Rights Reserved |
23 |
23 |
24 $Header: /cvs/stx/stx/libbasic/Method.st,v 1.20 1994-10-28 01:25:18 claus Exp $ |
24 $Header: /cvs/stx/stx/libbasic/Method.st,v 1.21 1994-10-28 03:06:36 claus Exp $ |
25 '! |
25 '! |
26 |
26 |
27 !Method class methodsFor:'documentation'! |
27 !Method class methodsFor:'documentation'! |
28 |
28 |
29 copyright |
29 copyright |
40 " |
40 " |
41 ! |
41 ! |
42 |
42 |
43 version |
43 version |
44 " |
44 " |
45 $Header: /cvs/stx/stx/libbasic/Method.st,v 1.20 1994-10-28 01:25:18 claus Exp $ |
45 $Header: /cvs/stx/stx/libbasic/Method.st,v 1.21 1994-10-28 03:06:36 claus Exp $ |
46 " |
46 " |
47 ! |
47 ! |
48 |
48 |
49 documentation |
49 documentation |
50 " |
50 " |
182 aStream := LastFileReference at:1. |
182 aStream := LastFileReference at:1. |
183 ]. |
183 ]. |
184 |
184 |
185 aStream isNil ifTrue:[ |
185 aStream isNil ifTrue:[ |
186 fileName := Smalltalk getSystemFileName:('source/' , source). |
186 fileName := Smalltalk getSystemFileName:('source/' , source). |
|
187 fileName isNil ifTrue:[ |
|
188 fileName := source |
|
189 ]. |
187 aStream := fileName asFilename readStream. |
190 aStream := fileName asFilename readStream. |
188 ]. |
191 ]. |
189 |
192 |
190 aStream notNil ifTrue:[ |
193 aStream notNil ifTrue:[ |
191 aStream position:sourcePosition. |
194 aStream position:sourcePosition. |
209 |
212 |
210 source := aString. |
213 source := aString. |
211 sourcePosition := nil |
214 sourcePosition := nil |
212 ! |
215 ! |
213 |
216 |
214 sourceFileName |
217 sourceFilename |
215 "return the sourcefilename if source is extern; nil otherwise" |
218 "return the sourcefilename if source is extern; nil otherwise" |
216 |
219 |
217 sourcePosition notNil ifTrue:[^ source]. |
220 sourcePosition notNil ifTrue:[^ source]. |
218 ^ nil |
221 ^ nil |
219 ! |
222 ! |
222 "return the sourceposition if source is extern; nil otherwise" |
225 "return the sourceposition if source is extern; nil otherwise" |
223 |
226 |
224 ^ sourcePosition |
227 ^ sourcePosition |
225 ! |
228 ! |
226 |
229 |
227 sourceFileName:aFileName position:aNumber |
230 sourceFilename:aFileName position:aNumber |
228 "set the methods sourcefile/position" |
231 "set the methods sourcefile/position" |
229 |
232 |
230 source := aFileName. |
233 source := aFileName. |
231 sourcePosition := aNumber |
234 sourcePosition := aNumber |
232 ! |
235 ! |
1216 ^ nil. |
1219 ^ nil. |
1217 ]. |
1220 ]. |
1218 " |
1221 " |
1219 try to save a bit of memory, by sharing the source (whatever it is) |
1222 try to save a bit of memory, by sharing the source (whatever it is) |
1220 " |
1223 " |
1221 temporaryMethod sourceFileName:source position:sourcePosition. |
1224 temporaryMethod sourceFilename:source position:sourcePosition. |
1222 ^ temporaryMethod |
1225 ^ temporaryMethod |
1223 |
1226 |
1224 " |
1227 " |
1225 (LargeInteger compiledMethodAt:#normalize) asByteCodeMethod |
1228 (LargeInteger compiledMethodAt:#normalize) asByteCodeMethod |
1226 (SmallInteger compiledMethodAt:#+) asByteCodeMethod |
1229 (SmallInteger compiledMethodAt:#+) asByteCodeMethod |