Commit Graph

616 Commits

Author SHA1 Message Date
pjh123 18a0732a91 perf: 属性键解析移出 IC 命中路径 2026-08-13 15:54:46 +08:00
pjh123 6b9371ed4a perf: 字符串 for-of 迭代改字节游标增量推进 2026-08-13 15:03:48 +08:00
pjh123 3ad80d6ed4 perf: new_string_owned 零拷贝路径替代 new_string 二次克隆 2026-08-13 14:55:08 +08:00
pjh123 d2c21c3a4a perf: parse_js_number 去 lowercase 分配 + int32 位运算直取 2026-08-13 14:48:19 +08:00
pjh123 033ef9abea perf: 算术运算 int 结果保 int + double 快路径 2026-08-13 14:44:24 +08:00
pjh123 43a0c53ed7 feat: 拆分 stress benchmark 到细粒度单热点测试并修复 bench 采样逻辑 2026-08-13 14:27:20 +08:00
pjh123 f3d411120e fix: accessor getter 调用异常经 raise_call_error 走 unwind(JS try/catch 可捕获,此前逃逸) 2026-08-12 17:55:58 +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 b32d525141 feat: emit 模块编译(快照式链接:依赖子模块闭包 + import/export 域)
- emit_program_module:模块顶层编译(is_global_scope=false,顶层 this undefined 由 VM 按标志绑定)
- emit_module_into_ctx:预声明/闭包分析识别 export 包裹声明与 import 绑定
- 依赖收集:import/re-export/star 的 source 去重、循环检测、json/text 数据模块
- 导入绑定初始化:__moduleLinkGet 链接期检查;self-import 别名语义(export 处回写)
- export 域:声明/重导出/export */export default 就地注册命名空间
- re-export 链接检查移至 prelude(先于 body 求值)
- emit_module_call 参数打包连续寄存器(CALL_NATIVE 契约)
- CompileCtx 增 module_ns_reg/module_dep_ns_regs/self-import 映射
- 拆分 declaration helper(export 声明复用);function/class 表达式 emitter 提升可见性
2026-08-12 17:37:33 +08:00
pjh123 b650ecb3cb feat: module natives(命名空间对象/导出读写/star 合并/seal/eval/data + 链接检查)
- __moduleObject:null 原型命名空间,带 @@toStringTag=Module(w/e/c=false)
- __moduleSet:定义不可写/可枚举/不可配置导出属性
- __moduleGet:模块命名空间 exotic Get(缺失导出抛 TypeError)
- __moduleLinkGet:import 绑定链接期检查(缺失导出抛 SyntaxError)
- __moduleStar:export * 合并,冲突名跳过(dst 已有属性省略)
- __moduleSeal:封冻命名空间
- __moduleEval:同步执行依赖模块并返回命名空间
- __moduleData:json/text 数据模块命名空间
2026-08-12 17:37:33 +08:00
pjh123 0c22a0e968 fix: class 类名绑定经 dedicated cell 捕获(C===Cv 恒等)+ upvalue 写入 const guard(getter 赋值抛 TypeError) 2026-08-12 17:30:28 +08:00
pjh123 0a4e42334d feat: Duration.total 支持字符串/原始值 relativeTo 语义(无效与越界字符串 RangeError、数字/null 等 TypeError、days 日历路径),total 子集 41/29 2026-08-12 16:58:57 +08:00
pjh123 f2214ab95b feat: Temporal.Duration.prototype.round(无日历单位路径:选项校验+24h 天舍入+按最大单位平衡,绑定注册) 2026-08-12 16:16:22 +08:00
pjh123 621956114c fix: class 类名绑定 TDZ 与 const 语义(extends 引用类名抛 ReferenceError,类构建后初始化绑定) 2026-08-12 15:37:58 +08:00
pjh123 5d3b5d055a feat: parser 支持 ES module(parse_module)+ test262 放行 module 用例
- oxide_parser 新增 parse_module(SourceType::mjs),parse 重构为 parse_with_source_type
- oxide_test262 不再跳过 flags:[module]/features:module,module 用例走 parse_module
- 首轮实测:language/import 12 pass/35 fail(原全跳过,10/10 负向 parse 全过),
  language/module-code 248 pass/274 fail(parse-err 103/0,early-* 26/0)
- 顺带修复 oxide_test262 两个 clippy lint(single-match、unnecessary unwrap)
2026-08-12 15:15:27 +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 7c1da3f979 fix: Instant 参数转换按规范——非字符串原始值直接抛 TypeError(from/compare/equals/since/until) 2026-08-12 14:33:16 +08:00
pjh123 79346097ac feat: Temporal.PlainDateTime.prototype.equals(实例/字符串/对象/ZDT 统一比较,绑定注册) 2026-08-12 14:27:25 +08:00
pjh123 5032175707 fix: Temporal PlainDate/PlainDateTime.from 表示范围边界、leap second、constrain 下限与实例转换 2026-08-12 14:17:28 +08:00
pjh123 f1b7a908f9 fix: class 方法/访问器/constructor/prototype 属性描述符(非枚举/只读),新增 DEFINE_PROP_ATTRS/DEFINE_ACCESSOR_ATTRS
- opcode.rs/inst.rs/contract.rs/vm.rs/vm_dispatch_ctrl.rs:新增两个带 attrs 扩展字的 define 指令
  (attrs bit0=writable, bit1=enumerable, bit2=configurable,与 PropAttributes 一致)
