[BUG] Compiling a VM with 2.6 image segment changeset

agree at carltonfields.com agree at carltonfields.com
Thu Sep 23 19:07:07 UTC 1999


The number of named variables in a class can be computed from inside the interpreter as follows:

	hdr _ self baseHeader: oop.
	fmt _ (hdr >> 8) bitAnd: 16rF.
	totalLength _ self lengthOf: oop baseHeader: hdr format: fmt.
	fixedFields _ self fixedFieldsOf: oop format: fmt length: totalLength.

So far as I can see, "instSize" is not a primitive exposed to be available to the interpreter.  The preceding excerpt comes from Interpreter>>firstIndexableField:.  But as Tim explains below, even that's not useful unless you also have a oop pointing to the Metaclass object instance.

> -----Original Message-----
> From: MIME :rowledge at interval.com > Sent: Thursday, September 23, 1999 2:41 PM
> To: squeak at cs.uiuc.edu
> Subject: Re: [BUG] Compiling a VM with 2.6 image segment changeset
> > > > > printNameOfClass: classOop count: cnt
> > 	"Details: The count argument is used to avoid a > possible infinite
> > recursion if classOop is a corrupted object."
> > > 	cnt <= 0 ifTrue: [ ^ self print: 'bad class' ].
> > 	(self sizeBitsOf: classOop) = (Metaclass instSize +1*4) > ifTrue: [
> I'd say there is a good chance this really needs to refer to 'self
> classMetaclass' just as many places refer to classByteArray > etc.  Unfortunately
> the is no such method (up to upg 1407) and so it most likely > is a typo-like
> bug. It must have been fixed at some point or the code > couldn't have worked,
> and nobody is going to release code that cannot work, are > they? Surely not? :-)
> > > -- Why Dogs Hate WIn95:-  3)  Annoyed by lack of newsgroup, > alt.pictures.master's.
> leg.
> Tim Rowledge:  rowledge at interval.com (w)  +1 (650) 842-6110 (w)
>  tim at sumeru.stanford.edu (h)  <http://sumeru.stanford.edu/tim>
> > > > 





More information about the Squeak-dev mailing list