I've replaced the use of throw(0) to exit catch blocks normally with an opcode that uses a normal return instead of a longjmp.
At the same time I changed the default return value from catch blocks to UNDEFINED (it was a "plain" zero earlier), only because I think it's a little cleaner. I don't think it has any practical compatibility impact, but there might be other opinions?
/ Martin Stjernholm, Roxen IS
Previous text:
2002-09-23 00:10: Subject: catch { catch { break foo; }; };
--assembler-debug=2 or more ought to give it to you. This is what I get after peephole optimization:
=== 1 0 byte(3) === 1 1 byte(3) === 1 2 entry === 1 2 function start === 1 2 label(4) === 1 11 catch(5) === 1 1e catch(7) === 1 27 escape catch === 1 2c escape catch === 1 31 branch(2) === 1 36 label(7) === 1 45 pop === 1 4a throw(0) === 1 4f label(5) === 1 5e pop === 1 63 catch(5) === 1 6c catch(7) === 1 75 escape catch === 1 7a escape catch === 1 7f label(2) === 1 8e return 0
I can't say I understand why the body is repeated twice. It only happens if the for statement lacks the repeat condition.
/ Martin Stjernholm, Roxen IS