Diff for /gforth/kernel/comp.fs between versions 1.13 and 1.14

version 1.13, 1999/04/16 22:19:54 version 1.14, 1999/05/05 18:12:15
Line 24 Line 24
   
 \ \ here allot , c, A,                                          17dec92py  \ \ here allot , c, A,                                          17dec92py
   
   [IFUNDEF] allot
   [IFUNDEF] forthstart
   : allot ( n -- ) \ core
       \G Reserve or release @var{n} address units of data space; @var{n}
       \G is a signed number. There are restrictions on releasing data
       \G space.
       dup unused u> -8 and throw
       dp +! ;
   [THEN]
   [THEN]
   
   \ we default to this version if we have nothing else 05May99jaw
   [IFUNDEF] allot
 : allot ( n -- ) \ core  : allot ( n -- ) \ core
     \G Reserve or release @var{n} address units of data space; @var{n}      \G Reserve or release @var{n} address units of data space; @var{n}
     \G is a signed number. There are restrictions on releasing data      \G is a signed number. There are restrictions on releasing data
Line 31 Line 44
     here +      here +
     dup 1- usable-dictionary-end forthstart within -8 and throw      dup 1- usable-dictionary-end forthstart within -8 and throw
     dp ! ;      dp ! ;
   [THEN]
   
 : c,    ( c -- ) \ core  : c,    ( c -- ) \ core
     \G Reserve data space for one char and store @var{c} in the space.      \G Reserve data space for one char and store @var{c} in the space.
Line 137  create nextname-buffer 32 chars allot Line 151  create nextname-buffer 32 chars allot
 : Literal  ( compilation n -- ; run-time -- n ) \ core  : Literal  ( compilation n -- ; run-time -- n ) \ core
     \G Compile appropriate code such that, at run-time, @var{n} is placed      \G Compile appropriate code such that, at run-time, @var{n} is placed
     \G on the stack. Interpretation semantics are undefined.      \G on the stack. Interpretation semantics are undefined.
     postpone lit  , ; immediate restrict  [ [IFDEF] lit, ]
       lit,
   [ [ELSE] ]
       postpone lit , 
   [ [THEN] ] ; immediate restrict
   
 : ALiteral ( compilation addr -- ; run-time -- addr ) \ gforth  : ALiteral ( compilation addr -- ; run-time -- addr ) \ gforth
     postpone lit A, ; immediate restrict  [ [IFDEF] alit, ]
       alit,
   [ [ELSE] ]
       postpone lit A, 
   [ [THEN] ] ; immediate restrict
   
 : char   ( '<spaces>ccc' -- c ) \ core  : char   ( '<spaces>ccc' -- c ) \ core
     \G Skip leading spaces. Parse the string @var{ccc} and return @var{c}, the      \G Skip leading spaces. Parse the string @var{ccc} and return @var{c}, the
Line 161  create nextname-buffer 32 chars allot Line 183  create nextname-buffer 32 chars allot
     dup lastcfa !      dup lastcfa !
     0 A, 0 ,  code-address! ;      0 A, 0 ,  code-address! ;
   
   [IFUNDEF] compile,
 : compile, ( xt -- )    \ core-ext      compile-comma  : compile, ( xt -- )    \ core-ext      compile-comma
     \G  Compile the word represented by the execution token, @var{xt}.      \G  Compile the word represented by the execution token, @var{xt}.
     A, ;      A, ;
   [THEN]
   
 : !does    ( addr -- ) \ gforth store-does  : !does    ( addr -- ) \ gforth store-does
     lastxt does-code! ;      lastxt does-code! ;
Line 185  create nextname-buffer 32 chars allot Line 209  create nextname-buffer 32 chars allot
     else      else
         dup ['] compile, =          dup ['] compile, =
         if          if
             drop POSTPONE (compile) compile,              drop POSTPONE (compile) a,
         else          else
             swap POSTPONE aliteral compile,              swap POSTPONE aliteral compile,
         then          then
Line 413  defer :-hook ( sys1 -- sys2 ) Line 437  defer :-hook ( sys1 -- sys2 )
   
 defer ;-hook ( sys2 -- sys1 )  defer ;-hook ( sys2 -- sys1 )
   
   [IFDEF] docol,
   : (:noname) ( -- colon-sys )
       \ common factor of : and :noname
       docol, ]comp defstart ] :-hook ;
   [ELSE]
 : (:noname) ( -- colon-sys )  : (:noname) ( -- colon-sys )
     \ common factor of : and :noname      \ common factor of : and :noname
     docol: cfa, defstart ] :-hook ;      docol: cfa, defstart ] :-hook ;
   [THEN]
   
 : : ( "name" -- colon-sys ) \ core      colon  : : ( "name" -- colon-sys ) \ core      colon
     Header (:noname) ;      Header (:noname) ;
Line 424  defer ;-hook ( sys2 -- sys1 ) Line 454  defer ;-hook ( sys2 -- sys1 )
     0 last !      0 last !
     cfalign here (:noname) ;      cfalign here (:noname) ;
   
   [IFDEF] fini,
   : ; ( compilation colon-sys -- ; run-time nest-sys ) \ core   semicolon
       ;-hook ?struc fini, comp[ reveal postpone [ ; immediate restrict
   [ELSE]
 : ; ( compilation colon-sys -- ; run-time nest-sys ) \ core     semicolon  : ; ( compilation colon-sys -- ; run-time nest-sys ) \ core     semicolon
     ;-hook ?struc postpone exit reveal postpone [ ; immediate restrict      ;-hook ?struc postpone exit reveal postpone [ ; immediate restrict
   [THEN]
   
 \ \ Search list handling: reveal words, recursive               23feb93py  \ \ Search list handling: reveal words, recursive               23feb93py
   

Removed from v.1.13  
changed lines
  Added in v.1.14


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