From c8dfdcfdea5e48ac9a98fbeb907c379bcf76c28d Mon Sep 17 00:00:00 2001 From: lyken Date: Tue, 27 Aug 2024 23:43:40 +0800 Subject: [PATCH] standalone & artiq: remove class_names from resolver --- nac3artiq/src/lib.rs | 2 -- nac3artiq/src/symbol_resolver.rs | 3 +-- nac3standalone/src/basic_symbol_resolver.rs | 1 - nac3standalone/src/main.rs | 1 - 4 files changed, 1 insertion(+), 6 deletions(-) diff --git a/nac3artiq/src/lib.rs b/nac3artiq/src/lib.rs index 4ed40aeef..93ebbbdc0 100644 --- a/nac3artiq/src/lib.rs +++ b/nac3artiq/src/lib.rs @@ -448,7 +448,6 @@ impl Nac3 { pyid_to_type: pyid_to_type.clone(), primitive_ids: self.primitive_ids.clone(), global_value_ids: global_value_ids.clone(), - class_names: Mutex::default(), name_to_pyid: name_to_pyid.clone(), module: module.clone(), id_to_pyval: RwLock::default(), @@ -540,7 +539,6 @@ impl Nac3 { pyid_to_type: pyid_to_type.clone(), primitive_ids: self.primitive_ids.clone(), global_value_ids: global_value_ids.clone(), - class_names: Mutex::default(), id_to_pyval: RwLock::default(), id_to_primitive: RwLock::default(), field_to_val: RwLock::default(), diff --git a/nac3artiq/src/symbol_resolver.rs b/nac3artiq/src/symbol_resolver.rs index 9470ee712..787cb8bb9 100644 --- a/nac3artiq/src/symbol_resolver.rs +++ b/nac3artiq/src/symbol_resolver.rs @@ -23,7 +23,7 @@ use nac3core::{ }, }; use nac3parser::ast::{self, StrRef}; -use parking_lot::{Mutex, RwLock}; +use parking_lot::RwLock; use pyo3::{ types::{PyDict, PyTuple}, PyAny, PyObject, PyResult, Python, @@ -79,7 +79,6 @@ pub struct InnerResolver { pub id_to_primitive: RwLock>, pub field_to_val: RwLock>>, pub global_value_ids: Arc>>, - pub class_names: Mutex>, pub pyid_to_def: Arc>>, pub pyid_to_type: Arc>>, pub primitive_ids: PrimitivePythonId, diff --git a/nac3standalone/src/basic_symbol_resolver.rs b/nac3standalone/src/basic_symbol_resolver.rs index 5fe0d4f5a..3dbf0a0eb 100644 --- a/nac3standalone/src/basic_symbol_resolver.rs +++ b/nac3standalone/src/basic_symbol_resolver.rs @@ -15,7 +15,6 @@ use std::{collections::HashMap, sync::Arc}; pub struct ResolverInternal { pub id_to_type: Mutex>, pub id_to_def: Mutex>, - pub class_names: Mutex>, pub module_globals: Mutex>, pub str_store: Mutex>, } diff --git a/nac3standalone/src/main.rs b/nac3standalone/src/main.rs index 17a5d15e3..ae27508a4 100644 --- a/nac3standalone/src/main.rs +++ b/nac3standalone/src/main.rs @@ -306,7 +306,6 @@ fn main() { let internal_resolver: Arc = ResolverInternal { id_to_type: builtins_ty.into(), id_to_def: builtins_def.into(), - class_names: Mutex::default(), module_globals: Mutex::default(), str_store: Mutex::default(), }