From eea58ee669f69fddf2cef9e1675c41959e2e0a55 Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Tue, 31 Jul 2018 18:36:18 -0400 Subject: Now implementing atom functionality in stdlib instead of the compiler. --- new-luxc/test/test/luxc/lang/analysis/host.jvm.lux | 2 - .../test/test/luxc/lang/translation/common.lux | 61 ---------------------- 2 files changed, 63 deletions(-) (limited to 'new-luxc/test') diff --git a/new-luxc/test/test/luxc/lang/analysis/host.jvm.lux b/new-luxc/test/test/luxc/lang/analysis/host.jvm.lux index dabef0e08..9d09216b8 100644 --- a/new-luxc/test/test/luxc/lang/analysis/host.jvm.lux +++ b/new-luxc/test/test/luxc/lang/analysis/host.jvm.lux @@ -3,8 +3,6 @@ [control [monad (#+ do)] pipe] - [concurrency - ["." atom]] [data ["e" error] ["." product] diff --git a/new-luxc/test/test/luxc/lang/translation/common.lux b/new-luxc/test/test/luxc/lang/translation/common.lux index 9a2465ce3..5425be2ea 100644 --- a/new-luxc/test/test/luxc/lang/translation/common.lux +++ b/new-luxc/test/test/luxc/lang/translation/common.lux @@ -378,66 +378,6 @@ #0)))) ))) -(def: (atom-spec run) - (-> Runner Test) - (do r.Monad - [pre r.nat - post (|> r.nat (r.filter (|>> (n/= pre) not))) - #let [preS (synthesis.i64 pre) - postS (synthesis.i64 post) - atomS (#synthesis.Extension "lux atom new" (list preS))]] - ($_ seq - (test "Can read atoms." - (|> (run (#synthesis.Extension "lux atom read" (list atomS))) - (case> (#e.Success valueV) - (n/= pre (:coerce Nat valueV)) - - (#e.Error error) - (exec (log! error) - #0)))) - (test "Can compare-and-swap atoms." - (and (|> (run (synthesis.branch/let - [preS 0 - (synthesis.branch/let - [(#synthesis.Extension "lux atom new" - (list (synthesis.variable/local 0))) - 1 - (synthesis.tuple - (list (#synthesis.Extension "lux atom compare-and-swap" - (list (synthesis.variable/local 1) - (synthesis.variable/local 0) - postS)) - (#synthesis.Extension "lux atom read" (list (synthesis.variable/local 1)))))])])) - (case> (#e.Success valueV) - (let [[swapped? current-value] (:coerce [Bit Nat] valueV)] - (and swapped? - (n/= post current-value))) - - (#e.Error error) - (exec (log! error) - #0))) - (|> (run (synthesis.branch/let - [preS 0 - (synthesis.branch/let - [(#synthesis.Extension "lux atom new" - (list (synthesis.variable/local 0))) - 1 - (synthesis.tuple - (list (#synthesis.Extension "lux atom compare-and-swap" - (list (synthesis.variable/local 1) - postS - postS)) - (#synthesis.Extension "lux atom read" (list (synthesis.variable/local 1)))))])])) - (case> (#e.Success valueV) - (let [[swapped? current-value] (:coerce [Bit Nat] valueV)] - (and (not swapped?) - (n/= pre current-value))) - - (#e.Error error) - (exec (log! error) - #0))))) - ))) - (def: (box-spec run) (-> Runner Test) (do r.Monad @@ -513,7 +453,6 @@ (text-spec run) (array-spec run) (io-spec run) - (atom-spec run) (box-spec run) (process-spec run) )) -- cgit v1.2.3