[squeak-dev] Why is source code always in files only?
Tobias Pape
Das.Linux at gmx.de
Mon Jan 19 12:45:53 UTC 2015
Hi all,
We store method source _solely_ in files (.sources/.changes).
Why? We have means to attach it to Compiled methods, in fact, more than one:
CompiledMethod allInstances size. "57766."
CompiledMethod allInstances count: [:m | m properties includesKey: #source]. "0."
CompiledMethod allInstances count: [:m | m trailer sourceCode notNil]. "0."
CompiledMethod allInstances count: [:m | m trailer hasSourcePointer]. "57700."
" also interesting "
(CompiledMethod allInstances collect: [:m | m trailer kind] as: Bag) sortedCounts
{57701->#SourcePointer . 65->#NoTrailer . 14->#TempsNamesQCompress . 2->#TempsNamesZip}
When doing some analysis on source code, it is a pain to _either_
always go to disk for the source _or_ cache the code myself (which may
get out of sync sooon).
Can't we just save the source code either via trailer or properties
on first access?
Best
-Tobias
More information about the Squeak-dev
mailing list
|