From d797c4ae7f9ccff01459b2b0c69a804abca5b7a8 Mon Sep 17 00:00:00 2001 From: Weird Constructor Date: Tue, 19 Nov 2019 19:14:40 +0100 Subject: [PATCH] prepare release 0.3.4 --- CHANGELOG.md | 2 +- Cargo.toml | 2 +- src/compiler.rs | 11 ++--------- src/main.rs | 2 +- src/prelude.rs | 4 ++-- src/vval.rs | 2 +- 6 files changed, 8 insertions(+), 15 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index f1c3b5c..b23c29c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -1,4 +1,4 @@ -0.3.4 (unreleased) +0.3.4 (2019-11-20) ================== * Feature: Version of WLambda is printed to stderr in the executable diff --git a/Cargo.toml b/Cargo.toml index d1bccfd..6aa84d2 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "wlambda" -version = "0.3.3" +version = "0.3.4" authors = ["Weird Constructor "] license = "GPL-3.0-or-later" edition = "2018" diff --git a/src/compiler.rs b/src/compiler.rs index 88d4957..29533d5 100644 --- a/src/compiler.rs +++ b/src/compiler.rs @@ -518,21 +518,14 @@ impl EvalContext { Ok(prog_closures) => { l_env.sp = 0; l_env.set_bp(local_env_size); - //d// println!("*** PRECALL"); - //d// l_env.dump_stack(); - //d// println!("*** PRECALL"); - let r = match l_env.with_restore_sp( + match l_env.with_restore_sp( |e: &mut Env| { prog_closures(e) }) { Ok(v) => Ok(v.clone()), Err(je) => Err(EvalError::ExecError( format!("Jumped out of execution: {:?}", je))), - }; - //d// println!("*** POSTCALL"); - //d// l_env.dump_stack(); - //d// println!("*** POSTCALL"); - r + } }, Err(e) => { Err(EvalError::CompileError(e)) }, }; diff --git a/src/main.rs b/src/main.rs index bf35063..17c545b 100644 --- a/src/main.rs +++ b/src/main.rs @@ -12,7 +12,7 @@ use vval::Env; use vval::VVal; use crate::compiler::{GlobalEnv, EvalContext}; -const VERSION: &'static str = env!("CARGO_PKG_VERSION"); +const VERSION: &str = env!("CARGO_PKG_VERSION"); fn main() { let global = GlobalEnv::new_default(); diff --git a/src/prelude.rs b/src/prelude.rs index 508e14c..c91d5fa 100644 --- a/src/prelude.rs +++ b/src/prelude.rs @@ -758,7 +758,7 @@ generated from the given _sm_state_. */ -const VERSION: &'static str = env!("CARGO_PKG_VERSION"); +const VERSION: &str = env!("CARGO_PKG_VERSION"); use crate::compiler::*; use crate::vval::*; @@ -1474,7 +1474,7 @@ pub fn std_symbol_table() -> SymbolTable { Ok(VVal::vec_mv( env.arg(0).s_raw() .chars() - .map(|c| VVal::Int(c as u32 as i64)) + .map(|c| VVal::Int(i64::from(c as u32))) .collect())) }, Some(1), Some(1), false); diff --git a/src/vval.rs b/src/vval.rs index f5b4122..710e76a 100644 --- a/src/vval.rs +++ b/src/vval.rs @@ -297,7 +297,7 @@ impl Env { } if n > 0 { //d// println!("SP={}, N={}", self.sp, n); - for i in (self.sp - n)..=(self.sp - 1) { + for i in (self.sp - n)..self.sp { //d// println!("POP[{}] {} [of {}]", i, self.args[i].s(), n); self.args[i] = VVal::Nul; }