[squeak-dev] The Inbox: Environments-cmm.74.mcz
Chris Muller
asqueaker at gmail.com
Mon Feb 18 03:00:47 UTC 2019
Hi Levente,
> > Item was changed:
> > ----- Method: Environment>>hasClassNamed: (in category 'classes and traits') -----
> > hasClassNamed: aString
> > + ^ declarations includesKey: aString!
> > - Symbol hasInterned: aString ifTrue:
> > - [:symbol |
> > - ^ (declarations at: symbol ifAbsent: [nil])
> > - isKindOf: Class].
> > - ^ false.!
>
> The above change will make
>
> Smalltalk hasClassNamed: #Smalltalk
>
> return true because the #isKindOf: test was removed. But that is not
> correct.
Woops, not sure how I missed that. Fixed in Environments-cmm.75.
> > ...
> > Item was added:
> > + (PackageInfo named: 'Environments') postscript: '"Fix ''Instances'' entry for Smalltalk Environment."
> > + | dict |
> > + dict := (Environment classPool at: ''Instances'').
> > + Environment classPool at: ''Instances'' put: (dict := dict as: Dictionary).
> > + dict keys
> > + do: [ : eachName | (eachName isSymbol not ) ifTrue: [ dict at: eachName asSymbol put: (dict removeKey: eachName) ] ].
> > +
> > + "Let Environment names be, consistently, Symbols."
> > + Environment allInstances do:
> > + [ : each |
> > + each info
> > + instVarNamed: ''name''
> > + put: (each name asSymbol).
> > + #(''declarations'' ''bindings'') do: [ : eachIdDictVar | (each instVarNamed: eachIdDictVar put: ((each instVarNamed: eachIdDictVar) as: Dictionary)) ] ]'!
>
> Large part of this postscript seems to be the same as what was removed
> from the preamble.
> Why was it moved to the postscript? Does it need to be evaluated again?
This change needs a postscript. I borrowed the code from the preamble
and added in the conversion. There was some harmless idempotent code
in there from the prior preamble that I should've just cleaned out
since it wasn't needed anymore. I did that in the new
Environments-cmm.75.
Thanks,
Chris
More information about the Squeak-dev
mailing list
|