mirror of
https://github.com/Noratrieb/dilaria.git
synced 2026-01-14 17:35:03 +01:00
remove alloc
not used anyways for now
This commit is contained in:
parent
131229686a
commit
ca46a40795
1 changed files with 0 additions and 34 deletions
34
src/alloc.rs
34
src/alloc.rs
|
|
@ -1,34 +0,0 @@
|
|||
#![allow(dead_code)]
|
||||
|
||||
use std::rc::Rc;
|
||||
|
||||
pub struct Alloc {
|
||||
strings: table::IStrTable,
|
||||
}
|
||||
|
||||
pub enum Object {
|
||||
String(IStr),
|
||||
}
|
||||
|
||||
/// Reference to an interned String
|
||||
#[derive(Debug)]
|
||||
pub struct IStr {
|
||||
/// This will be changed to a raw pointer once a tracing GC is implemented
|
||||
data: Rc<str>,
|
||||
hash: u64,
|
||||
}
|
||||
|
||||
mod table {
|
||||
use crate::alloc::IStr;
|
||||
use std::collections::HashMap;
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
pub struct IStrTable {
|
||||
map: HashMap<u64, IStr, StringHashBuilder>,
|
||||
}
|
||||
|
||||
#[derive(Debug, Default)]
|
||||
struct StringHashBuilder;
|
||||
|
||||
struct PrimitveHasher {}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue