got exceptions working along with my weird idea for clearing the operand stack 🤓 https://hastebin.com/oqalutefuz.js
To accomplish this, when an exception is thrown my clear_op_stack routine scans bytecode until it sees a ProtectedJump (marks the end of a catch or try, similar to MSIL's CEE_LEAVE_S), along the way it keeps track of stack effects and applies them at the end. so that way you get however may POPs you'd expect if the exception weren't thrown
(I guess I should link these toots into #programming )
Since my language is all expressions I can't just clear the entire operand stack like you'd see in the openjdk, coreclr, and mono interpreters
python seems to use frames for everything, and I wanted to see if I could do this without pushing protected-block frames