From d01f75d220539efd7d58ee9534d3ef3a7bbc3cdc Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Sat, 17 Feb 2018 11:40:12 -0400 Subject: - Added tests for normal JS (non-procedure) behavior. - Fixed a few bugs. --- new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) (limited to 'new-luxc/source/luxc/lang/translation/js/runtime.jvm.lux') 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 - [_ (//.save-js runtime)] + [_ //.init-module-buffer + _ (//.save-js runtime)] (//.save-module! artifact))) -- cgit v1.2.3