indentation

This commit is contained in:
Danny Yoo 2012-10-23 17:35:04 -06:00
parent af389dd564
commit ebd7051758

View File

@ -38,42 +38,42 @@
(define (assemble/write-invoke stmts op) (define (assemble/write-invoke stmts op)
(parameterize ([current-interned-symbol-table ((inst make-hash Symbol Symbol))] (parameterize ([current-interned-symbol-table ((inst make-hash Symbol Symbol))]
[current-interned-constant-closure-table ((inst make-hash Symbol MakeCompiledProcedure))]) [current-interned-constant-closure-table ((inst make-hash Symbol MakeCompiledProcedure))])
(display "(function(M, success, fail, params) {\n" op) (display "(function(M, success, fail, params) {\n" op)
(display "var param;\n" op) (display "var param;\n" op)
(display "var RT = plt.runtime;\n" op) (display "var RT = plt.runtime;\n" op)
(define-values (basic-blocks entry-points) (fracture stmts)) (define-values (basic-blocks entry-points) (fracture stmts))
(define function-entry-and-exit-names (define function-entry-and-exit-names
(list->set (get-function-entry-and-exit-names stmts))) (list->set (get-function-entry-and-exit-names stmts)))
(: blockht : Blockht) (: blockht : Blockht)
(define blockht (make-hash)) (define blockht (make-hash))
(for ([b basic-blocks]) (for ([b basic-blocks])
(hash-set! blockht (BasicBlock-name b) b)) (hash-set! blockht (BasicBlock-name b) b))
(write-blocks basic-blocks (write-blocks basic-blocks
blockht blockht
(list->set entry-points) (list->set entry-points)
function-entry-and-exit-names function-entry-and-exit-names
op) op)
(write-linked-label-attributes stmts blockht op) (write-linked-label-attributes stmts blockht op)
(display (assemble-current-interned-symbol-table) op) (display (assemble-current-interned-symbol-table) op)
(display (assemble-current-interned-constant-closure-table) op) (display (assemble-current-interned-constant-closure-table) op)
(display "M.params.currentErrorHandler = fail;\n" op) (display "M.params.currentErrorHandler = fail;\n" op)
(display "M.params.currentSuccessHandler = success;\n" op) (display "M.params.currentSuccessHandler = success;\n" op)
(display #<<EOF (display #<<EOF
for (param in params) { for (param in params) {
if (params.hasOwnProperty(param)) { if (params.hasOwnProperty(param)) {
M.params[param] = params[param]; M.params[param] = params[param];
} }
} }
EOF EOF
op) op)
(fprintf op "M.trampoline(~a, true); })" (fprintf op "M.trampoline(~a, true); })"
(assemble-label (make-Label (BasicBlock-name (first basic-blocks))))))) (assemble-label (make-Label (BasicBlock-name (first basic-blocks)))))))