Fri Jun 15 11:48:54 EDT 2012
Cache target code compilation
Trouble here is that it needs to have a sytax representation. Is that
possible with arbitrary (circular) data structures? Doesn't look like
(require (for-syntax scheme))
(define-syntax (foo stx)
(let ((val (make-vector 1)))
(vector-set! val 0 val)
(define bar (foo))
datum->syntax: cannot create syntax from cyclic datum: #0=#(#0#)
So... before this can work, there first needs to be a non-circular
representation of target words, where names are used to introduce
The only place where this happens in code is in an assignment
statement that links a word to its code. Can this be broken open?
grep -nrI . -e set-target-word
./comp/postprocess.ss:68: (set-target-word-next! w w+)
./comp/postprocess.ss:71: (set-target-word-code! word code)
./comp/postprocess.ss:91: (set-target-word-code! word
./asm/assembler.ss:134: (lambda (w) (set-target-word-address! w #f))
./asm/assembler.ss:167: (set-target-word-address! word addr)
./asm/assembler.ss:231: (set-target-word-bin! word inss)
I'm not sure if this is going to be an easy change.
It might be better to live with the situation and first make PK2 more robust.