Diff for /gforth/kernel/comp.fs between versions 1.38 and 1.39

version 1.38, 2001/12/24 20:39:30 version 1.39, 2002/01/05 20:16:18
Line 230  has? peephole [IF] Line 230  has? peephole [IF]
     \G compile xt to use primitives (and their peephole optimization)      \G compile xt to use primitives (and their peephole optimization)
     \G instead of ","-ing the xt.      \G instead of ","-ing the xt.
     \ !! all POSTPONEs here postpone primitives; this can be optimized      \ !! all POSTPONEs here postpone primitives; this can be optimized
     dup >does-code ?dup if      dup >does-code if
         swap >body POSTPONE literal POSTPONE call , EXIT          POSTPONE does-exec , EXIT
     then      then
     dup >code-address CASE      dup >code-address CASE
         docon:   OF >body POSTPONE literal POSTPONE @ EXIT ENDOF          docon:   OF >body POSTPONE lit@ , EXIT ENDOF
            \ docon is also used by VALUEs, so don't @ at compile time             \ docon is also used by VALUEs, so don't @ at compile time
         docol:   OF >body POSTPONE call , EXIT ENDOF          docol:   OF >body POSTPONE call , EXIT ENDOF
         dovar:   OF >body POSTPONE literal EXIT ENDOF          dovar:   OF >body POSTPONE literal EXIT ENDOF
         douser:  OF >body @ POSTPONE useraddr , EXIT ENDOF          douser:  OF >body @ POSTPONE useraddr , EXIT ENDOF
         dodefer: OF >body POSTPONE literal POSTPONE @ POSTPONE EXECUTE EXIT          dodefer: OF >body POSTPONE lit-perform , EXIT
         ENDOF          ENDOF
         dofield: OF >body @ POSTPONE literal POSTPONE + EXIT ENDOF          dofield: OF >body @ POSTPONE lit+ , EXIT ENDOF
     ENDCASE      ENDCASE
     peephole-compile, ;      peephole-compile, ;
   
Line 468  doer? :dofield [IF] Line 468  doer? :dofield [IF]
 [ELSE]  [ELSE]
     : (Field)  Create DOES> @ + ;      : (Field)  Create DOES> @ + ;
 [THEN]  [THEN]
   
   \ \ interpret/compile:
   
   struct
       >body
       cell% field interpret/compile-int
       cell% field interpret/compile-comp
   end-struct interpret/compile-struct
   
   : interpret/compile: ( interp-xt comp-xt "name" -- ) \ gforth
       Create immediate swap A, A,
   DOES>
       abort" executed primary cfa of an interpret/compile: word" ;
   \    state @ IF  cell+  THEN  perform ;
   
 \ IS Defer What's Defers TO                            24feb93py  \ IS Defer What's Defers TO                            24feb93py
   
 doer? :dodefer [IF]  doer? :dodefer [IF]
Line 524  interpret/compile: TO ( w "name" -- ) \ Line 539  interpret/compile: TO ( w "name" -- ) \
 interpret/compile: What's ( interpretation "name" -- xt; compilation "name" -- ; run-time -- xt ) \ gforth  interpret/compile: What's ( interpretation "name" -- xt; compilation "name" -- ; run-time -- xt ) \ gforth
 \G @i{Xt} is the XT that is currently assigned to @i{name}.  \G @i{Xt} is the XT that is currently assigned to @i{name}.
   
 \ \ interpret/compile:  
   
 struct  
     >body  
     cell% field interpret/compile-int  
     cell% field interpret/compile-comp  
 end-struct interpret/compile-struct  
   
 : interpret/compile: ( interp-xt comp-xt "name" -- ) \ gforth  
     Create immediate swap A, A,  
 DOES>  
     abort" executed primary cfa of an interpret/compile: word" ;  
 \    state @ IF  cell+  THEN  perform ;  
   
 : interpret/compile? ( xt -- flag )  : interpret/compile? ( xt -- flag )
     >does-code ['] DOES> >does-code = ;      >does-code ['] DOES> >does-code = ;
   

Removed from v.1.38  
changed lines
  Added in v.1.39


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