refactor: 字符串值改用 JsString 指针表示,键与字面量改用 PermInterner

This commit is contained in:
2026-06-24 20:15:15 +08:00
parent 9a62cf1610
commit ddffa8504e
73 changed files with 768 additions and 860 deletions
-8
View File
@@ -22,7 +22,6 @@ pub struct VmGuard {
vm: Option<Vm>,
pool: Arc<VmPool>,
dirty: bool,
interned_strings: Vec<u32>,
}
impl VmPool {
@@ -55,7 +54,6 @@ impl VmPool {
vm: Some(vm),
pool: Arc::clone(self),
dirty: false,
interned_strings: Vec::new(),
};
}
@@ -72,7 +70,6 @@ impl VmPool {
vm: Some(vm),
pool: Arc::clone(self),
dirty: false,
interned_strings: Vec::new(),
};
}
@@ -86,7 +83,6 @@ impl VmPool {
vm: Some(vm),
pool: Arc::clone(self),
dirty: false,
interned_strings: Vec::new(),
};
}
}
@@ -115,10 +111,6 @@ impl Drop for VmGuard {
let new_vm = self.pool.replace_vm();
inner.available.push(new_vm);
} else {
for &idx in &self.interned_strings {
self.pool.kernel_core.string_forge().decref(idx);
}
vm.full_reset();
inner.available.push(vm);
}