diff --git a/compiler_base/3rdparty/rustc_data_structures/Cargo.toml b/compiler_base/3rdparty/rustc_data_structures/Cargo.toml index 5ce0784a3..ec84addf2 100644 --- a/compiler_base/3rdparty/rustc_data_structures/Cargo.toml +++ b/compiler_base/3rdparty/rustc_data_structures/Cargo.toml @@ -28,7 +28,6 @@ rayon-core = { version = "0.3.2", package = "rustc-rayon-core" } rustc-hash = "1.1.0" bitflags = "1.2.1" libc = "0.2" -stacker = "0.1.14" tempfile = "3.5.0" [dependencies.parking_lot] diff --git a/compiler_base/3rdparty/rustc_data_structures/src/lib.rs b/compiler_base/3rdparty/rustc_data_structures/src/lib.rs index aa2ec1022..55b6a0d0a 100644 --- a/compiler_base/3rdparty/rustc_data_structures/src/lib.rs +++ b/compiler_base/3rdparty/rustc_data_structures/src/lib.rs @@ -44,7 +44,6 @@ pub mod stable_set; #[macro_use] mod atomic_ref; -pub mod stack; pub mod sync; pub use atomic_ref::AtomicRef; pub mod frozen; diff --git a/compiler_base/3rdparty/rustc_data_structures/src/stack.rs b/compiler_base/3rdparty/rustc_data_structures/src/stack.rs deleted file mode 100644 index 3bdd67512..000000000 --- a/compiler_base/3rdparty/rustc_data_structures/src/stack.rs +++ /dev/null @@ -1,18 +0,0 @@ -// This is the amount of bytes that need to be left on the stack before increasing the size. -// It must be at least as large as the stack required by any code that does not call -// `ensure_sufficient_stack`. -const RED_ZONE: usize = 100 * 1024; // 100k - -// Only the first stack that is pushed, grows exponentially (2^n * STACK_PER_RECURSION) from then -// on. This flag has performance relevant characteristics. Don't set it too high. -const STACK_PER_RECURSION: usize = 1 * 1024 * 1024; // 1MB - -/// Grows the stack on demand to prevent stack overflow. Call this in strategic locations -/// to "break up" recursive calls. E.g. almost any call to `visit_expr` or equivalent can benefit -/// from this. -/// -/// Should not be sprinkled around carelessly, as it causes a little bit of overhead. -#[inline] -pub fn ensure_sufficient_stack(f: impl FnOnce() -> R) -> R { - stacker::maybe_grow(RED_ZONE, STACK_PER_RECURSION, f) -} diff --git a/kclvm/Cargo.lock b/kclvm/Cargo.lock index 4fcb93728..6fc2ab8a3 100644 --- a/kclvm/Cargo.lock +++ b/kclvm/Cargo.lock @@ -28,18 +28,6 @@ dependencies = [ "version_check", ] -[[package]] -name = "ahash" -version = "0.8.11" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" -dependencies = [ - "cfg-if 1.0.0", - "once_cell", - "version_check", - "zerocopy", -] - [[package]] name = "aho-corasick" version = "1.1.3" @@ -49,12 +37,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "allocator-api2" -version = "0.2.16" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0942ffc6dcaadf03badf6e6a2d0228460359d5e34b57ccdc720b7382dfbd5ec5" - [[package]] name = "always-assert" version = "0.1.3" @@ -373,16 +355,6 @@ dependencies = [ "windows-targets 0.52.4", ] -[[package]] -name = "chumsky" -version = "0.9.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8eebd66744a15ded14960ab4ccdbfb51ad3b81f51f3f04a80adac98c985396c9" -dependencies = [ - "hashbrown 0.14.3", - "stacker", -] - [[package]] name = "ciborium" version = "0.2.2" @@ -1185,10 +1157,6 @@ name = "hashbrown" version = "0.14.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" -dependencies = [ - "ahash 0.8.11", - "allocator-api2", -] [[package]] name = "heck" @@ -1475,7 +1443,6 @@ version = "0.8.4" dependencies = [ "anyhow", "chrono", - "chumsky", "clap 4.5.4", "compiler_base_session", "crossbeam-channel", @@ -1636,7 +1603,7 @@ dependencies = [ name = "kclvm-compiler" version = "0.8.4" dependencies = [ - "ahash 0.7.8", + "ahash", "bit-set", "bitflags 1.3.2", "fancy-regex", @@ -1656,7 +1623,7 @@ dependencies = [ name = "kclvm-config" version = "0.8.4" dependencies = [ - "ahash 0.7.8", + "ahash", "anyhow", "chrono", "dirs", @@ -1853,7 +1820,7 @@ dependencies = [ name = "kclvm-runtime" version = "0.8.4" dependencies = [ - "ahash 0.7.8", + "ahash", "base64", "bstr", "chrono", @@ -1884,7 +1851,7 @@ dependencies = [ name = "kclvm-sema" version = "0.8.4" dependencies = [ - "ahash 0.7.8", + "ahash", "anyhow", "bit-set", "bitflags 1.3.2", @@ -4457,23 +4424,3 @@ checksum = "fe5c30ade05e61656247b2e334a031dfd0cc466fadef865bdcdea8d537951bf1" dependencies = [ "winapi", ] - -[[package]] -name = "zerocopy" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" -dependencies = [ - "zerocopy-derive", -] - -[[package]] -name = "zerocopy-derive" -version = "0.7.32" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" -dependencies = [ - "proc-macro2", - "quote", - "syn 2.0.58", -] diff --git a/kclvm/tools/src/LSP/Cargo.toml b/kclvm/tools/src/LSP/Cargo.toml index aafc5e297..addc9eee5 100644 --- a/kclvm/tools/src/LSP/Cargo.toml +++ b/kclvm/tools/src/LSP/Cargo.toml @@ -8,7 +8,6 @@ edition = "2021" [dependencies] chrono = "0.4.19" indexmap = "1.0" -chumsky = "0.9.0" env_logger = "0.11.2" ropey = "1.3.2" tokio = { version = "1.17.0", features = ["full"] } diff --git a/kclvm/tools/src/LSP/src/rename.rs b/kclvm/tools/src/LSP/src/rename.rs index 5b21549bf..a5cc8406f 100644 --- a/kclvm/tools/src/LSP/src/rename.rs +++ b/kclvm/tools/src/LSP/src/rename.rs @@ -2,7 +2,6 @@ use crate::state::KCLVfs; use crate::word_index::{build_virtual_word_index, VirtualLocation}; use crate::{from_lsp::kcl_pos, goto_def::find_def_with_gs}; use anyhow::{anyhow, Result}; -use chumsky::chain::Chain; use kclvm_ast::ast::{self, Program}; use kclvm_error::diagnostic; use kclvm_parser::{load_program, LoadProgramOptions, ParseSessionRef};