diff options
| author | Thomas Voss <mail@thomasvoss.com> | 2026-03-17 19:56:03 +0100 |
|---|---|---|
| committer | Thomas Voss <mail@thomasvoss.com> | 2026-03-17 19:56:16 +0100 |
| commit | db11ea02d777a33fedb6af4ee056e85f52fbb008 (patch) | |
| tree | 95243c3efe24bac3caabf2eb364911230a59d3ce /oryxc/src/depmap.rs | |
| parent | ad2c6812a71f10797a4023e175b7a0d2d9b1fa81 (diff) | |
Diffstat (limited to 'oryxc/src/depmap.rs')
| -rw-r--r-- | oryxc/src/depmap.rs | 31 |
1 files changed, 0 insertions, 31 deletions
diff --git a/oryxc/src/depmap.rs b/oryxc/src/depmap.rs deleted file mode 100644 index 60e358e..0000000 --- a/oryxc/src/depmap.rs +++ /dev/null @@ -1,31 +0,0 @@ -use boxcar; -use dashmap::DashMap; - -use crate::compiler::Job; -use crate::prelude::*; - -pub struct DepMap(DashMap<Dependency, boxcar::Vec<Job>>); - -#[derive(Eq, Hash, PartialEq)] -pub enum Dependency { - Symbol(SymbolId), -} - -impl DepMap { - pub fn with_capacity(n: usize) -> Self { - return Self(DashMap::with_capacity(n)); - } - - pub fn add(&self, d: Dependency, j: Job) { - self.0 - .entry(d) - .and_modify(|v| { - v.push(j.clone()); - }) - .or_insert_with(|| boxcar::vec![j]); - } - - pub fn pop(&self, d: Dependency) -> Option<boxcar::Vec<Job>> { - return self.0.remove(&d).map(|(_, v)| v); - } -} |