Annotation of gforth/kernel/comp.fs, revision 1.23

1.1       pazsan      1: \ compiler definitions                                         14sep97jaw
                      2: 
1.6       anton       3: \ Copyright (C) 1995,1996,1997,1998 Free Software Foundation, Inc.
                      4: 
                      5: \ This file is part of Gforth.
                      6: 
                      7: \ Gforth is free software; you can redistribute it and/or
                      8: \ modify it under the terms of the GNU General Public License
                      9: \ as published by the Free Software Foundation; either version 2
                     10: \ of the License, or (at your option) any later version.
                     11: 
                     12: \ This program is distributed in the hope that it will be useful,
                     13: \ but WITHOUT ANY WARRANTY; without even the implied warranty of
                     14: \ MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
                     15: \ GNU General Public License for more details.
                     16: 
                     17: \ You should have received a copy of the GNU General Public License
                     18: \ along with this program; if not, write to the Free Software
                     19: \ Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
                     20: 
1.1       pazsan     21: \ \ Revisions-Log
                     22: 
                     23: \      put in seperate file                            14sep97jaw      
                     24: 
                     25: \ \ here allot , c, A,                                         17dec92py
                     26: 
1.14      jwilke     27: [IFUNDEF] allot
                     28: [IFUNDEF] forthstart
                     29: : allot ( n -- ) \ core
                     30:     dup unused u> -8 and throw
                     31:     dp +! ;
                     32: [THEN]
                     33: [THEN]
                     34: 
                     35: \ we default to this version if we have nothing else 05May99jaw
                     36: [IFUNDEF] allot
1.1       pazsan     37: : allot ( n -- ) \ core
1.23    ! anton      38:     \G Reserve @i{n} address units of data space without
        !            39:     \G initialization. @i{n} is a signed number, passing a negative
        !            40:     \G @i{n} releases memory.  In ANS Forth you can only deallocate
        !            41:     \G memory from the current contiguous region in this way.  In
        !            42:     \G Gforth you can deallocate anything in this way but named words.
        !            43:     \G The system does not check this restriction.
1.12      anton      44:     here +
                     45:     dup 1- usable-dictionary-end forthstart within -8 and throw
                     46:     dp ! ;
1.14      jwilke     47: [THEN]
1.1       pazsan     48: 
1.22      crook      49: : c,    ( c -- ) \ core c-comma
1.15      crook      50:     \G Reserve data space for one char and store @i{c} in the space.
1.1       pazsan     51:     here 1 chars allot c! ;
                     52: 
1.22      crook      53: : ,     ( w -- ) \ core comma
1.15      crook      54:     \G Reserve data space for one cell and store @i{w} in the space.
1.1       pazsan     55:     here cell allot  ! ;
                     56: 
                     57: : 2,   ( w1 w2 -- ) \ gforth
