aboutsummaryrefslogtreecommitdiff
path: root/lux-jvm/source/luxc/lang/host
diff options
context:
space:
mode:
authorEduardo Julian2021-08-02 20:26:21 -0400
committerEduardo Julian2021-08-02 20:26:21 -0400
commiteff4c59794868b89d60fdc411f9b544a270b817e (patch)
treee88c4dd09acdf1e83c8683940c0496a844096dfe /lux-jvm/source/luxc/lang/host
parentbcd70df3568d71f14763959f454c15d8164e2d15 (diff)
Fixed a bug in the new compiler which allowed the same module to be imported more than once.
Diffstat (limited to 'lux-jvm/source/luxc/lang/host')
-rw-r--r--lux-jvm/source/luxc/lang/host/jvm.lux38
-rw-r--r--lux-jvm/source/luxc/lang/host/jvm/def.lux6
-rw-r--r--lux-jvm/source/luxc/lang/host/jvm/inst.lux12
3 files changed, 28 insertions, 28 deletions
diff --git a/lux-jvm/source/luxc/lang/host/jvm.lux b/lux-jvm/source/luxc/lang/host/jvm.lux
index 1c81be667..5c854d646 100644
--- a/lux-jvm/source/luxc/lang/host/jvm.lux
+++ b/lux-jvm/source/luxc/lang/host/jvm.lux
@@ -103,25 +103,25 @@
(|> (~ g!none)
(set@ (~ (code.local_tag option)) #1)))))
options)]
- (wrap (list& (` (type: (~' #export) (~ g!type)
- (~ (code.record (list/map (function (_ tag)
- [tag (` .Bit)])
- g!tags+)))))
-
- (` (def: (~' #export) (~ g!none)
- (~ g!type)
- (~ (code.record (list/map (function (_ tag)
- [tag (` #0)])
- g!tags+)))))
-
- (` (def: (~' #export) ((~ (code.local_identifier ++)) (~ g!_left) (~ g!_right))
- (-> (~ g!type) (~ g!type) (~ g!type))
- (~ (code.record (list/map (function (_ tag)
- [tag (` (or (get@ (~ tag) (~ g!_left))
- (get@ (~ tag) (~ g!_right))))])
- g!tags+)))))
-
- g!options+))))
+ (in (list& (` (type: (~' #export) (~ g!type)
+ (~ (code.record (list/map (function (_ tag)
+ [tag (` .Bit)])
+ g!tags+)))))
+
+ (` (def: (~' #export) (~ g!none)
+ (~ g!type)
+ (~ (code.record (list/map (function (_ tag)
+ [tag (` #0)])
+ g!tags+)))))
+
+ (` (def: (~' #export) ((~ (code.local_identifier ++)) (~ g!_left) (~ g!_right))
+ (-> (~ g!type) (~ g!type) (~ g!type))
+ (~ (code.record (list/map (function (_ tag)
+ [tag (` (or (get@ (~ tag) (~ g!_left))
+ (get@ (~ tag) (~ g!_right))))])
+ g!tags+)))))
+
+ g!options+))))
(config: Class_Config noneC ++C [finalC])
(config: Method_Config noneM ++M [finalM staticM synchronizedM strictM])
diff --git a/lux-jvm/source/luxc/lang/host/jvm/def.lux b/lux-jvm/source/luxc/lang/host/jvm/def.lux
index 953dbf200..e1e60179f 100644
--- a/lux-jvm/source/luxc/lang/host/jvm/def.lux
+++ b/lux-jvm/source/luxc/lang/host/jvm/def.lux
@@ -293,11 +293,11 @@
(def: #export (fuse defs)
(-> (List //.Def) //.Def)
(case defs
- #.Nil
+ #.End
function.identity
- (#.Cons singleton #.Nil)
+ (#.Item singleton #.End)
singleton
- (#.Cons head tail)
+ (#.Item head tail)
(function.compose (fuse tail) head)))
diff --git a/lux-jvm/source/luxc/lang/host/jvm/inst.lux b/lux-jvm/source/luxc/lang/host/jvm/inst.lux
index e86504d60..ea68f2680 100644
--- a/lux-jvm/source/luxc/lang/host/jvm/inst.lux
+++ b/lux-jvm/source/luxc/lang/host/jvm/inst.lux
@@ -47,7 +47,7 @@
(syntax: (declare {codes (p.many s.local_identifier)})
(|> codes
(list@map (function (_ code) (` ((~' #static) (~ (code.local_identifier code)) (~' int)))))
- wrap))
+ in))
(`` (import: org/objectweb/asm/Opcodes
["#::."
@@ -375,7 +375,7 @@
labels_array (ffi.array org/objectweb/asm/Label array_size)
_ (loop [idx 0]
(if (n.< array_size idx)
- (let [[key label] (maybe.assume (list.nth idx keys+labels))]
+ (let [[key label] (maybe.assume (list.item idx keys+labels))]
(exec
(ffi.array_write idx (ffi.long_to_int key) keys_array)
(ffi.array_write idx label labels_array)
@@ -392,7 +392,7 @@
_ (loop [idx 0]
(if (n.< num_labels idx)
(exec (ffi.array_write idx
- (maybe.assume (list.nth idx labels))
+ (maybe.assume (list.item idx labels))
labels_array)
(recur (inc idx)))
[]))]
@@ -459,11 +459,11 @@
(def: #export (fuse insts)
(-> (List Inst) Inst)
(case insts
- #.Nil
+ #.End
function.identity
- (#.Cons singleton #.Nil)
+ (#.Item singleton #.End)
singleton
- (#.Cons head tail)
+ (#.Item head tail)
(function.compose (fuse tail) head)))