Commit Graph

200 Commits

Author SHA1 Message Date
pjh123 7c02d3ece1 feat: DisposableStack 内置对象(状态盒 + use/adopt/defer/dispose/move + GC 六处接线 + 绑定三时机) 2026-08-16 19:22:57 +08:00
pjh123 75b429fac7 fix: Error 子类型构造器描述符与原型链对齐规范(prototype/name meta + [[Prototype]] 指向 Error) 2026-08-16 19:10:51 +08:00
pjh123 e100bfb8b4 feat: SuppressedError 内置错误实现(三字段属性序 + 构造器接线) 2026-08-16 19:04:09 +08:00
pjh123 f1c4b33735 feat: Iterator.prototype 返回迭代器方法(map/filter/take/drop/flatMap) 2026-08-16 16:38:45 +08:00
pjh123 4ea723764f feat: Iterator.prototype 终端方法(forEach/every/some/find/reduce/toArray) 2026-08-16 16:02:14 +08:00
pjh123 9f13d107ec feat: Iterator helpers 基建——Symbol.dispose 注册与 %IteratorHelperPrototype% 2026-08-16 14:44:47 +08:00
pjh123 fe8892079e chore: 全仓 rustfmt 格式化归拢 2026-08-16 12:50:36 +08:00
pjh123 4a1e0a3e9e fix: IC 快速路径 symbol 原始值走 Symbol.prototype 链 2026-08-16 10:31:34 +08:00
pjh123 4e2644016b test: $262 宿主对象最小绑定 + is not defined 判定白名单化
引擎侧:绑定 $262 宿主对象(evalScript/global/gc 可用,detachArrayBuffer/
createRealm/agent 抛 not supported 而非 ReferenceError),并加入编译期
已知全局表;引用 $262.* 的测试从全量 skip 转为真实执行。

runner 侧:is not defined 不再一票吞 skip——解析错误消息中的标识符名,
仅在缺失全局白名单($262/structuredClone/queueMicrotask)内才按能力
缺失跳过;其余 is not defined 按真实失败计入,修复后应转 PASS 的
测试恢复可见。
2026-08-16 02:47:02 +08:00
pjh123 c59ad64e7d fix: 全局构造器与内置对象属性改非枚举与规范对齐 2026-08-16 02:29:42 +08:00
pjh123 3df08dddff fix: object 家族 dirty 时重建迭代器绑定并对齐 Iterator.prototype,绑定幂等化避免重复槽 2026-08-16 00:25:30 +08:00
pjh123 69152ad608 fix: 迭代器原型形状补全(Iterator.prototype/string 中继层/next 原型化) 2026-08-15 23:36:01 +08:00
pjh123 2359c4e0a4 feat: 迭代器原型基建:%IteratorPrototype% 链 + 各集合迭代器原型
新增 %IteratorPrototype%(含 @@iterator 返回自身,经原型链被全部迭代器
继承,it[Symbol.iterator]() === it 恒等)与 %ArrayIteratorPrototype%/
%MapIteratorPrototype%/%SetIteratorPrototype%/%StringIteratorPrototype%/
%RegExpStringIteratorPrototype%(链到 %IteratorPrototype%);Array/Map/Set/
TA/String/matchAll 迭代器包装统一挂对应原型;补 Array/String 的 @@iterator
别名绑定。集合迭代器原型不含 return 方法(规范集合迭代器无 return)。
2026-08-15 22:57:03 +08:00
pjh123 c052f5a619 feat: Function.prototype[Symbol.hasInstance] 绑定与 bound 函数构造语义
@@hasInstance 按 OrdinaryHasInstance 实现(非可调用 this 返回 false、
prototype 非对象抛 TypeError、bound 链递归到最内层 target);
new boundFn() 解包 [[BoundTargetFunction]] 链后转发构造:绑定实参前置、
新对象原型取 target.prototype、new.target 替换为最内层 target。
2026-08-15 22:40:45 +08:00
pjh123 528f893e63 fix: 错误对象属性枚举性、toString 标签与构造器调用语义
- message/name 属性改非枚举(CreateNonEnumerableDataPropertyOrThrow),
  Object.keys/for-in/JSON.stringify 不再泄漏错误信息
- 新增 Error 家族对象标签,Object.prototype.toString 输出 [object Error],
  含子类型与用户子类(沿原型链判定)
