VM & Runtime stack

Klaus D. Witzel klaus.witzel at cobss.com
Mon Jul 16 14:04:17 UTC 2007


On Mon, 16 Jul 2007 14:01:35 +0200, Adrian Lienhard wrote:

> Hi Alex,
>
> No, there is no real reification (depending on the definition of  
> course). The contexts used by the VM are the very same objects you get  
> at the image level. Plain old Smalltalk objects...
>
> The only special thing about contexts is that they are recycled, if  
> possible. The VM holds a list of contexts that can be reused. If you  
> access thisContext (through the special bytecode), this context and any  
> other context not returned from (i.e., still on the stack of the active  
> process) cannot be recycled anymore. As far as I remember, also when  
> switching process or when doing a GC, the cache is flushed. (I once did  
> a statistic about how many contexts are actually recycled compared to  
> being newly instantiated, and only got around 6-10%, which is much less  
> than what I expected.)

FWIW, over in the newcompiler list we recently discussed various  
implementation details, from the new compiler down to the VM level, of  
full BlockClosures. It turned out that as soon as BlockClosures receive  
full (performant) support from the VM then breaking the recycleable  
context rule no longer occurs and recycling can happen 100%[tm]. We  
haven't looked at process switch and GC (adaptation is possibly easy).

/Klaus

> Cheers,
> Adrian
>
> ___________________
> Adrian Lienhard
> www.adrian-lienhard.ch
>
> On Jul 16, 2007, at 12:47 , Bergel, Alexandre wrote:
>
>> Hi!
>>
>> In Squeak, the stack is reified upon the execution of the thisContext  
>> bytecode. Else, the stack is not reified. So comes my question: Where  
>> is the stack stored ? Is there a dedicated part of the memory ?
>>
>> Cheers,
>> Alexandre
>>
>> --_,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:
>> Alexandre Bergel  http://www.bergel.eu
>> ^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;._,.;:~^~:;.
>>
>>
>>
>>
>
>
>
>
>





More information about the Squeak-dev mailing list