From f2a60f486821118d11ab2bb7f496450176193411 Mon Sep 17 00:00:00 2001 From: Shagun Agrawal Date: Sun, 8 Dec 2024 22:02:49 +0530 Subject: Tacky generation cleanup --- src/cljcc/tacky.clj | 36 +++--------------------------------- 1 file changed, 3 insertions(+), 33 deletions(-) (limited to 'src/cljcc/tacky.clj') diff --git a/src/cljcc/tacky.clj b/src/cljcc/tacky.clj index 8f87165..678c74e 100644 --- a/src/cljcc/tacky.clj +++ b/src/cljcc/tacky.clj @@ -5,12 +5,9 @@ [cljcc.parser :as p] [cljcc.exception :as exc] [cljcc.symbol :as sym] - [cljcc.analyze.resolve :as r] - [cljcc.analyze.label-loops :as label-loop] [malli.dev.pretty :as pretty] [cljcc.analyze.typecheck :as tc] [cljcc.analyze.core :as a] - [malli.core :as m] [cljcc.schema :as s])) (defn- variable @@ -172,30 +169,6 @@ (fn [exp _symbols] (:exp-type exp))) -(comment - - (exp-handler - {:type :exp, - :exp-type :function-call-exp, - :children [:arguments], - :identifier "foo", - :arguments [], - :value-type {:type :long}} - (atom {})) - - ()) - -(comment - - (exp-handler - {:type :exp, - :exp-type :variable-exp, - :identifier "x.5", - :value-type {:type :int}} - (atom {})) - - ()) - (defmethod exp-handler :default [_ _] {:instructions []}) @@ -363,10 +336,6 @@ [exp symbols] (postwalk exp #(exp-handler % symbols))) -(comment - - ()) - ;;;; Statement Handlers (declare statement->tacky-instruction block-item->tacky-instruction) @@ -548,8 +517,9 @@ symbols (atom ident->symbol) function-instructions (tacky-function-instructions ast symbols) program (vec (concat variable-instructions function-instructions)) - _ (m/coerce s/TackyProgram program) - _ (m/coerce s/SymbolMap @symbols)] + ;_ (m/coerce s/TackyProgram program) + ;_ (m/coerce s/SymbolMap @symbols) + ] {:program program :ident->symbol @symbols})) -- cgit v1.2.3