pjh123
|
d4df1ddaf4
|
fix: 循环体被捕获词法声明每迭代新建 cell
|
2026-09-19 19:58:13 +00:00 |
|
pjh123
|
c1dcc7a8f3
|
fix: 默认导出匿名函数与类设置隐式名
|
2026-09-17 22:16:17 +00:00 |
|
pjh123
|
e4b17d2ecf
|
fix: 块级异步与生成器函数声明不再泄漏全局
|
2026-09-17 22:08:56 +00:00 |
|
pjh123
|
816fdc3dd6
|
fix: switch 无命中跳 default 且 case 比较改严格相等
|
2026-09-17 21:43:12 +00:00 |
|
pjh123
|
1e8861e14f
|
fix: C 风格 for 词法头建立独立每迭代环境
|
2026-09-17 21:21:36 +00:00 |
|
pjh123
|
e86ec8d7d2
|
fix: 修正捕获可见性过滤的前向捕获与隐式全局误判
|
2026-09-17 20:07:23 +00:00 |
|
pjh123
|
3de3b639d9
|
fix: switch 语句补 case 块作用域与函数预声明
|
2026-09-17 19:09:22 +00:00 |
|
pjh123
|
f73f5b8005
|
fix: for-in/of 解构声明头支持与默认值 TDZ
|
2026-09-17 18:48:55 +00:00 |
|
pjh123
|
e90edba4ec
|
fix: if 支臂函数绑定收集下钻容器语句
|
2026-09-17 18:29:44 +00:00 |
|
pjh123
|
24cc61d51e
|
docs: 统一循环与声明写点的注释措辞
|
2026-09-17 15:37:12 +00:00 |
|
pjh123
|
fa4c9edb81
|
refactor: 闭包捕获分析拆目录并自由函数化去除接收者
|
2026-09-15 23:02:03 +00:00 |
|
pjh123
|
423f075ddc
|
refactor: 顶层程序发射迁出 emit.rs 独立成 program 模块
|
2026-09-15 22:27:29 +00:00 |
|
pjh123
|
6cde7738b1
|
fix: 块级函数声明支臂不再块入口物化,声明点按入口物化状态区分写回
|
2026-09-15 16:41:37 +00:00 |
|
pjh123
|
0418820115
|
fix: 块级函数 builtin 名守卫收窄至只读三常量面,可配置 builtin 恢复实例化写回
|
2026-09-15 06:42:12 +00:00 |
|
pjh123
|
1b26bc7ed8
|
fix: 块级函数声明闭包物化提前至块入口,声明点退化为外层 var 写回
|
2026-09-15 05:42:08 +00:00 |
|
pjh123
|
320c660620
|
fix: 块级函数声明补 web-compat 外层 var 绑定实例化与声明点写回
|
2026-09-15 03:48:19 +00:00 |
|
pjh123
|
da5e6d13ba
|
fix: for-in/of 词法头建独立 TDZ 环境,捕获与右值直读归正
|
2026-09-14 23:58:10 +00:00 |
|
pjh123
|
c50eb9e566
|
fix: 复合语句域收敛真实完成值,空体物化 undefined 不沿用前值
|
2026-09-14 22:51:29 +00:00 |
|
pjh123
|
fa67988ab4
|
fix: 变量声明完成值归空记录,脚本保留末非空完成值
|
2026-09-14 20:15:08 +00:00 |
|
pjh123
|
d161b7cfe3
|
fix: 顶层声明撞不可定义全局按规范抛 TypeError
|
2026-09-14 14:32:39 +00:00 |
|
pjh123
|
c564ec539b
|
emit/kernel: 可写 builtin 全局标识符写双写全局属性,三常量描述符对齐规范 c:false,受限词法名集补 eval
- 谓词注册表化:targets_readonly_builtin 解析条件抽公共助手,新增
targets_writable_builtin / is_writable_builtin_global(BUILTIN_GLOBALS
减只读三常量派生,不复制名单)+ 只读/可写划分漂移守卫单测
- 12 个赋值族写点(简单/复合/更新/逻辑赋值、解构两臂、for-in/for-of
标识符目标)补双写臂:STORE_VAR 后 0x98 同步全局对象属性(既有可写
属性原地更值、保 e/c 位),裸读镜像与 globalThis 反射不失步
- for-in 头 tier 写点移除 builtin 名例外:可写 builtin 名迭代键照规范
覆写全局属性(三常量仍由拦截臂跳过)
- 三常量(undefined/NaN/Infinity)全局描述符 configurable 翻正为
false:delete 拒绝、属性保留,描述符读同步
- 脚本顶层受限词法名集 3→4(补 eval,静态受限臂):let/const/class
eval 顶层声明编译期 SyntaxError
- 配套钉:7 处既有钉随 c 位翻正 + 2 枚 for-in/eval 形态钉反转,新增
global_builtin_writable_tests(16 钉:双写六形态 + 遮蔽/strict/eval/
宿主名面)
test262 子集:built-ins/global 29/29、三常量族 20/20、11.13.1-4 7/7、
assignmenttargettype plain 8/8 全绿;language/global-code 17 失败文件
双树单跑一致(pre-existing);annexB assignmenttargettype 7 个 parse
error 为既有解析器缺口
|
2026-09-13 10:46:10 +00:00 |
|
pjh123
|
1fdb7aca2d
|
fix: eval 代码顶层函数声明撞不可写全局内置——sloppy 编译期首指令 TypeError、strict 函数声明不落全局
|
2026-09-13 09:05:54 +00:00 |
|
pjh123
|
6aff1101f3
|
fix: 顶层受限全局名 lexical 声明编译期拒绝——let/const undefined|NaN|Infinity 撞 GDI 三常量 SyntaxError
|
2026-09-12 22:45:24 +00:00 |
|
pjh123
|
44c16cab8a
|
fix: 顶层 var 读写直连全局对象属性单一真值——GDI 序言 + 声明处同步删除,类原型 session 直分防晋升克隆 identity 分裂,自增减 int 保持
|
2026-09-12 15:48:32 +00:00 |
|
pjh123
|
ef3b95f6d3
|
fix: for-in/for-of 左侧未声明写改读写登记集并集判定——读侧登记的全局槽漏全局对象属性写与 strict 漏抛
左侧标识符先读后写时全局槽由读侧登记,写侧单集判定不命中:sloppy 写穿透漏发(循环后读陈旧值)、strict 漏抛 ReferenceError。与其余 8 写点统一为 is_implicit_global_reg;补 3 枚判别性钉(sloppy for-in / for-of 穿透 + strict for-in 漏抛,回退单集判定必红)。
|
2026-09-11 12:44:24 +00:00 |
|
pjh123
|
c0451a484a
|
fix: do-while 的 continue 目标错指体首——改指条件位置使条件可被求值
|
2026-09-11 09:46:29 +00:00 |
|
pjh123
|
a5aab0077f
|
fix: for-in var 头撞既有绑定复用槽位消除顶层编译报错,迭代键写不可写全局内置接只读拦截
|
2026-09-10 05:56:10 +08:00 |
|
pjh123
|
1f37c4c9e6
|
fix: 全局 var 绑定 0x6F 按 CreateGlobalVarBinding 不更新既有不可写数据描述符,for-in 枚举断言修运算符优先级括号化
|
2026-09-10 05:55:03 +08:00 |
|
pjh123
|
c87edd404a
|
fix: 全局三常量描述符翻可配置,var 重复声明以 builtin 镜像值保留现存值
|
2026-09-10 04:16:08 +08:00 |
|
pjh123
|
b77a9322e5
|
fix: 不可写全局内置(undefined/NaN/Infinity)寄存器镜像写编译期拦截——sloppy 静默 no-op、strict 抛 TypeError
|
2026-09-09 23:17:01 +08:00 |
|
pjh123
|
2457f283fe
|
fix: 顶层 var 全局属性求值前创建(声明定时语义)+ 无初始化 var 声明不再抹槽值
|
2026-09-09 22:00:29 +08:00 |
|
pjh123
|
d9c2847730
|
fix: sloppy 未声明写隐式全局创建 + strict ReferenceError——DEFINE_GLOBAL_PROP_C 0x98
|
2026-09-09 18:44:38 +08:00 |
|
pjh123
|
089179daab
|
refactor: 函数 strict 标志入 IR/编译/缓存链(零行为地基)
|
2026-08-16 16:46:33 +08:00 |
|
pjh123
|
fe8892079e
|
chore: 全仓 rustfmt 格式化归拢
|
2026-08-16 12:50:36 +08:00 |
|
pjh123
|
744899aae9
|
fix: for-of/for-in 提前退出时按规范顺序完成 IteratorClose
return/break/continue 逃出 for-of 时此前完全不执行 IteratorClose:
BREAK/CONTINUE/RETURN 指令现在经 ext 字携带词法逃出的迭代器层数
(for-of + for-in 各 16 位),运行时在全部 finally 穿越之后、真正
跳转/返回之前按 LIFO 关闭——与规范 §13.7.5.4(循环体完成值已含
内部 try-finally 处理,IteratorClose 在后)顺序一致。
- emit 词法:LabelCtx 增加 for-of/for-in 深度计数,loop/switch/label
打开时快照,break/continue/return 按当前深度减目标深度计算逃出层数
(switch 内 break 以 switch 打开点为基准,目标循环自身不计入)
- 指令编码:brk/cont/ret 三参构造,lower 跳转路径补发 ext 字
- 运行时:dispatch_break/continue/return 读取逃出计数,无 finally 时
直接关闭后跳转/返回,有 finally 时随 Completion 悬挂由 TRY_FINALLY_END
在穿越完成后消费;生成器 .return()/.throw() 注入经 complete_generator_return
全关快照栈迭代器;return() 抛错经 unwind 替代完成值并关闭剩余迭代器
- 顺带:for-in 逃出残留(无 return() 语义,仅弹栈);for-await-of 的
异步迭代器不做同步关闭(return() promise 须 await,走异步机制)
- 新增 15 项回归测试:return/labeled break/continue/switch/while/finally
顺序/抛错优先/生成器注入/for-in/for-await-of 嵌套
|
2026-08-16 09:31:39 +08:00 |
|
pjh123
|
75153a909d
|
fix: 未声明标识符读取抛 ReferenceError(typeof 特判返回 undefined)
|
2026-08-16 00:10:08 +08:00 |
|
pjh123
|
391f613653
|
fix: 块内函数声明预声明支持(Annex B 块级绑定)
|
2026-08-15 23:13:26 +08:00 |
|
pjh123
|
bca463438d
|
fix: for-const 循环 update 段豁免 const 写检查(per-iteration 绑定合法)
|
2026-08-15 22:29:09 +08:00 |
|
pjh123
|
abeab6f216
|
fix: finally 体直落进入时置位 finally_active 防完成穿越计数错乱
catch 体正常结束后指令直落入 finally 体,此前 finally_active 未被置位,
finally 内 break/continue/return/throw 触发未进入分支导致 finally 体重复
执行、完成计数错乱。新增无操作数标记指令 TRY_FINALLY_ENTER,在 finally
体入口统一置位栈顶 handler 的 finally_active,覆盖 JMP/直落/unwind/完成
穿越/挂起恢复全部进入路径,并删除 control_flow.rs 中对跳转目标匹配的
脆弱栈顶检测。
|
2026-08-15 07:47:54 +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
|
0c22a0e968
|
fix: class 类名绑定经 dedicated cell 捕获(C===Cv 恒等)+ upvalue 写入 const guard(getter 赋值抛 TypeError)
|
2026-08-12 17:30:28 +08:00 |
|
pjh123
|
621956114c
|
fix: class 类名绑定 TDZ 与 const 语义(extends 引用类名抛 ReferenceError,类构建后初始化绑定)
|
2026-08-12 15:37:58 +08:00 |
|
pjh123
|
33dae0a8c2
|
fix: 闭包捕获对象键与循环变量绑定
|
2026-08-11 14:17:45 +08:00 |
|
pjh123
|
973778f181
|
fix: 块级 let/const/class 预声明 + TDZ 读取运行时抛 ReferenceError
|
2026-08-10 21:07:39 +08:00 |
|
pjh123
|
80cb1c2feb
|
feat: 循环 let/const 每迭代绑定(MAKE_CELL_FRESH + 解构捕获修复)
|
2026-08-10 10:18:39 +08:00 |
|
pjh123
|
e03ec0f635
|
fix: 脚本顶层 var/function 声明落 globalThis(DEFINE_GLOBAL_PROP 非可配置数据属性)
|
2026-08-10 03:52:17 +08:00 |
|
pjh123
|
a5a910a24e
|
feat: for-await-of + Symbol.asyncIterator + AsyncFromSyncIterator
|
2026-08-10 03:21:37 +08:00 |
|
pjh123
|
5ced83e8c0
|
feat: async-generator 语义(async function*),yield/await 共存 + next 返回 Promise
- emit 识别 generator+async 组合,模块同时标记 is_generator/is_async
- 新增 AsyncGeneratorState:帧快照 + 请求队列 + 当前请求
- next/return/throw 返回 Promise,请求入队逐条处理
- YIELD 让出经 promise unwrap 后交付(yield rejected promise 关闭生成器)
- AWAIT 挂起保留当前请求,微任务恢复后继续执行
- %AsyncGeneratorPrototype% / %AsyncGeneratorFunction.prototype% 内建
- session GC / promote 支持异步生成器状态盒
- 普通 async 函数嵌套调用隔离外层异步生成器上下文
|
2026-08-10 01:52:03 +08:00 |
|
pjh123
|
85c192a747
|
feat: rest 参数(function f(...args)),实参区收集数组
|
2026-08-10 00:33:25 +08:00 |
|
pjh123
|
fd47cd56d0
|
feat: async/await 语法支持(AWAIT 帧快照挂起/恢复 + 微任务驱动 + AsyncFunction intrinsics)
|
2026-08-09 22:02:15 +08:00 |
|