trying to trace where the time is going

This commit is contained in:
Danny Yoo 2011-09-02 10:54:51 -04:00
parent 97681d43ec
commit eb2c71232c

View File

@ -241,12 +241,18 @@ MACHINE.modules[~s] =
(list->set (source-resources src))))
(fprintf op "\n// ** Visiting ~a\n" (source-name src))
(cond
(define temporary-output-port (open-output-bytes))
(time
(cond
[(UninterpretedSource? src)
(fprintf op "~a" (UninterpretedSource-datum src))]
(fprintf temporary-output-port "~a" (UninterpretedSource-datum src))]
[else
(assemble/write-invoke stmts op)
(fprintf op "(MACHINE, function() { ")]))
(assemble/write-invoke stmts temporary-output-port)
(fprintf temporary-output-port "(MACHINE, function() { ")]))
(displayln (source-name src))
(displayln (bytes-length (get-output-bytes temporary-output-port)))
(write-bytes (get-output-bytes temporary-output-port) op)
(void))
(define (after-visit-src src ast stmts)