From a4c4ae94fc3d8703b6dc1234f4a4d542bde40d9b Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 13 Jul 2015 21:18:29 -0400 Subject: [PATCH] Fixed up call trace outputs --- cgen.scm | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/cgen.scm b/cgen.scm index 52362704..c6468199 100644 --- a/cgen.scm +++ b/cgen.scm @@ -148,11 +148,7 @@ (cons (car trace) fnc) trace)) -TODO: don't just do this, need to output as valid C code... -TODO: try and output this as the first expression after all var declarations. - may require change where this is called, though (define (st:->code trace) - ;;(write `(JAE DEBUG ,trace)) (if (or (not (pair? trace)) (null? (cdr trace))) "" @@ -1013,8 +1009,12 @@ TODO: try and output this as the first expression after all var declarations. (if has-closure? 1 0))) ");\n"); "") ; No varargs, skip - (st:->code trace) - (c:serialize body " ") "; \n" + (c:serialize + (c:append + (c-code (st:->code trace)) + body) + " ") + "; \n" "}\n")) formals*))))