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

Andreas Raab andreas.raab at gmx.de
Mon Aug 11 09:58:59 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.

I don't think that'll be of much help if one wants to introduce a different
source pointer encoding. In this situation SourceFiles is likely to go away
alltogether. So in some sense, if someone would want to work on this issue
(and that's not going to be me) it might even be better to leave it alone
not to complicate matters further by introducing a moving target.

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

Or simpler:

SystemNavigation new 
	browseAllCallsOn: (Smalltalk associationAt: #SourceFiles)

Cheers,
  - andreas


> -----Original Message-----
> From: squeak-dev-bounces at lists.squeakfoundation.org 
> [mailto:squeak-dev-bounces at lists.squeakfoundation.org] On 
> Behalf Of Roel Wuyts
> Sent: Monday, August 11, 2003 10:36 AM
> To: The general-purpose Squeak developers list
> Cc: kcp at iam.unibe.ch
> Subject: Re: Method source pointer encoding (was: Squat 
> progress 7 August2003: method IDs)
> 
> 
> 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