- class/method.rs:方法与非计算访问器改按规范非枚举安装(DefineMethod 语义)
- class/prototype.rs:proto.constructor 非枚举;ctor.prototype 三标志全 false(MakeConstructor)
- 效果:language/statements/class 1782 pass/948 fail -> 1910 pass/716 fail(+128/-232)
2026-08-12 14:11:02 +08:00
pjh123 5b884d6e75 feat: Temporal PlainDate 字符串走 ParseTemporalDateString(注解/UTC/小数位/分数分钟校验),property bag 支持 monthCode 与日历标识符解析 2026-08-12 13:49:58 +08:00
pjh123 0b6d309cea fix: PlainDate/PlainDateTime until/since 月分解 days 计算(current 保持真实钳制日期,锚定日只用于越界比较) 2026-08-12 13:31:15 +08:00
pjh123 000e2ce872 feat: PlainDate/PlainDateTime until/since 舍入选项(roundingMode/roundingIncrement/smallestUnit,GetDifferenceSettings 对齐) 2026-08-12 13:26:10 +08:00
pjh123 e0d6a85261 fix: ArraySetLength 收缩遇不可配置元素静默失败、ToPrimitive 异常透传与既有属性描述符缺省回填
- arr.length 收缩时若 [newLen, oldLen) 内存在不可配置元素,整个收缩失败且不做任何修改(sloppy 赋值静默 no-op),不再抛错或截断
- length 赋值 ToPrimitive(valueOf/toString)抛错时按主 dispatch 约定直接返回,避免二次抛 RangeError 覆盖原异常(S15.4.5.1_A1.3_T2)
- Object.defineProperty/defineProperties/create 对已有属性省略描述符字段时保持现有属性值(无显式 meta 按 DEFAULT_DATA 回填),修复 toReversed/toSorted/toSpliced/with length-decreased-while-iterating
2026-08-12 13:07:32 +08:00
pjh123 d4cd52ba90 fix: 数组 length 赋值 ArraySetLength 语义与超长逻辑长度(a.length 读取/收缩校验/空洞同步) 2026-08-12 12:52:02 +08:00
pjh123 e87515a27f fix: Array 方法 array-like receiver/Get 异常传播、species 构造、slice/toSpliced/toSorted 规范化,数组字面量空洞语义 2026-08-12 12:51:28 +08:00
pjh123 62991cfa4b feat: 新增 Symbol.species well-known symbol 绑定(Symbol.species 解析/键槽/内建对象) 2026-08-12 12:50:53 +08:00
pjh123 e94bbc6c52 feat: BigInt 位运算按 ToNumeric 语义实现 2026-08-12 11:27:50 +08:00
pjh123 426ed0daa3 fix: 对象转原始值转换错误经内置函数传播 2026-08-12 11:27:40 +08:00
pjh123 64a5da45c0 feat: PlainDate equals/compare 字符串参数经 date_like_ymd 转换并做 ISO 范围校验 2026-08-12 10:47:43 +08:00
pjh123 3a832d5a27 fix: PlainDate until/since 全范围 ISO 日期,civil 日计数 + 范围校验,修复全量运行崩溃 2026-08-12 10:47:32 +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 1eadb5ac1b fix: BigInt SUB/MUL 除 0n 不再误抛 Division by zero
binary_arith! 的 is_zero() 守卫无条件生效,x - 0n 与 x * 0n(含包装对象形式)
误抛 RangeError。仅 DIV/MOD 应拒绝 BigInt 零除数,SUB/MUL 正常计算。
test262 language/expressions/subtraction 由 29/6 通过提升到 30/5。
2026-08-12 03:30:03 +08:00
pjh123 1824ef0df1 feat: num-bigint 接入任意精度 BigInt(字面量、算术、toString、asIntN/asUintN) 2026-08-12 03:15:18 +08:00
pjh123 4474702735 fix: Object.prototype.toString 补 Math/JSON/Arguments 标签 2026-08-12 02:29:40 +08:00
pjh123 aa51d57660 feat: BigInt 构造器 ToPrimitive 语义、toString(radix)、asIntN/asUintN 2026-08-12 02:23:27 +08:00
pjh123 a84738cd60 test: 最小 BigInt 落地后从排除列表移除 BigInt 2026-08-12 01:40:18 +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 fbb3500129 feat: PlainDateTime toString 选项与 ISO 区间解析 2026-08-11 23:07:41 +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 4e2d00fd0f fix: 嵌套内置对象寄存器映射同步 2026-08-11 18:06:42 +08:00
pjh123 e6d70664d3 fix: 模板表达式高位寄存器槽保留 2026-08-11 17:17:30 +08:00