From 9f548cd6f0c237f45e37723df90c130a95a915fd Mon Sep 17 00:00:00 2001 From: Dennis Ranke Date: Sun, 8 May 2022 00:19:49 +0200 Subject: [PATCH] update curlywas --- Cargo.lock | 2 +- Cargo.toml | 2 +- platform/Cargo.lock | 2 +- platform/Cargo.toml | 2 +- platform/src/platform.cwa | 8 +++----- 5 files changed, 7 insertions(+), 9 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index fc0dcb3..678856c 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -599,7 +599,7 @@ checksum = "b365fabc795046672053e29c954733ec3b05e4be654ab130fe8f1f94d7051f35" [[package]] name = "curlywas" version = "0.1.0" -source = "git+https://github.com/exoticorn/curlywas.git?rev=aac7bbd#aac7bbd8786a26da0dcbe8320b1afefaf6086464" +source = "git+https://github.com/exoticorn/curlywas.git?rev=c22297e#c22297ea82977ac06373d629fb273a795322d788" dependencies = [ "anyhow", "ariadne", diff --git a/Cargo.toml b/Cargo.toml index 66abb19..97f0bc3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -16,7 +16,7 @@ anyhow = "1" minifb = { version = "0.22", default-features = false, features = ["x11"], optional = true } notify = "4" pico-args = "0.4" -curlywas = { git = "https://github.com/exoticorn/curlywas.git", rev = "aac7bbd" } +curlywas = { git = "https://github.com/exoticorn/curlywas.git", rev = "c22297e" } wat = "1" uw8-tool = { path = "uw8-tool" } same-file = "1" diff --git a/platform/Cargo.lock b/platform/Cargo.lock index edb179c..7756edc 100644 --- a/platform/Cargo.lock +++ b/platform/Cargo.lock @@ -146,7 +146,7 @@ checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" [[package]] name = "curlywas" version = "0.1.0" -source = "git+https://github.com/exoticorn/curlywas.git?rev=aac7bbd#aac7bbd8786a26da0dcbe8320b1afefaf6086464" +source = "git+https://github.com/exoticorn/curlywas.git?rev=c22297e#c22297ea82977ac06373d629fb273a795322d788" dependencies = [ "anyhow", "ariadne", diff --git a/platform/Cargo.toml b/platform/Cargo.toml index bdd6c11..1bda5ee 100644 --- a/platform/Cargo.toml +++ b/platform/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -curlywas = { git="https://github.com/exoticorn/curlywas.git", rev="aac7bbd" } +curlywas = { git="https://github.com/exoticorn/curlywas.git", rev="c22297e" } uw8-tool = { path="../uw8-tool" } anyhow = "1" lodepng = "3.4" \ No newline at end of file diff --git a/platform/src/platform.cwa b/platform/src/platform.cwa index 90253a0..e1f0e45 100644 --- a/platform/src/platform.cwa +++ b/platform/src/platform.cwa @@ -32,11 +32,9 @@ export fn random() -> i32 { } export fn random64() -> i64 { - let state: i64; - randomState = (state := ( - state := randomState ^ (randomState #>> 12i64) - ) ^ (state << 25i64) - ) ^ (state #>> 27i64); + let lazy state = randomState ^ (randomState #>> 12i64); + let lazy state = state ^ (state << 25i64); + randomState = state ^ (state #>> 27i64); randomState * 0x2545f4914f6cdd1di64 }