]> Repositorios git - scryer-prolog.git/commitdiff
remove unused fields instead, prompting more dead_code removal
authorSkgland <[email protected]>
Thu, 11 Nov 2021 18:32:35 +0000 (19:32 +0100)
committerSkgland <[email protected]>
Thu, 11 Nov 2021 18:32:35 +0000 (19:32 +0100)
src/forms.rs
src/heap_print.rs
src/machine/compile.rs
src/machine/mod.rs
src/machine/preprocessor.rs
src/machine/stack.rs

index b24884aba744c685e3beae72121839b239082341..4f579c8c9dce90692cdd99f64fa963ddccfc2326 100644 (file)
@@ -435,7 +435,6 @@ pub(crate) struct Module {
     pub(crate) meta_predicates: MetaPredicateDir,
     pub(crate) extensible_predicates: ExtensiblePredicates,
     pub(crate) local_extensible_predicates: LocalExtensiblePredicates,
-    pub(crate) _is_impromptu_module: bool,
     pub(crate) listing_src: ListingSource,
 }
 
@@ -447,7 +446,6 @@ impl Module {
             code_dir: CodeDir::new(),
             op_dir: default_op_dir(),
             meta_predicates: MetaPredicateDir::new(),
-            _is_impromptu_module: false,
             extensible_predicates: ExtensiblePredicates::new(),
             local_extensible_predicates: LocalExtensiblePredicates::new(),
             listing_src,
@@ -460,7 +458,6 @@ impl Module {
             code_dir: CodeDir::new(),
             op_dir: OpDir::new(),
             meta_predicates: MetaPredicateDir::new(),
-            _is_impromptu_module: false,
             extensible_predicates: ExtensiblePredicates::new(),
             local_extensible_predicates: LocalExtensiblePredicates::new(),
             listing_src: ListingSource::DynamicallyGenerated,
index 68554d5be2e1528a1c2ee8c77eba1e89d72cd36c..09af815fc7b032caaac4ee9eac3a73b48d672c22 100644 (file)
@@ -339,7 +339,6 @@ pub(crate) struct HCPrinter<'a, Outputter> {
     state_stack: Vec<TokenOrRedirect>,
     toplevel_spec: Option<DirectedOp>,
     heap_locs: ReverseHeapVarDict,
-    _printed_vars: IndexSet<Addr>,
     last_item_idx: usize,
     cyclic_terms: IndexMap<Addr, usize>,
     non_cyclic_terms: IndexSet<usize>,
@@ -348,7 +347,6 @@ pub(crate) struct HCPrinter<'a, Outputter> {
     pub(crate) numbervars: bool,
     pub(crate) quoted: bool,
     pub(crate) ignore_ops: bool,
-    pub(crate) _print_strings_as_strs: bool,
     pub(crate) max_depth: usize,
 }
 
@@ -466,7 +464,6 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
             state_stack: vec![],
             heap_locs: ReverseHeapVarDict::new(),
             toplevel_spec: None,
-            _printed_vars: IndexSet::new(),
             last_item_idx: 0,
             numbervars: false,
             numbervars_offset: Integer::from(0),
@@ -475,7 +472,6 @@ impl<'a, Outputter: HCValueOutputter> HCPrinter<'a, Outputter> {
             cyclic_terms: IndexMap::new(),
             non_cyclic_terms: IndexSet::new(),
             var_names: IndexMap::new(),
-            _print_strings_as_strs: false,
             max_depth: 0,
         }
     }
index b0242aaca278eb9e59129f517a5d88782ae24031..ef99df341db96e0ad13f0d64414c2704633270ba 100644 (file)
@@ -1351,7 +1351,7 @@ impl<'a> LoadState<'a> {
         settings: CodeGenSettings,
         atom_tbl: TabledData<Atom>,
     ) -> Result<StandaloneCompileResult, SessionError> {
-        let mut preprocessor = Preprocessor::new(self.wam.machine_st.flags);
+        let mut preprocessor = Preprocessor::new();
         let mut cg = CodeGenerator::<DebrayAllocator>::new(atom_tbl.clone(), settings);
 
         let clause = self.try_term_to_tl(term, &mut preprocessor)?;
@@ -1389,7 +1389,7 @@ impl<'a> LoadState<'a> {
             CodeGenerator::<DebrayAllocator>::new(self.wam.machine_st.atom_tbl.clone(), settings);
 
         let mut clauses = vec![];
-        let mut preprocessor = Preprocessor::new(self.wam.machine_st.flags);
+        let mut preprocessor = Preprocessor::new();
 
         for term in predicates.predicates.drain(0..) {
             clauses.push(self.try_term_to_tl(term, &mut preprocessor)?);
index 11095caa918e62ed7cd47747bce70b82455a05f4..1f7ef41a90563dc7815d1042e9384d4e2bcc8ae2 100644 (file)
@@ -7,7 +7,6 @@ use lazy_static::lazy_static;
 use crate::clause_types::*;
 use crate::forms::*;
 use crate::instructions::*;
-use crate::machine::heap::*;
 use crate::machine::loader::*;
 use crate::machine::term_stream::{LiveTermStream, LoadStatePayload, TermStream};
 use crate::read::*;
@@ -109,7 +108,6 @@ impl LoadContext {
 #[derive(Debug)]
 pub struct Machine {
     pub(super) machine_st: MachineState,
-    pub(super) _inner_heap: Heap,
     pub(super) policies: MachinePolicies,
     pub(super) indices: IndexStore,
     pub(super) code_repo: CodeRepo,
@@ -280,7 +278,6 @@ impl Machine {
 
         let mut wam = Machine {
             machine_st: MachineState::new(),
-            _inner_heap: Heap::new(),
             policies: MachinePolicies::new(),
             indices: IndexStore::new(),
             code_repo: CodeRepo::new(),
index 317a6b94c2a33bbb1d7ccce9eacf6c6028f4190d..b93f270ef590e02e18dbb802b4a2e32c20559113 100644 (file)
@@ -553,14 +553,12 @@ fn qualified_clause_to_query_term<'a>(
 
 #[derive(Debug)]
 pub(crate) struct Preprocessor {
-    _flags: MachineFlags,
     queue: VecDeque<VecDeque<Term>>,
 }
 
 impl Preprocessor {
-    pub(super) fn new(flags: MachineFlags) -> Self {
+    pub(super) fn new() -> Self {
         Preprocessor {
-            _flags: flags,
             queue: VecDeque::new(),
         }
     }
index 11b0a8f0f86b187529b2e906bc5319f28bcdd072..a3c917136653e7bd9dd5e6f445c2a23a31ac0f3a 100644 (file)
@@ -109,7 +109,6 @@ pub(crate) struct OrFramePrelude {
     pub(crate) b: usize,
     pub(crate) bp: LocalCodePtr,
     pub(crate) tr: usize,
-    pub(crate) _pstr_tr: usize,
     pub(crate) h: usize,
     pub(crate) b0: usize,
 }