[gforth] / gforth / kernel / comp.fs  

gforth: gforth/kernel/comp.fs

Diff for /gforth/kernel/comp.fs between version 1.24 and 1.28

version 1.24, Thu Aug 10 20:46:26 2000 UTC version 1.28, Sat Sep 23 15:06:09 2000 UTC
Line 1 
Line 1 
 \ compiler definitions                                          14sep97jaw  \ compiler definitions                                          14sep97jaw
   
 \ Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.  \ Copyright (C) 1995,1996,1997,1998,2000 Free Software Foundation, Inc.
   
 \ This file is part of Gforth.  \ This file is part of Gforth.
   
Line 159 
Line 159 
 \ \ literals                                                    17dec92py  \ \ literals                                                    17dec92py
   
 : Literal  ( compilation n -- ; run-time -- n ) \ core  : Literal  ( compilation n -- ; run-time -- n ) \ core
     \G Compile appropriate code such that, at run-time, @i{n} is placed      \G Compilation semantics: compile the run-time semantics.@*
     \G on the stack. Interpretation semantics are undefined.      \G Run-time Semantics: push @i{n}.@*
       \G Interpretation semantics: undefined.
 [ [IFDEF] lit, ]  [ [IFDEF] lit, ]
     lit,      lit,
 [ [ELSE] ]  [ [ELSE] ]
Line 195 
Line 196 
   
 [IFUNDEF] compile,  [IFUNDEF] compile,
 : compile, ( xt -- )    \ core-ext      compile-comma  : compile, ( xt -- )    \ core-ext      compile-comma
     \G  Compile the word represented by the execution token, @i{xt},      \G  Compile the word represented by the execution token @i{xt}
     \G  into the current definition.      \G  into the current definition.
     A, ;      A, ;
 [THEN]  [THEN]
Line 241 
Line 242 
     COMP' swap POSTPONE Aliteral POSTPONE ALiteral ; immediate restrict      COMP' swap POSTPONE Aliteral POSTPONE ALiteral ; immediate restrict
   
 : postpone, ( w xt -- ) \ gforth        postpone-comma  : postpone, ( w xt -- ) \ gforth        postpone-comma
     \g Compile the compilation semantics represented by @i{w xt}.      \g Compile the compilation semantics represented by the
       \g compilation token @i{w xt}.
     dup ['] execute =      dup ['] execute =
     if      if
         drop compile,          drop compile,
Line 431 
Line 433 
   
 [THEN]  [THEN]
   
 : Defers ( "name" -- ) \ gforth  : Defers ( compilation "name" -- ; run-time ... -- ... ) \ gforth
       \G Compiles the present contents of the deferred word @i{name}
       \G into the current definition.  I.e., this produces static
       \G binding as if @i{name} was not deferred.
     ' >body @ compile, ; immediate      ' >body @ compile, ; immediate
   
 :noname  :noname
Line 464 
Line 469 
   
 :noname    ' >body @ ;  :noname    ' >body @ ;
 :noname    ' >body postpone ALiteral postpone @ ;  :noname    ' >body postpone ALiteral postpone @ ;
 interpret/compile: What's ( "name" -- addr ) \ 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}.
   
 \ \ interpret/compile:  \ \ interpret/compile:
   


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

CVS Admin

Powered by ViewCVS 1.0-dev
(Powered by ViewCVS)

ViewCVS and CVS Help