steve@mepis1:~/Desktop$ ls -al test*
-rw-r--r-- 1 steve users 97 Jun 7 11:10 test2.scm
-rw-r--r-- 1 root root 97 Jun 7 11:03 test.scm
steve@mepis1:~/Desktop$ gsc -exe test.scm
steve@mepis1:~/Desktop$ ls -al test*
-rwxr-xr-x 1 steve users 5449050 Jun 7 11:18 test
-rw-r--r-- 1 steve users 97 Jun 7 11:10 test2.scm
-rw-r--r-- 1 root root 97 Jun 7 11:03 test.scm
steve@mepis1:~/Desktop$ gsc -exe -e '(set! c#targ-tree-shake? #t)' test2.scm
steve@mepis1:~/Desktop$ ls -al test*
-rwxr-xr-x 1 steve users 5449050 Jun 7 11:18 test
-rwxr-xr-x 1 steve users 5449057 Jun 7 11:19 test2
-rw-r--r-- 1 steve users 97 Jun 7 11:10 test2.scm
-rw-r--r-- 1 root root 97 Jun 7 11:03 test.scm
steve@mepis1:~/Desktop$ ./test
123
steve@mepis1:~/Desktop$ ./test2
123
steve@mepis1:~/Desktop$
So, they both execute, but the tree shaking didn't seem to do much.
Any thoughts?
Thanks, Steve
root@mepis1:/opt/gambit# cat test.scm
(define (block))
(define (f x)
(+ (* x x)
(- x 1)))
(define (g y)
(f (f y)))
(pp 123)
root@mepis1:/opt/gambit# gsc test.scm
*** ERROR IN "/opt/gambit/test.scm"@1.1 -- Ill-formed special form: define
root@mepis1:/opt/gambit# gsc -e '(set! c#targ-tree-shake? #t)' test.scm
*** ERROR IN (string)@1.1 -- Unbound variable: c#targ-tree-shake?
Any ideas?
Thanks, Steve