feat: implement PlainDateTime toString options and ISO range parsing

This commit is contained in:
爱特每羊队
2026-08-11 23:07:41 +08:00
parent ed90ebd4e4
commit d1d85ffe4f
3 changed files with 441 additions and 89 deletions
+5 -2
View File
@@ -229,8 +229,11 @@ impl Emitter {
if is_derived {
module.insts.clear();
module.constants.clear();
module.n_registers = 1;
module.insts.push(Inst::super_call(Operand::None, Operand::None, 0));
module.n_registers = 2;
// 隐式派生构造器等价于 `constructor(...args) { super(...args); }`:
// 收集全部实参为数组,再展开传给 super。
module.insts.push(Inst::create_rest_array(Operand::Reg(1), 0));
module.insts.push(Inst::super_call_spread(Operand::Reg(0), &[0x8000_0000 | 1]));
// 字段初始化直接重发:构造器 upvalue/内置槽引用须与首轮编译产物对齐。
let mut field_ctx = CompileCtx::new();
field_ctx.scopes.private_name_map =