[squeak-dev] Re: cachedStackTop ?

Nicolas Cellier nicolas.cellier.aka.nice at gmail.com
Wed Apr 13 23:55:59 UTC 2011


2011/4/14 Nicolas Cellier <nicolas.cellier.aka.nice at gmail.com>:
> I feel like (MethodContext removeSelector: #cachedStackTop)
> Any objection ?
>
> cachedStackTop
>        "WARNING - this method depends on a very dirty trick, viz. snitching
> information off the variable stack of a particular CompiledMethod.  So
> if you add/remove a temp in BlockContext>>valueUninterruptably, this
> method will fail, probably with some horrible consequences I'd rather
> not think through just now ... assumption is that the variable
> declaration in that method looks like:
>                | sendingContext result homeSender |"
>
>        ^self tempAt: 3
>

I forgot to say, BlockContext are rarely used these days and don't
really meet above assumptions anyway, neither does BlockClosure

BlockContext/Closure>>valueUninterruptably
	"Temporarily make my home Context unable to return control to its
sender, to guard against circumlocution of the ensured behavior."

	^ self ifCurtailed: [^ self]



More information about the Squeak-dev mailing list