This commit is contained in:
2026-05-26 18:10:03 -06:00
parent 8345763bee
commit 37b97f9eb3
2 changed files with 20 additions and 20 deletions

View File

@@ -5,7 +5,7 @@ use std::slice;
use internment::Intern;
use crate::{gc};
use crate::gc;
pub type scm_bits = u64;

View File

@@ -1,26 +1,26 @@
use std::{collections::HashMap, ops::DerefMut as _, sync::{LazyLock, RwLock}};
use crate::scm::scm_bits;
// struct Vars (
// LazyLock <RwLock <HashMap <SymbolU32, scm_bits>>>
// );
struct Vars (
LazyLock <RwLock <HashMap <String, scm_bits>>>
);
// impl Vars {
// pub const fn new () -> Vars {
// Vars (LazyLock::new (|| RwLock::new (HashMap::new ())))
// }
impl Vars {
pub const fn new () -> Vars {
Vars (LazyLock::new (|| RwLock::new (HashMap::new ())))
}
// pub fn lookup (&self, name : SymbolU32) -> Option <scm_bits> {
// // let r = self.0.write ().unwrap ();
// // (*r).get (&name).map (|x| *x)
// todo! ()
// }
pub fn lookup (&self, name : String) -> Option <scm_bits> {
// let r = self.0.write ().unwrap ();
// (*r).get (&name).map (|x| *x)
todo! ()
}
// pub fn define (&self, name : SymbolU32, value : scm_bits) {
// // let mut r = self.0.write ().unwrap ();
// // r.deref_mut ().insert (name, value);
// todo! ()
// }
// }
pub fn define (&self, name : String, value : scm_bits) {
// let mut r = self.0.write ().unwrap ();
// r.deref_mut ().insert (name, value);
todo! ()
}
}
// static vars : Vars = Vars::new ();
static vars : Vars = Vars::new ();