aboutsummaryrefslogtreecommitdiff
path: root/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
diff options
context:
space:
mode:
authorEduardo Julian2018-02-17 11:40:12 -0400
committerEduardo Julian2018-02-17 11:40:12 -0400
commitd01f75d220539efd7d58ee9534d3ef3a7bbc3cdc (patch)
treeb0b4f7d06b3e57b3ec304a1323feaa1c44f605c9 /new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
parent24b5c3a973dbfea7bd3de102c909af5483ade0f7 (diff)
- Added tests for normal JS (non-procedure) behavior.
- Fixed a few bugs.
Diffstat (limited to 'new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux')
-rw-r--r--new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux9
1 files changed, 5 insertions, 4 deletions
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 e9653547d..aceac4089 100644
--- a/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
+++ b/new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux
@@ -1059,9 +1059,9 @@
(def: #export atom-field Text "V")
(runtime: atom//compare-and-swap "atomCompareAndSwap"
- (format "(function " @ "(atom,old,new) {"
- "if(atom." atom-field " === old) {"
- "atom." atom-field " = new;"
+ (format "(function " @ "(atom,oldV,newV) {"
+ "if(atom." atom-field " === oldV) {"
+ "atom." atom-field " = newV;"
"return true;"
"}"
"else {"
@@ -1127,5 +1127,6 @@
(def: #export translate
(Meta (Process Unit))
(do macro.Monad<Meta>
- [_ (//.save-js runtime)]
+ [_ //.init-module-buffer
+ _ (//.save-js runtime)]
(//.save-module! artifact)))