SmalltalkImage

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
6 messages Options
Reply | Threaded
Open this post in threaded view
|

SmalltalkImage

Benjamin Van Ryseghem (Pharo)
Hi guys,

I wonder how SmalltalkImage create the Smalltalk instance.

Can someone explain me that ?




Thank you

Ben

Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage

Levente Uzonyi-2
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
>
>

Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage

Stéphane Ducasse
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
>


Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage

Benjamin Van Ryseghem (Pharo)

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
>>
>
>


Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage

Levente Uzonyi-2
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

>
>
> 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
>>>
>>
>>
>
>
Reply | Threaded
Open this post in threaded view
|

Re: SmalltalkImage

Benjamin Van Ryseghem (Pharo)

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
>>
>>