--- gforth/look.fs 2001/09/16 10:20:39 1.16 +++ gforth/look.fs 2002/12/21 17:27:13 1.20 @@ -35,14 +35,28 @@ decimal \ rename to discover!!! +: xt>threaded ( xt -- x ) +\G produces the threaded-code cell for the primitive xt + threading-method 0= if + @ + then ; + : (look) ( xt startlfa -- lfa flag ) - false swap - BEGIN @ dup - WHILE dup name>int - 3 pick = IF nip dup THEN - REPEAT - drop nip - dup 0<> ; + swap + [IFDEF] decompile-prim + decompile-prim + [THEN] + false rot + BEGIN + @ dup + WHILE + dup name>int xt>threaded + 3 pick = IF + nip dup + THEN + REPEAT + drop nip + dup 0<> ; \ !!! nicht optimal!