aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/python
diff options
context:
space:
mode:
authorEduardo Julian2018-07-31 18:36:18 -0400
committerEduardo Julian2018-07-31 18:36:18 -0400
commiteea58ee669f69fddf2cef9e1675c41959e2e0a55 (patch)
tree5424dab3ef26190958fe4371f3f50995025d31cf /new-luxc/source/luxc/lang/translation/python
parent748c868680683df1949f62aac274040ac5bf43da (diff)
Now implementing atom functionality in stdlib instead of the compiler.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux22
-rw-r--r--new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux16
2 files changed, 0 insertions, 38 deletions
diff --git a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux
index 35ffdb1f8..9a70c8c92 100644
--- a/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/procedure/common.jvm.lux
@@ -358,27 +358,6 @@
(install "current-time" (nullary (function (_ _)
(runtimeT.io//current-time! runtimeT.unit)))))))
-## [[Atoms]]
-(def: atom//new
- Unary
- (|>> [(python.string runtimeT.atom//field)] (list) python.dict))
-
-(def: atom//read
- Unary
- (python.nth (python.string runtimeT.atom//field)))
-
-(def: (atom//compare-and-swap [atomO oldO newO])
- Trinary
- (runtimeT.atom//compare-and-swap atomO oldO newO))
-
-(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)))))
-
## [[Box]]
(def: box//new
Unary
@@ -428,7 +407,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/python/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
index 3dd5980e8..571835b79 100644
--- a/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/python/runtime.jvm.lux
@@ -333,21 +333,6 @@
@@array//get
@@array//put))
-(def: #export atom//field Text "_lux_atom")
-
-(runtime: (atom//compare-and-swap atom old new)
- (let [atom//field (python.string atom//field)]
- (python.if! (python.= old (python.nth atom//field atom))
- ($_ python.then!
- (python.set-nth! atom//field new atom)
- (python.return! (python.bool #1)))
- (python.return! (python.bool #0)))))
-
-(def: runtime//atom
- Runtime
- ($_ python.then!
- @@atom//compare-and-swap))
-
(runtime: (box//write value box)
($_ python.then!
(python.set-nth! (python.int 0) value box)
@@ -384,7 +369,6 @@
runtime//frac
runtime//text
runtime//array
- runtime//atom
runtime//box
runtime//io
runtime//process