Method source pointer encoding (was: Squat progress 7 August2003: method IDs)

Roel Wuyts wuyts at iam.unibe.ch
Mon Aug 11 08:36:04 UTC 2003


More specifically, there is already this global variable (SourceFiles), 
which is an instance of StandardSourceFileArray. So we planned to at 
least to make StandardSourceFileArray a facade for the operations that 
need to be done. That way we want to rewrite all statements of the form:

	(SourceFiles at: 2) isReadOnly

to *something like*:

	SourceFiles changesFileIsReadOnly


This would update 38 places in the system that directly use a 
'Sourcefiles at: VVV' statement. Of course some of them are more 
'vicious' than others, but we'll clean them.


PS: If you want to see the references, do for example this thing I 
quickly hacked up:

| methods |
methods := Dictionary new.
CompiledMethod allInstances do: [:cm |
	(cm hasLiteralSuchThat: [:lit | (lit isKindOf: Association) and: [lit 
key = #SourceFiles]])
		ifTrue: [methods at: cm put: cm who first -> cm selector]].
^methods


On Saturday, Aug 9, 2003, at 21:46 Europe/Zurich, Stephane Ducasse 
wrote:

> Hi Andreas and other
>
> 	The Simplest and Most Important Thing to do is to figure out how any 
> new
> 	scheme can be used in parallel to the existing source code 
> management. As I
> 	have learned (the hard way; and I'm pretty sure Craig will agree on 
> this -
> 	if not today than surely later ;) trying to change these kinds of 
> things is
> 	a real pain if it means you have to find and fix all of those implicit
> 	assumptions in the system while you're trying to come up with 
> something
> 	better.
>
> We (with Roel) got already some discussions, not to change the format 
> but, to
> provide a better interface than these "at: 1" and "at:2" everywhere. 
> So we were thinking
> about creating an object responsible for managing the files. This 
> would then help
> people to change the format.
>
> if you have any suggestion please say it.
>
> Stef
>
>
Roel Wuyts                                                   Software 
Composition Group
roel.wuyts at iam.unibe.ch                       University of Bern, 
Switzerland
http://www.iam.unibe.ch/~wuyts/
Board Member of the European Smalltalk User Group: www.esug.org



More information about the Squeak-dev mailing list