mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-24 02:31:13 +08:00
feat: 搭建内建函数原型链框架
This commit is contained in:
@@ -8,7 +8,6 @@ description = "OxideJS - Register-based VM with epoch arena memory"
|
||||
|
||||
[dependencies]
|
||||
oxide_compiler = { path = "../oxide_compiler" }
|
||||
oxide_kernel = { path = "../oxide_kernel" }
|
||||
bumpalo.workspace = true
|
||||
hashbrown.workspace = true
|
||||
rustc-hash.workspace = true
|
||||
|
||||
@@ -14,6 +14,13 @@ impl<T> P<T> {
|
||||
pub fn new(value: T) -> Self {
|
||||
Self(Arc::new(value))
|
||||
}
|
||||
|
||||
pub fn from_arena(value: &T) -> Self
|
||||
where
|
||||
T: Clone,
|
||||
{
|
||||
Self(Arc::new(value.clone()))
|
||||
}
|
||||
}
|
||||
|
||||
impl<T> Clone for P<T> {
|
||||
|
||||
Reference in New Issue
Block a user