From 378c7e18cdda380adbf42d5d1e2fc72f68f9f2cb Mon Sep 17 00:00:00 2001 From: Devin Bidwell Date: Sat, 13 Dec 2025 00:35:31 -0700 Subject: [PATCH] version bump --- Changelog.md | 6 ++++++ ModData/About/About.xml | 2 +- csharp_mod/Plugin.cs | 2 +- csharp_mod/stationeersSlang.csproj | 2 +- rust_compiler/Cargo.lock | 2 +- rust_compiler/Cargo.toml | 2 +- rust_compiler/libs/il/src/lib.rs | 2 +- rust_compiler/libs/optimizer/src/lib.rs | 6 ------ 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/Changelog.md b/Changelog.md index 46736d6..0670e13 100644 --- a/Changelog.md +++ b/Changelog.md @@ -1,5 +1,11 @@ # Changelog +[0.3.0] + +- Implemented a multi-pass optimizer + - This should significantly reduce line count in the final output +- Fixed source map to line up with newly optimized code + [0.2.4] - Groundwork laid to collect and track source maps diff --git a/ModData/About/About.xml b/ModData/About/About.xml index ef16119..9b34754 100644 --- a/ModData/About/About.xml +++ b/ModData/About/About.xml @@ -2,7 +2,7 @@ Slang JoeDiertay - 0.2.4 + 0.3.0 [h1]Slang: High-Level Programming for Stationeers[/h1] diff --git a/csharp_mod/Plugin.cs b/csharp_mod/Plugin.cs index 6f8266c..b5f2570 100644 --- a/csharp_mod/Plugin.cs +++ b/csharp_mod/Plugin.cs @@ -41,7 +41,7 @@ namespace Slang { public const string PluginGuid = "com.biddydev.slang"; public const string PluginName = "Slang"; - public const string PluginVersion = "0.2.4"; + public const string PluginVersion = "0.3.0"; public static Mod MOD = new Mod(PluginName, PluginVersion); diff --git a/csharp_mod/stationeersSlang.csproj b/csharp_mod/stationeersSlang.csproj index 3564bc4..7be1826 100644 --- a/csharp_mod/stationeersSlang.csproj +++ b/csharp_mod/stationeersSlang.csproj @@ -5,7 +5,7 @@ enable StationeersSlang Slang Compiler Bridge - 0.2.4 + 0.3.0 true latest diff --git a/rust_compiler/Cargo.lock b/rust_compiler/Cargo.lock index 20fd557..ca51170 100644 --- a/rust_compiler/Cargo.lock +++ b/rust_compiler/Cargo.lock @@ -930,7 +930,7 @@ checksum = "e3a9fe34e3e7a50316060351f37187a3f546bce95496156754b601a5fa71b76e" [[package]] name = "slang" -version = "0.2.4" +version = "0.3.0" dependencies = [ "anyhow", "clap", diff --git a/rust_compiler/Cargo.toml b/rust_compiler/Cargo.toml index 2bf6da4..047478e 100644 --- a/rust_compiler/Cargo.toml +++ b/rust_compiler/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "slang" -version = "0.2.4" +version = "0.3.0" edition = "2021" [workspace] diff --git a/rust_compiler/libs/il/src/lib.rs b/rust_compiler/libs/il/src/lib.rs index fae551c..62affd8 100644 --- a/rust_compiler/libs/il/src/lib.rs +++ b/rust_compiler/libs/il/src/lib.rs @@ -30,7 +30,7 @@ impl<'a> Instructions<'a> { pub fn into_inner(self) -> Vec> { self.0 } - pub fn write(self, writer: &mut BufWriter) -> Result<(), std::io::Error> { + pub fn write(self, writer: &mut BufWriter) -> Result<(), std::io::Error> { for node in self.0 { writer.write_all(node.to_string().as_bytes())?; writer.write_all(b"\n")?; diff --git a/rust_compiler/libs/optimizer/src/lib.rs b/rust_compiler/libs/optimizer/src/lib.rs index 2204488..e4397e6 100644 --- a/rust_compiler/libs/optimizer/src/lib.rs +++ b/rust_compiler/libs/optimizer/src/lib.rs @@ -423,11 +423,6 @@ fn register_forwarding<'a>( break; } - // Reg15 is a return register. - - if temp_reg == 15 { - break; - } // If we hit a label/jump, we assume liveness might leak (conservative safety) if matches!( node.instruction, @@ -871,4 +866,3 @@ fn remove_unreachable_code<'a>( } (output, changed) } -