From d06e1b82dd7a47995f73ba95b08f22fca482cd04 Mon Sep 17 00:00:00 2001 From: Alek Ratzloff Date: Mon, 17 Jan 2022 19:51:19 -0800 Subject: [PATCH] Remove max_arena_objects configuration This isn't something we can't really control so out it goes, I guess. Signed-off-by: Alek Ratzloff --- src/main.rs | 4 ---- src/vm/machine.rs | 7 ------- 2 files changed, 11 deletions(-) diff --git a/src/main.rs b/src/main.rs index 21aecfd..9a44bbe 100644 --- a/src/main.rs +++ b/src/main.rs @@ -17,9 +17,6 @@ struct Opt { #[structopt(long)] max_stack_size: Option, - - #[structopt(long)] - max_arena_objects: Option, } type Result> = std::result::Result; @@ -43,7 +40,6 @@ fn main() -> Result { let mut machine = MachineBuilder::default() .max_stack_size(opt.max_stack_size) - .max_arena_objects(opt.max_arena_objects) .finish(); if let Err(e) = machine.eval(stmts) { diff --git a/src/vm/machine.rs b/src/vm/machine.rs index 8669cfa..c905971 100644 --- a/src/vm/machine.rs +++ b/src/vm/machine.rs @@ -3,7 +3,6 @@ use crate::object::*; use crate::scope::*; use crate::syn::{ast::SpStmt, span::Span}; use crate::vm::{error::*, inst::*}; -use std::cell::RefCell; use std::collections::BTreeMap; use std::rc::Rc; @@ -318,7 +317,6 @@ pub struct MachineBuilder { pub(super) globals: BTreeMap, pub(super) scope_stack: ScopeStack, pub(super) max_stack_size: Option, - pub(super) max_arena_objects: Option, } impl MachineBuilder { @@ -327,11 +325,6 @@ impl MachineBuilder { self } - pub fn max_arena_objects(mut self, max_arena_objects: Option) -> Self { - self.max_arena_objects = max_arena_objects; - self - } - pub(super) fn register_builtin_fun( &mut self, name: &str,