Diff for /gforth/except.fs between versions 1.2 and 1.5

version 1.2, 2000/09/23 15:05:59 version 1.5, 2002/12/05 19:25:23
Line 16 Line 16
   
 \ You should have received a copy of the GNU General Public License  \ You should have received a copy of the GNU General Public License
 \ along with this program; if not, write to the Free Software  \ along with this program; if not, write to the Free Software
 \ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.  \ Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111, USA.
   
 \ !! use a separate exception stack?           anton  \ !! use a separate exception stack?           anton
   
Line 33  Defer store-backtrace Line 33  Defer store-backtrace
 ' noop IS store-backtrace  ' noop IS store-backtrace
 \ [THEN]  \ [THEN]
   
 : (try) ( -- )  : (try) ( ahandler -- )
     \ inline argument: address of the handler  
     r>      r>
     dup dup @ + >r \ recovery address      swap >r \ recovery address
     rp@ 'catch >r      rp@ 'catch >r
     sp@ >r      sp@ >r
     fp@ >r      fp@ >r
Line 44  Defer store-backtrace Line 43  Defer store-backtrace
     handler @ >r      handler @ >r
     rp@ handler !      rp@ handler !
     backtrace-empty on      backtrace-empty on
     cell+ >r ;      >r ;
   
 : try ( compilation  -- orig ; run-time  -- ) \ gforth  : try ( compilation  -- orig ; run-time  -- ) \ gforth
     POSTPONE (try) >mark ; immediate compile-only      \ !! does not work correctly for gforth-native
       POSTPONE lit >mark POSTPONE (try) ; immediate compile-only
   
 : (recover) ( -- )  : (recover) ( -- )
     \ normal end of try block: restore handler, forget rest      \ normal end of try block: restore handler, forget rest

Removed from v.1.2  
changed lines
  Added in v.1.5


FreeBSD-CVSweb <freebsd-cvsweb@FreeBSD.org>