aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/js
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/js
parent748c868680683df1949f62aac274040ac5bf43da (diff)
Now implementing atom functionality in stdlib instead of the compiler.
Diffstat (limited to '')
-rw-r--r--new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux22
-rw-r--r--new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux18
2 files changed, 0 insertions, 40 deletions
diff --git a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux
index b40f00c73..cca49372b 100644
--- a/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/procedure/common.jvm.lux
@@ -307,19 +307,6 @@
Nullary
(frac//to-int "(new Date()).getTime()"))
-## [[Atoms]]
-(def: (atom//new initJS)
- Unary
- (format "{" runtimeT.atom-field ":" initJS "}"))
-
-(def: (atom//read atomJS)
- Unary
- (format (self-contained atomJS) "." runtimeT.atom-field))
-
-(def: (atom//compare-and-swap [atomJS oldJS newJS])
- Trinary
- (format runtimeT.atom//compare-and-swap "(" atomJS "," oldJS "," newJS ")"))
-
## [[Box]]
(def: (box//new initJS)
Unary
@@ -432,14 +419,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")
@@ -466,7 +445,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/js/runtime.jvm.lux b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
index c5d85eb0d..d5abbc150 100644
--- a/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
@@ -643,23 +643,6 @@
(format __io//log
__io//error))
-(def: #export atom-field Text "V")
-
-(runtime: atom//compare-and-swap "atomCompareAndSwap"
- (format "(function " @ "(atom,oldV,newV) {"
- "if(atom." atom-field " === oldV) {"
- "atom." atom-field " = newV;"
- "return true;"
- "}"
- "else {"
- "return false;"
- "}"
- "})"))
-
-(def: runtime//atom
- Runtime
- (format __atom//compare-and-swap))
-
(runtime: js//get "jsGetField"
(format "(function " @ "(object, field) {"
"var temp = object[field];"
@@ -704,7 +687,6 @@
runtime//text
runtime//array
runtime//io
- runtime//atom
runtime//js))
(def: #export artifact Text (format prefix ".js"))