[squeak-dev] The Trunk: Kernel-eem.876.mcz
Nicolas Cellier
nicolas.cellier.aka.nice at gmail.com
Tue Sep 30 06:15:56 UTC 2014
So generally, all tempAt: accesses should be protected?
2014-09-29 23:22 GMT+02:00 <commits at source.squeak.org>:
> Eliot Miranda uploaded a new version of Kernel to project The Trunk:
> http://source.squeak.org/trunk/Kernel-eem.876.mcz
>
> ==================== Summary ====================
>
> Name: Kernel-eem.876
> Author: eem
> Time: 29 September 2014, 2:21:45.514 pm
> UUID: 9ea5bea7-14c9-48c9-9d49-ca311d68d49a
> Ancestors: Kernel-ul.875
>
> Fix handleSignal: for a rare edge case that can
> occur on Stack & Cog VMs.
>
> =============== Diff against Kernel-ul.875 ===============
>
> Item was changed:
> ----- Method: ContextPart>>handleSignal: (in category
> 'private-exceptions') -----
> handleSignal: exception
> + "Sent to handler (on:do:) contexts only. If my exception class
> (first arg) handles exception
> + and the handler is active then execute my handle block (second
> arg), otherwise forward
> + this message to the next handler context. If none left, execute
> exception's defaultAction
> + (see nil>>handleSignal:)."
> - "Sent to handler (on:do:) contexts only. If my exception class
> (first arg) handles exception then execute my handle block (second arg),
> otherwise forward this message to the next handler context. If none left,
> execute exception's defaultAction (see nil>>handleSignal:)."
>
> + | handlerActive val |
> + "If the context has been returned from the handlerActive temp var
> may not be accessible."
> + handlerActive := stackp >= 3 and: [(self tempAt: 3) == true].
> + (((self tempAt: 1) handles: exception) and: [handlerActive])
> ifFalse:
> + [^self nextHandlerContext handleSignal: exception].
> - | val |
> - (((self tempAt: 1) handles: exception) and: [self tempAt: 3])
> ifFalse: [
> - ^ self nextHandlerContext handleSignal: exception].
>
> exception privHandlerContext: self contextTag.
> self tempAt: 3 put: false. "disable self while executing handle
> block"
> + val := [(self tempAt: 2) cull: exception]
> + ensure: [self tempAt: 3 put: true].
> + self return: val "return from self if not otherwise directed in
> handle block"
> - val := [(self tempAt: 2) cull: exception ]
> - ensure: [self tempAt: 3 put: true].
> - self return: val. "return from self if not otherwise directed in
> handle block"
> !
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20140930/00a96b05/attachment.htm
More information about the Squeak-dev
mailing list
|