aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/lux/analyser.clj16
-rw-r--r--src/lux/analyser/base.clj3
-rw-r--r--src/lux/analyser/host.clj205
-rw-r--r--src/lux/compiler.clj9
-rw-r--r--src/lux/compiler/host.clj203
-rw-r--r--src/lux/optimizer.clj12
6 files changed, 210 insertions, 238 deletions
diff --git a/src/lux/analyser.clj b/src/lux/analyser.clj
index 55f05ce84..9c6158325 100644
--- a/src/lux/analyser.clj
+++ b/src/lux/analyser.clj
@@ -199,22 +199,6 @@
(|do [catches+finally (&/fold% &&a-parser/parse-handler (&/T [&/$Nil &/$None]) ?handlers)]
(&&host/analyse-jvm-try analyse exo-type ?body catches+finally))
- (&/$FormS (&/$Cons [_ (&/$SymbolS _ "_jvm_throw")]
- (&/$Cons ?ex
- (&/$Nil))))
- (&&host/analyse-jvm-throw analyse exo-type ?ex)
-
- ;; Syncronization/monitos
- (&/$FormS (&/$Cons [_ (&/$SymbolS _ "_jvm_monitorenter")]
- (&/$Cons ?monitor
- (&/$Nil))))
- (&&host/analyse-jvm-monitorenter analyse exo-type ?monitor)
-
- (&/$FormS (&/$Cons [_ (&/$SymbolS _ "_jvm_monitorexit")]
- (&/$Cons ?monitor
- (&/$Nil))))
- (&&host/analyse-jvm-monitorexit analyse exo-type ?monitor)
-
_
(aba4 analyse eval! compile-module compile-statement exo-type token)))
diff --git a/src/lux/analyser/base.clj b/src/lux/analyser/base.clj
index 7d20b808d..86838d354 100644
--- a/src/lux/analyser/base.clj
+++ b/src/lux/analyser/base.clj
@@ -40,9 +40,6 @@
("jvm-class" 1)
("jvm-interface" 1)
("jvm-try" 1)
- ("jvm-throw" 1)
- ("jvm-monitorenter" 1)
- ("jvm-monitorexit" 1)
("jvm-program" 1)
)
diff --git a/src/lux/analyser/host.clj b/src/lux/analyser/host.clj
index 2b3dedd4c..4d422d4d1 100644
--- a/src/lux/analyser/host.clj
+++ b/src/lux/analyser/host.clj
@@ -878,25 +878,6 @@
(&&/$host (&/T ["jvm" "arraylength"]) (&/|list =array))
)))))
-(defn analyse-jvm-throw [analyse exo-type ?ex]
- (|do [=ex (&&/analyse-1 analyse (&/$DataT "java.lang.Throwable" &/$Nil) ?ex)
- _cursor &/cursor
- _ (&type/check exo-type &/$VoidT)]
- (return (&/|list (&&/|meta exo-type _cursor (&&/$jvm-throw =ex))))))
-
-(do-template [<name> <tag>]
- (defn <name> [analyse exo-type ?monitor]
- (|do [=monitor (&&/analyse-1+ analyse ?monitor)
- _ (ensure-object (&&/expr-type* =monitor))
- :let [output-type &/$UnitT]
- _ (&type/check exo-type output-type)
- _cursor &/cursor]
- (return (&/|list (&&/|meta output-type _cursor (<tag> =monitor))))))
-
- analyse-jvm-monitorenter &&/$jvm-monitorenter
- analyse-jvm-monitorexit &&/$jvm-monitorexit
- )
-
(defn ^:private analyse-jvm-null? [analyse exo-type ?values]
(|do [:let [(&/$Cons object (&/$Nil)) ?values]
=object (&&/analyse-1+ analyse object)
@@ -915,90 +896,116 @@
(return (&/|list (&&/|meta exo-type _cursor
(&&/$host (&/T ["jvm" "null"]) (&/|list)))))))
+(do-template [<name> <tag>]
+ (defn <name> [analyse exo-type ?values]
+ (|do [:let [(&/$Cons ?monitor (&/$Nil)) ?values]
+ =monitor (&&/analyse-1+ analyse ?monitor)
+ _ (ensure-object (&&/expr-type* =monitor))
+ :let [output-type &/$UnitT]
+ _ (&type/check exo-type output-type)
+ _cursor &/cursor]
+ (return (&/|list (&&/|meta exo-type _cursor
+ (&&/$host (&/T ["jvm" <tag>]) (&/|list =monitor)))))))
+
+ ^:private analyse-jvm-monitorenter "monitorenter"
+ ^:private analyse-jvm-monitorexit "monitorexit"
+ )
+
+(defn ^:private analyse-jvm-throw [analyse exo-type ?values]
+ (|do [:let [(&/$Cons ?ex (&/$Nil)) ?values]
+ =ex (&&/analyse-1 analyse (&/$DataT "java.lang.Throwable" &/$Nil) ?ex)
+ _cursor &/cursor
+ _ (&type/check exo-type &/$VoidT)]
+ (return (&/|list (&&/|meta exo-type _cursor
+ (&&/$host (&/T ["jvm" "throw"]) (&/|list =ex)))))))
+
(defn analyse-host [analyse exo-type category proc ?values]
(case category
"jvm"
(case proc
- "null?" (analyse-jvm-null? analyse exo-type ?values)
- "null" (analyse-jvm-null analyse exo-type ?values)
- "anewarray" (analyse-jvm-anewarray analyse exo-type ?values)
- "aaload" (analyse-jvm-aaload analyse exo-type ?values)
- "aastore" (analyse-jvm-aastore analyse exo-type ?values)
- "arraylength" (analyse-jvm-arraylength analyse exo-type ?values)
- "znewarray" (analyse-jvm-znewarray analyse exo-type ?values)
- "bnewarray" (analyse-jvm-bnewarray analyse exo-type ?values)
- "snewarray" (analyse-jvm-snewarray analyse exo-type ?values)
- "inewarray" (analyse-jvm-inewarray analyse exo-type ?values)
- "lnewarray" (analyse-jvm-lnewarray analyse exo-type ?values)
- "fnewarray" (analyse-jvm-fnewarray analyse exo-type ?values)
- "dnewarray" (analyse-jvm-dnewarray analyse exo-type ?values)
- "cnewarray" (analyse-jvm-cnewarray analyse exo-type ?values)
- "iadd" (analyse-jvm-iadd analyse exo-type ?values)
- "isub" (analyse-jvm-isub analyse exo-type ?values)
- "imul" (analyse-jvm-imul analyse exo-type ?values)
- "idiv" (analyse-jvm-idiv analyse exo-type ?values)
- "irem" (analyse-jvm-irem analyse exo-type ?values)
- "ieq" (analyse-jvm-ieq analyse exo-type ?values)
- "ilt" (analyse-jvm-ilt analyse exo-type ?values)
- "igt" (analyse-jvm-igt analyse exo-type ?values)
- "ceq" (analyse-jvm-ceq analyse exo-type ?values)
- "clt" (analyse-jvm-clt analyse exo-type ?values)
- "cgt" (analyse-jvm-cgt analyse exo-type ?values)
- "ladd" (analyse-jvm-ladd analyse exo-type ?values)
- "lsub" (analyse-jvm-lsub analyse exo-type ?values)
- "lmul" (analyse-jvm-lmul analyse exo-type ?values)
- "ldiv" (analyse-jvm-ldiv analyse exo-type ?values)
- "lrem" (analyse-jvm-lrem analyse exo-type ?values)
- "leq" (analyse-jvm-leq analyse exo-type ?values)
- "llt" (analyse-jvm-llt analyse exo-type ?values)
- "lgt" (analyse-jvm-lgt analyse exo-type ?values)
- "fadd" (analyse-jvm-fadd analyse exo-type ?values)
- "fsub" (analyse-jvm-fsub analyse exo-type ?values)
- "fmul" (analyse-jvm-fmul analyse exo-type ?values)
- "fdiv" (analyse-jvm-fdiv analyse exo-type ?values)
- "frem" (analyse-jvm-frem analyse exo-type ?values)
- "feq" (analyse-jvm-feq analyse exo-type ?values)
- "flt" (analyse-jvm-flt analyse exo-type ?values)
- "fgt" (analyse-jvm-fgt analyse exo-type ?values)
- "dadd" (analyse-jvm-dadd analyse exo-type ?values)
- "dsub" (analyse-jvm-dsub analyse exo-type ?values)
- "dmul" (analyse-jvm-dmul analyse exo-type ?values)
- "ddiv" (analyse-jvm-ddiv analyse exo-type ?values)
- "drem" (analyse-jvm-drem analyse exo-type ?values)
- "deq" (analyse-jvm-deq analyse exo-type ?values)
- "dlt" (analyse-jvm-dlt analyse exo-type ?values)
- "dgt" (analyse-jvm-dgt analyse exo-type ?values)
- "iand" (analyse-jvm-iand analyse exo-type ?values)
- "ior" (analyse-jvm-ior analyse exo-type ?values)
- "ixor" (analyse-jvm-ixor analyse exo-type ?values)
- "ishl" (analyse-jvm-ishl analyse exo-type ?values)
- "ishr" (analyse-jvm-ishr analyse exo-type ?values)
- "iushr" (analyse-jvm-iushr analyse exo-type ?values)
- "land" (analyse-jvm-land analyse exo-type ?values)
- "lor" (analyse-jvm-lor analyse exo-type ?values)
- "lxor" (analyse-jvm-lxor analyse exo-type ?values)
- "lshl" (analyse-jvm-lshl analyse exo-type ?values)
- "lshr" (analyse-jvm-lshr analyse exo-type ?values)
- "lushr" (analyse-jvm-lushr analyse exo-type ?values)
- "d2f" (analyse-jvm-d2f analyse exo-type ?values)
- "d2i" (analyse-jvm-d2i analyse exo-type ?values)
- "d2l" (analyse-jvm-d2l analyse exo-type ?values)
- "f2d" (analyse-jvm-f2d analyse exo-type ?values)
- "f2i" (analyse-jvm-f2i analyse exo-type ?values)
- "f2l" (analyse-jvm-f2l analyse exo-type ?values)
- "i2b" (analyse-jvm-i2b analyse exo-type ?values)
- "i2c" (analyse-jvm-i2c analyse exo-type ?values)
- "i2d" (analyse-jvm-i2d analyse exo-type ?values)
- "i2f" (analyse-jvm-i2f analyse exo-type ?values)
- "i2l" (analyse-jvm-i2l analyse exo-type ?values)
- "i2s" (analyse-jvm-i2s analyse exo-type ?values)
- "l2d" (analyse-jvm-l2d analyse exo-type ?values)
- "l2f" (analyse-jvm-l2f analyse exo-type ?values)
- "l2i" (analyse-jvm-l2i analyse exo-type ?values)
- "c2b" (analyse-jvm-c2b analyse exo-type ?values)
- "c2s" (analyse-jvm-c2s analyse exo-type ?values)
- "c2i" (analyse-jvm-c2i analyse exo-type ?values)
- "c2l" (analyse-jvm-c2l analyse exo-type ?values)
+ "throw" (analyse-jvm-throw analyse exo-type ?values)
+ "monitorenter" (analyse-jvm-monitorenter analyse exo-type ?values)
+ "monitorexit" (analyse-jvm-monitorexit analyse exo-type ?values)
+ "null?" (analyse-jvm-null? analyse exo-type ?values)
+ "null" (analyse-jvm-null analyse exo-type ?values)
+ "anewarray" (analyse-jvm-anewarray analyse exo-type ?values)
+ "aaload" (analyse-jvm-aaload analyse exo-type ?values)
+ "aastore" (analyse-jvm-aastore analyse exo-type ?values)
+ "arraylength" (analyse-jvm-arraylength analyse exo-type ?values)
+ "znewarray" (analyse-jvm-znewarray analyse exo-type ?values)
+ "bnewarray" (analyse-jvm-bnewarray analyse exo-type ?values)
+ "snewarray" (analyse-jvm-snewarray analyse exo-type ?values)
+ "inewarray" (analyse-jvm-inewarray analyse exo-type ?values)
+ "lnewarray" (analyse-jvm-lnewarray analyse exo-type ?values)
+ "fnewarray" (analyse-jvm-fnewarray analyse exo-type ?values)
+ "dnewarray" (analyse-jvm-dnewarray analyse exo-type ?values)
+ "cnewarray" (analyse-jvm-cnewarray analyse exo-type ?values)
+ "iadd" (analyse-jvm-iadd analyse exo-type ?values)
+ "isub" (analyse-jvm-isub analyse exo-type ?values)
+ "imul" (analyse-jvm-imul analyse exo-type ?values)
+ "idiv" (analyse-jvm-idiv analyse exo-type ?values)
+ "irem" (analyse-jvm-irem analyse exo-type ?values)
+ "ieq" (analyse-jvm-ieq analyse exo-type ?values)
+ "ilt" (analyse-jvm-ilt analyse exo-type ?values)
+ "igt" (analyse-jvm-igt analyse exo-type ?values)
+ "ceq" (analyse-jvm-ceq analyse exo-type ?values)
+ "clt" (analyse-jvm-clt analyse exo-type ?values)
+ "cgt" (analyse-jvm-cgt analyse exo-type ?values)
+ "ladd" (analyse-jvm-ladd analyse exo-type ?values)
+ "lsub" (analyse-jvm-lsub analyse exo-type ?values)
+ "lmul" (analyse-jvm-lmul analyse exo-type ?values)
+ "ldiv" (analyse-jvm-ldiv analyse exo-type ?values)
+ "lrem" (analyse-jvm-lrem analyse exo-type ?values)
+ "leq" (analyse-jvm-leq analyse exo-type ?values)
+ "llt" (analyse-jvm-llt analyse exo-type ?values)
+ "lgt" (analyse-jvm-lgt analyse exo-type ?values)
+ "fadd" (analyse-jvm-fadd analyse exo-type ?values)
+ "fsub" (analyse-jvm-fsub analyse exo-type ?values)
+ "fmul" (analyse-jvm-fmul analyse exo-type ?values)
+ "fdiv" (analyse-jvm-fdiv analyse exo-type ?values)
+ "frem" (analyse-jvm-frem analyse exo-type ?values)
+ "feq" (analyse-jvm-feq analyse exo-type ?values)
+ "flt" (analyse-jvm-flt analyse exo-type ?values)
+ "fgt" (analyse-jvm-fgt analyse exo-type ?values)
+ "dadd" (analyse-jvm-dadd analyse exo-type ?values)
+ "dsub" (analyse-jvm-dsub analyse exo-type ?values)
+ "dmul" (analyse-jvm-dmul analyse exo-type ?values)
+ "ddiv" (analyse-jvm-ddiv analyse exo-type ?values)
+ "drem" (analyse-jvm-drem analyse exo-type ?values)
+ "deq" (analyse-jvm-deq analyse exo-type ?values)
+ "dlt" (analyse-jvm-dlt analyse exo-type ?values)
+ "dgt" (analyse-jvm-dgt analyse exo-type ?values)
+ "iand" (analyse-jvm-iand analyse exo-type ?values)
+ "ior" (analyse-jvm-ior analyse exo-type ?values)
+ "ixor" (analyse-jvm-ixor analyse exo-type ?values)
+ "ishl" (analyse-jvm-ishl analyse exo-type ?values)
+ "ishr" (analyse-jvm-ishr analyse exo-type ?values)
+ "iushr" (analyse-jvm-iushr analyse exo-type ?values)
+ "land" (analyse-jvm-land analyse exo-type ?values)
+ "lor" (analyse-jvm-lor analyse exo-type ?values)
+ "lxor" (analyse-jvm-lxor analyse exo-type ?values)
+ "lshl" (analyse-jvm-lshl analyse exo-type ?values)
+ "lshr" (analyse-jvm-lshr analyse exo-type ?values)
+ "lushr" (analyse-jvm-lushr analyse exo-type ?values)
+ "d2f" (analyse-jvm-d2f analyse exo-type ?values)
+ "d2i" (analyse-jvm-d2i analyse exo-type ?values)
+ "d2l" (analyse-jvm-d2l analyse exo-type ?values)
+ "f2d" (analyse-jvm-f2d analyse exo-type ?values)
+ "f2i" (analyse-jvm-f2i analyse exo-type ?values)
+ "f2l" (analyse-jvm-f2l analyse exo-type ?values)
+ "i2b" (analyse-jvm-i2b analyse exo-type ?values)
+ "i2c" (analyse-jvm-i2c analyse exo-type ?values)
+ "i2d" (analyse-jvm-i2d analyse exo-type ?values)
+ "i2f" (analyse-jvm-i2f analyse exo-type ?values)
+ "i2l" (analyse-jvm-i2l analyse exo-type ?values)
+ "i2s" (analyse-jvm-i2s analyse exo-type ?values)
+ "l2d" (analyse-jvm-l2d analyse exo-type ?values)
+ "l2f" (analyse-jvm-l2f analyse exo-type ?values)
+ "l2i" (analyse-jvm-l2i analyse exo-type ?values)
+ "c2b" (analyse-jvm-c2b analyse exo-type ?values)
+ "c2s" (analyse-jvm-c2s analyse exo-type ?values)
+ "c2i" (analyse-jvm-c2i analyse exo-type ?values)
+ "c2l" (analyse-jvm-c2l analyse exo-type ?values)
;; else
(fail (str "[Analyser Error] Unknown host procedure: " [category proc])))
diff --git a/src/lux/compiler.clj b/src/lux/compiler.clj
index 6ea22dc66..f3af23768 100644
--- a/src/lux/compiler.clj
+++ b/src/lux/compiler.clj
@@ -125,15 +125,6 @@
(&o/$jvm-try ?body ?catches ?finally)
(&&host/compile-jvm-try compile-expression ?body ?catches ?finally)
- (&o/$jvm-throw ?ex)
- (&&host/compile-jvm-throw compile-expression ?ex)
-
- (&o/$jvm-monitorenter ?monitor)
- (&&host/compile-jvm-monitorenter compile-expression ?monitor)
-
- (&o/$jvm-monitorexit ?monitor)
- (&&host/compile-jvm-monitorexit compile-expression ?monitor)
-
(&o/$jvm-instanceof ?class ?object)
(&&host/compile-jvm-instanceof compile-expression ?class ?object)
diff --git a/src/lux/compiler/host.clj b/src/lux/compiler/host.clj
index 4caea6112..ba73cb283 100644
--- a/src/lux/compiler/host.clj
+++ b/src/lux/compiler/host.clj
@@ -881,25 +881,6 @@
:let [_ (.visitLabel *writer* $end)]]
(return nil)))
-(defn compile-jvm-throw [compile ?ex]
- (|do [^MethodVisitor *writer* &/get-writer
- _ (compile ?ex)
- :let [_ (.visitInsn *writer* Opcodes/ATHROW)]]
- (return nil)))
-
-(do-template [<name> <op>]
- (defn <name> [compile ?monitor]
- (|do [^MethodVisitor *writer* &/get-writer
- _ (compile ?monitor)
- :let [_ (doto *writer*
- (.visitInsn <op>)
- (.visitInsn Opcodes/ACONST_NULL))]]
- (return nil)))
-
- compile-jvm-monitorenter Opcodes/MONITORENTER
- compile-jvm-monitorexit Opcodes/MONITOREXIT
- )
-
(do-template [<name> <op> <from-class> <from-method> <from-sig> <to-class> <to-sig>]
(defn <name> [compile _?value]
(|do [:let [(&/$Cons ?value (&/$Nil)) _?value]
@@ -1213,90 +1194,114 @@
(.visitLabel $end))]]
(return nil)))
+(do-template [<name> <op>]
+ (defn <name> [compile ?values]
+ (|do [:let [(&/$Cons ?monitor (&/$Nil)) ?values]
+ ^MethodVisitor *writer* &/get-writer
+ _ (compile ?monitor)
+ :let [_ (doto *writer*
+ (.visitInsn <op>)
+ (.visitInsn Opcodes/ACONST_NULL))]]
+ (return nil)))
+
+ ^:private compile-jvm-monitorenter Opcodes/MONITORENTER
+ ^:private compile-jvm-monitorexit Opcodes/MONITOREXIT
+ )
+
+(defn ^:private compile-jvm-throw [compile ?values]
+ (|do [:let [(&/$Cons ?ex (&/$Nil)) ?values]
+ ^MethodVisitor *writer* &/get-writer
+ _ (compile ?ex)
+ :let [_ (.visitInsn *writer* Opcodes/ATHROW)]]
+ (return nil)))
+
(defn compile-host [compile proc-category proc-name ?values]
(case proc-category
"jvm"
(case proc-name
- "null?" (compile-jvm-null? compile ?values)
- "null" (compile-jvm-null compile ?values)
- "anewarray" (compile-jvm-anewarray compile ?values)
- "aaload" (compile-jvm-aaload compile ?values)
- "aastore" (compile-jvm-aastore compile ?values)
- "arraylength" (compile-jvm-arraylength compile ?values)
- "znewarray" (compile-jvm-znewarray compile ?values)
- "bnewarray" (compile-jvm-bnewarray compile ?values)
- "snewarray" (compile-jvm-snewarray compile ?values)
- "inewarray" (compile-jvm-inewarray compile ?values)
- "lnewarray" (compile-jvm-lnewarray compile ?values)
- "fnewarray" (compile-jvm-fnewarray compile ?values)
- "dnewarray" (compile-jvm-dnewarray compile ?values)
- "cnewarray" (compile-jvm-cnewarray compile ?values)
- "iadd" (compile-jvm-iadd compile ?values)
- "isub" (compile-jvm-isub compile ?values)
- "imul" (compile-jvm-imul compile ?values)
- "idiv" (compile-jvm-idiv compile ?values)
- "irem" (compile-jvm-irem compile ?values)
- "ieq" (compile-jvm-ieq compile ?values)
- "ilt" (compile-jvm-ilt compile ?values)
- "igt" (compile-jvm-igt compile ?values)
- "ceq" (compile-jvm-ceq compile ?values)
- "clt" (compile-jvm-clt compile ?values)
- "cgt" (compile-jvm-cgt compile ?values)
- "ladd" (compile-jvm-ladd compile ?values)
- "lsub" (compile-jvm-lsub compile ?values)
- "lmul" (compile-jvm-lmul compile ?values)
- "ldiv" (compile-jvm-ldiv compile ?values)
- "lrem" (compile-jvm-lrem compile ?values)
- "leq" (compile-jvm-leq compile ?values)
- "llt" (compile-jvm-llt compile ?values)
- "lgt" (compile-jvm-lgt compile ?values)
- "fadd" (compile-jvm-fadd compile ?values)
- "fsub" (compile-jvm-fsub compile ?values)
- "fmul" (compile-jvm-fmul compile ?values)
- "fdiv" (compile-jvm-fdiv compile ?values)
- "frem" (compile-jvm-frem compile ?values)
- "feq" (compile-jvm-feq compile ?values)
- "flt" (compile-jvm-flt compile ?values)
- "fgt" (compile-jvm-fgt compile ?values)
- "dadd" (compile-jvm-dadd compile ?values)
- "dsub" (compile-jvm-dsub compile ?values)
- "dmul" (compile-jvm-dmul compile ?values)
- "ddiv" (compile-jvm-ddiv compile ?values)
- "drem" (compile-jvm-drem compile ?values)
- "deq" (compile-jvm-deq compile ?values)
- "dlt" (compile-jvm-dlt compile ?values)
- "dgt" (compile-jvm-dgt compile ?values)
- "iand" (compile-jvm-iand compile ?values)
- "ior" (compile-jvm-ior compile ?values)
- "ixor" (compile-jvm-ixor compile ?values)
- "ishl" (compile-jvm-ishl compile ?values)
- "ishr" (compile-jvm-ishr compile ?values)
- "iushr" (compile-jvm-iushr compile ?values)
- "land" (compile-jvm-land compile ?values)
- "lor" (compile-jvm-lor compile ?values)
- "lxor" (compile-jvm-lxor compile ?values)
- "lshl" (compile-jvm-lshl compile ?values)
- "lshr" (compile-jvm-lshr compile ?values)
- "lushr" (compile-jvm-lushr compile ?values)
- "d2f" (compile-jvm-d2f compile ?values)
- "d2i" (compile-jvm-d2i compile ?values)
- "d2l" (compile-jvm-d2l compile ?values)
- "f2d" (compile-jvm-f2d compile ?values)
- "f2i" (compile-jvm-f2i compile ?values)
- "f2l" (compile-jvm-f2l compile ?values)
- "i2b" (compile-jvm-i2b compile ?values)
- "i2c" (compile-jvm-i2c compile ?values)
- "i2d" (compile-jvm-i2d compile ?values)
- "i2f" (compile-jvm-i2f compile ?values)
- "i2l" (compile-jvm-i2l compile ?values)
- "i2s" (compile-jvm-i2s compile ?values)
- "l2d" (compile-jvm-l2d compile ?values)
- "l2f" (compile-jvm-l2f compile ?values)
- "l2i" (compile-jvm-l2i compile ?values)
- "c2b" (compile-jvm-c2b compile ?values)
- "c2s" (compile-jvm-c2s compile ?values)
- "c2i" (compile-jvm-c2i compile ?values)
- "c2l" (compile-jvm-c2l compile ?values)
+ "throw" (compile-jvm-throw compile ?values)
+ "monitorenter" (compile-jvm-monitorenter compile ?values)
+ "monitorexit" (compile-jvm-monitorexit compile ?values)
+ "null?" (compile-jvm-null? compile ?values)
+ "null" (compile-jvm-null compile ?values)
+ "anewarray" (compile-jvm-anewarray compile ?values)
+ "aaload" (compile-jvm-aaload compile ?values)
+ "aastore" (compile-jvm-aastore compile ?values)
+ "arraylength" (compile-jvm-arraylength compile ?values)
+ "znewarray" (compile-jvm-znewarray compile ?values)
+ "bnewarray" (compile-jvm-bnewarray compile ?values)
+ "snewarray" (compile-jvm-snewarray compile ?values)
+ "inewarray" (compile-jvm-inewarray compile ?values)
+ "lnewarray" (compile-jvm-lnewarray compile ?values)
+ "fnewarray" (compile-jvm-fnewarray compile ?values)
+ "dnewarray" (compile-jvm-dnewarray compile ?values)
+ "cnewarray" (compile-jvm-cnewarray compile ?values)
+ "iadd" (compile-jvm-iadd compile ?values)
+ "isub" (compile-jvm-isub compile ?values)
+ "imul" (compile-jvm-imul compile ?values)
+ "idiv" (compile-jvm-idiv compile ?values)
+ "irem" (compile-jvm-irem compile ?values)
+ "ieq" (compile-jvm-ieq compile ?values)
+ "ilt" (compile-jvm-ilt compile ?values)
+ "igt" (compile-jvm-igt compile ?values)
+ "ceq" (compile-jvm-ceq compile ?values)
+ "clt" (compile-jvm-clt compile ?values)
+ "cgt" (compile-jvm-cgt compile ?values)
+ "ladd" (compile-jvm-ladd compile ?values)
+ "lsub" (compile-jvm-lsub compile ?values)
+ "lmul" (compile-jvm-lmul compile ?values)
+ "ldiv" (compile-jvm-ldiv compile ?values)
+ "lrem" (compile-jvm-lrem compile ?values)
+ "leq" (compile-jvm-leq compile ?values)
+ "llt" (compile-jvm-llt compile ?values)
+ "lgt" (compile-jvm-lgt compile ?values)
+ "fadd" (compile-jvm-fadd compile ?values)
+ "fsub" (compile-jvm-fsub compile ?values)
+ "fmul" (compile-jvm-fmul compile ?values)
+ "fdiv" (compile-jvm-fdiv compile ?values)
+ "frem" (compile-jvm-frem compile ?values)
+ "feq" (compile-jvm-feq compile ?values)
+ "flt" (compile-jvm-flt compile ?values)
+ "fgt" (compile-jvm-fgt compile ?values)
+ "dadd" (compile-jvm-dadd compile ?values)
+ "dsub" (compile-jvm-dsub compile ?values)
+ "dmul" (compile-jvm-dmul compile ?values)
+ "ddiv" (compile-jvm-ddiv compile ?values)
+ "drem" (compile-jvm-drem compile ?values)
+ "deq" (compile-jvm-deq compile ?values)
+ "dlt" (compile-jvm-dlt compile ?values)
+ "dgt" (compile-jvm-dgt compile ?values)
+ "iand" (compile-jvm-iand compile ?values)
+ "ior" (compile-jvm-ior compile ?values)
+ "ixor" (compile-jvm-ixor compile ?values)
+ "ishl" (compile-jvm-ishl compile ?values)
+ "ishr" (compile-jvm-ishr compile ?values)
+ "iushr" (compile-jvm-iushr compile ?values)
+ "land" (compile-jvm-land compile ?values)
+ "lor" (compile-jvm-lor compile ?values)
+ "lxor" (compile-jvm-lxor compile ?values)
+ "lshl" (compile-jvm-lshl compile ?values)
+ "lshr" (compile-jvm-lshr compile ?values)
+ "lushr" (compile-jvm-lushr compile ?values)
+ "d2f" (compile-jvm-d2f compile ?values)
+ "d2i" (compile-jvm-d2i compile ?values)
+ "d2l" (compile-jvm-d2l compile ?values)
+ "f2d" (compile-jvm-f2d compile ?values)
+ "f2i" (compile-jvm-f2i compile ?values)
+ "f2l" (compile-jvm-f2l compile ?values)
+ "i2b" (compile-jvm-i2b compile ?values)
+ "i2c" (compile-jvm-i2c compile ?values)
+ "i2d" (compile-jvm-i2d compile ?values)
+ "i2f" (compile-jvm-i2f compile ?values)
+ "i2l" (compile-jvm-i2l compile ?values)
+ "i2s" (compile-jvm-i2s compile ?values)
+ "l2d" (compile-jvm-l2d compile ?values)
+ "l2f" (compile-jvm-l2f compile ?values)
+ "l2i" (compile-jvm-l2i compile ?values)
+ "c2b" (compile-jvm-c2b compile ?values)
+ "c2s" (compile-jvm-c2s compile ?values)
+ "c2i" (compile-jvm-c2i compile ?values)
+ "c2l" (compile-jvm-c2l compile ?values)
;; else
(fail (str "[Compiler Error] Unknown host procedure: " [proc-category proc-name])))
diff --git a/src/lux/optimizer.clj b/src/lux/optimizer.clj
index 69ffd25ba..14cd42fdb 100644
--- a/src/lux/optimizer.clj
+++ b/src/lux/optimizer.clj
@@ -39,9 +39,6 @@
("jvm-class" 1)
("jvm-interface" 1)
("jvm-try" 1)
- ("jvm-throw" 1)
- ("jvm-monitorenter" 1)
- ("jvm-monitorexit" 1)
("jvm-program" 1)
)
@@ -133,15 +130,6 @@
(&-base/$jvm-try value)
(return ($jvm-try value))
- (&-base/$jvm-throw value)
- (return ($jvm-throw value))
-
- (&-base/$jvm-monitorenter value)
- (return ($jvm-monitorenter value))
-
- (&-base/$jvm-monitorexit value)
- (return ($jvm-monitorexit value))
-
(&-base/$jvm-program value)
(return ($jvm-program value))