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 数据模块命名空间
This commit is contained in:
2026-08-12 17:37:05 +08:00
parent 0c22a0e968
commit b650ecb3cb
2 changed files with 222 additions and 0 deletions
+2
View File
@@ -35,6 +35,8 @@ pub mod json;
pub mod map;
/// Math 内置对象实现(数学函数)。
pub mod math;
/// 模块命名空间与求值辅助(import 实现内部用)。
pub mod module;
/// Number 内置对象实现(constructor 与 toFixed/isInteger 等)。
pub mod number;
/// Object 内置对象实现(keys/create/assign/defineProperty 等静态方法)。