From 296d5c054c9b6e2e262a0b2971e4a1c556d50389 Mon Sep 17 00:00:00 2001 From: Stephen Chung Date: Fri, 26 Aug 2022 11:23:16 +0800 Subject: [PATCH] Use simple optimization for rhai-run. --- CHANGELOG.md | 1 + src/bin/rhai-run.rs | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 7f17154f..d936b051 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -9,6 +9,7 @@ Bug fixes * API for registering property getters/setters and indexers to an `Engine` now works with functions that take a first parameter of `NativeCallContext`. * Missing API function `Module::set_getter_setter_fn` is added. +* To avoid subtle errors, simple optimization is used for `rhai-run`; previous it was full optimization. Deprecated API -------------- diff --git a/src/bin/rhai-run.rs b/src/bin/rhai-run.rs index ec4816d6..e87e99b4 100644 --- a/src/bin/rhai-run.rs +++ b/src/bin/rhai-run.rs @@ -51,7 +51,7 @@ fn main() { let mut engine = Engine::new(); #[cfg(not(feature = "no_optimize"))] - engine.set_optimization_level(rhai::OptimizationLevel::Full); + engine.set_optimization_level(rhai::OptimizationLevel::Simple); let mut f = match File::open(&filename) { Err(err) => {