[gforth] / gforth / kernel / basics.fs  

gforth: gforth/kernel/basics.fs

Diff for /gforth/kernel/basics.fs between version 1.15 and 1.16

version 1.15, Thu May 6 21:33:36 1999 UTC version 1.16, Mon May 17 15:07:02 1999 UTC
Line 20 
Line 20 
   
 \ Idea and implementation: Bernd Paysan (py)  \ Idea and implementation: Bernd Paysan (py)
   
 HEX  \ Needs:
   
   require ./vars.fs
   
   hex
   
 \ labels for some code addresses  \ labels for some code addresses
   
Line 137 
Line 141 
     true EXIT      true EXIT
   THEN    THEN
   toupper [char] 0 - dup 9 u> IF    toupper [char] 0 - dup 9 u> IF
     [ 'A '9 1 + -  ] literal -      [ char A char 9 1 + -  ] literal -
     dup 9 u<= IF      dup 9 u<= IF
       drop false EXIT        drop false EXIT
     THEN      THEN
Line 201 
Line 205 
 ' noop IS 'catch  ' noop IS 'catch
 ' noop IS 'throw  ' noop IS 'throw
   
   has? backtrace [IF]
 Defer store-backtrace  Defer store-backtrace
 ' noop IS store-backtrace  ' noop IS store-backtrace
   [THEN]
   
 : catch ( x1 .. xn xt -- y1 .. ym 0 / z1 .. zn error ) \ exception  : catch ( x1 .. xn xt -- y1 .. ym 0 / z1 .. zn error ) \ exception
     'catch      'catch
Line 215 
Line 221 
 [ [THEN] ]  [ [THEN] ]
     handler @ >r      handler @ >r
     rp@ handler !      rp@ handler !
   [ has? backtrace [IF] ]
     backtrace-empty on      backtrace-empty on
   [ [THEN] ]
     execute      execute
     r> handler ! rdrop      r> handler ! rdrop
 [ has? floating [IF] ]  [ has? floating [IF] ]
Line 229 
Line 237 
 : throw ( y1 .. ym error/0 -- y1 .. ym / z1 .. zn error ) \ exception  : throw ( y1 .. ym error/0 -- y1 .. ym / z1 .. zn error ) \ exception
     ?DUP IF      ?DUP IF
         [ has? header [IF] here 9 cells ! [THEN] ] \ entry point for signal handler          [ has? header [IF] here 9 cells ! [THEN] ] \ entry point for signal handler
   [ has? backtrace [IF] ]
         store-backtrace          store-backtrace
   [ [THEN] ]
 [ has? interpreter [IF] ]  [ has? interpreter [IF] ]
         handler @ dup 0= IF          handler @ dup 0= IF
 [ has? os [IF] ]  [ has? os [IF] ]
Line 256 
Line 266 
 : bounce ( y1 .. ym error/0 -- y1 .. ym error / y1 .. ym ) \ gforth  : bounce ( y1 .. ym error/0 -- y1 .. ym error / y1 .. ym ) \ gforth
 \ a throw without data or fp stack restauration  \ a throw without data or fp stack restauration
   ?DUP IF    ?DUP IF
   [ has? backtrace [IF] ]
       store-backtrace        store-backtrace
   [ [THEN] ]
       handler @ rp!        handler @ rp!
       r> handler !        r> handler !
 [ has? glocals [IF] ]  [ has? glocals [IF] ]


Generate output suitable for use with a patch program
Legend:
Removed from v.1.15  
changed lines
  Added in v.1.16

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help