- Error 家族构造器补 length=1,函数调用忽略 this 一律新建对象
- JSON.stringify 序列化仅含可枚举自身属性(规范 EnumerableOwnPropertyNames)
2026-08-15 21:30:28 +08:00
pjh123 7362137720 chore: 清理 oxide_vm clippy 告警 2026-08-14 05:26:46 +08:00
pjh123 df23fdff39 feat: compiler/test262 runner 接线 + 模块顶层 this 绑定
- Compiler::compile_module:Emitter::emit_program_module → 统一 IR 管线(DCE/regalloc/lower/flatten)
- CompiledModule.is_es_module:VM run 时模块顶层 this=undefined(脚本仍为全局对象)
- 全局注册 __moduleLinkGet
- test262 runner:Test262ModuleLoader(相对路径解析 + import attributes 判定 json/text/bytes),is_module 走 compile_module
2026-08-12 17:37:33 +08:00
pjh123 f2214ab95b feat: Temporal.Duration.prototype.round(无日历单位路径:选项校验+24h 天舍入+按最大单位平衡,绑定注册) 2026-08-12 16:16:22 +08:00
pjh123 1563fdc845 feat: Temporal.Duration.prototype.add(分量精确求和+按最大单位平衡+范围校验,绑定注册);add 子集 32/0 2026-08-12 14:50:13 +08:00
pjh123 1a71e0b8d6 fix: Temporal 构造器补 length 自有属性(Instant/ZonedDateTime/PlainDate/PlainTime/Duration 按规范 arity) 2026-08-12 14:37:31 +08:00
pjh123 79346097ac feat: Temporal.PlainDateTime.prototype.equals(实例/字符串/对象/ZDT 统一比较,绑定注册) 2026-08-12 14:27:25 +08:00
pjh123 62991cfa4b feat: 新增 Symbol.species well-known symbol 绑定(Symbol.species 解析/键槽/内建对象) 2026-08-12 12:50:53 +08:00
pjh123 af61dcf6fc feat: ToPropertyKey 改走 ToPrimitive,Symbol 键与描述符,转换错误可捕获 2026-08-12 09:59:56 +08:00
pjh123 c287708ddc feat: 补 entries/keys/findLastIndex/toSorted/toReversed/toSpliced/with 2026-08-12 03:42:42 +08:00
pjh123 6bcd090b06 feat: 补 BigInt.prototype[Symbol.toStringTag] 数据属性
补 @@toStringTag 数据属性,writable:false、enumerable:false、configurable:true,
使 Object.prototype.toString 与属性描述符符合规范。剩余 built-ins/BigInt 的
Symbol.toStringTag.js verifyProperty 失败仍受 String(Symbol) 支持阻塞。
2026-08-12 03:41:22 +08:00
pjh123 aa51d57660 feat: BigInt 构造器 ToPrimitive 语义、toString(radix)、asIntN/asUintN 2026-08-12 02:23:27 +08:00
pjh123 bbca9a5c3a feat: PlainDateTime until/since 按规范舍入语义实现 2026-08-12 01:18:34 +08:00
pjh123 47733ae224 feat: PlainDateTime add/subtract 算术 2026-08-11 23:14:42 +08:00
pjh123 3cf2c792ba feat: Temporal PlainDateTime 转换与序列化 2026-08-11 22:29:00 +08:00
pjh123 66712e05a5 feat: Temporal PlainDateTime 基础实现 2026-08-11 21:32:15 +08:00
pjh123 90a162d39a feat: Temporal Instant 时区转换 2026-08-11 20:54:25 +08:00
pjh123 b982e964a7 feat: Temporal Instant 序列化 2026-08-11 19:14:24 +08:00
pjh123 59da42fea9 feat: Temporal Instant 差值实现 2026-08-11 18:22:21 +08:00
pjh123 7ccedfb0b1 feat: Temporal Instant round 实现 2026-08-11 16:57:53 +08:00
pjh123 abc794709e feat: Temporal Instant 算术精确实现 2026-08-11 15:55:05 +08:00
pjh123 930bfa1ac9 feat: Temporal Instant 工厂精确实现 2026-08-11 15:21:28 +08:00
pjh123 0d75e901ff fix: Temporal 时长输入校验 2026-08-11 13:11:51 +08:00
pjh123 b9686e000d feat: Temporal 时长差值与纯日期差值 2026-08-11 12:38:31 +08:00
pjh123 078688070d feat: 实现最小 BigInt 子集(字面量/算术/比较/构造器,Temporal 前置) 2026-08-10 23:02:31 +08:00
pjh123 9e26a13655 feat: Temporal 解锁 + PlainDate 补齐日期派生字段与 add/subtract/equals/compare 2026-08-10 21:23:00 +08:00
pjh123 924b8fd4e0 feat: Temporal 最小子集(Temporal.Now/Instant/PlainDate/PlainTime) 2026-08-10 18:18:39 +08:00
pjh123 a5a910a24e feat: for-await-of + Symbol.asyncIterator + AsyncFromSyncIterator 2026-08-10 03:21:37 +08:00
pjh123 cd1bc206a5 fix: symbol 作属性键独立编码,不再塌缩为空串 2026-08-09 16:09:49 +08:00
pjh123 c65f3be179 feat: TypedArray 原型方法族全量解锁(回调/查找/迭代/排序/ES2023 copy 族) 2026-08-09 13:18:50 +08:00
pjh123 2bebd822d0 feat: TypedArray 第一批解锁(%TypedArray% 构造器、原型访问器、of/from、bind 绑参、harness) 2026-08-09 12:26:31 +08:00
pjh123 6c79dbb21c feat: class 私有成员语义(字段/方法/访问器 + brand 检查 + 契约修复) 2026-08-09 11:08:36 +08:00
pjh123 5611d90ad0 feat: with 语句、成员位/移位复合赋值、CALL_NATIVE 无目标修复
with 语句:新增 emit 支持,with 体内自由标识符动态解析(对象属性优先,
回退外层),支持读/写/复合赋值/自增自减/delete/var 初始化动态化,
TO_OBJECT opcode 处理原始值对象,顶层 this 绑定全局对象。

复合赋值:新增 6 个 COMPOUND_MEMBER_BIT_* opcode 支持成员位/移位复合赋值,
修复 computed member 复合赋值覆盖 bug,with 内标识符复合赋值动态化。

CALL_NATIVE:实现全局 isNaN/isFinite 并绑定,用户覆盖 builtin 名时
回退通用调用路径而非报错,局部遮蔽 builtin 名走普通 CALL。

test262: with 34 pass(基线 0),compound-assignment 320 pass(基线 223)
2026-08-09 07:22:46 +08:00
pjh123 826d9fd0a2 feat: RegExp.prototype 实现 Symbol.match/replace/search/split/matchAll 2026-08-08 22:33:32 +08:00
pjh123 9e3be30fe8 fix: TypedArray 元素写入进 buffer + BYTES_PER_ELEMENT 属性 2026-08-08 21:41:33 +08:00
pjh123 71c9f78338 feat: 补 String.fromCodePoint/codePointAt/isWellFormed/toWellFormed 2026-08-08 20:05:49 +08:00