Bug 18619 - Support continue, break, and return in try .. finally blocks
Summary: Support continue, break, and return in try .. finally blocks
Status: RESOLVED FIXED
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: Mac OS X 10.5
: P2 Normal
Assignee: Oliver Hunt
URL:
Keywords:
Depends on:
Blocks: 18624
  Show dependency treegraph
 
Reported: 2008-04-19 02:50 PDT by Oliver Hunt
Modified: 2008-04-19 15:37 PDT (History)
3 users (show)

See Also:


Attachments
Rewrite finalisers with the wonder and joy of jsr/sret (19.10 KB, patch)
2008-04-19 03:18 PDT, Oliver Hunt
mjs: review+
Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Oliver Hunt 2008-04-19 02:50:00 PDT
Task tracking bug
Comment 1 Oliver Hunt 2008-04-19 03:18:56 PDT
Created attachment 20688 [details]
Rewrite finalisers with the wonder and joy of jsr/sret
Comment 2 Maciej Stachowiak 2008-04-19 15:10:12 PDT
Comment on attachment 20688 [details]
Rewrite finalisers with the wonder and joy of jsr/sret

The code seems ok on the substance, so I'll say r=me.

But here are some style suggestions:

1) The return address register is variously named it's returnRegister, returnAddrRegister, returnAddress, and in some confusing cases, returnAddressnReg. I think it should be retAddrDst (or returnAddrDst) for jsr, and retAddrSrc (or returnAddrSrc) for sret, just to make clear these instructions respectively read and write the return address.

2) Is it really right to call a finally block a "finaliser"? In the context of dynamic languages, a "finaliser" is typically a routine that runs when a garbage-collected object is destroyed.

3) In emitComplexJumpScopes, I would advise you to consider breaking some of the commented blocks into well-named helper functions.
Comment 3 Oliver Hunt 2008-04-19 15:37:40 PDT
Committed r32269