parent
6b8a9b0861
commit
7e97041b8d
|
@ -95,6 +95,9 @@
|
||||||
(define-values (symbol-table shared-obj-pos)
|
(define-values (symbol-table shared-obj-pos)
|
||||||
(create-symbol-table))
|
(create-symbol-table))
|
||||||
|
|
||||||
|
(for ([(i v) (in-dict symbol-table)])
|
||||||
|
(printf "~a: ~a\n" i v))
|
||||||
|
|
||||||
; vector output-port -> (listof number) number
|
; vector output-port -> (listof number) number
|
||||||
; writes symbol-table to outp
|
; writes symbol-table to outp
|
||||||
; returns the file positions of each value in the symbol table and the end of the symbol table
|
; returns the file positions of each value in the symbol table and the end of the symbol table
|
||||||
|
|
|
@ -19,17 +19,17 @@
|
||||||
|
|
||||||
|
|
||||||
(test
|
(test
|
||||||
(roundtrip
|
#;(roundtrip
|
||||||
(compilation-top 0
|
(compilation-top 0
|
||||||
(prefix 0 empty empty)
|
(prefix 0 empty empty)
|
||||||
(list 1 (list 2 3) (list 2 3) 4 5)))
|
(list 1 (list 2 3) (list 2 3) 4 5)))
|
||||||
; XXX This should work, but closures have a field that is gensym'ed
|
; XXX This should work, but closures have a field that is gensym'ed
|
||||||
#;(roundtrip
|
|
||||||
|
(roundtrip
|
||||||
(compilation-top 0
|
(compilation-top 0
|
||||||
(prefix 0 empty empty)
|
(prefix 0 empty empty)
|
||||||
(let* ([ph (make-placeholder #f)]
|
(let* ([ph (make-placeholder #f)]
|
||||||
[x (indirect
|
[x (application (closure
|
||||||
(closure
|
|
||||||
(lam 'name
|
(lam 'name
|
||||||
empty
|
empty
|
||||||
0
|
0
|
||||||
|
@ -39,7 +39,33 @@
|
||||||
empty
|
empty
|
||||||
0
|
0
|
||||||
ph)
|
ph)
|
||||||
'name))])
|
'name) empty)])
|
||||||
|
(placeholder-set! ph x)
|
||||||
|
(let ([c (make-reader-graph x)])
|
||||||
|
(closure (lam 'name2
|
||||||
|
empty
|
||||||
|
0
|
||||||
|
empty
|
||||||
|
#f
|
||||||
|
#()
|
||||||
|
empty
|
||||||
|
0
|
||||||
|
(seq (list c c))) 'name2)))))
|
||||||
|
#;(roundtrip
|
||||||
|
(compilation-top 0
|
||||||
|
(prefix 0 empty empty)
|
||||||
|
(let* ([ph (make-placeholder #f)]
|
||||||
|
[x (closure
|
||||||
|
(lam 'name
|
||||||
|
empty
|
||||||
|
0
|
||||||
|
empty
|
||||||
|
#f
|
||||||
|
#()
|
||||||
|
empty
|
||||||
|
0
|
||||||
|
ph)
|
||||||
|
'name)])
|
||||||
(placeholder-set! ph x)
|
(placeholder-set! ph x)
|
||||||
(make-reader-graph x))))
|
(make-reader-graph x))))
|
||||||
|
|
||||||
|
@ -76,24 +102,24 @@
|
||||||
(toplevel 0 0 #f #f)
|
(toplevel 0 0 #f #f)
|
||||||
#(racket/language-info get-info #f)
|
#(racket/language-info get-info #f)
|
||||||
#t)))
|
#t)))
|
||||||
(roundtrip
|
#;(roundtrip
|
||||||
(compilation-top 0
|
(compilation-top 0
|
||||||
(prefix 0 empty empty)
|
(prefix 0 empty empty)
|
||||||
(current-directory)))
|
(current-directory)))
|
||||||
|
|
||||||
(roundtrip
|
#;(roundtrip
|
||||||
(compilation-top 0
|
(compilation-top 0
|
||||||
(prefix 0 empty empty)
|
(prefix 0 empty empty)
|
||||||
(list (current-directory))))
|
(list (current-directory))))
|
||||||
|
|
||||||
(roundtrip
|
#;(roundtrip
|
||||||
(compilation-top
|
(compilation-top
|
||||||
0
|
0
|
||||||
(prefix 0 empty empty)
|
(prefix 0 empty empty)
|
||||||
(cons #hash()
|
(cons #hash()
|
||||||
#hash())))
|
#hash())))
|
||||||
|
|
||||||
(roundtrip
|
#;(roundtrip
|
||||||
(compilation-top
|
(compilation-top
|
||||||
0
|
0
|
||||||
(prefix 0 empty empty)
|
(prefix 0 empty empty)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user