feat: 增加 CreateClosure 字节码,函数字面量每次执行创建新闭包

This commit is contained in:
爱特每羊队
2026-06-25 10:16:32 +08:00
parent 12f66ae675
commit 5007e7af7c
8 changed files with 29 additions and 13 deletions
+1 -1
View File
@@ -235,7 +235,7 @@ impl Vm {
/// Create a function JsObject for a BytecodeFunc constant.
/// When `is_arrow` is true, captures the current `this` (regs[254])
/// for lexical this binding at call time.
fn create_function_object(
pub(crate) fn create_function_object(
&mut self, sub_idx: u32, is_arrow: bool, is_class_constructor: bool, is_derived_constructor: bool,
needs_home_object: bool,
) -> JsValue {