diff options
author | Eduardo Julian | 2015-03-08 02:20:51 -0400 |
---|---|---|
committer | Eduardo Julian | 2015-03-08 02:20:51 -0400 |
commit | 9b0c07dbf78bbdb6e13fbbd44e02fe322d9f145c (patch) | |
tree | 0cfc071a8c96cca29f0a9fa299e9e373cf3ed7fb /src/lux/compiler/case.clj | |
parent | c7fc7e1ffa91db4a563a48d53743a5e0752779ea (diff) |
- Changed once more the syntax of the prefix for host special forms. It's now "jvm-" instead of "jvm;"
- Fixed the bug where the same local vars/registers were getting registered more than once and the class-verifier complained.
- Fixed a bug where the "end label" for pattern-matching bodies was never inserted.
- Simplified the analyser by removing "self" calls and having self be just a local for the "this" object (register 0).
- Removed the lambda-folding optimization.
- The compiler state now holds and environment for naming globally-scoped lambdas.
Diffstat (limited to 'src/lux/compiler/case.clj')
-rw-r--r-- | src/lux/compiler/case.clj | 7 |
1 files changed, 1 insertions, 6 deletions
diff --git a/src/lux/compiler/case.clj b/src/lux/compiler/case.clj index 48c52123f..37fe6c61f 100644 --- a/src/lux/compiler/case.clj +++ b/src/lux/compiler/case.clj @@ -189,12 +189,7 @@ ;; [Resources] (defn compile-case [compile *type* ?variant ?base-register ?num-registers ?branches] (exec [*writer* &/get-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))) - _ (.visitLabel *writer* $start)] + :let [$end (new Label)] _ (compile ?variant) :let [[mappings patterns] (process-branches ?base-register ?branches)] _ (compile-pattern-matching *writer* compile mappings patterns $end) |