Dimitris Vardoulakis
2009-04-25 21:28:35 UTC
Hi,
which file in the source code shows what happens when I type a
definition in the repl?
For example, I can type
and a procedure is created which I can then call.
However, when I use the "assemble" and "compile" functions to compile
a lambda expression the result I get isn't a procedure (doesn't
satisfy procedure?).
118 6 255 85 16 144 235 231 139 93 12 45 0 1 0 0 137 69 12 199 3 254
12 0 0 86 139 118 1 139 70 5 137 67 4 139 70 9 94 137 67 8 137 115 12
128 195 7 195)
.
#((data #f)
(codevector
#vu8(131 251 4 116 17 199 69 44 4 0 0 0 255 149 0 2 0 0 144 144
235 234 137 203 195))
(constantvector #((data #(#f #f 1 #f #f (x)))))))
So, what else is happening when I send sth to the repl directly, vs
calling "assemble" and "compile" myself?
which file in the source code shows what happens when I type a
definition in the repl?
For example, I can type
(define (id x) x)
(procedure? id)
#t(procedure? id)
and a procedure is created which I can then call.
However, when I use the "assemble" and "compile" functions to compile
a lambda expression the result I get isn't a procedure (doesn't
satisfy procedure?).
(define exp1 '(lambda (x) x))
(define cexp1 (assemble (compile exp1)))
(procedure? cexp1)
#f(define cexp1 (assemble (compile exp1)))
(procedure? cexp1)
cexp1
(#vu8(187 16 0 0 0 139 69 12 141 68 24 4 131 224 248 5 0 1 0 0 57 224118 6 255 85 16 144 235 231 139 93 12 45 0 1 0 0 137 69 12 199 3 254
12 0 0 86 139 118 1 139 70 5 137 67 4 139 70 9 94 137 67 8 137 115 12
128 195 7 195)
.
#((data #f)
(codevector
#vu8(131 251 4 116 17 199 69 44 4 0 0 0 255 149 0 2 0 0 144 144
235 234 137 203 195))
(constantvector #((data #(#f #f 1 #f #f (x)))))))
So, what else is happening when I send sth to the repl directly, vs
calling "assemble" and "compile" myself?
--
Dimitris
Dimitris