--- gforth/objects.fs 1997/07/31 16:17:10 1.6 +++ gforth/objects.fs 1998/10/07 18:58:58 1.9 @@ -177,10 +177,10 @@ does> ( ... object -- ... ) \ copy it to make it unique; used for implementing a copy-on-write policy over @ class-parent @ class->map ( class-map offset parent-map ) over + @ >r \ the map for the interface for the parent - + dup @ ( mapp map ) + + dup @ ( interface-mapp interface-map ) dup r> = if - @ interface-map 2@ save-mem drop + dup @ interface-map 2@ nip save-mem drop swap ! else 2drop @@ -211,11 +211,11 @@ variable last-interface-offset 0 last-in : interface ( -- ) \ objects \g starts an interface definition. interface% %allot >r - 0 0 r@ interface-map 2! + r@ current-interface ! + current-interface 1 cells save-mem r@ interface-map 2! -1 cells last-interface-offset +! last-interface-offset @ r@ interface-offset ! - 0 r@ interface-map-offset ! - r> current-interface ! ; + 0 r> interface-map-offset ! ; : end-interface-noname ( -- interface ) \ objects \g ends an interface definition. The resulting interface is @@ -364,7 +364,7 @@ variable public-wordlist POSTPONE to-this POSTPONE ; ; immediate -: catch ( ... xt -- ... n ) +: catch ( ... xt -- ... n ) \ exception \ make it safe to call CATCH within a method. \ should also be done with all words containing CATCH. this >r catch r> to-this ;