--- gforth/kernel/Attic/special.fs 1997/05/21 20:40:18 1.1 +++ gforth/kernel/Attic/special.fs 1998/05/02 21:29:09 1.5 @@ -21,14 +21,22 @@ \ this file comes last, because these words override cross' words. create s"-buffer /line chars allot -:noname [char] " parse - /line min >r s"-buffer r@ cmove - s"-buffer r> ; -:noname [char] " parse postpone SLiteral ; +has? compiler 0= +[IF] : s" [ELSE] :noname [THEN] + [char] " parse + /line min >r s"-buffer r@ cmove + s"-buffer r> ; +has? compiler [IF] +:noname [char] " parse postpone SLiteral ; interpret/compile: S" ( compilation 'ccc"' -- ; run-time -- c-addr u ) \ core,file s-quote +[THEN] + +has? compiler [IF] +: [IS] ( compilation "name" -- ; run-time xt -- ) \ possibly-gforth bracket-is + ' >body postpone ALiteral postpone ! ; immediate restrict :noname ' >body ! ; -:noname ' >body postpone ALiteral postpone ! ; +' [IS] interpret/compile: IS ( addr "name" -- ) \ gforth :noname ' >body @ ; @@ -52,4 +60,13 @@ interpret/compile: DOES> ( compilation ' IS Alias TO ( addr "name" -- ) \ core-ext immediate +[THEN] + +has? compiler [IF] +: interpret/compile? ( xt -- flag ) + >does-code ['] S" >does-code = ; +[ELSE] +: interpret/compile? + false ; +[THEN]