diff options
author | Eduardo Julian | 2015-02-18 00:49:55 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-02-18 00:49:55 -0400 |
commit | ef6c934aa876d1c7426ec567a3d7b4cf136d573e (patch) | |
tree | fa49084d3f068fb983d9cbec8986082969b6a7eb /src/lux/compiler/case.clj | |
parent | ff0bdbddd74a23c59e421403f82a20fd216faf56 (diff) |
Corrections to the super-refactoring: part 4
Diffstat (limited to '')
-rw-r--r-- | src/lux/compiler/case.clj | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/lux/compiler/case.clj b/src/lux/compiler/case.clj index a6a181a6d..2139bb24a 100644 --- a/src/lux/compiler/case.clj +++ b/src/lux/compiler/case.clj @@ -535,25 +535,30 @@ )) (defn ^:private decision-tree [branches] + (prn 'decision-tree branches) (exec [group (reduce-m group-branch [::?PM (list)] branches) :let [[mappings group*] (map-bodies group) paths (valid-paths group*)]] - (sequence-pm paths group*))) + (sequence-pm group*))) ;; [Resources] (let [ex-class (&host/->class "java.lang.IllegalStateException")] (defn compile-case [compile *type* ?variant ?base-register ?num-registers ?branches] (exec [*writer* &util/get-writer + :let [_ (prn "Has writer")] :let [$start (new Label) $end (new Label) _ (dotimes [offset ?num-registers] (let [idx (+ ?base-register offset)] (.visitLocalVariable *writer* (str &&/local-prefix idx) (&host/->java-sig [::&type/Any]) nil $start $end idx)))] + :let [_ (prn "PRE Compiled ?variant")] _ (compile ?variant) + :let [_ (prn "POST Compiled ?variant")] :let [_ (doto *writer* (.visitInsn Opcodes/DUP) (.visitLabel $start))] - :let [[mapping tree] (decision-tree ?branches)] + [mapping tree] (decision-tree ?branches) + :let [_ (assert false "compile-case")] ;; :let [[mappings pm-struct*] (map-bodies pm-struct) ;; entries (for [[?branch ?body] mappings |