VM & Runtime stack
siguctua at gmail.com
Tue Jul 17 08:17:09 UTC 2007
On 17/07/07, Klaus D. Witzel <klaus.witzel at cobss.com> wrote:
> On Tue, 17 Jul 2007 04:16:28 +0200, sig wrote:
> > On 17/07/07, Mathieu Suen <mathk.sue at gmail.com> wrote:
> >> Actualy not when a precess switch occure or not when thisContext is
> >> used.
> >> But is true that the from now the block need to push the context and
> >> this bytecode flush the context cache.
> >> This is not a good things since the context may not be used inside
> >> the block.
> >> The only case when the context shouldn't be recycle is when the block
> >> is pass as a return value or assign to an inst var,class var, global
> >> var....
> >> This because:
> >> MethodContext goes to the cache when the VM return from the method.
> >> The BlockContext have a reference to the MethodContext
> >> But there is some block where the context aren't push on the stack.
> >> Actually is for special send that are inlined (#to:do:,
> >> #ifTrue:ifFalse: #caseOf: and so on) so block aren't created.
> >> Mth
> > Compiler, in most cases, can figure out if block requires MethodContext
> > or not.
> Perhaps you mean BlockContext.
No, saying MethodContext i mean home context or environment.
More information about the Squeak-dev