Commit Graph

128 Commits

Author SHA1 Message Date
pjh123 542236a15a fix: clear_transient 补清 overflow 态(id 空间完整复位)+ kernel 增加 active_vms 计数,sweep/重建/kernel-drop 三处 debug_assert 守卫'清空时点无存活 VM' 2026-09-11 21:42:55 +00:00
pjh123 a8c668002b perf: test262 runner 重建与 sweep 双钟互斥——重建迭代不再对 doomed 核白做 50k 清理,sweep 文档对齐两边界契约 2026-09-11 21:19:08 +00:00
pjh123 22ae7e2642 chore: PermInterner 模块注释去历史叙述(写语义不写历史) 2026-09-11 21:06:59 +00:00
pjh123 389ce0e6af refactor: PermEntry 布局钉改 repr(C)——字段序(指针, 长度)连续 16B 由 repr(C) 保证(非 pack),尺寸断言即 ABI 钉 2026-09-11 20:53:42 +00:00
pjh123 55727a2e01 perf: should_rebuild_perm 改 advisory 建议上限 Option——键数超阈值(严格大于)返回 Some(阈值取 2 的幂后加倍) 供宿主重建后写入新 kernel 不再立即触顶,预设 None 恒 None,3 单测钉默认/恰阈值/未达三面 2026-09-11 20:53:42 +00:00
pjh123 5b0affe065 perf: PermEntry 瘦身——删存储侧零消费的 8B hash 字段(24B→16B,键寻址仍经 DashMap 哈希键,计算保留存储删除),get_hash 随之删除,布局以尺寸 const 断言钉死 2026-09-11 20:20:00 +00:00
pjh123 b8167d4d84 perf: kernel 寿命配置化——零消费者死旋钮 max_dead_strings 换 advisory 重建阈值 perm_interner_max_entries(预设全 None 零漂移)+ KernelCore::should_rebuild_perm 宿主边界查询,3 单测钉默认面/阈值面/未达阈值面 2026-09-11 20:20:00 +00:00
pjh123 b17119ce16 fix: 脏重建方法 wrapper/构造器/global 槽跨轮复用迁移——FnWrapperKey 四分件键(加 label 消解同名原型 next/return/throw 碰撞)登记表继承止 S2 每轮 wrapper 无界累积,global 槽原位更新堵住旧构造器滞留 UAF 与每轮 +3 槽无界增长 2026-09-11 18:06:19 +00:00
pjh123 ee32b2c682 fix: 选择性重建收尾重指保留对象 proto 槽并恰好释放一次被替换旧 P 对象属性区——含保活钉住对属性区,本体钉保留作重指遗漏兜底 2026-09-11 13:34:47 +00:00
pjh123 fa4ee6861b refactor: BuiltinWorld P 字段枚举抽统一入口 all_p_fields——session 收尾清单单点维护,新增字段不再漏行 2026-09-11 13:32:23 +00:00
pjh123 6268275689 docs: 绑定层对象登记表字段注释对齐选择性重建继承模型(并入新 world 后仍由 session 收尾统一释放) 2026-09-11 11:26:48 +00:00
pjh123 9493b889b6 fix: 选择性重建后被替换家族的属性区无人释放——重建点按脏标记恰好释放一次 2026-09-11 08:50:59 +00:00
pjh123 e2e68fe0ad fix: full_reset 脏重建后方法 wrapper 原型链悬空——旧 Function/Object 对保活 2026-09-11 08:50:45 +00:00
pjh123 227dfe008f fix: test262 runner 进程 RSS 无界增长——session 收尾统一释放内建裸堆区/upvalue 别名 + 每测试分配上限 256MiB(任务 116)
- 泄漏修复:KernelSession 收尾(teardown_intrinsic_protos/free_session_upvalues)
  释放内建对象 Box::into_raw 裸堆区(release_raw_heap 四区置空幂等)与
  session upvalue 原件/晋升克隆别名去重释放;bindings 原生盒负载边、
  session_gc 边记录、vm_props 属性区同步收尾
- 失控测试封顶:runner kernel max_alloc_bytes=256MiB(dispatch 采样口径
  run_alloc_bytes/run_alloc_bytes_full),超限计 memory-limit 失败而非拖垮
  进程 RSS(arena 高水位 GB 级 × 多 worker = 宿主 OOM)
- 归属:RSS 泄漏 pre-existing(HEAD 无 WIP 同现);identifiers escaped
  unicode 挂死族另立 B132(pre-existing,supervise 超时自愈)
- 验证:build/clippy/四 crate 测试全绿零新增告警;language 前 5000 测试
  单窗峰值 330MB(旧 ~4.5MB/测试 单调增长→88GB OOM 签名消失),
  窗口间峰值 0.17-1.6GB 有界、逐测试释放回基线
