[FIX][BUG] ExceptionTester>>simpleOuterTest fails
ajhannan at yahoo.com
Thu May 27 20:40:41 UTC 2004
I do not believe David's change is correct. Maybe the #outer test cases are
incorrect. Exception>>#outer is implemented according to the ANSI definition
given to us by John Brant in a previous email
Tim Rowledge <tim at sumeru.stanford.edu> wrote:
> Whilst digging around I was also startled by the current implementation
> of #aboutToReturn:through: which really doesn't look as if it could
> possibly work. I'm reasonably convinced that it
> shouldn't involve #terminateTo: until after the unwinding is completed
> but I could be wrong. Can anyone explain the comment in
> ContextPart>return: ? If nothing else it's a bit strange to not make
> use of the VM provided initial context.
In senders of #terminateTo:, like #return: and #restart, unwinding is done
while terminating. They find the next ensure:/ifCurtailed: (unwind) sender,
terminate to it, execute its unwind block, then repeat until the target home
context is found.
#aboutToReturn:through: simply calls #return: which performs the unwind loop
described above. The supplied first unwind sender is redundant. To use it would
require starting in the middle of the unwind loop, requiring another interface
to the return method. I would rather keep a single simple #return: interface
and pay the extra primitive call to find the first unwind sender again.
Non-local returns through an unwind context are probably rare, so I don't think
its worth adding the extra return interface to save this one primitive call. Of
course, others may disagree.
Do you Yahoo!?
Friends. Fun. Try the all-new Yahoo! Messenger.
More information about the Squeak-dev