From 2d68fde138c54549a77c636272db2cf530aaff4a Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Wed, 4 Nov 2015 20:55:27 -0500 Subject: [PATCH] Simplified code --- scheme/cyclone/cgen.sld | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/scheme/cyclone/cgen.sld b/scheme/cyclone/cgen.sld index 3d7f7d3f..69743427 100644 --- a/scheme/cyclone/cgen.sld +++ b/scheme/cyclone/cgen.sld @@ -844,25 +844,14 @@ (list (string-append (car (c:allocs c-fun)) (if (prim/c-var-assign fun) - ;; Add a comma if there were any args to the func - (let* ((fnc-str (car (c:allocs c-fun))) - (len (string-length fnc-str))) -;(write (string-append "(JAE-DEBUG " fnc-str)) -TODO: rewrite cond below in terms of (str-ending?) - (cond - ((and (> len 0) - (not (equal? "(" - (substring fnc-str (- len 1) len)))) - ",") - (else ""))) + ;; Add a comma if there were any args to the func added by comp-prim + (if (str-ending? (car (c:allocs c-fun)) "(") "" ",") ",") (c:body c-args*) ");")))) ;; Args stay with body (c:append (c:append (let () -;(display "JAE DEBUG2: ") -;(write c-fun) ;; Add a comma if necessary (if (str-ending? (c:body c-fun) "(") c-fun