Old source code subsystem [was: New source code subsystem]
Marcus Denker
denker at iam.unibe.ch
Thu Jul 27 09:33:36 UTC 2006
On 27.07.2006, at 10:47, Klaus D. Witzel wrote:
> On Thu, 27 Jul 2006 09:57:24 +0200, Marcus Denker wrote:
>> On 27.07.2006, at 09:39, Klaus D. Witzel wrote:
>>> No, I was lead by the aim for more collaborative features (hmm,
>>> since there are none in Squeak, should I say for *at least* one or
>>> two collaborative features).
>>>
>>
>> What I would suggest: Do not plan to save the world, at least not at
>> first. If you now set out to build "the solution" we won't have for a
>> looong
>> time, most likely never.
>>
>> What we need first is
>>
>> - source offset in a property, not at the end of the bytecode. Use
>> an Integer , so we get indefinite size of .source and .changens --
>> One Problem Solved.
>
> Wait a minute, a quick question before that can be solved
>
> (nil systemNavigation
> allMethodsSelect: [:cm | (cm fileIndex = 0
> or: [(SourceFiles at: cm fileIndex) == nil])
> or: [cm filePosition = 0]])asArray
>
> This has size 204 in #7048, do the elements have anything to do
> with potential changes to SourceFiles, fileIndex or filePosition?
>
These are generated methods without source. The source you see when
looking at them is the result of a decompilation.
(see e.g Preferences class>>#compileAccessMethodForPreference: ).
Used for Preferences, Services and in some
old stuff, PlayWithMe1 should be removed...).
CompiledMethod>>#getSourceFor: selector in: class
"Retrieve or reconstruct the source code for this method."
| source flagByte sourceSelector |
flagByte _ self last.
(flagByte = 0
or: [flagByte = 251 "some source-less methods have flag = 251, rest
= 0"
and: [((1 to: 3) collect: [:i | self at: self size - i]) = #(0 0
0)]])
ifTrue: ["No source pointer -- decompile without temp names"
^ self decompileString].
......
Marcus
-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/pkcs7-signature
Size: 3938 bytes
Desc: not available
Url : http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20060727/af48dfae/smime.bin
More information about the Squeak-dev
mailing list
|