wip: more raw ptrs
This commit is contained in:
1 parent
b8d98698c6
commit
95bd17e38f
17 files changed
+3335
-3535
No files matched your search
@@ -5,6 +5,14 @@ use futures_channel::mpsc::UnboundedSender;
|
||||
|
||||
use crate::innerlude::*;
|
||||
|
||||
pub type FcSlot = *const ();
|
||||
// pub heuristics: FxHashMap<FcSlot, Heuristic>,
|
||||
|
||||
pub struct Heuristic {
|
||||
hook_arena_size: usize,
|
||||
node_arena_size: usize,
|
||||
}
|
||||
|
||||
// a slab-like arena with stable references even when new scopes are allocated
|
||||
// uses a bump arena as a backing
|
||||
//
|
||||
@@ -24,6 +32,10 @@ impl ScopeArena {
|
||||
}
|
||||
}
|
||||
|
||||
pub fn get_mut(&mut self, id: &ScopeId) -> Option<&mut ScopeInner> {
|
||||
unsafe { Some(&mut *self.scopes[id.0]) }
|
||||
}
|
||||
|
||||
pub fn new_with_key(
|
||||
&mut self,
|
||||
fc_ptr: *const (),
|
||||
|
||||
Reference in new issue
Block a user