Hi guys,
I wonder how SmalltalkImage create the Smalltalk instance. Can someone explain me that ? Thank you Ben |
On Sun, 7 Nov 2010, Benjamin wrote:
> Hi guys, > > I wonder how SmalltalkImage create the Smalltalk instance. > > Can someone explain me that ? Smalltalk is a global variable, it's value is the only instance of SmalltalkImage. The code that created the instance was removed, so you won't find it. Levente > > > > > Thank you > > Ben > > |
In reply to this post by Benjamin Van Ryseghem (Pharo)
SmalltalkImage current
instVarAt: #globals put: SystemDictionary new Something like that. ? 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 > > Ben > |
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 ... Ben > ? > 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 >> >> Ben >> > > |
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 ... 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 Levente > > > Ben > > >> ? >> 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 >>> >>> Ben >>> >> >> > > |
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 > > > Levente Thank you for your explanations ^^ Ben > >> >> >> Ben >> >> >>> ? >>> 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 >>>> Ben >> >> |
Free forum by Nabble | Edit this page |