aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--new-luxc/source/luxc/lang/host.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/host/common-lisp.lux4
-rw-r--r--new-luxc/source/luxc/lang/host/jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/host/jvm/inst.lux4
-rw-r--r--new-luxc/source/luxc/lang/host/php.lux8
-rw-r--r--new-luxc/source/luxc/lang/host/python.lux4
-rw-r--r--new-luxc/source/luxc/lang/host/r.lux4
-rw-r--r--new-luxc/source/luxc/lang/host/ruby.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux14
-rw-r--r--new-luxc/source/luxc/lang/translation/js.lux6
-rw-r--r--new-luxc/source/luxc/lang/translation/js/imports.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux8
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux14
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux24
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux10
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux48
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux12
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux60
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/function.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux14
-rw-r--r--new-luxc/source/luxc/lang/translation/php/eval.jvm.lux4
-rw-r--r--new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux12
-rw-r--r--new-luxc/source/luxc/lang/translation/python/function.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux12
-rw-r--r--new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux14
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux2
-rw-r--r--new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux12
-rw-r--r--new-luxc/source/luxc/repl.lux8
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/host.jvm.lux8
-rw-r--r--new-luxc/test/test/luxc/lang/analysis/type.lux6
-rw-r--r--new-luxc/test/test/luxc/lang/synthesis/loop.lux8
-rw-r--r--new-luxc/test/test/luxc/lang/synthesis/procedure.lux2
-rw-r--r--new-luxc/test/test/luxc/lang/translation/case.lux8
-rw-r--r--new-luxc/test/test/luxc/lang/translation/common.lux78
-rw-r--r--new-luxc/test/test/luxc/lang/translation/function.lux6
-rw-r--r--new-luxc/test/test/luxc/lang/translation/js.lux24
-rw-r--r--new-luxc/test/test/luxc/lang/translation/jvm.lux52
-rw-r--r--new-luxc/test/test/luxc/lang/translation/primitive.lux2
-rw-r--r--new-luxc/test/test/luxc/lang/translation/reference.lux4
-rw-r--r--new-luxc/test/test/luxc/lang/translation/structure.lux4
45 files changed, 265 insertions, 265 deletions
diff --git a/new-luxc/source/luxc/lang/host.jvm.lux b/new-luxc/source/luxc/lang/host.jvm.lux
index b9f0588b1..b207fdad7 100644
--- a/new-luxc/source/luxc/lang/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/host.jvm.lux
@@ -47,7 +47,7 @@
(host.class-for java/lang/ClassLoader))
(#e.Success method)
(do-to method
- (AccessibleObject::setAccessible [true]))
+ (AccessibleObject::setAccessible [#1]))
(#e.Error error)
(error! error)))
diff --git a/new-luxc/source/luxc/lang/host/common-lisp.lux b/new-luxc/source/luxc/lang/host/common-lisp.lux
index fb6a933df..2acc52700 100644
--- a/new-luxc/source/luxc/lang/host/common-lisp.lux
+++ b/new-luxc/source/luxc/lang/host/common-lisp.lux
@@ -54,8 +54,8 @@
(def: #export bool
(-> Bit Expression)
- (|>> (case> true (:abstraction "t")
- false ..nil)))
+ (|>> (case> #0 ..nil
+ #1 (:abstraction "t"))))
(def: #export int
(-> Int Expression)
diff --git a/new-luxc/source/luxc/lang/host/jvm.lux b/new-luxc/source/luxc/lang/host/jvm.lux
index 3c5fa3150..adb24b8c0 100644
--- a/new-luxc/source/luxc/lang/host/jvm.lux
+++ b/new-luxc/source/luxc/lang/host/jvm.lux
@@ -93,7 +93,7 @@
(` (def: (~' #export) (~ (code.local-symbol option))
(~ g!type)
(|> (~ g!none)
- (set@ (~ (code.local-tag option)) true)))))
+ (set@ (~ (code.local-tag option)) #1)))))
options)]
(wrap (list& (` (type: (~' #export) (~ g!type)
(~ (code.record (list/map (function (_ tag)
@@ -103,7 +103,7 @@
(` (def: (~' #export) (~ g!none)
(~ g!type)
(~ (code.record (list/map (function (_ tag)
- [tag (` false)])
+ [tag (` #0)])
g!tags+)))))
(` (def: (~' #export) ((~ (code.local-symbol ++)) (~ g!_left) (~ g!_right))
diff --git a/new-luxc/source/luxc/lang/host/jvm/inst.lux b/new-luxc/source/luxc/lang/host/jvm/inst.lux
index 3f0f68def..393200a28 100644
--- a/new-luxc/source/luxc/lang/host/jvm/inst.lux
+++ b/new-luxc/source/luxc/lang/host/jvm/inst.lux
@@ -358,7 +358,7 @@
(//type.method (list (#//.Primitive type))
(#.Some (//type.class class (list)))
(list))
- false))))
+ #0))))
(def: #export (unwrap type)
(-> //.Primitive //.Inst)
@@ -366,7 +366,7 @@
(|>> (CHECKCAST class)
(INVOKEVIRTUAL class (primitive-unwrap type)
(//type.method (list) (#.Some (#//.Primitive type)) (list))
- false))))
+ #0))))
(def: #export (fuse insts)
(-> (List //.Inst) //.Inst)
diff --git a/new-luxc/source/luxc/lang/host/php.lux b/new-luxc/source/luxc/lang/host/php.lux
index 34c7c0535..6ab97ee52 100644
--- a/new-luxc/source/luxc/lang/host/php.lux
+++ b/new-luxc/source/luxc/lang/host/php.lux
@@ -61,8 +61,8 @@
(-> Var Argument)
(|>> [<reference?>]))]
- [parameter false]
- [reference true]
+ [parameter #0]
+ [reference #1]
)
(def: arguments
@@ -83,8 +83,8 @@
(def: #export bool
(-> Bit Computation)
- (|>> (case> true "true"
- false "false")
+ (|>> (case> #0 "false"
+ #1 "true")
:abstraction))
(def: #export int
diff --git a/new-luxc/source/luxc/lang/host/python.lux b/new-luxc/source/luxc/lang/host/python.lux
index e39ce5571..43c8b28a3 100644
--- a/new-luxc/source/luxc/lang/host/python.lux
+++ b/new-luxc/source/luxc/lang/host/python.lux
@@ -49,8 +49,8 @@
(def: #export bool
(-> Bit Expression)
- (|>> (case> true "True"
- false "False")
+ (|>> (case> #0 "False"
+ #1 "True")
:abstraction))
(def: #export int
diff --git a/new-luxc/source/luxc/lang/host/r.lux b/new-luxc/source/luxc/lang/host/r.lux
index 4655c1343..8cd802df9 100644
--- a/new-luxc/source/luxc/lang/host/r.lux
+++ b/new-luxc/source/luxc/lang/host/r.lux
@@ -67,8 +67,8 @@
(def: #export bool
(-> Bit Expression)
- (|>> (case> true "TRUE"
- false "FALSE")
+ (|>> (case> #0 "FALSE"
+ #1 "TRUE")
self-contained))
(def: #export (int value)
diff --git a/new-luxc/source/luxc/lang/host/ruby.lux b/new-luxc/source/luxc/lang/host/ruby.lux
index 51b0d7ea7..61e945af0 100644
--- a/new-luxc/source/luxc/lang/host/ruby.lux
+++ b/new-luxc/source/luxc/lang/host/ruby.lux
@@ -19,8 +19,8 @@
(def: #export bool
(-> Bit Expression)
- (|>> (case> true "true"
- false "false")))
+ (|>> (case> #0 "false"
+ #1 "true")))
(def: #export int
(-> Int Expression)
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux
index 373d23ae4..78149471d 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/case.jvm.lux
@@ -89,7 +89,7 @@
(def: (pm-catch handler)
(-> Expression Handler)
- [(_.bool true) $alt_error
+ [(_.bool #1) $alt_error
(_.progn
(list
(_.setq! $alt_error (_.format/3 _.nil (_.string "~A") (@@ $alt_error)))
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux
index c88e83ed5..54b77e60d 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/eval.jvm.lux
@@ -124,11 +124,11 @@
(#e.Success (DoubleFloat::doubleValue [] (:coerce DoubleFloat host-object)))
(host.instance? org/armedbear/lisp/Nil host-object)
- (#e.Success false)
+ (#e.Success #0)
(host.instance? org/armedbear/lisp/Symbol host-object)
(if (is? Symbol::T (:coerce Symbol host-object))
- (#e.Success true)
+ (#e.Success #1)
(ex.throw Unknown-Kind-Of-Host-Object (:coerce Object host-object)))
(host.instance? org/armedbear/lisp/SimpleString host-object)
diff --git a/new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux
index 43c1fd2a0..fe0a620d9 100644
--- a/new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/common-lisp/runtime.jvm.lux
@@ -37,19 +37,19 @@
(def: #export none
Expression
- (variant +0 false unit))
+ (variant +0 #0 unit))
(def: #export some
(-> Expression Expression)
- (variant +1 true))
+ (variant +1 #1))
(def: #export left
(-> Expression Expression)
- (variant +0 false))
+ (variant +0 #0))
(def: #export right
(-> Expression Expression)
- (variant +1 true))
+ (variant +1 #1))
(type: Runtime Expression)
@@ -105,7 +105,7 @@
(runtime: (lux//try op)
(with-vars [error]
(_.handler-case
- (list [(_.bool true) error
+ (list [(_.bool #1) error
(..left (_.format/3 _.nil (_.string "~A") (@@ error)))])
(..right (_.funcall (list ..unit) (@@ op))))))
@@ -272,8 +272,8 @@
(_.if (_.eq (@@ old) (@@ temp))
(_.progn
(list (_.setf! (_.svref (@@ atom) (_.int 0)) (@@ new))
- (_.bool true)))
- (_.bool false)))))
+ (_.bool #1)))
+ (_.bool #0)))))
(def: runtime//atom
Runtime
diff --git a/new-luxc/source/luxc/lang/translation/js.lux b/new-luxc/source/luxc/lang/translation/js.lux
index 9a7f55dd0..9daf7330c 100644
--- a/new-luxc/source/luxc/lang/translation/js.lux
+++ b/new-luxc/source/luxc/lang/translation/js.lux
@@ -191,7 +191,7 @@
(object [] AbstractJSObject []
[]
(AbstractJSObject (isFunction) boolean
- true)
+ #1)
(AbstractJSObject (call [args (Array Object)]) Object
(Object::toString [] (:coerce Object js-object)))
))
@@ -201,7 +201,7 @@
(object [] AbstractJSObject []
[]
(AbstractJSObject (isFunction) boolean
- true)
+ #1)
(AbstractJSObject (call [args (Array Object)]) Object
(:coerce Object
(js-object (Arrays::copyOfRange [value
@@ -264,7 +264,7 @@
(StructureValue (getValue) (Array Object)
(:coerce (Array Object) value))
(AbstractJSObject (isArray) boolean
- true)
+ #1)
(AbstractJSObject (getMember [member String]) Object
(cond (text/= "toString" member)
(:coerce Object
diff --git a/new-luxc/source/luxc/lang/translation/js/imports.jvm.lux b/new-luxc/source/luxc/lang/translation/js/imports.jvm.lux
index cbd4b2752..36500e737 100644
--- a/new-luxc/source/luxc/lang/translation/js/imports.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/imports.jvm.lux
@@ -51,7 +51,7 @@
already-seen? (moduleL.exists? dependency)
circular-dependency? (if already-seen?
(moduleL.active? dependency)
- (wrap false))
+ (wrap #0))
_ (lang.assert Circular-Dependency (format "From: " current-module "\n"
" To: " dependency)
(not circular-dependency?))
diff --git a/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
index 8adfd22bf..fca27344e 100644
--- a/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
@@ -31,19 +31,19 @@
(def: none
Expression
- (variant +0 false unit))
+ (variant +0 #0 unit))
(def: some
(-> Expression Expression)
- (variant +1 true))
+ (variant +1 #1))
(def: left
(-> Expression Expression)
- (variant +0 false))
+ (variant +0 #0))
(def: right
(-> Expression Expression)
- (variant +1 true))
+ (variant +1 #1))
(type: Runtime JS)
diff --git a/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux
index d29b9ae7c..e47e123ad 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/case.jvm.lux
@@ -32,7 +32,7 @@
($t.method (list //runtime.$Stack)
(#.Some $Object)
(list))
- false)))
+ #0)))
(def: popI
$.Inst
@@ -41,7 +41,7 @@
($t.method (list //runtime.$Stack)
(#.Some //runtime.$Stack)
(list))
- false)))
+ #0)))
(def: pushI
$.Inst
@@ -50,7 +50,7 @@
($t.method (list //runtime.$Stack $Object)
(#.Some //runtime.$Stack)
(list))
- false)))
+ #0)))
(exception: #export (Unrecognized-Path {message Text})
message)
@@ -101,7 +101,7 @@
($t.method (list $Object)
(#.Some $t.boolean)
(list))
- false)
+ #0)
($i.IFEQ @else)))
(^template [<special> <method>]
@@ -123,7 +123,7 @@
($t.method (list //runtime.$Tuple $t.int)
(#.Some $Object)
(list))
- false)
+ #0)
pushI))))
(["lux case tuple left" "pm_left"]
["lux case tuple right" "pm_right"])
@@ -140,7 +140,7 @@
($t.method (list //runtime.$Variant //runtime.$Tag //runtime.$Flag)
(#.Some //runtime.$Datum)
(list))
- false)
+ #0)
$i.DUP
($i.IFNULL @fail)
($i.GOTO @success)
@@ -185,7 +185,7 @@
($i.INVOKESTATIC hostL.runtime-class
"pm_fail"
($t.method (list) #.None (list))
- false)
+ #0)
$i.NULL
($i.GOTO @end)))))
diff --git a/new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux
index 062cf5d52..d9ecba1e4 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/function.jvm.lux
@@ -71,7 +71,7 @@
id)]
(|>> ($i.CHECKCAST hostL.function-class)
(inputsI start max-args)
- ($i.INVOKEVIRTUAL hostL.function-class runtimeT.apply-method (runtimeT.apply-signature max-args) false)
+ ($i.INVOKEVIRTUAL hostL.function-class runtimeT.apply-method (runtimeT.apply-signature max-args) #0)
later-applysI)))
(def: (inc-intI by)
@@ -114,7 +114,7 @@
$i.DUP
($i.fuse captureI+)
argsI
- ($i.INVOKESPECIAL class "<init>" (init-method env arity) false)))))
+ ($i.INVOKESPECIAL class "<init>" (init-method env arity) #0)))))
(def: (with-reset class arity env)
(-> Text ls.Arity (List Variable) $.Def)
@@ -135,7 +135,7 @@
$i.DUP
captureI
argsI
- ($i.INVOKESPECIAL class "<init>" (init-method env arity) false)
+ ($i.INVOKESPECIAL class "<init>" (init-method env arity) #0)
$i.ARETURN))
(|>> ($i.ALOAD +0)
$i.ARETURN))))
@@ -155,9 +155,9 @@
(-> ls.Arity Nat $.Inst)
(if (n/= +1 arity)
(|>> ($i.int 0)
- ($i.INVOKESPECIAL hostL.function-class "<init>" function-init-method false))
+ ($i.INVOKESPECIAL hostL.function-class "<init>" function-init-method #0))
(|>> ($i.ILOAD (inc env-size))
- ($i.INVOKESPECIAL hostL.function-class "<init>" function-init-method false))))
+ ($i.INVOKESPECIAL hostL.function-class "<init>" function-init-method #0))))
(def: (with-init class env arity)
(-> Text (List Variable) ls.Arity $.Def)
@@ -207,10 +207,10 @@
(|>> ($i.label @label)
($i.ALOAD +0)
(when (n/> +0 stage)
- ($i.INVOKEVIRTUAL class "reset" (reset-method class) false))
+ ($i.INVOKEVIRTUAL class "reset" (reset-method class) #0))
load-partialsI
(inputsI +1 apply-arity)
- ($i.INVOKEVIRTUAL class "impl" (implementation-method function-arity) false)
+ ($i.INVOKEVIRTUAL class "impl" (implementation-method function-arity) #0)
$i.ARETURN)
(i/> arity-over-extent (.int stage))
@@ -218,10 +218,10 @@
args-left (|> apply-arity (n/- args-to-completion))]
(|>> ($i.label @label)
($i.ALOAD +0)
- ($i.INVOKEVIRTUAL class "reset" (reset-method class) false)
+ ($i.INVOKEVIRTUAL class "reset" (reset-method class) #0)
load-partialsI
(inputsI +1 args-to-completion)
- ($i.INVOKEVIRTUAL class "impl" (implementation-method function-arity) false)
+ ($i.INVOKEVIRTUAL class "impl" (implementation-method function-arity) #0)
(applysI (inc args-to-completion) args-left)
$i.ARETURN))
@@ -241,7 +241,7 @@
load-partialsI
(inputsI +1 apply-arity)
(nullsI (|> num-partials (n/- apply-arity) (n/- stage)))
- ($i.INVOKESPECIAL class "<init>" (init-method env function-arity) false)
+ ($i.INVOKESPECIAL class "<init>" (init-method env function-arity) #0)
$i.ARETURN))
))))
$i.fuse)]
@@ -250,7 +250,7 @@
($i.TABLESWITCH 0 (|> num-partials dec .int)
@default @labels)
casesI
- ($i.INVOKESTATIC hostL.runtime-class "apply_fail" ($t.method (list) #.None (list)) false)
+ ($i.INVOKESTATIC hostL.runtime-class "apply_fail" ($t.method (list) #.None (list)) #0)
$i.NULL
$i.ARETURN
))))
@@ -319,7 +319,7 @@
(list/map (function (_ chunkI+)
(|>> ($i.CHECKCAST hostL.function-class)
($i.fuse chunkI+)
- ($i.INVOKEVIRTUAL hostL.function-class runtimeT.apply-method (runtimeT.apply-signature (list.size chunkI+)) false))))
+ ($i.INVOKEVIRTUAL hostL.function-class runtimeT.apply-method (runtimeT.apply-signature (list.size chunkI+)) #0))))
$i.fuse)]]
(wrap (|>> functionI
applyI))))
diff --git a/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux
index 820024153..9c344e7e9 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/imports.jvm.lux
@@ -71,7 +71,7 @@
[current-compilations (stm.read compilations)]
(case (dict.get dependency current-compilations)
(#.Some ongoing)
- (wrap [false ongoing])
+ (wrap [#0 ongoing])
#.None
(do @
@@ -79,7 +79,7 @@
(CompletableFuture::new []))]
_ (stm.write (dict.put dependency pending current-compilations)
compilations)]
- (wrap [true pending]))))))]
+ (wrap [#1 pending]))))))]
(if new?
(exec (promise.future (io (CompletableFuture::complete [(io.run (translate-module dependency compiler))]
future)))
@@ -91,10 +91,10 @@
(|>> (get@ #.module-state)
(case>
(^or #.Cached #.Compiled)
- true
+ #1
_
- false)))
+ #0)))
(def: (merge-modules current-module from-dependency from-current)
(-> Text (List [Text Module]) (List [Text Module]) (List [Text Module]))
@@ -132,7 +132,7 @@
already-seen? (moduleL.exists? dependency)
circular-dependency? (if already-seen?
(moduleL.active? dependency)
- (wrap false))
+ (wrap #0))
_ (&.assert Circular-Dependency (format "From: " current-module "\n"
" To: " dependency)
(not circular-dependency?))
diff --git a/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux
index 120a3e384..19da0dd78 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/loop.jvm.lux
@@ -24,10 +24,10 @@
(^multi (^code ((~ [_ (#.Int var)])))
(i/= (variableL.local register)
var))
- true
+ #1
_
- false))
+ #0))
(def: #export (translate-recur translate argsS)
(-> (-> ls.Synthesis (Meta $.Inst))
diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux
index 527ec4f2d..0bf625624 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/common.jvm.lux
@@ -155,7 +155,7 @@
($i.CHECKCAST hostL.function-class)
($i.INVOKESTATIC hostL.runtime-class "try"
($t.method (list $Function) (#.Some $Object-Array) (list))
- false)))
+ #0)))
(exception: #export (Wrong-Syntax {message Text})
message)
@@ -303,13 +303,13 @@
[int//to-frac ($i.unwrap #$.Long) (<| ($i.wrap #$.Double) $i.L2D)]
[int//char ($i.unwrap #$.Long)
- ((|>> $i.L2I $i.I2C ($i.INVOKESTATIC "java.lang.Character" "toString" ($t.method (list $t.char) (#.Some $String) (list)) false)))]
+ ((|>> $i.L2I $i.I2C ($i.INVOKESTATIC "java.lang.Character" "toString" ($t.method (list $t.char) (#.Some $String) (list)) #0)))]
[frac//to-int ($i.unwrap #$.Double) (<| ($i.wrap #$.Long) $i.D2L)]
[frac//encode ($i.unwrap #$.Double)
- ($i.INVOKESTATIC "java.lang.Double" "toString" ($t.method (list $t.double) (#.Some $String) (list)) false)]
+ ($i.INVOKESTATIC "java.lang.Double" "toString" ($t.method (list $t.double) (#.Some $String) (list)) #0)]
[frac//decode ($i.CHECKCAST "java.lang.String")
- ($i.INVOKESTATIC hostL.runtime-class "decode_frac" ($t.method (list $String) (#.Some $Object-Array) (list)) false)]
+ ($i.INVOKESTATIC hostL.runtime-class "decode_frac" ($t.method (list $String) (#.Some $Object-Array) (list)) #0)]
)
## [[Text]]
@@ -318,7 +318,7 @@
Unary
(|>> inputI
($i.CHECKCAST "java.lang.String")
- ($i.INVOKEVIRTUAL <class> <method> ($t.method (list) (#.Some <outputT>) (list)) false)
+ ($i.INVOKEVIRTUAL <class> <method> ($t.method (list) (#.Some <outputT>) (list)) #0)
<post>))]
[text//size "java.lang.String" "length" lux-intI $t.int]
@@ -332,16 +332,16 @@
<op> <post>))]
[text//eq id id
- ($i.INVOKEVIRTUAL "java.lang.Object" "equals" ($t.method (list $Object) (#.Some $t.boolean) (list)) false)
+ ($i.INVOKEVIRTUAL "java.lang.Object" "equals" ($t.method (list $Object) (#.Some $t.boolean) (list)) #0)
($i.wrap #$.Boolean)]
[text//lt ($i.CHECKCAST "java.lang.String") ($i.CHECKCAST "java.lang.String")
- ($i.INVOKEVIRTUAL "java.lang.String" "compareTo" ($t.method (list $String) (#.Some $t.int) (list)) false)
+ ($i.INVOKEVIRTUAL "java.lang.String" "compareTo" ($t.method (list $String) (#.Some $t.int) (list)) #0)
(<| (predicateI $i.IF_ICMPEQ) ($i.int -1))]
[text//concat ($i.CHECKCAST "java.lang.String") ($i.CHECKCAST "java.lang.String")
- ($i.INVOKEVIRTUAL "java.lang.String" "concat" ($t.method (list $String) (#.Some $String) (list)) false)
+ ($i.INVOKEVIRTUAL "java.lang.String" "concat" ($t.method (list $String) (#.Some $String) (list)) #0)
id]
[text//char ($i.CHECKCAST "java.lang.String") jvm-intI
- ($i.INVOKESTATIC hostL.runtime-class "text_char" ($t.method (list $String $t.int) (#.Some $Variant) (list)) false)
+ ($i.INVOKESTATIC hostL.runtime-class "text_char" ($t.method (list $String $t.int) (#.Some $Variant) (list)) #0)
id]
)
@@ -355,7 +355,7 @@
[text//clip ($i.CHECKCAST "java.lang.String") jvm-intI jvm-intI
($i.INVOKESTATIC hostL.runtime-class "text_clip"
- ($t.method (list $String $t.int $t.int) (#.Some $Variant) (list)) false)]
+ ($t.method (list $String $t.int $t.int) (#.Some $Variant) (list)) #0)]
)
(def: index-method $.Method ($t.method (list $String $t.int) (#.Some $t.int) (list)))
@@ -366,7 +366,7 @@
(|>> textI ($i.CHECKCAST "java.lang.String")
partI ($i.CHECKCAST "java.lang.String")
startI jvm-intI
- ($i.INVOKEVIRTUAL "java.lang.String" "indexOf" index-method false)
+ ($i.INVOKEVIRTUAL "java.lang.String" "indexOf" index-method #0)
$i.DUP
($i.int -1)
($i.IF_ICMPEQ @not-found)
@@ -387,7 +387,7 @@
Unary
(|>> inputI
($i.unwrap #$.Double)
- ($i.INVOKESTATIC "java.lang.Math" <method> math-unary-method false)
+ ($i.INVOKESTATIC "java.lang.Math" <method> math-unary-method #0)
($i.wrap #$.Double)))]
[math//cos "cos"]
@@ -410,7 +410,7 @@
Binary
(|>> inputI ($i.unwrap #$.Double)
paramI ($i.unwrap #$.Double)
- ($i.INVOKESTATIC "java.lang.Math" <method> math-binary-method false)
+ ($i.INVOKESTATIC "java.lang.Math" <method> math-binary-method #0)
($i.wrap #$.Double)))]
[math//atan2 "atan2"]
@@ -421,7 +421,7 @@
Unary
(|>> inputI
($i.unwrap #$.Double)
- ($i.INVOKESTATIC "java.lang.Math" "round" ($t.method (list $t.double) (#.Some $t.long) (list)) false)
+ ($i.INVOKESTATIC "java.lang.Math" "round" ($t.method (list $t.double) (#.Some $t.long) (list)) #0)
$i.L2D
($i.wrap #$.Double)))
@@ -432,7 +432,7 @@
(|>> ($i.GETSTATIC "java.lang.System" "out" ($t.class "java.io.PrintStream" (list)))
messageI
($i.CHECKCAST "java.lang.String")
- ($i.INVOKEVIRTUAL "java.io.PrintStream" "println" string-method false)
+ ($i.INVOKEVIRTUAL "java.io.PrintStream" "println" string-method #0)
unitI))
(def: (io//error messageI)
@@ -441,18 +441,18 @@
$i.DUP
messageI
($i.CHECKCAST "java.lang.String")
- ($i.INVOKESPECIAL "java.lang.Error" "<init>" string-method false)
+ ($i.INVOKESPECIAL "java.lang.Error" "<init>" string-method #0)
$i.ATHROW))
(def: (io//exit codeI)
Unary
(|>> codeI jvm-intI
- ($i.INVOKESTATIC "java.lang.System" "exit" ($t.method (list $t.int) #.None (list)) false)
+ ($i.INVOKESTATIC "java.lang.System" "exit" ($t.method (list $t.int) #.None (list)) #0)
$i.NULL))
(def: (io//current-time [])
Nullary
- (|>> ($i.INVOKESTATIC "java.lang.System" "currentTimeMillis" ($t.method (list) (#.Some $t.long) (list)) false)
+ (|>> ($i.INVOKESTATIC "java.lang.System" "currentTimeMillis" ($t.method (list) (#.Some $t.long) (list)) #0)
($i.wrap #$.Long)))
## [[Atoms]]
@@ -462,13 +462,13 @@
(|>> ($i.NEW atom-class)
$i.DUP
initI
- ($i.INVOKESPECIAL atom-class "<init>" ($t.method (list $Object) #.None (list)) false)))
+ ($i.INVOKESPECIAL atom-class "<init>" ($t.method (list $Object) #.None (list)) #0)))
(def: (atom//read atomI)
Unary
(|>> atomI
($i.CHECKCAST atom-class)
- ($i.INVOKEVIRTUAL atom-class "get" ($t.method (list) (#.Some $Object) (list)) false)))
+ ($i.INVOKEVIRTUAL atom-class "get" ($t.method (list) (#.Some $Object) (list)) #0)))
(def: (atom//compare-and-swap [atomI oldI newI])
Trinary
@@ -476,7 +476,7 @@
($i.CHECKCAST atom-class)
oldI
newI
- ($i.INVOKEVIRTUAL atom-class "compareAndSet" ($t.method (list $Object $Object) (#.Some $t.boolean) (list)) false)
+ ($i.INVOKEVIRTUAL atom-class "compareAndSet" ($t.method (list $Object $Object) (#.Some $t.boolean) (list)) #0)
($i.wrap #$.Boolean)))
## [[Box]]
@@ -507,8 +507,8 @@
## [[Processes]]
(def: (process//parallelism-level [])
Nullary
- (|>> ($i.INVOKESTATIC "java.lang.Runtime" "getRuntime" ($t.method (list) (#.Some ($t.class "java.lang.Runtime" (list))) (list)) false)
- ($i.INVOKEVIRTUAL "java.lang.Runtime" "availableProcessors" ($t.method (list) (#.Some $t.int) (list)) false)
+ (|>> ($i.INVOKESTATIC "java.lang.Runtime" "getRuntime" ($t.method (list) (#.Some ($t.class "java.lang.Runtime" (list))) (list)) #0)
+ ($i.INVOKEVIRTUAL "java.lang.Runtime" "availableProcessors" ($t.method (list) (#.Some $t.int) (list)) #0)
lux-intI))
(def: (process//schedule [millisecondsI procedureI])
@@ -516,7 +516,7 @@
(|>> millisecondsI ($i.unwrap #$.Long)
procedureI ($i.CHECKCAST hostL.function-class)
($i.INVOKESTATIC hostL.runtime-class "schedule"
- ($t.method (list $t.long $Function) (#.Some $Object) (list)) false)))
+ ($t.method (list $t.long $Function) (#.Some $Object) (list)) #0)))
## [Bundles]
(def: lux-procs
diff --git a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
index 45cb67fb9..ddf345a13 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/procedure/host.jvm.lux
@@ -415,7 +415,7 @@
($t.method (list ($t.class "java.lang.String" (list)))
(#.Some ($t.class "java.lang.Class" (list)))
(list))
- false))))
+ #0))))
_
(&.throw @.Wrong-Syntax (@.wrong-syntax proc inputs))))
@@ -679,7 +679,7 @@
(wrap (|>> ($i.fuse (list/map product.right argsTI))
($i.INVOKESTATIC class method
($t.method (list/map product.left argsTI) returnT (list))
- false))))
+ #0))))
_
(&.throw @.Wrong-Syntax (@.wrong-syntax proc inputs))))
@@ -704,9 +704,9 @@
_
(&.throw @.Wrong-Syntax (@.wrong-syntax proc inputs))))]
- [invoke//virtual $i.INVOKEVIRTUAL false]
- [invoke//special $i.INVOKESPECIAL false]
- [invoke//interface $i.INVOKEINTERFACE true]
+ [invoke//virtual $i.INVOKEVIRTUAL #0]
+ [invoke//special $i.INVOKESPECIAL #0]
+ [invoke//interface $i.INVOKEINTERFACE #1]
)
(def: (invoke//constructor proc translate inputs)
@@ -720,7 +720,7 @@
($i.fuse (list/map product.right argsTI))
($i.INVOKESPECIAL class "<init>"
($t.method (list/map product.left argsTI) #.None (list))
- false))))
+ #0))))
_
(&.throw @.Wrong-Syntax (@.wrong-syntax proc inputs))))
diff --git a/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux
index c22199864..0d37031e0 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/runtime.jvm.lux
@@ -32,7 +32,7 @@
(def: #export logI
$.Inst
(let [outI ($i.GETSTATIC "java.lang.System" "out" ($t.class "java.io.PrintStream" (list)))
- printI (function (_ method) ($i.INVOKEVIRTUAL "java.io.PrintStream" method ($t.method (list $Object) #.None (list)) false))]
+ printI (function (_ method) ($i.INVOKEVIRTUAL "java.io.PrintStream" method ($t.method (list $Object) #.None (list)) #0))]
(|>> outI ($i.string "LOG: ") (printI "print")
outI $i.SWAP (printI "println"))))
@@ -42,7 +42,7 @@
(def: #export variantI
$.Inst
- ($i.INVOKESTATIC hostL.runtime-class "variant_make" variant-method false))
+ ($i.INVOKESTATIC hostL.runtime-class "variant_make" variant-method #0))
(def: #export leftI
$.Inst
@@ -86,7 +86,7 @@
(def: #export string-concatI
$.Inst
- ($i.INVOKEVIRTUAL "java.lang.String" "concat" ($t.method (list $String) (#.Some $String) (list)) false))
+ ($i.INVOKEVIRTUAL "java.lang.String" "concat" ($t.method (list $String) (#.Some $String) (list)) #0))
(def: #export partials-field Text "partials")
(def: #export apply-method Text "apply")
@@ -111,11 +111,11 @@
$i.with-label (function (_ @elem-end))
$i.with-label (function (_ @fold-end))
(let [on-normal-objectI (|>> ($i.ALOAD +0)
- ($i.INVOKEVIRTUAL "java.lang.Object" "toString" ($t.method (list) (#.Some $String) (list)) false))
+ ($i.INVOKEVIRTUAL "java.lang.Object" "toString" ($t.method (list) (#.Some $String) (list)) #0))
on-null-objectI ($i.string "NULL")
arrayI (|>> ($i.ALOAD +0)
($i.CHECKCAST ($t.descriptor $Object-Array)))
- recurseI ($i.INVOKESTATIC hostL.runtime-class "force_text" force-textMT false)
+ recurseI ($i.INVOKESTATIC hostL.runtime-class "force_text" force-textMT #0)
force-elemI (|>> $i.DUP arrayI $i.SWAP $i.AALOAD recurseI)
swap2 (|>> $i.DUP2_X2 ## X,Y => Y,X,Y
$i.POP2 ## Y,X,Y => Y,X
@@ -165,7 +165,7 @@
(def: #export force-textI
$.Inst
- ($i.INVOKESTATIC hostL.runtime-class "force_text" ($t.method (list $Object) (#.Some $String) (list)) false))
+ ($i.INVOKESTATIC hostL.runtime-class "force_text" ($t.method (list $Object) (#.Some $String) (list)) #0))
(def: frac-shiftI $.Inst ($i.double (math.pow 32.0 2.0)))
@@ -174,7 +174,7 @@
(|>> ($d.method #$.Public $.staticM "decode_frac" ($t.method (list $String) (#.Some $Object-Array) (list))
(try-methodI
(|>> ($i.ALOAD +0)
- ($i.INVOKESTATIC "java.lang.Double" "parseDouble" ($t.method (list $String) (#.Some $t.double) (list)) false)
+ ($i.INVOKESTATIC "java.lang.Double" "parseDouble" ($t.method (list $String) (#.Some $t.double) (list)) #0)
($i.wrap #$.Double))))
))
@@ -187,12 +187,12 @@
(|>> ($i.ALOAD +0)
($i.ILOAD +1)
($i.ILOAD +2)
- ($i.INVOKEVIRTUAL "java.lang.String" "substring" ($t.method (list $t.int $t.int) (#.Some $String) (list)) false))))
+ ($i.INVOKEVIRTUAL "java.lang.String" "substring" ($t.method (list $t.int $t.int) (#.Some $String) (list)) #0))))
($d.method #$.Public $.staticM "text_char" ($t.method (list $String $t.int) (#.Some $Variant) (list))
(try-methodI
(|>> ($i.ALOAD +0)
($i.ILOAD +1)
- ($i.INVOKEVIRTUAL "java.lang.String" "codePointAt" ($t.method (list $t.int) (#.Some $t.int) (list)) false)
+ ($i.INVOKEVIRTUAL "java.lang.String" "codePointAt" ($t.method (list $t.int) (#.Some $t.int) (list)) #0)
$i.I2L
($i.wrap #$.Long))))
))
@@ -207,13 +207,13 @@
(|>> ($i.NEW "java.lang.IllegalStateException")
$i.DUP
($i.string "Invalid expression for pattern-matching.")
- ($i.INVOKESPECIAL "java.lang.IllegalStateException" "<init>" ($t.method (list $String) #.None (list)) false)
+ ($i.INVOKESPECIAL "java.lang.IllegalStateException" "<init>" ($t.method (list $String) #.None (list)) #0)
$i.ATHROW))
($d.method #$.Public $.staticM "apply_fail" ($t.method (list) #.None (list))
(|>> ($i.NEW "java.lang.IllegalStateException")
$i.DUP
($i.string "Error while applying function.")
- ($i.INVOKESPECIAL "java.lang.IllegalStateException" "<init>" ($t.method (list $String) #.None (list)) false)
+ ($i.INVOKESPECIAL "java.lang.IllegalStateException" "<init>" ($t.method (list $String) #.None (list)) #0)
$i.ATHROW))
($d.method #$.Public $.staticM "pm_push" ($t.method (list $Stack $Object) (#.Some $Stack) (list))
(|>> ($i.int 2)
@@ -312,7 +312,7 @@
$i.with-label (function (_ @slice))
(let [updated-idxI (|>> ($i.ILOAD +1) ($i.int 1) $i.IADD tuple-sizeI $i.ISUB)
sliceI (|>> ($i.ALOAD +0) ($i.ILOAD +1) tuple-sizeI
- ($i.INVOKESTATIC "java.util.Arrays" "copyOfRange" ($t.method (list $Object-Array $t.int $t.int) (#.Some $Object-Array) (list)) false))])
+ ($i.INVOKESTATIC "java.util.Arrays" "copyOfRange" ($t.method (list $Object-Array $t.int $t.int) (#.Some $Object-Array) (list)) #0))])
(|>> ($i.label @begin)
tuple-sizeI
expected-last-sizeI
@@ -335,14 +335,14 @@
$.Def
(let [string-writerI (|>> ($i.NEW "java.io.StringWriter")
$i.DUP
- ($i.INVOKESPECIAL "java.io.StringWriter" "<init>" ($t.method (list) #.None (list)) false))
+ ($i.INVOKESPECIAL "java.io.StringWriter" "<init>" ($t.method (list) #.None (list)) #0))
print-writerI (|>> ($i.NEW "java.io.PrintWriter")
$i.SWAP
$i.DUP2
$i.POP
$i.SWAP
- ($i.boolean true)
- ($i.INVOKESPECIAL "java.io.PrintWriter" "<init>" ($t.method (list ($t.class "java.io.Writer" (list)) $t.boolean) #.None (list)) false)
+ ($i.boolean #1)
+ ($i.INVOKESPECIAL "java.io.PrintWriter" "<init>" ($t.method (list ($t.class "java.io.Writer" (list)) $t.boolean) #.None (list)) #0)
)]
(|>> ($d.method #$.Public $.staticM "try" ($t.method (list $Function) (#.Some $Variant) (list))
(<| $i.with-label (function (_ @from))
@@ -352,7 +352,7 @@
($i.label @from)
($i.ALOAD +0)
$i.NULL
- ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature +1) false)
+ ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature +1) #0)
rightI
$i.ARETURN
($i.label @to)
@@ -360,8 +360,8 @@
string-writerI ## TW
$i.DUP2 ## TWTW
print-writerI ## TWTP
- ($i.INVOKEVIRTUAL "java.lang.Throwable" "printStackTrace" ($t.method (list ($t.class "java.io.PrintWriter" (list))) #.None (list)) false) ## TW
- ($i.INVOKEVIRTUAL "java.io.StringWriter" "toString" ($t.method (list) (#.Some $String) (list)) false) ## TS
+ ($i.INVOKEVIRTUAL "java.lang.Throwable" "printStackTrace" ($t.method (list ($t.class "java.io.PrintWriter" (list))) #.None (list)) #0) ## TW
+ ($i.INVOKEVIRTUAL "java.io.StringWriter" "toString" ($t.method (list) (#.Some $String) (list)) #0) ## TS
$i.SWAP $i.POP leftI
$i.ARETURN)))
)))
@@ -378,21 +378,21 @@
(|>> ($i.NEW hostL.runnable-class)
$i.DUP
functionI
- ($i.INVOKESPECIAL hostL.runnable-class "<init>" ($t.method (list $Function) #.None (list)) false))))
+ ($i.INVOKESPECIAL hostL.runnable-class "<init>" ($t.method (list $Function) #.None (list)) #0))))
threadI (: (-> $.Inst $.Inst)
(function (_ runnableI)
(|>> ($i.NEW "java.lang.Thread")
$i.DUP
runnableI
- ($i.INVOKESPECIAL "java.lang.Thread" "<init>" ($t.method (list $Runnable) #.None (list)) false))))]
+ ($i.INVOKESPECIAL "java.lang.Thread" "<init>" ($t.method (list $Runnable) #.None (list)) #0))))]
(|>> ($d.field #$.Public ($.++F $.finalF $.staticF) executor-field executorT)
($d.method #$.Public $.staticM "<clinit>" ($t.method (list) #.None (list))
- (let [parallelism-levelI (|>> ($i.INVOKESTATIC "java.lang.Runtime" "getRuntime" ($t.method (list) (#.Some $Runtime) (list)) false)
- ($i.INVOKEVIRTUAL "java.lang.Runtime" "availableProcessors" ($t.method (list) (#.Some $t.int) (list)) false))
+ (let [parallelism-levelI (|>> ($i.INVOKESTATIC "java.lang.Runtime" "getRuntime" ($t.method (list) (#.Some $Runtime) (list)) #0)
+ ($i.INVOKEVIRTUAL "java.lang.Runtime" "availableProcessors" ($t.method (list) (#.Some $t.int) (list)) #0))
executorI (|>> ($i.NEW executor-class)
$i.DUP
parallelism-levelI
- ($i.INVOKESPECIAL executor-class "<init>" ($t.method (list $t.int) #.None (list)) false))]
+ ($i.INVOKESPECIAL executor-class "<init>" ($t.method (list $t.int) #.None (list)) #0))]
(|>> executorI
($i.PUTSTATIC hostL.runtime-class executor-field executorT)
$i.RETURN)))
@@ -410,10 +410,10 @@
(runnableI ($i.ALOAD +2))
delayI
($i.GETSTATIC time-unit-class "MILLISECONDS" time-unitT)
- ($i.INVOKEVIRTUAL executor-class "schedule" ($t.method (list $Runnable $t.long time-unitT) (#.Some futureT) (list)) false))
+ ($i.INVOKEVIRTUAL executor-class "schedule" ($t.method (list $Runnable $t.long time-unitT) (#.Some futureT) (list)) #0))
schedule-immediatelyI (|>> executorI
(runnableI ($i.ALOAD +2))
- ($i.INVOKEVIRTUAL executor-class "execute" ($t.method (list $Runnable) #.None (list)) false))]
+ ($i.INVOKEVIRTUAL executor-class "execute" ($t.method (list $Runnable) #.None (list)) #0))]
(<| $i.with-label (function (_ @immediately))
(|>> immediacy-checkI
($i.IFEQ @immediately)
@@ -449,10 +449,10 @@
(list/map $i.ALOAD)
$i.fuse)]
(|>> preI
- ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature (dec arity)) false)
+ ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature (dec arity)) #0)
($i.CHECKCAST hostL.function-class)
($i.ALOAD arity)
- ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature +1) false)
+ ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature +1) #0)
$i.ARETURN)))))
(list& ($d.abstract-method #$.Public $.noneM apply-method (apply-signature +1)))
$d.fuse)
@@ -460,7 +460,7 @@
(|>> ($d.field #$.Public $.finalF partials-field $t.int)
($d.method #$.Public $.noneM "<init>" ($t.method (list $t.int) #.None (list))
(|>> ($i.ALOAD +0)
- ($i.INVOKESPECIAL "java.lang.Object" "<init>" ($t.method (list) #.None (list)) false)
+ ($i.INVOKESPECIAL "java.lang.Object" "<init>" ($t.method (list) #.None (list)) #0)
($i.ALOAD +0)
($i.ILOAD +1)
($i.PUTFIELD hostL.function-class partials-field $t.int)
@@ -478,7 +478,7 @@
(|>> ($d.field #$.Public $.finalF procedure-field $Function)
($d.method #$.Public $.noneM "<init>" ($t.method (list $Function) #.None (list))
(|>> ($i.ALOAD +0)
- ($i.INVOKESPECIAL "java.lang.Object" "<init>" ($t.method (list) #.None (list)) false)
+ ($i.INVOKESPECIAL "java.lang.Object" "<init>" ($t.method (list) #.None (list)) #0)
($i.ALOAD +0)
($i.ALOAD +1)
($i.PUTFIELD hostL.runnable-class procedure-field $Function)
@@ -487,7 +487,7 @@
(|>> ($i.ALOAD +0)
($i.GETFIELD hostL.runnable-class procedure-field $Function)
$i.NULL
- ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature +1) false)
+ ($i.INVOKEVIRTUAL hostL.function-class apply-method (apply-signature +1) #0)
$i.RETURN))
))]
_ (commonT.store-class hostL.runnable-class bytecode)]
diff --git a/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux
index df9cd6be2..81b60e1ce 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/statement.jvm.lux
@@ -139,7 +139,7 @@
($i.ASTORE +0)))
run-ioI (|>> ($i.CHECKCAST hostL.function-class)
$i.NULL
- ($i.INVOKEVIRTUAL hostL.function-class runtimeT.apply-method (runtimeT.apply-signature +1) false))
+ ($i.INVOKEVIRTUAL hostL.function-class runtimeT.apply-method (runtimeT.apply-signature +1) #0))
main-type ($t.method (list ($t.array +1 ($t.class "java.lang.String" (list))))
#.None
(list))]
diff --git a/new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux b/new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux
index 9d3e4d097..8b636b1cf 100644
--- a/new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/jvm/structure.jvm.lux
@@ -59,4 +59,4 @@
($t.method (list $t.int $Object $Object)
(#.Some ($t.array +1 $Object))
(list))
- false)))))
+ #0)))))
diff --git a/new-luxc/source/luxc/lang/translation/lua/function.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/function.jvm.lux
index 02b322de6..451e9dbb4 100644
--- a/new-luxc/source/luxc/lang/translation/lua/function.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/function.jvm.lux
@@ -67,7 +67,7 @@
(lua.if! (lua.= arityO "num_args")
(lua.block! (list selfO
(lua.block! args-initsO+)
- (lua.while! (lua.bool true)
+ (lua.while! (lua.bool #1)
(lua.return! bodyO))))
(let [unpack (|>> (list) (lua.apply "table.unpack"))
recur (|>> (list) (lua.apply function-name))]
diff --git a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
index 6be20a0e6..7c45f0786 100644
--- a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux
@@ -34,19 +34,19 @@
(def: none
Expression
- (variant +0 false unit))
+ (variant +0 #0 unit))
(def: some
(-> Expression Expression)
- (variant +1 true))
+ (variant +1 #1))
(def: left
(-> Expression Expression)
- (variant +0 false))
+ (variant +0 #0))
(def: right
(-> Expression Expression)
- (variant +1 true))
+ (variant +1 #1))
(type: Runtime Lua)
@@ -189,7 +189,7 @@
@@bit//logical-right-shift)
(runtime: (text//index subject param start)
- (lua.block! (list (lua.local! "idx" (#.Some (lua.apply "string.find" (list subject param start (lua.bool true)))))
+ (lua.block! (list (lua.local! "idx" (#.Some (lua.apply "string.find" (list subject param start (lua.bool #1)))))
(lua.if! (lua.= lua.nil "idx")
(lua.return! none)
(lua.return! (some "idx"))))))
@@ -255,8 +255,8 @@
(let [atom//field (lua.string atom//field)]
(lua.if! (lua.= old (lua.nth atom//field atom))
(lua.block! (list (lua.set! (lua.nth atom//field atom) new)
- (lua.return! (lua.bool true))))
- (lua.return! (lua.bool false)))))
+ (lua.return! (lua.bool #1))))
+ (lua.return! (lua.bool #0)))))
(def: runtime//atom
Runtime
diff --git a/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux b/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux
index 3768bb5c7..3bfd5578a 100644
--- a/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/eval.jvm.lux
@@ -97,10 +97,10 @@
(def: (lux-object host-object)
(-> Object (Error Any))
(cond (host.instance? php/runtime/memory/FalseMemory host-object)
- (ex.return false)
+ (ex.return #0)
(host.instance? php/runtime/memory/TrueMemory host-object)
- (ex.return true)
+ (ex.return #1)
(host.instance? php/runtime/memory/LongMemory host-object)
(ex.return (LongMemory::toLong [] (:coerce LongMemory host-object)))
diff --git a/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux
index 045f8ceb7..7feb0033c 100644
--- a/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/php/runtime.jvm.lux
@@ -36,19 +36,19 @@
(def: #export none
Computation
- (variant +0 false unit))
+ (variant +0 #0 unit))
(def: #export some
(-> Expression Computation)
- (variant +1 true))
+ (variant +1 #1))
(def: #export left
(-> Expression Computation)
- (variant +0 false))
+ (variant +0 #0))
(def: #export right
(-> Expression Computation)
- (variant +1 true))
+ (variant +1 #1))
(type: Runtime Statement)
@@ -306,8 +306,8 @@
## (_.if! (_.= old (_.nth atom//field atom))
## ($_ _.then!
## (_.set-nth! atom//field new atom)
-## (_.return! (_.bool true)))
-## (_.return! (_.bool false)))))
+## (_.return! (_.bool #1)))
+## (_.return! (_.bool #0)))))
## (def: runtime//atom
## Runtime
diff --git a/new-luxc/source/luxc/lang/translation/python/function.jvm.lux b/new-luxc/source/luxc/lang/translation/python/function.jvm.lux
index 32522d1c0..d081dd52b 100644
--- a/new-luxc/source/luxc/lang/translation/python/function.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/function.jvm.lux
@@ -80,7 +80,7 @@
($_ python.then!
(python.set! (list (referenceT.variable +0)) @function)
args-initsO+
- (python.while! (python.bool true)
+ (python.while! (python.bool #1)
(python.return! bodyO)))
(python.if! (python.> arityO @num_args)
(let [arity-args (python.slice (python.int 0) arityO @curried)
diff --git a/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
index 70ce11a94..68af2d630 100644
--- a/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
@@ -36,19 +36,19 @@
(def: #export none
Expression
- (variant +0 false unit))
+ (variant +0 #0 unit))
(def: #export some
(-> Expression Expression)
- (variant +1 true))
+ (variant +1 #1))
(def: #export left
(-> Expression Expression)
- (variant +0 false))
+ (variant +0 #0))
(def: #export right
(-> Expression Expression)
- (variant +1 true))
+ (variant +1 #1))
(type: Runtime Statement)
@@ -340,8 +340,8 @@
(python.if! (python.= old (python.nth atom//field atom))
($_ python.then!
(python.set-nth! atom//field new atom)
- (python.return! (python.bool true)))
- (python.return! (python.bool false)))))
+ (python.return! (python.bool #1)))
+ (python.return! (python.bool #0)))))
(def: runtime//atom
Runtime
diff --git a/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux
index cf0b87d78..3ea37ae85 100644
--- a/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/r/runtime.jvm.lux
@@ -64,19 +64,19 @@
(def: #export none
Expression
- (variant +0 false unit))
+ (variant +0 #0 unit))
(def: #export some
(-> Expression Expression)
- (variant +1 true))
+ (variant +1 #1))
(def: #export left
(-> Expression Expression)
- (variant +0 false))
+ (variant +0 #0))
(def: #export right
(-> Expression Expression)
- (variant +1 true))
+ (variant +1 #1))
(type: Runtime Expression)
@@ -690,7 +690,7 @@
(text-clip (inc (@@ startF))
(inc (@@ subjectL))
(@@ subject))))
- (list ["fixed" (r.bool true)])
+ (list ["fixed" (r.bool #1)])
(r.global "regexpr"))
(r.nth (r.int 1))))
(r.if (|> (@@ idx) (r.= (r.int -1)))
@@ -771,8 +771,8 @@
(r.if (|> (@@ atom) (r.nth atom//field) (r.= (@@ old)))
($_ r.then
(r.set-nth! atom//field (@@ new) atom)
- (r.bool true))
- (r.bool false))))
+ (r.bool #1))
+ (r.bool #0))))
(def: runtime//atom
Runtime
diff --git a/new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux
index aecabc914..64c2bba2e 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/function.jvm.lux
@@ -62,7 +62,7 @@
(ruby.if! (ruby.= arityO "num_args")
(ruby.block! (list selfO
args-initsO+
- (ruby.while! (ruby.bool true)
+ (ruby.while! (ruby.bool #1)
(ruby.return! bodyO))))
(ruby.return! (let [recur (function (_ args) (ruby.call (list args) function-name))]
(ruby.? (ruby.> arityO "num_args")
diff --git a/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux
index 9d0d0f890..4ab5417a1 100644
--- a/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/ruby/runtime.jvm.lux
@@ -34,19 +34,19 @@
(def: #export none
Expression
- (variant +0 false unit))
+ (variant +0 #0 unit))
(def: #export some
(-> Expression Expression)
- (variant +1 true))
+ (variant +1 #1))
(def: #export left
(-> Expression Expression)
- (variant +0 false))
+ (variant +0 #0))
(def: #export right
(-> Expression Expression)
- (variant +1 true))
+ (variant +1 #1))
(type: Runtime Ruby)
@@ -228,8 +228,8 @@
(let [atom//field (ruby.string atom//field)]
(ruby.if! (ruby.= old (ruby.nth atom//field atom))
(ruby.block! (list (ruby.set-nth! atom//field new atom)
- (ruby.return! (ruby.bool true))))
- (ruby.return! (ruby.bool false)))))
+ (ruby.return! (ruby.bool #1))))
+ (ruby.return! (ruby.bool #0)))))
(def: runtime//atom
Runtime
diff --git a/new-luxc/source/luxc/repl.lux b/new-luxc/source/luxc/repl.lux
index 9df2d181d..df046700c 100644
--- a/new-luxc/source/luxc/repl.lux
+++ b/new-luxc/source/luxc/repl.lux
@@ -108,7 +108,7 @@
compiler (initialize source-dirs target-dir console)]
(loop [compiler compiler
source fresh-source
- multi-line? false]
+ multi-line? #0]
(do @
[_ (if multi-line?
(console.write " " console)
@@ -126,11 +126,11 @@
(#e.Success [compiler' [source' exprT exprV]])
(do @
[_ (console.write (represent compiler' exprT exprV) console)]
- (recur compiler' source' false))
+ (recur compiler' source' #0))
(#e.Error error)
(if (ex.match? syntax.end-of-file error)
- (recur compiler source true)
+ (recur compiler source #1)
(exec (log! (ex.construct repl-error error))
- (recur compiler fresh-source false))))))
+ (recur compiler fresh-source #0))))))
)))
diff --git a/new-luxc/test/test/luxc/lang/analysis/host.jvm.lux b/new-luxc/test/test/luxc/lang/analysis/host.jvm.lux
index 1e6cafdfc..fcdcfbe6a 100644
--- a/new-luxc/test/test/luxc/lang/analysis/host.jvm.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/host.jvm.lux
@@ -50,8 +50,8 @@
(#e.Error error)
<failure>)))]
- [success true false]
- [failure false true]
+ [success #1 #0]
+ [failure #0 #1]
)
(do-template [<name> <success> <failure>]
@@ -71,8 +71,8 @@
(#e.Error error)
<failure>)))]
- [success' true false]
- [failure' false true]
+ [success' #1 #0]
+ [failure' #0 #1]
)
(context: "Conversions [double + float]."
diff --git a/new-luxc/test/test/luxc/lang/analysis/type.lux b/new-luxc/test/test/luxc/lang/analysis/type.lux
index b2d819ec5..707565fca 100644
--- a/new-luxc/test/test/luxc/lang/analysis/type.lux
+++ b/new-luxc/test/test/luxc/lang/analysis/type.lux
@@ -73,10 +73,10 @@
[#.Text text/=])
_
- false))
+ #0))
(#e.Error error)
- false)))
+ #0)))
(test (format "Can analyse type-coercion.")
(|> (do Monad<Meta>
[runtime-bytecode @runtime.translate]
@@ -89,5 +89,5 @@
(type/= codeT analysisT)
(#e.Error error)
- false)))
+ #0)))
))))
diff --git a/new-luxc/test/test/luxc/lang/synthesis/loop.lux b/new-luxc/test/test/luxc/lang/synthesis/loop.lux
index af818255b..c6efa7dbf 100644
--- a/new-luxc/test/test/luxc/lang/synthesis/loop.lux
+++ b/new-luxc/test/test/luxc/lang/synthesis/loop.lux
@@ -35,7 +35,7 @@
(does-recursion? arity bodyS)
_
- false))
+ #0))
(^ [_ (#.Form (list& [_ (#.Text "lux recur")] argsS))])
(n/= arity (list.size argsS))
@@ -48,7 +48,7 @@
(recur elseS))
_
- false
+ #0
)))
(def: (gen-body arity output)
@@ -139,7 +139,7 @@
(and (n/= arity _arity)))
_
- false))))))
+ #0))))))
(context: "Loop."
(<| (times +100)
@@ -159,4 +159,4 @@
(loopS.contains-self-reference? _bodyS)
_
- false))))))
+ #0))))))
diff --git a/new-luxc/test/test/luxc/lang/synthesis/procedure.lux b/new-luxc/test/test/luxc/lang/synthesis/procedure.lux
index 9648e5add..ab6c9de6f 100644
--- a/new-luxc/test/test/luxc/lang/synthesis/procedure.lux
+++ b/new-luxc/test/test/luxc/lang/synthesis/procedure.lux
@@ -30,5 +30,5 @@
(list.zip2 argsA argsS)))
_
- false)))
+ #0)))
))))
diff --git a/new-luxc/test/test/luxc/lang/translation/case.lux b/new-luxc/test/test/luxc/lang/translation/case.lux
index 20d072651..391dc5ad8 100644
--- a/new-luxc/test/test/luxc/lang/translation/case.lux
+++ b/new-luxc/test/test/luxc/lang/translation/case.lux
@@ -70,15 +70,15 @@
(|> (run (` ("lux case" (~ valueS)
("lux case alt"
("lux case seq" (~ pathS)
- ("lux case exec" true))
+ ("lux case exec" #1))
("lux case seq" ("lux case bind" +0)
- ("lux case exec" false))))))
+ ("lux case exec" #0))))))
(case> (#e.Success valueT)
(:coerce Bit valueT)
(#e.Error error)
(exec (log! error)
- false))))
+ #0))))
(test "Can bind values."
(|> (run (` ("lux case" (~ (code.nat to-bind))
("lux case seq" ("lux case bind" +0)
@@ -88,7 +88,7 @@
(#e.Error error)
(exec (log! error)
- false))))
+ #0))))
)))
(context: "[JVM] Pattern-matching."
diff --git a/new-luxc/test/test/luxc/lang/translation/common.lux b/new-luxc/test/test/luxc/lang/translation/common.lux
index 9aba56d6b..769aea3f5 100644
--- a/new-luxc/test/test/luxc/lang/translation/common.lux
+++ b/new-luxc/test/test/luxc/lang/translation/common.lux
@@ -34,7 +34,7 @@
(#e.Error error)
(exec (log! error)
- false))
+ #0))
(let [param <param-expr>])))]
["lux bit and" bit.and param]
@@ -55,7 +55,7 @@
(#e.Error error)
(exec (log! error)
- false))
+ #0))
(let [param (n/% +64 param)])))
))))
@@ -75,7 +75,7 @@
(#e.Error error)
(exec (log! error)
- false))
+ #0))
(let [subject <subject-expr>])))]
["lux int to-frac" Frac int-to-frac f/= subject]
@@ -93,7 +93,7 @@
(#e.Error error)
(exec (log! error)
- false)))))]
+ #0)))))]
["lux int +" i/+ Int i/=]
["lux int -" i/- Int i/=]
@@ -117,7 +117,7 @@
(<comp> (<reference> param subject) (:coerce <outputT> valueT))
_
- false)))]
+ #0)))]
["lux frac +" f/+ Frac f/=]
["lux frac -" f/- Frac f/=]
@@ -143,7 +143,7 @@
(<test> (:coerce Frac valueT))
_
- false)))]
+ #0)))]
["lux frac min" (f/= frac/bottom)]
["lux frac max" (f/= frac/top)]
@@ -157,7 +157,7 @@
(#e.Error error)
(exec (log! error)
- false))))]
+ #0))))]
["lux frac to-int" "lux int to-frac" (f/< 1.0)]))
))))
@@ -205,34 +205,34 @@
(:coerce Bit valueV)
_
- false))
+ #0))
(|> (run (` ("lux text =" (~ sample0S) (~ sample1S))))
(case> (#e.Success valueV)
(not (:coerce Bit valueV))
_
- false))))
+ #0))))
(test "Can compare texts for order."
(|> (run (` ("lux text <" (~ sample1S) (~ sample0S))))
(case> (#e.Success valueV)
(:coerce Bit valueV)
_
- false)))
+ #0)))
(test "Can get length of text."
(|> (run (` ("lux text size" (~ sample0S))))
(case> (#e.Success valueV)
(n/= sample-size (:coerce Nat valueV))
_
- false)))
+ #0)))
(test "Can concatenate text."
(|> (run (` ("lux text size" (~ concatenatedS))))
(case> (#e.Success valueV)
(n/= (n/* +2 sample-size) (:coerce Nat valueV))
_
- false)))
+ #0)))
(test "Can find index of sub-text."
(and (|> (run (` ("lux text index" (~ concatenatedS) (~ sample0S) +0)))
(case> (^multi (#e.Success valueV)
@@ -240,14 +240,14 @@
(n/= +0 valueV)
_
- false))
+ #0))
(|> (run (` ("lux text index" (~ concatenatedS) (~ sample1S) +0)))
(case> (^multi (#e.Success valueV)
[(:coerce (Maybe Nat) valueV) (#.Some valueV)])
(n/= sample-size valueV)
_
- false))))
+ #0))))
(let [test-clip (function (_ from to expected)
(|> (run (` ("lux text clip"
(~ concatenatedS)
@@ -258,7 +258,7 @@
(text/= expected valueV)
_
- false)))]
+ #0)))]
(test "Can clip text to extract sub-text."
(and (test-clip +0 sample-size sample0)
(test-clip sample-size (n/* +2 sample-size) sample1))))
@@ -272,7 +272,7 @@
sample0)
_
- false)))
+ #0)))
)))
(def: (array-spec run)
@@ -291,22 +291,22 @@
(#e.Error error)
(exec (log! error)
- false))))
+ #0))))
(test "Can get element from array (if it exists)."
(and (|> (run (` ("lux array get" (~ array0S) (~ (code.nat idx)))))
(case> (^multi (#e.Success valueV)
[(:coerce (Maybe Nat) valueV) #.None])
- true
+ #1
_
- false))
+ #0))
(|> (run (` ("lux array get" (~ array1S) (~ (code.nat idx)))))
(case> (^multi (#e.Success valueV)
[(:coerce (Maybe Nat) valueV) (#.Some valueV)])
(n/= value valueV)
_
- false))))
+ #0))))
(test "Can remove element from array."
(|> (run (` ("lux array get"
("lux array remove" (~ array1S)
@@ -314,10 +314,10 @@
(~ (code.nat idx)))))
(case> (^multi (#e.Success valueV)
[(:coerce (Maybe Nat) valueV) #.None])
- true
+ #1
_
- false)))
+ #0)))
)))
(def: (math-spec run)
@@ -330,11 +330,11 @@
[(test (format "Can apply '" <name> "' procedure.")
(|> (run (` (<name> (~ (code.frac subject)))))
(case> (#e.Success valueV)
- true
+ #1
(#e.Error error)
(exec (log! error)
- false))))]
+ #0))))]
["lux math cos"]
["lux math sin"]
@@ -350,11 +350,11 @@
[(test (format "Can apply '" <name> "' procedure.")
(|> (run (` (<name> (~ (code.frac subject)) (~ (code.frac param)))))
(case> (#e.Success valueV)
- true
+ #1
(#e.Error error)
(exec (log! error)
- false))))]
+ #0))))]
["lux math pow"]))
))))
@@ -367,11 +367,11 @@
(test "Can log messages."
(|> (run (` ("lux io log" (~ (code.text (format "LOG: " message))))))
(case> (#e.Success valueV)
- true
+ #1
(#e.Error error)
(exec (log! error)
- false))))
+ #0))))
(test "Can throw runtime errors."
(and (|> (run (` ("lux try" ("lux function" +1 []
("lux io error" (~ (code.text message)))))))
@@ -380,7 +380,7 @@
(text.contains? message error)
_
- false))
+ #0))
(|> (run (` ("lux try" ("lux function" +1 []
(~ (code.text message))))))
(case> (^multi (#e.Success valueV)
@@ -388,7 +388,7 @@
(text/= message valueV)
_
- false))))
+ #0))))
(test "Can obtain current time in milli-seconds."
(|> (run (` [("lux io current-time") ("lux io current-time")]))
(case> (#e.Success valueV)
@@ -397,7 +397,7 @@
(#e.Error error)
(exec (log! error)
- false))))
+ #0))))
)))
(def: (atom-spec run)
@@ -416,7 +416,7 @@
(#e.Error error)
(exec (log! error)
- false))))
+ #0))))
(test "Can compare-and-swap atoms."
(and (|> (run (` ("lux let" +0 (~ preS)
("lux let" +1 ("lux atom new" (0))
@@ -429,7 +429,7 @@
(#e.Error error)
(exec (log! error)
- false)))
+ #0)))
(|> (run (` ("lux let" +0 (~ preS)
("lux let" +1 ("lux atom new" (0))
[("lux atom compare-and-swap" (1) (~ postS) (~ postS))
@@ -441,7 +441,7 @@
(#e.Error error)
(exec (log! error)
- false)))))
+ #0)))))
)))
(def: (box-spec run)
@@ -460,7 +460,7 @@
(#e.Error error)
(exec (log! error)
- false))))
+ #0))))
(test "Can write boxes."
(|> (run (` ("lux let" +0 (~ boxS)
("lux let" +1 ("lux box write" (~ postS) (0))
@@ -470,7 +470,7 @@
(#e.Error error)
(exec (log! error)
- false))))
+ #0))))
)))
(def: (process-spec run)
@@ -483,7 +483,7 @@
(#e.Error error)
(exec (log! error)
- false))))
+ #0))))
(do r.Monad<Random>
[delay (|> r.nat (:: @ map (n/% +10)))
message (r.text +5)]
@@ -493,11 +493,11 @@
("lux function" +1 []
("lux io log" (~ (code.text (format "SCHEDULE: " message))))))))
(case> (#e.Success valueV)
- true
+ #1
(#e.Error error)
(exec (log! error)
- false)))))
+ #0)))))
))
(def: (all-specs run)
diff --git a/new-luxc/test/test/luxc/lang/translation/function.lux b/new-luxc/test/test/luxc/lang/translation/function.lux
index fd96aeeb9..9eb25d380 100644
--- a/new-luxc/test/test/luxc/lang/translation/function.lux
+++ b/new-luxc/test/test/luxc/lang/translation/function.lux
@@ -55,7 +55,7 @@
(#e.Error error)
(exec (log! error)
- false))))
+ #0))))
(test "Can partially apply functions."
(or (n/= +1 arity)
(let [partial-arity (n/inc cut-off)
@@ -69,7 +69,7 @@
(#e.Error error)
(exec (log! error)
- false))))))
+ #0))))))
(test "Can read environment."
(or (n/= +1 arity)
(let [env (|> (list.n/range +0 cut-off)
@@ -88,7 +88,7 @@
(#e.Error error)
(exec (log! error)
- false))))))
+ #0))))))
)))
(context: "[JVM] Function."
diff --git a/new-luxc/test/test/luxc/lang/translation/js.lux b/new-luxc/test/test/luxc/lang/translation/js.lux
index 42947b580..8175e82fc 100644
--- a/new-luxc/test/test/luxc/lang/translation/js.lux
+++ b/new-luxc/test/test/luxc/lang/translation/js.lux
@@ -26,7 +26,7 @@
(:coerce Bit valueV)
_
- false)))
+ #0)))
(type: Check (-> (e.Error Any) Bit))
@@ -37,7 +37,7 @@
(<=> (<pre> angle) (:coerce <type> valueV))
(#e.Error error)
- false)))]
+ #0)))]
[sin-check Frac math.sin f/=]
[length-check Nat id n/=]
@@ -75,10 +75,10 @@
(|> (run-js (` ("js object get" (~ field) (~ empty-object))))
(case> (^multi (#e.Success valueV)
[(:coerce (Maybe Int) valueV) #.None])
- true
+ #1
_
- false)))
+ #0)))
(test "Can get fields from objects."
(|> (run-js (` ("js object get" (~ field) (~ object))))
(case> (^multi (#e.Success valueV)
@@ -86,16 +86,16 @@
(i/= value (:coerce Int valueV))
_
- false)))
+ #0)))
(test "Can delete fields from objects."
(|> (run-js (let [post-delete (` ("js object delete" (~ field) (~ object)))]
(` ("js object get" (~ field) (~ post-delete)))))
(case> (^multi (#e.Success valueV)
[(:coerce (Maybe Int) valueV) #.None])
- true
+ #1
_
- false)))
+ #0)))
(test "Can instance new objects."
(let [base (` ("js object new" ("js global" "Number") (~ (code.text (%f frac-value)))))]
(|> (run-js (` ("lux frac +" (~ base) 0.0)))
@@ -103,7 +103,7 @@
(f/= frac-value (:coerce Frac valueV))
(#e.Error error)
- false))))
+ #0))))
(test "Can call methods on objects."
(|> (run-js (` ("js object call" ("js global" "Math") "sin" (~ (code.text (%f frac-value))))))
(sin-check frac-value)))
@@ -130,7 +130,7 @@
(n/= reference sample)
_
- false)))
+ #0)))
(test "Can write an element into an array."
(let [idxS (code.nat idx)
overwriteS (code.nat overwrite)]
@@ -142,7 +142,7 @@
(n/= overwrite sample)
_
- false))))
+ #0))))
(test "Can delete an element from an array."
(let [idxS (code.nat idx)
deleteS (` ("js array delete" (~ idxS) (~ arrayS)))]
@@ -152,9 +152,9 @@
(case> (^multi (#e.Success elemV)
[(:coerce (Maybe Nat) elemV)
#.None])
- true
+ #1
_
- false))
+ #0))
)))
))))
diff --git a/new-luxc/test/test/luxc/lang/translation/jvm.lux b/new-luxc/test/test/luxc/lang/translation/jvm.lux
index 34f1af508..f31496b08 100644
--- a/new-luxc/test/test/luxc/lang/translation/jvm.lux
+++ b/new-luxc/test/test/luxc/lang/translation/jvm.lux
@@ -40,7 +40,7 @@
(<test> <sample> (:coerce <cast> valueT))
(#e.Error error)
- false)))]
+ #0)))]
["jvm convert double-to-float" "jvm convert float-to-double" code.frac frac-sample Frac f/=]
["jvm convert double-to-int" "jvm convert int-to-double" code.frac frac-sample Frac f/=]
@@ -72,7 +72,7 @@
(<test> <sample> (:coerce <cast> valueT))
(#e.Error error)
- false)))]
+ #0)))]
["jvm convert long-to-int" "jvm convert int-to-char" "jvm convert char-to-long" code.int int-sample Int i/=]
["jvm convert long-to-int" "jvm convert int-to-byte" "jvm convert byte-to-long" code.int int-sample Int i/=]
@@ -99,7 +99,7 @@
(<test> <sample> (:coerce <cast> valueT))
(#e.Error error)
- false)))]
+ #0)))]
["jvm convert long-to-int" "jvm convert int-to-char" "jvm convert char-to-byte" "jvm convert byte-to-long" code.int int-sample Int i/=]
["jvm convert long-to-int" "jvm convert int-to-char" "jvm convert char-to-short" "jvm convert short-to-long" code.int int-sample Int i/=]
@@ -141,7 +141,7 @@
(:coerce <type> valueT))
(#e.Error error)
- false)))]
+ #0)))]
[(format "jvm " <domain> " +") <+>]
[(format "jvm " <domain> " -") <->]
@@ -180,7 +180,7 @@
(:coerce Nat valueT))
(#e.Error error)
- false)))]
+ #0)))]
[(format "jvm " <domain> " and") bit.and]
[(format "jvm " <domain> " or") bit.or]
@@ -214,7 +214,7 @@
(:coerce <type> valueT))
(#e.Error error)
- false)))]
+ #0)))]
[(format "jvm " <domain> " shl") bit.left-shift Nat n/= id code.nat]
[(format "jvm " <domain> " shr") bit.arithmetic-right-shift Int i/= nat-to-int (|>> nat-to-int code.int)]
@@ -246,7 +246,7 @@
(:coerce Bit valueT))
(#e.Error error)
- false)))]
+ #0)))]
[(format "jvm " <domain> " =") <=>]
[(format "jvm " <domain> " <") <<>]
@@ -301,7 +301,7 @@
(<test> <value> (:coerce <type> outputZ))
(#e.Error error)
- false)))]
+ #0)))]
["boolean" Bit valueZ bit/= (code.bit valueZ)
id]
@@ -349,7 +349,7 @@
(<test> <value> (:coerce <type> outputT))
(#e.Error error)
- false)))]
+ #0)))]
["char" Int valueC i/=
(|> (code.int valueC) (~) "jvm convert long-to-int" "jvm convert int-to-char" (`))
@@ -377,7 +377,7 @@
(f/= valueD (:coerce Frac outputT))
(#e.Error error)
- false)))
+ #0)))
(test "jvm array length"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm array length" ("jvm array new" +0 "java.lang.Object" (~ (code.nat size))))))]
@@ -388,7 +388,7 @@
(n/= size (:coerce Nat outputT))
(#e.Error error)
- false)))
+ #0)))
)))))
(host.import: java/lang/Class
@@ -439,7 +439,7 @@
(:coerce Bit outputT)
(#e.Error error)
- false)))
+ #0)))
(test "jvm object null?"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm object null?" (~ (code.int sample)))))]
@@ -450,7 +450,7 @@
(not (:coerce Bit outputT))
(#e.Error error)
- false)))
+ #0)))
(test "jvm object synchronized"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm object synchronized" (~ (code.int monitor)) (~ (code.int sample)))))]
@@ -461,7 +461,7 @@
(i/= sample (:coerce Int outputT))
(#e.Error error)
- false)))
+ #0)))
(test "jvm object throw"
(|> (do macro.Monad<Meta>
[_ runtimeT.translate
@@ -478,10 +478,10 @@
(text.contains? exception-message error)
(#e.Success outputT)
- false)
+ #0)
(#e.Error error)
- false)))
+ #0)))
(test "jvm object class"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm object class" (~ (code.text class)))))]
@@ -492,7 +492,7 @@
(|> outputT (:coerce Class) (Class::getName []) (text/= class))
(#e.Error error)
- false)))
+ #0)))
(test "jvm object instance?"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm object instance?" (~ (code.text instance-class)) (~ instance))))]
@@ -503,7 +503,7 @@
(:coerce Bit outputT)
(#e.Error error)
- false)))
+ #0)))
))))
(host.import: java/util/GregorianCalendar
@@ -535,7 +535,7 @@
(i/= GregorianCalendar::AD (:coerce Int outputT))
(#e.Error error)
- false)))
+ #0)))
(test "jvm member static put"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm member static put" "java.awt.datatransfer.DataFlavor" "allHtmlFlavor" "java.awt.datatransfer.DataFlavor"
@@ -547,7 +547,7 @@
(is? hostL.unit (:coerce Text outputT))
(#e.Error error)
- false)))
+ #0)))
(test "jvm member virtual get"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String" (~ value-memberS))))]
@@ -558,7 +558,7 @@
(text/= sample-string (:coerce Text outputT))
(#e.Error error)
- false)))
+ #0)))
(test "jvm member virtual put"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm member virtual get" "org.omg.CORBA.ValueMember" "name" "java.lang.String"
@@ -571,7 +571,7 @@
(text/= other-sample-string (:coerce Text outputT))
(#e.Error error)
- false)))
+ #0)))
))))
(host.import: java/lang/Object)
@@ -600,7 +600,7 @@
(i/= sample (:coerce Int outputT))
(#e.Error error)
- false)))
+ #0)))
(test "jvm member invoke virtual"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm object cast" "boolean" "java.lang.Boolean"
@@ -613,7 +613,7 @@
(:coerce Bit outputT)
(#e.Error error)
- false)))
+ #0)))
(test "jvm member invoke interface"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate (` ("jvm object cast" "boolean" "java.lang.Boolean"
@@ -626,7 +626,7 @@
(:coerce Bit outputT)
(#e.Error error)
- false)))
+ #0)))
(test "jvm member invoke constructor"
(|> (do macro.Monad<Meta>
[sampleI (expressionT.translate array-listS)]
@@ -637,5 +637,5 @@
(host.instance? ArrayList (:coerce Object outputT))
(#e.Error error)
- false)))
+ #0)))
))))
diff --git a/new-luxc/test/test/luxc/lang/translation/primitive.lux b/new-luxc/test/test/luxc/lang/translation/primitive.lux
index a58b3b97e..14a887873 100644
--- a/new-luxc/test/test/luxc/lang/translation/primitive.lux
+++ b/new-luxc/test/test/luxc/lang/translation/primitive.lux
@@ -31,7 +31,7 @@
(#e.Error error)
(exec (log! error)
- false))))]
+ #0))))]
["bit" Bit //synthesis.bit %bit% bit/=]
["int" Int //synthesis.i64 %int% i/=]
diff --git a/new-luxc/test/test/luxc/lang/translation/reference.lux b/new-luxc/test/test/luxc/lang/translation/reference.lux
index 17cd78d54..66dd8de9f 100644
--- a/new-luxc/test/test/luxc/lang/translation/reference.lux
+++ b/new-luxc/test/test/luxc/lang/translation/reference.lux
@@ -39,7 +39,7 @@
(#e.Error error)
(exec (log! error)
- false))))))
+ #0))))))
(def: (variables-spec run)
(-> Runner Test)
@@ -55,7 +55,7 @@
(#e.Error error)
(exec (log! error)
- false))))))
+ #0))))))
(def: (references-spec run define)
(-> Runner Definer Test)
diff --git a/new-luxc/test/test/luxc/lang/translation/structure.lux b/new-luxc/test/test/luxc/lang/translation/structure.lux
index 17068bb72..3251844b7 100644
--- a/new-luxc/test/test/luxc/lang/translation/structure.lux
+++ b/new-luxc/test/test/luxc/lang/translation/structure.lux
@@ -38,7 +38,7 @@
(#e.Error error)
(exec (log! error)
- false))))))
+ #0))))))
(def: (variants-spec run)
(-> Runner Test)
@@ -69,7 +69,7 @@
(#e.Error error)
(exec (log! error)
- false))))))
+ #0))))))
(def: (structure-spec run)
(-> Runner Test)