add avm2 exception handler support to assemblermaster
commitea0b59dd56fa76c015371bf9a3ac1ad3e716612c
authorBart Botta <00003b@gmail.com>
Sat, 24 Jan 2009 06:04:20 +0000 (24 00:04 -0600)
committerBart Botta <00003b@gmail.com>
Sat, 24 Jan 2009 06:04:20 +0000 (24 00:04 -0600)
treee40a2ba13e8ad1d5b50ecd1477235c7435a86810
parent06cbe257e1ed58a480241d309cc589101fbdb67a
add avm2 exception handler support to assembler

* mark beginning and end of active range with :%dlabel

* mark beginning of exception handler with
   (:%exception handler-name start-label end-label type-name variable-name)
  where type-name is name of type to catch, defaults to *
  and variable is name of slot for :new-catch using this exception block

* on entry to exception block, thrown object is on top of stack
  replacing any previous stack contents before the :throw

* (optional, i think?) create a catch object/scope with
  (:new-catch handler-name).  currently only works after corresponding
  :%exception instruction,  since it doesn't go back and resolve unknown
  exception labels after assembly

* somewhere within the dynamic extent of an exception block, push
  something on the stack, and call (:throw)
asm/asm.lisp
asm/opcodes.lisp
test/test.lisp