2026-09-11 03:55:59 +00:00
pjh123 c87edd404a fix: 全局三常量描述符翻可配置,var 重复声明以 builtin 镜像值保留现存值 2026-09-10 04:16:08 +08:00
pjh123 c7b54cb181 feat: String.raw/groupBy/withResolvers/f16round/__defineGetter__ 低垂果实批量实现 2026-08-22 10:26:00 +08:00
pjh123 c514ab35a3 feat: 实现 console 全局对象 (log/warn/error/info/debug/trace) 2026-08-21 22:29:21 +08:00
pjh123 76504fa963 refactor: 资源栈类型注释改为纯语义描述 2026-08-16 19:23:10 +08:00
pjh123 fbfa3f5ccf feat: DisposableStack/AsyncDisposableStack 对象类型标签与两栈原型字段入世界 2026-08-16 19:14:48 +08:00
pjh123 e100bfb8b4 feat: SuppressedError 内置错误实现(三字段属性序 + 构造器接线) 2026-08-16 19:04:09 +08:00
pjh123 9f13d107ec feat: Iterator helpers 基建——Symbol.dispose 注册与 %IteratorHelperPrototype% 2026-08-16 14:44:47 +08:00
pjh123 885c43e0e4 refactor: match 可改 ? 的等价改写 2026-08-16 14:04:25 +08:00
pjh123 c59ad64e7d fix: 全局构造器与内置对象属性改非枚举与规范对齐 2026-08-16 02:29:42 +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 9a7fe9777d perf: typeof 改 js_type 单次提取并复用进程级静态字符串消除每次分配 2026-08-15 16:09:19 +08:00
pjh123 350b65c091 perf: 字符串 +/+= 二元拼接改 Cons rope 惰性扁平化消除 O(n²)
JsString 拆 Flat/Cons 变体:Cons 经独立 ConsNode 保存左右子节点 + O(1)
字节长 + 惰性扁平化产物缓存(OnceLock 原子发布,产物挂节点生命周期)。
concat_strings 接线:总长 ≤ 128B 的小链急切扁平(与 rope 前同款,拼接即
消费场景零开销),大链 O(1) 链接——大段重复拼接从 O(n²) 拷贝降为 O(n)
链接,文本在消费点(.length/==/string_ref/方法族)首次扁平化后缓存。

GC 兼容:mark 收口 mark_string_live 传播 Cons 子节点与产物闭包(显式栈
防深链爆栈);sweep/full_reset 共用 drop 辅助连带释放产物;节点字节记账
用 O(1) byte_len。rope 节点登记 session 字符串表,与执行期字符串 GC
(指令边界触发)天然兼容。JsString 结构 32B 与 rope 前同 bin,小串路径
零结构回退;unsafe impl Send/Sync 论证同 StringPtr(perm 恒 Flat)。
2026-08-15 14:32:08 +08:00
pjh123 b479fb4a4d fix: rebuild 时泄漏保活旧 function/object 家族消除 wrapper 悬垂原型 UAF 2026-08-15 04:05:16 +08:00
pjh123 1c5676e614 perf: ASCII 单字符缓存 + 字符串迭代器游标收尾 2026-08-14 12:11:54 +08:00
pjh123 4f80fb4fb6 fix: builtin 快照数组与枚举判别值错位致符号/时间族永久脏 2026-08-14 05:50:46 +08:00
pjh123 62991cfa4b feat: 新增 Symbol.species well-known symbol 绑定(Symbol.species 解析/键槽/内建对象) 2026-08-12 12:50:53 +08:00
pjh123 c287708ddc feat: 补 entries/keys/findLastIndex/toSorted/toReversed/toSpliced/with 2026-08-12 03:42:42 +08:00
pjh123 aa51d57660 feat: BigInt 构造器 ToPrimitive 语义、toString(radix)、asIntN/asUintN 2026-08-12 02:23:27 +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 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 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 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 826d9fd0a2 feat: RegExp.prototype 实现 Symbol.match/replace/search/split/matchAll 2026-08-08 22:33:32 +08:00
pjh123 71c9f78338 feat: 补 String.fromCodePoint/codePointAt/isWellFormed/toWellFormed 2026-08-08 20:05:49 +08:00
pjh123 0bc8c847b5 feat: 实现 Array.from 与 Array.of 静态方法
- Array.from:可迭代(迭代协议)与 array-like 双路径,支持 mapFn/thisArg,
  构造器 this 支持(new C),CreateDataPropertyOrThrow 写入,IteratorClose
- Array.of:以参数为元素,this 构造器 + CreateDataProperty + Set length
- iterator.rs:get_iterator 改为 Option 返回,新增 try_make_iterator 与
  peek_iterator_method(GetMethod 只读判定,不调用迭代器)
2026-08-08 13:13:08 +08:00
pjh123 31e28a03a6 docs: 补充注释与格式化 2026-08-06 23:10:27 +08:00
pjh123 263fd255b6 docs: 添加 Rustdoc 注释 2026-08-05 21:46:47 +08:00
pjh123 2f7fe3cedf fix: 修复不符合 JS 语义约束的错误行为测试 2026-08-05 15:44:22 +08:00
pjh123 168ef93079 perf: Shape 加 depth 字段 + positions 反向索引,lookup_position 首次写入缓存后 O(1) 2026-06-30 23:28:35 +08:00