Skip to content

Commit

Permalink
chore: remove unused coprocessor functions
Browse files Browse the repository at this point in the history
  • Loading branch information
huitseeker committed Nov 9, 2023
1 parent daaf0b0 commit cf688ba
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 26 deletions.
15 changes: 0 additions & 15 deletions src/eval/lang.rs
Original file line number Diff line number Diff line change
Expand Up @@ -211,21 +211,6 @@ impl<F: LurkField, C: Coprocessor<F>> Lang<F, C> {
self.index.get(z_ptr).copied()
}

pub fn get_coprocessor(&self, index: usize) -> Option<&C> {
self.coprocessors.get_index(index).map(|(_, (c, _))| c)
}

pub fn get_coprocessor_z_ptr(&self, index: usize) -> Option<&ZExprPtr<F>> {
self.coprocessors
.get_index(index)
.map(|(_, (_, z_ptr))| z_ptr)
}

pub fn get_coprocessor_from_zptr(&self, z_ptr: &ZExprPtr<F>) -> Option<&C> {
self.get_index(z_ptr)
.and_then(|index| self.get_coprocessor(index))
}

#[inline]
pub fn get_index_by_symbol(&self, sym: &Symbol) -> Option<usize> {
self.coprocessors.get_index_of(sym)
Expand Down
11 changes: 0 additions & 11 deletions src/eval/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,20 +67,9 @@ pub enum Meta<F: LurkField> {
}

impl<F: LurkField> Meta<F> {
pub fn is_lurk(&self) -> bool {
*self == Self::Lurk
}

pub fn is_coprocessor(&self) -> bool {
matches!(self, Self::Coprocessor(_))
}

pub fn get_coprocessor_z_ptr(&self) -> Option<&ZExprPtr<F>> {
match self {
Self::Lurk => None,
Self::Coprocessor(z_ptr) => Some(z_ptr),
}
}
}

#[derive(Clone, Copy, Debug, PartialEq, Eq)]
Expand Down

0 comments on commit cf688ba

Please sign in to comment.