remove leftover limits from haku-wasm

This commit is contained in:
りき萌 2025-09-01 21:13:32 +02:00
parent 64e2489979
commit 09f2292e62
2 changed files with 9 additions and 22 deletions

View file

@ -6,7 +6,7 @@ use core::{alloc::Layout, mem, ptr, slice};
use alloc::{boxed::Box, string::String, vec::Vec};
use haku::{
ast::Ast,
ast::{self, Ast},
bytecode::{Chunk, Defs, DefsImage, DefsLimits},
compiler::{compile_expr, ClosureSpec, CompileError, Compiler, Source},
diagnostic::Diagnostic,
@ -48,12 +48,6 @@ struct Limits {
max_parser_events: usize,
ast_capacity: usize,
chunk_capacity: usize,
stack_capacity: usize,
call_stack_capacity: usize,
ref_capacity: usize,
fuel: usize,
memory: usize,
render_max_depth: usize,
}
impl Default for Limits {
@ -67,12 +61,6 @@ impl Default for Limits {
max_parser_events: 1024,
ast_capacity: 1024,
chunk_capacity: 65536,
stack_capacity: 1024,
call_stack_capacity: 256,
ref_capacity: 2048,
fuel: 65536,
memory: 1024 * 1024,
render_max_depth: 256,
}
}
}
@ -112,12 +100,6 @@ limit_setter!(max_tokens);
limit_setter!(max_parser_events);
limit_setter!(ast_capacity);
limit_setter!(chunk_capacity);
limit_setter!(stack_capacity);
limit_setter!(call_stack_capacity);
limit_setter!(ref_capacity);
limit_setter!(fuel);
limit_setter!(memory);
limit_setter!(render_max_depth);
#[derive(Debug, Clone)]
struct Instance {