mirror of
https://github.com/pjh456/OxideJS.git
synced 2026-10-25 03:01:12 +08:00
perf: run 装载期常量转换与 si 侧表改 Vm 模块级缓存
This commit is contained in:
@@ -476,7 +476,7 @@ impl Vm {
|
||||
}
|
||||
self.pc = 0;
|
||||
self.bytecode = Arc::clone(&sub.bytecode);
|
||||
self.activate_immutables(gen, sub_idx, &sub.constants);
|
||||
self.activate_immutables(gen, sub_idx, &sub);
|
||||
self.active_flat_id = sub_idx as u32;
|
||||
self.active_table_gen = gen;
|
||||
self.active_reg_limit = sub.n_registers.max(1);
|
||||
@@ -726,7 +726,7 @@ impl Vm {
|
||||
} else {
|
||||
self.bytecode = Arc::clone(&module.bytecode);
|
||||
}
|
||||
self.activate_immutables(self.current_gen, 0, &module.constants);
|
||||
self.activate_immutables(self.current_gen, 0, module);
|
||||
self.root_reg_limit = module.n_registers.max(1);
|
||||
self.active_reg_limit = self.root_reg_limit;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user