benjamin.vanryseghem.pharo at gmail.com
Sun Nov 7 16:05:27 CET 2010
On Nov 7, 2010, at 4:04 PM, Levente Uzonyi wrote:
> On Sun, 7 Nov 2010, Benjamin wrote:
>> On Nov 7, 2010, at 10:51 AM, Stéphane Ducasse wrote:
>>> SmalltalkImage current
>>> instVarAt: #globals put: SystemDictionary new
>>> Something like that.
>> This code initialize Smalltalk, but I haven't found where Smalltalk
>> is stored.
>> Smalltalk is not a SmalltalkImage inst var nor class var neither
>> Smalltalk class inst var ...
>> So I wonder where to find it ...
> Smalltalk is a global. Globals are stored in a SystemDictionary. So
> far the only instance of SystemDictionary is the value of [Smalltalk
> globals]. Currently Smalltalk is a SmalltalkImage. SmalltalkImage
> has an instance variable called globals which holds the
> SystemDictionary. So
> (Smalltalk globals at: #Smalltalk) == Smalltalk.
> But SmalltalkImage also understands some of the protocol of
> SystemDictionary, because originally Smalltalk was a
> SystemDictionary, so you can write this too:
> (Smalltalk at: #Smalltalk) == Smalltalk
Thank you for your explanations ^^
>>> On Nov 7, 2010, at 2:46 AM, Benjamin wrote:
>>>> Hi guys,
>>>> I wonder how SmalltalkImage create the Smalltalk instance.
>>>> Can someone explain me that ?
>>>> Thank you
More information about the Pharo-project