1.15      crook      58:     \G Reserve data space for two cells and store the double @i{w1
1.11      crook      59:     \G w2} in the space.
1.1       pazsan     60:     here 2 cells allot 2! ;
                     61: 
                     62: \ : aligned ( addr -- addr' ) \ core
                     63: \     [ cell 1- ] Literal + [ -1 cells ] Literal and ;
                     64: 
                     65: : align ( -- ) \ core
1.15      crook      66:     \G If the data-space pointer is not aligned, reserve enough space to align it.
1.1       pazsan     67:     here dup aligned swap ?DO  bl c,  LOOP ;
                     68: 
1.22      crook      69: \ : faligned ( addr -- f-addr ) \ float f-aligned
1.1       pazsan     70: \     [ 1 floats 1- ] Literal + [ -1 floats ] Literal and ; 
                     71: 
1.22      crook      72: : falign ( -- ) \ float f-align
1.15      crook      73:     \G If the data-space pointer is not float-aligned, reserve
                     74:     \G enough space to align it.
1.1       pazsan     75:     here dup faligned swap
                     76:     ?DO
                     77:        bl c,
                     78:     LOOP ;
                     79: 
1.9       anton      80: : maxalign ( -- ) \ gforth
1.23    ! anton      81:     \G Align data-space pointer for all alignment requirements.
1.1       pazsan     82:     here dup maxaligned swap
                     83:     ?DO
                     84:        bl c,
                     85:     LOOP ;
                     86: 
                     87: \ the code field is aligned if its body is maxaligned
                     88: ' maxalign Alias cfalign ( -- ) \ gforth
1.23    ! anton      89: \G Align data-space pointer for code field (i.e., such that the
        !            90: \G corresponding body is maxaligned).
1.1       pazsan     91: 
                     92: ' , alias A, ( addr -- ) \ gforth
                     93: 
                     94: ' NOOP ALIAS const
                     95: 
                     96: \ \ Header                                                     23feb93py
                     97: 
                     98: \ input-stream, nextname and noname are quite ugly (passing
                     99: \ information through global variables), but they are useful for dealing
                    100: \ with existing/independent defining words
                    101: 
                    102: defer (header)
                    103: defer header ( -- ) \ gforth
                    104: ' (header) IS header
                    105: 
                    106: : string, ( c-addr u -- ) \ gforth
                    107:     \G puts down string as cstring
                    108:     dup c, here swap chars dup allot move ;
                    109: 
                    110: : header, ( c-addr u -- ) \ gforth
                    111:     name-too-long?
                    112:     align here last !
                    113:     current @ 1 or A,  \ link field; before revealing, it contains the
                    114:                        \ tagged reveal-into wordlist
                    115:     string, cfalign
                    116:     alias-mask lastflags cset ;
                    117: 
                    118: : input-stream-header ( "name" -- )
                    119:     name name-too-short? header, ;
                    120: 
                    121: : input-stream ( -- )  \ general
                    122:     \G switches back to getting the name from the input stream ;
                    123:     ['] input-stream-header IS (header) ;
                    124: 
                    125: ' input-stream-header IS (header)
                    126: 
                    127: \ !! make that a 2variable
                    128: create nextname-buffer 32 chars allot
                    129: 
                    130: : nextname-header ( -- )
                    131:     nextname-buffer count header,
                    132:     input-stream ;
                    133: 
                    134: \ the next name is given in the string
                    135: 
                    136: : nextname ( c-addr u -- ) \ gforth
1.19      anton     137:     \g The next defined word will have the name @var{c-addr u}; the
                    138:     \g defining word will leave the input stream alone.
1.1       pazsan    139:     name-too-long?
                    140:     nextname-buffer c! ( c-addr )
                    141:     nextname-buffer count move
                    142:     ['] nextname-header IS (header) ;
                    143: 
                    144: : noname-header ( -- )
                    145:     0 last ! cfalign
                    146:     input-stream ;
                    147: 
                    148: : noname ( -- ) \ gforth
1.19      anton     149:     \g The next defined word will be anonymous. The defining word will
                    150:     \g leave the input stream alone. The xt of the defined word will
                    151:     \g be given by @code{lastxt}.
1.1       pazsan    152:     ['] noname-header IS (header) ;
                    153: 
                    154: : lastxt ( -- xt ) \ gforth
1.15      crook     155:     \G @i{xt} is the execution token of the last word defined.
1.13      crook     156:     \ The main purpose of this word is to get the xt of words defined using noname
1.1       pazsan    157:     lastcfa @ ;
                    158: 
                    159: \ \ literals                                                   17dec92py
                    160: 
                    161: : Literal  ( compilation n -- ; run-time -- n ) \ core
1.15      crook     162:     \G Compile appropriate code such that, at run-time, @i{n} is placed
1.8       crook     163:     \G on the stack. Interpretation semantics are undefined.
1.14      jwilke    164: [ [IFDEF] lit, ]
                    165:     lit,
                    166: [ [ELSE] ]
                    167:     postpone lit , 
                    168: [ [THEN] ] ; immediate restrict
1.1       pazsan    169: 
                    170: : ALiteral ( compilation addr -- ; run-time -- addr ) \ gforth
1.14      jwilke    171: [ [IFDEF] alit, ]
                    172:     alit,
                    173: [ [ELSE] ]
                    174:     postpone lit A, 
                    175: [ [THEN] ] ; immediate restrict
1.1       pazsan    176: 
1.8       crook     177: : char   ( '<spaces>ccc' -- c ) \ core
1.15      crook     178:     \G Skip leading spaces. Parse the string @i{ccc} and return @i{c}, the
                    179:     \G display code representing the first character of @i{ccc}.
1.1       pazsan    180:     bl word char+ c@ ;
                    181: 
1.8       crook     182: : [char] ( compilation '<spaces>ccc' -- ; run-time -- c ) \ core bracket-char
1.10      crook     183:     \G Compilation: skip leading spaces. Parse the string
1.15      crook     184:     \G @i{ccc}. Run-time: return @i{c}, the display code
                    185:     \G representing the first character of @i{ccc}.  Interpretation
1.10      crook     186:     \G semantics for this word are undefined.
1.1       pazsan    187:     char postpone Literal ; immediate restrict
                    188: 
                    189: \ \ threading                                                  17mar93py
                    190: 
                    191: : cfa,     ( code-address -- )  \ gforth       cfa-comma
                    192:     here
                    193:     dup lastcfa !
                    194:     0 A, 0 ,  code-address! ;
                    195: 
1.14      jwilke    196: [IFUNDEF] compile,
1.1       pazsan    197: : compile, ( xt -- )   \ core-ext      compile-comma
1.15      crook     198:     \G  Compile the word represented by the execution token, @i{xt},
                    199:     \G  into the current definition.
1.1       pazsan    200:     A, ;
1.14      jwilke    201: [THEN]
1.1       pazsan    202: 
                    203: : !does    ( addr -- ) \ gforth        store-does
                    204:     lastxt does-code! ;
                    205: 
                    206: : (does>)  ( R: addr -- )
                    207:     r> cfaligned /does-handler + !does ;
                    208: 
                    209: : dodoes,  ( -- )
                    210:   cfalign here /does-handler allot does-handler! ;
                    211: 
                    212: : (compile) ( -- ) \ gforth
                    213:     r> dup cell+ >r @ compile, ;
                    214: 
                    215: \ \ ticks
                    216: 
                    217: : name>comp ( nt -- w xt ) \ gforth
1.15      crook     218:     \G @i{w xt} is the compilation token for the word @i{nt}.
1.1       pazsan    219:     (name>comp)
                    220:     1 = if
                    221:         ['] execute
                    222:     else
                    223:         ['] compile,
                    224:     then ;
                    225: 
                    226: : [(')]  ( compilation "name" -- ; run-time -- nt ) \ gforth bracket-paren-tick
                    227:     (') postpone ALiteral ; immediate restrict
                    228: 
                    229: : [']  ( compilation. "name" -- ; run-time. -- xt ) \ core      bracket-tick
1.15      crook     230:     \g @i{xt} represents @i{name}'s interpretation
                    231:     \g semantics. Perform @code{-14 throw} if the word has no
1.1       pazsan    232:     \g interpretation semantics.
                    233:     ' postpone ALiteral ; immediate restrict
                    234: 
1.5       anton     235: : COMP'    ( "name" -- w xt ) \ gforth  comp-tick
1.15      crook     236:     \g Compilation token @i{w xt} represents @i{name}'s compilation semantics.
1.1       pazsan    237:     (') name>comp ;
                    238: 
                    239: : [COMP']  ( compilation "name" -- ; run-time -- w xt ) \ gforth bracket-comp-tick
1.15      crook     240:     \g Compilation token @i{w xt} represents @i{name}'s compilation semantics.
1.1       pazsan    241:     COMP' swap POSTPONE Aliteral POSTPONE ALiteral ; immediate restrict
                    242: 
1.18      jwilke    243: : postpone, ( w xt -- ) \ gforth       postpone-comma
                    244:     \g Compile the compilation semantics represented by @i{w xt}.
                    245:     dup ['] execute =
                    246:     if
                    247:        drop compile,
                    248:     else
                    249:        dup ['] compile, =
                    250:        if
                    251:            drop POSTPONE (compile) a,
                    252:        else
                    253:            swap POSTPONE aliteral compile,
                    254:        then
                    255:     then ;
                    256: 
                    257: : POSTPONE ( "name" -- ) \ core
                    258:     \g Compiles the compilation semantics of @i{name}.
                    259:     COMP' postpone, ; immediate restrict
                    260: 
1.1       pazsan    261: \ \ recurse                                                    17may93jaw
                    262: 
                    263: : recurse ( compilation -- ; run-time ?? -- ?? ) \ core
1.10      crook     264:     \g Call the current definition.
1.1       pazsan    265:     lastxt compile, ; immediate restrict
                    266: 
                    267: \ \ compiler loop
                    268: 
                    269: : compiler ( c-addr u -- )
                    270:     2dup find-name dup
                    271:     if ( c-addr u nt )
                    272:        nip nip name>comp execute
                    273:     else
                    274:        drop
                    275:        2dup snumber? dup
                    276:        IF
                    277:            0>
                    278:            IF
                    279:                swap postpone Literal
                    280:            THEN
                    281:            postpone Literal
                    282:            2drop
                    283:        ELSE
                    284:            drop compiler-notfound
                    285:        THEN
                    286:     then ;
                    287: 
1.22      crook     288: : [ ( -- ) \  core     left-bracket
1.8       crook     289:     \G Enter interpretation state. Immediate word.
1.1       pazsan    290:     ['] interpreter  IS parser state off ; immediate
                    291: 
                    292: : ] ( -- ) \ core      right-bracket
1.8       crook     293:     \G Enter compilation state.
1.1       pazsan    294:     ['] compiler     IS parser state on  ;
                    295: 
                    296: \ \ Strings                                                    22feb93py
                    297: 
                    298: : ," ( "string"<"> -- ) [char] " parse
                    299:   here over char+ allot  place align ;
                    300: 
                    301: : SLiteral ( Compilation c-addr1 u ; run-time -- c-addr2 u ) \ string
1.15      crook     302:     \G Compilation: compile the string specified by @i{c-addr1},
                    303:     \G @i{u} into the current definition. Run-time: return
                    304:     \G @i{c-addr2 u} describing the address and length of the
1.10      crook     305:     \G string.
1.1       pazsan    306:     postpone (S") here over char+ allot  place align ;
                    307:                                              immediate restrict
                    308: 
                    309: \ \ abort"                                                     22feb93py
                    310: 
                    311: : abort" ( compilation 'ccc"' -- ; run-time f -- ) \ core,exception-ext        abort-quote
1.15      crook     312:     \G If any bit of @i{f} is non-zero, perform the function of @code{-2 throw},
                    313:     \G displaying the string @i{ccc} if there is no exception frame on the
1.10      crook     314:     \G exception stack.
1.1       pazsan    315:     postpone (abort") ," ;        immediate restrict
                    316: 
                    317: \ \ Header states                                              23feb93py
                    318: 
                    319: : cset ( bmask c-addr -- )
                    320:     tuck c@ or swap c! ; 
                    321: 
                    322: : creset ( bmask c-addr -- )
                    323:     tuck c@ swap invert and swap c! ; 
                    324: 
                    325: : ctoggle ( bmask c-addr -- )
                    326:     tuck c@ xor swap c! ; 
                    327: 
                    328: : lastflags ( -- c-addr )
                    329:     \ the address of the flags byte in the last header
                    330:     \ aborts if the last defined word was headerless
                    331:     last @ dup 0= abort" last word was headerless" cell+ ;
                    332: 
                    333: : immediate ( -- ) \ core
1.10      crook     334:     \G Make the compilation semantics of a word be to @code{execute}
                    335:     \G the execution semantics.
1.1       pazsan    336:     immediate-mask lastflags cset ;
                    337: 
                    338: : restrict ( -- ) \ gforth
1.10      crook     339:     \G A synonym for @code{compile-only}
1.1       pazsan    340:     restrict-mask lastflags cset ;
1.18      jwilke    341: 
1.1       pazsan    342: ' restrict alias compile-only ( -- ) \ gforth
1.10      crook     343: \G Remove the interpretation semantics of a word.
1.1       pazsan    344: 
                    345: \ \ Create Variable User Constant                              17mar93py
                    346: 
1.15      crook     347: : Alias    ( xt "name" -- ) \ gforth
1.1       pazsan    348:     Header reveal
                    349:     alias-mask lastflags creset
                    350:     dup A, lastcfa ! ;
                    351: 
                    352: doer? :dovar [IF]
                    353: 
                    354: : Create ( "name" -- ) \ core
                    355:     Header reveal dovar: cfa, ;
                    356: [ELSE]
                    357: 
                    358: : Create ( "name" -- ) \ core
                    359:     Header reveal here lastcfa ! 0 A, 0 , DOES> ;
                    360: [THEN]
                    361: 
                    362: : Variable ( "name" -- ) \ core
                    363:     Create 0 , ;
                    364: 
                    365: : AVariable ( "name" -- ) \ gforth
                    366:     Create 0 A, ;
                    367: 
1.22      crook     368: : 2Variable ( "name" -- ) \ double two-variable
1.1       pazsan    369:     create 0 , 0 , ;
                    370: 
1.21      crook     371: : uallot ( n -- ) \ gforth
                    372:     udp @ swap udp +! ;
1.1       pazsan    373: 
                    374: doer? :douser [IF]
                    375: 
                    376: : User ( "name" -- ) \ gforth
                    377:     Header reveal douser: cfa, cell uallot , ;
                    378: 
                    379: : AUser ( "name" -- ) \ gforth
                    380:     User ;
                    381: [ELSE]
                    382: 
                    383: : User Create cell uallot , DOES> @ up @ + ;
                    384: 
                    385: : AUser User ;
                    386: [THEN]
                    387: 
                    388: doer? :docon [IF]
                    389:     : (Constant)  Header reveal docon: cfa, ;
                    390: [ELSE]
                    391:     : (Constant)  Create DOES> @ ;
                    392: [THEN]
                    393: 
                    394: : Constant ( w "name" -- ) \ core
1.15      crook     395:     \G Define a constant @i{name} with value @i{w}.
1.1       pazsan    396:     \G  
1.15      crook     397:     \G @i{name} execution: @i{-- w}
1.1       pazsan    398:     (Constant) , ;
                    399: 
                    400: : AConstant ( addr "name" -- ) \ gforth
                    401:     (Constant) A, ;
                    402: 
                    403: : Value ( w "name" -- ) \ core-ext
                    404:     (Constant) , ;
                    405: 
1.22      crook     406: : 2Constant ( w1 w2 "name" -- ) \ double two-constant
1.1       pazsan    407:     Create ( w1 w2 "name" -- )
                    408:         2,
                    409:     DOES> ( -- w1 w2 )
                    410:         2@ ;
                    411:     
                    412: doer? :dofield [IF]
                    413:     : (Field)  Header reveal dofield: cfa, ;
                    414: [ELSE]
                    415:     : (Field)  Create DOES> @ + ;
                    416: [THEN]
                    417: \ IS Defer What's Defers TO                            24feb93py
                    418: 
                    419: doer? :dodefer [IF]
                    420: 
                    421: : Defer ( "name" -- ) \ gforth
                    422:     \ !! shouldn't it be initialized with abort or something similar?
                    423:     Header Reveal dodefer: cfa,
                    424:     ['] noop A, ;
1.18      jwilke    425: 
1.1       pazsan    426: [ELSE]
                    427: 
                    428: : Defer ( "name" -- ) \ gforth
                    429:     Create ['] noop A,
                    430: DOES> @ execute ;
1.18      jwilke    431: 
1.1       pazsan    432: [THEN]
                    433: 
                    434: : Defers ( "name" -- ) \ gforth
                    435:     ' >body @ compile, ; immediate
1.18      jwilke    436: 
                    437: :noname
                    438:     dodoes, here !does ]
                    439:     defstart :-hook ;
                    440: :noname
                    441:     ;-hook ?struc
                    442:     [ has? xconds [IF] ] exit-like [ [THEN] ]
                    443:     postpone (does>) dodoes,
                    444:     defstart :-hook ;
                    445: interpret/compile: DOES>  ( compilation colon-sys1 -- colon-sys2 ; run-time nest-sys -- ) \ core        does
                    446: 
1.20      anton     447: : <IS> ( "name" xt -- ) \ gforth
                    448:     \g Changes the @code{defer}red word @var{name} to execute @var{xt}.
                    449:     ' >body ! ;
                    450: 
                    451: : [IS] ( compilation "name" -- ; run-time xt -- ) \ gforth bracket-is
                    452:     \g At run-time, changes the @code{defer}red word @var{name} to
                    453:     \g execute @var{xt}.
1.18      jwilke    454:     ' >body postpone ALiteral postpone ! ; immediate restrict
                    455: 
1.20      anton     456: ' <IS>
1.18      jwilke    457: ' [IS]
                    458: interpret/compile: IS ( xt "name" -- ) \ gforth
1.21      crook     459: \G A combined word made up from @code{<IS>} and @code{[IS]}.
1.18      jwilke    460: 
1.20      anton     461: ' <IS>
                    462: ' [IS]
                    463: interpret/compile: TO ( w "name" -- ) \ core-ext
1.18      jwilke    464: 
                    465: :noname    ' >body @ ;
                    466: :noname    ' >body postpone ALiteral postpone @ ;
                    467: interpret/compile: What's ( "name" -- addr ) \ gforth
                    468: 
                    469: \ \ interpret/compile:
                    470: 
                    471: struct
                    472:     >body
                    473:     cell% field interpret/compile-int
                    474:     cell% field interpret/compile-comp
                    475: end-struct interpret/compile-struct
                    476: 
                    477: : interpret/compile: ( interp-xt comp-xt "name" -- ) \ gforth
                    478:     Create immediate swap A, A,
                    479: DOES>
                    480:     abort" executed primary cfa of an interpret/compile: word" ;
                    481: \    state @ IF  cell+  THEN  perform ;
                    482: 
                    483: : interpret/compile? ( xt -- flag )
                    484:     >does-code ['] DOES> >does-code = ;
1.1       pazsan    485: 
                    486: \ \ : ;                                                        24feb93py
                    487: 
                    488: defer :-hook ( sys1 -- sys2 )
                    489: 
                    490: defer ;-hook ( sys2 -- sys1 )
                    491: 
1.16      jwilke    492: 0 Constant defstart
                    493: 
1.14      jwilke    494: [IFDEF] docol,
                    495: : (:noname) ( -- colon-sys )
                    496:     \ common factor of : and :noname
                    497:     docol, ]comp defstart ] :-hook ;
                    498: [ELSE]
1.7       anton     499: : (:noname) ( -- colon-sys )
                    500:     \ common factor of : and :noname
                    501:     docol: cfa, defstart ] :-hook ;
1.14      jwilke    502: [THEN]
1.7       anton     503: 
1.1       pazsan    504: : : ( "name" -- colon-sys ) \ core     colon
1.7       anton     505:     Header (:noname) ;
                    506: 
                    507: : :noname ( -- xt colon-sys ) \ core-ext       colon-no-name
                    508:     0 last !
                    509:     cfalign here (:noname) ;
1.1       pazsan    510: 
1.14      jwilke    511: [IFDEF] fini,
                    512: : ; ( compilation colon-sys -- ; run-time nest-sys ) \ core   semicolon
                    513:     ;-hook ?struc fini, comp[ reveal postpone [ ; immediate restrict
                    514: [ELSE]
1.1       pazsan    515: : ; ( compilation colon-sys -- ; run-time nest-sys ) \ core    semicolon
                    516:     ;-hook ?struc postpone exit reveal postpone [ ; immediate restrict
1.14      jwilke    517: [THEN]
1.1       pazsan    518: 
                    519: \ \ Search list handling: reveal words, recursive              23feb93py
                    520: 
                    521: : last?   ( -- false / nfa nfa )
                    522:     last @ ?dup ;
                    523: 
                    524: : (reveal) ( nt wid -- )
1.3       pazsan    525:     wordlist-id dup >r
1.1       pazsan    526:     @ over ( name>link ) ! 
                    527:     r> ! ;
                    528: 
                    529: \ make entry in wordlist-map
                    530: ' (reveal) f83search reveal-method !
                    531: 
                    532: Variable warnings ( -- addr ) \ gforth
                    533: G -1 warnings T !
                    534: 
                    535: : check-shadow  ( addr count wid -- )
1.2       pazsan    536:     \G prints a warning if the string is already present in the wordlist
                    537:     >r 2dup 2dup r> (search-wordlist) warnings @ and ?dup if
                    538:        >stderr
                    539:        ." redefined " name>string 2dup type
                    540:        compare 0<> if
                    541:            ."  with " type
                    542:        else
                    543:            2drop
                    544:        then
                    545:        space space EXIT
                    546:     then
                    547:     2drop 2drop ;
1.1       pazsan    548: 
                    549: : reveal ( -- ) \ gforth
                    550:     last?
                    551:     if \ the last word has a header
                    552:        dup ( name>link ) @ 1 and
                    553:        if \ it is still hidden
                    554:            dup ( name>link ) @ 1 xor           ( nt wid )
                    555:            2dup >r name>string r> check-shadow ( nt wid )
                    556:            dup wordlist-map @ reveal-method perform
                    557:        else
                    558:            drop
                    559:        then
                    560:     then ;
                    561: 
                    562: : rehash  ( wid -- )
                    563:     dup wordlist-map @ rehash-method perform ;
                    564: 
                    565: ' reveal alias recursive ( compilation -- ; run-time -- ) \ gforth
1.10      crook     566: \g Make the current definition visible, enabling it to call itself
1.1       pazsan    567: \g recursively.
                    568:        immediate restrict

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