diff --git a/ssc/init.fnl b/ssc/init.fnl index c9e1b35..79736fe 100644 --- a/ssc/init.fnl +++ b/ssc/init.fnl @@ -172,12 +172,13 @@ (let [[lhs rhs] args ropgen (self:push-opgen rhs) pre (when ropgen.setup (ropgen.setup)) - (left etype) (self:expr-poly lhs) + lopgen (self:expr-opgen lhs) + left (when lopgen.setup (lopgen.setup) (if ropgen.hi :long :word)) truebranch (if ropgen.cleanup (.. :-if-true-cleanup- depth) truelabel) falsebranch (if ropgen.cleanup (.. :-if-false-cleanup- depth) falselabel) - hibranch (when (= etype :long) - [[:lda self.LONG_HI] (ropgen.hi :cmp) (cmp.hibranch truebranch falsebranch) [:lda self.LONG_LO]]) - lobranch [(ropgen.lo :cmp) (cmp.lobranch falsebranch)] + hibranch (when lopgen.hi + [(lopgen.hi :lda) (ropgen.hi :cmp) (cmp.hibranch truebranch falsebranch)]) + lobranch [(lopgen.lo :lda) (ropgen.lo :cmp) (cmp.lobranch falsebranch)] cleanup (when ropgen.cleanup (ropgen.cleanup)) post (if cleanup [truebranch cleanup [:bra truelabel] falsebranch cleanup [:bra falselabel]] ?branch-when-true [[:bra truelabel]])] diff --git a/ssc/notes.txt b/ssc/notes.txt index 86dff9b..8802bf4 100644 --- a/ssc/notes.txt +++ b/ssc/notes.txt @@ -1,5 +1,4 @@ full compilation to expr-opgen TODO: -- gen-condition could potentially use it for lhs which is on the stack / in a global - word! and long! are a mess right now - I don't think word-at and long-at could use it