From a94b482b001d99ecffdb31067319773cbde4501e Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Wed, 30 Oct 2024 00:34:36 +0530 Subject: Add emission for functions Able to execute "hello, world" program. Some segmentation faults in specific test steps. Executables not exiting on their own. --- src/cljcc/compiler.clj | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/cljcc/compiler.clj') diff --git a/src/cljcc/compiler.clj b/src/cljcc/compiler.clj index b0e5770..c1af6de 100644 --- a/src/cljcc/compiler.clj +++ b/src/cljcc/compiler.clj @@ -394,7 +394,7 @@ flatten (remove nil?)))) -(defn- tacky-function->assembly-function [{:keys [type identifier parameters instructions] :as function-definition}] +(defn- tacky-function->assembly-function [{:keys [type identifier parameters instructions]}] (let [parameter-instructions (parameters->assembly-instructions parameters) body-instructions (->> instructions (keep tacky-inst->assembly-inst) -- cgit v1.2.3