diff options
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/lua')
-rw-r--r-- | new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux | 22 | ||||
-rw-r--r-- | new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux | 14 |
2 files changed, 0 insertions, 36 deletions
diff --git a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux index 372d107cb..356adb5c3 100644 --- a/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/lua/procedure/common.jvm.lux @@ -306,19 +306,6 @@ (|> (lua.apply "os.time" (list)) (lua.* (lua.int 1_000)))) -## [[Atoms]] -(def: atom//new - Unary - (|>> [runtimeT.atom//field] (list) lua.table)) - -(def: atom//read - Unary - (lua.nth (lua.string runtimeT.atom//field))) - -(def: (atom//compare-and-swap [atomO oldO newO]) - Trinary - (runtimeT.atom//compare-and-swap atomO oldO newO)) - ## [[Box]] (def: box//new Unary @@ -429,14 +416,6 @@ (install "exit" (unary io//exit)) (install "current-time" (nullary io//current-time))))) -(def: atom-procs - Bundle - (<| (prefix "atom") - (|> (dict.new text.Hash<Text>) - (install "new" (unary atom//new)) - (install "read" (unary atom//read)) - (install "compare-and-swap" (trinary atom//compare-and-swap))))) - (def: box-procs Bundle (<| (prefix "box") @@ -463,7 +442,6 @@ (dict.merge text-procs) (dict.merge array-procs) (dict.merge io-procs) - (dict.merge atom-procs) (dict.merge box-procs) (dict.merge process-procs) ))) 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 8121b2c9d..3a18f98e7 100644 --- a/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux +++ b/new-luxc/source/luxc/lang/translation/lua/runtime.jvm.lux @@ -249,19 +249,6 @@ @@array//put )) -(def: #export atom//field Text "_lux_atom") - -(runtime: (atom//compare-and-swap atom old new) - (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 #1)))) - (lua.return! (lua.bool #0))))) - -(def: runtime//atom - Runtime - (format @@atom//compare-and-swap)) - (runtime: (box//write value box) (lua.block! (list (lua.set! (lua.nth (lua.int 0) box) value) @@ -337,7 +324,6 @@ runtime//bit runtime//text runtime//array - runtime//atom runtime//box runtime//process runtime//lua)) |