[Wisp-cvs] wisp/tools worth,1.28,1.29
Status: Alpha
Brought to you by:
digg
From: <di...@us...> - 2002-09-07 22:03:59
|
Update of /cvsroot/wisp/wisp/tools In directory usw-pr-cvs1:/tmp/cvs-serv7142/tools Modified Files: worth Log Message: Replaced the C-written |sys:fstat|, |sys:lstat|, and |sys:stat| with the Worth-written |sys:ns:fstat|, |sys:ns:lstat|, and |sys:ns:stat|. Index: worth =================================================================== RCS file: /cvsroot/wisp/wisp/tools/worth,v retrieving revision 1.28 retrieving revision 1.29 diff -u -d -r1.28 -r1.29 --- worth 7 Sep 2002 22:02:43 -0000 1.28 +++ worth 7 Sep 2002 22:03:56 -0000 1.29 @@ -15,7 +15,7 @@ unix) (define builtin-words - '(< <= <> = > >= begin else if then u< u<= u> u>= until)) + '(< <= <> = > >= begin else if stack=! then u< u<= u> u>= until)) (define (other op c) (cond @@ -105,8 +105,10 @@ (define namegenctr (make-counter)) +(define filename-root (make-box)) + (define (genname) - (string->symbol "_G$(namegenctr)_")) + (string->symbol "_$,[filename-root[]]_G$(namegenctr)_")) (define (reduce-to-utetra i) (modulo i #x100000000)) @@ -464,6 +466,14 @@ (my a (car regstack) (cdr! regstack) (cons! regstack (list word a b))))))) + ((stack=!) + (if (null? regstack) + (raise 'invalid-context 'stack=!)) + (my depth (car regstack) + (cdr! regstack) + (type integer depth) + (stack<=! depth) + (stack>=! depth))) ((if) ; booleanize and negate the stacktop (process-word 0 suppress?) @@ -734,6 +744,7 @@ (print "Worth is free software as defined by GPL 2.0.\n\n") (exit))) (set! skip-assembly?[] sa#) + (set! filename-root[] (basename input)) (if (not output) (my suffix (cond (skip-assembly?[] ".was") (as-source? ".s") |