From 7e97041b8daaf47fb8cf8fdbe52035331554210f Mon Sep 17 00:00:00 2001 From: Blake Johnson Date: Wed, 13 Oct 2010 12:39:35 -0600 Subject: [PATCH] debugging original commit: 77c46d07eed7742d6bd525e7180866dbbe15217d --- collects/compiler/zo-marshal.rkt | 3 ++ collects/tests/compiler/zo-exs.rkt | 44 ++++++++++++++++++++++++------ 2 files changed, 38 insertions(+), 9 deletions(-) diff --git a/collects/compiler/zo-marshal.rkt b/collects/compiler/zo-marshal.rkt index 78a5af08e7..445128e074 100644 --- a/collects/compiler/zo-marshal.rkt +++ b/collects/compiler/zo-marshal.rkt @@ -95,6 +95,9 @@ (define-values (symbol-table shared-obj-pos) (create-symbol-table)) + (for ([(i v) (in-dict symbol-table)]) + (printf "~a: ~a\n" i v)) + ; vector output-port -> (listof number) number ; writes symbol-table to outp ; returns the file positions of each value in the symbol table and the end of the symbol table diff --git a/collects/tests/compiler/zo-exs.rkt b/collects/tests/compiler/zo-exs.rkt index 34ca2e4c2e..51b4e8dd9a 100644 --- a/collects/tests/compiler/zo-exs.rkt +++ b/collects/tests/compiler/zo-exs.rkt @@ -19,17 +19,17 @@ (test - (roundtrip + #;(roundtrip (compilation-top 0 (prefix 0 empty empty) (list 1 (list 2 3) (list 2 3) 4 5))) ; XXX This should work, but closures have a field that is gensym'ed - #;(roundtrip + + (roundtrip (compilation-top 0 (prefix 0 empty empty) (let* ([ph (make-placeholder #f)] - [x (indirect - (closure + [x (application (closure (lam 'name empty 0 @@ -39,7 +39,33 @@ empty 0 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) (make-reader-graph x)))) @@ -76,24 +102,24 @@ (toplevel 0 0 #f #f) #(racket/language-info get-info #f) #t))) - (roundtrip + #;(roundtrip (compilation-top 0 (prefix 0 empty empty) (current-directory))) - (roundtrip + #;(roundtrip (compilation-top 0 (prefix 0 empty empty) (list (current-directory)))) - (roundtrip + #;(roundtrip (compilation-top 0 (prefix 0 empty empty) (cons #hash() #hash()))) - (roundtrip + #;(roundtrip (compilation-top 0 (prefix 0 empty empty)