From 3d60211e6718598cf4b38f082e4bf563ee8866f9 Mon Sep 17 00:00:00 2001 From: Justin Ethier Date: Mon, 23 Dec 2019 16:26:07 -0500 Subject: [PATCH] Do not reassign the same var to itself --- scheme/cyclone/cgen.sld | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/scheme/cyclone/cgen.sld b/scheme/cyclone/cgen.sld index 7c408971..cfc7613a 100644 --- a/scheme/cyclone/cgen.sld +++ b/scheme/cyclone/cgen.sld @@ -970,11 +970,13 @@ string-append (map (lambda (arg body-exp) - (string-append - (mangle arg) - " = " - (c:body body-exp) - ";")) + (if (equal? (mangle arg) (c:body body-exp)) + "" ;; Do nothing + (string-append + (mangle arg) + " = " + (c:body body-exp) + ";"))) parent-args cgen-lis)))) ;;(trace:info `(loop ,args ,(cadr args) ,cgen-lis ,parent-args))