@nudojs/core 1.1.4 → 1.2.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,16 +1,16 @@
1
- import { A as Abs, M as MayThrowEffect, b as Phi, c as AstEnv } from './hof-types-tAeoYvzY.js';
1
+ import { A as Abs, M as MayThrowEffect, b as Phi, c as AstEnv } from './hof-types-DqDpAxfh.js';
2
2
  import * as _babel_types from '@babel/types';
3
3
  import { Node, Expression, File, ImportDeclaration } from '@babel/types';
4
4
 
5
5
  /**
6
- * B 路径 throw 载荷(独立叶子模块):
6
+ * 求值引擎 throw 载荷(独立叶子模块):
7
7
  * builtins.ts(evalJsonMethod 等 Abs builtin)需要硬抛 TypeError/SyntaxError,
8
8
  * 而 exec/runtime.ts 又 import builtins.ts(evalNamespaceCall 等)——
9
9
  * 直接互引成环。NudoThrow 无依赖(仅 Abs 类型 + Error),抽成叶子,
10
10
  * runtime.ts re-export 保持既有 import 面不变。
11
11
  */
12
12
 
13
- /** B 路径 throw 载荷:携带 Abs 抛出值 */
13
+ /** 求值引擎 throw 载荷:携带 Abs 抛出值 */
14
14
  declare class NudoThrow extends Error {
15
15
  readonly absValue: Abs;
16
16
  constructor(absValue: Abs);
@@ -18,7 +18,7 @@ declare class NudoThrow extends Error {
18
18
  declare function isNudoThrow(e: unknown): e is NudoThrow;
19
19
 
20
20
  /**
21
- * B 路径运行时共享状态:phi、就地写、字面量 Abs、真值、循环信号。
21
+ * 求值引擎运行时共享状态:phi、就地写、字面量 Abs、真值、循环信号。
22
22
  * 叶子模块——不依赖 runtime 其它文件(tuple/obj 字面量就地构造,避免 state↔containers 环)。
23
23
  */
24
24
 
@@ -28,7 +28,7 @@ declare function currentExecPhi(): Phi;
28
28
  declare function withExecPhi<T>(p: Phi, body: () => T): T;
29
29
  /**
30
30
  * transpile 泄漏的 JS 函数值 → 一等 fn Abs。
31
- * B 路径把函数声明/表达式编译成真实 JS 函数;它们流进对象槽、
31
+ * 求值引擎把函数声明/表达式编译成真实 JS 函数;它们流进对象槽、
32
32
  * 元组、join 等 Abs 结构时不能裸存——下游(bridge/leq/join)读 `.shape`。
33
33
  * 参数名无法从运行时函数恢复(用 fn.length → argN,与 analyzer 的
34
34
  * extractParamNames 回退口径一致);带真实参数名走 $fnVal(transpile 侧)。
@@ -36,7 +36,7 @@ declare function withExecPhi<T>(p: Phi, body: () => T): T;
36
36
  declare function asAbsVal(v: unknown): Abs;
37
37
  /**
38
38
  * 函数调用边界:callee 的 loop/early-return 不得冒泡成 caller 结果。
39
- * 每个 B 路径调用帧独立 ALS;NudoReturn 收成该调用的返回值。
39
+ * 每个 求值引擎调用帧独立 ALS;NudoReturn 收成该调用的返回值。
40
40
  */
41
41
  declare function callAtFunctionBoundary<T>(body: () => T): T;
42
42
  /** 函数表达式 → 一等 fn Abs(transpile 侧带真实参数名;异步 body 包 $async)
@@ -47,7 +47,7 @@ declare function $fnVal(params: string[], impl: (...args: Abs[]) => Abs, opts?:
47
47
  /**
48
48
  * 宿主 this → Abs:函数体 prologue 用它承接 call/apply/bind 传入的 thisArg。
49
49
  * Abs 原样返回;宿主 undefined(普通调用/call 缺 thisArg)→ $lit(undefined)。
50
- * B 路径产物是 new Function 拼接(sloppy),裸调用的宿主 this 泄漏为
50
+ * 求值引擎产物是 new Function 拼接(sloppy),裸调用的宿主 this 泄漏为
51
51
  * globalThis——归一到 $lit(undefined)(strict 模块语义下的 this)。
52
52
  */
53
53
  declare function $rawThis(v: unknown): Abs;
@@ -91,7 +91,7 @@ declare function $tryDiscardSoft(_effects: MayThrowEffect[]): void;
91
91
  declare function $tryOrphanSoft(effects: MayThrowEffect[]): void;
92
92
  /** 无 handler / 出口:上浮未消化 soft may-throw(幂等) */
93
93
  declare function $tryReleaseSoftOut(): void;
94
- /** B 路径「函数提前 return」信号(区别于 throw) */
94
+ /** 求值引擎「函数提前 return」信号(区别于 throw) */
95
95
  declare class NudoReturn extends Error {
96
96
  readonly absValue: Abs;
97
97
  constructor(absValue: Abs);
@@ -141,6 +141,12 @@ declare function $shr(a: Abs, b: Abs): Abs;
141
141
  declare function $ushr(a: Abs, b: Abs): Abs;
142
142
  declare function $pow(a: Abs, b: Abs): Abs;
143
143
  declare function $toNumber(a: Abs): Abs;
144
+ /** ToNumeric(UpdateExpression):number|bigint,bigint 保持 */
145
+ declare function $toNumeric(a: Abs): Abs;
146
+ /** UpdateExpression `old+1`:ToNumeric 后按 numeric type 加 1(无 string concat) */
147
+ declare function $updateAdd(a: Abs): Abs;
148
+ /** UpdateExpression `old-1` */
149
+ declare function $updateSub(a: Abs): Abs;
144
150
  declare function $neg(a: Abs): Abs;
145
151
  declare function $typeof(a: Abs): Abs;
146
152
  declare function $not(a: Abs): Abs;
@@ -297,8 +303,15 @@ declare function $idx(a: Abs, i: Abs): Abs;
297
303
  declare function $idxSet(a: Abs, i: Abs, value: Abs): Abs;
298
304
  /** 数组/字符串长度 */
299
305
  declare function $len(a: Abs): Abs;
300
- /** 对象字面量 → Abs obj */
306
+ /** 对象字面量 → Abs obj(槽位写走 setSlot,`__proto__` 不踩宿主 setter) */
301
307
  declare function $obj(slots: Record<string, Abs>): Abs;
308
+ /**
309
+ * 对象字面量非计算 `__proto__: v` 的特殊原型设定(ES PropertyDefinition)。
310
+ * - v 为 null → null-proto(无 Object.prototype 回退)
311
+ * - v 为 object → 保守 open(继承读不折 exact undefined;细节不建模)
312
+ * - v 为 primitive → 原生忽略(无自有键、不改原型)
313
+ */
314
+ declare function $setProto(o: Abs, proto: Abs): Abs;
302
315
  /** 对象展开 { ...a, b } */
303
316
  declare function $spread(a: Abs, b: Abs): Abs;
304
317
  /**
@@ -343,7 +356,7 @@ declare function $get(o: Abs, key: string, opts?: {
343
356
  }): Abs;
344
357
  /**
345
358
  * Map/Set forEach:条目表逐条调用回调(value, key, recv)。
346
- * 回调是 B 路径 JS 函数(transpile 内联箭头)直接调用;Abs fn 走 $call。
359
+ * 回调是 求值引擎 JS 函数(transpile 内联箭头)直接调用;Abs fn 走 $call。
347
360
  * 回调返回值丢弃;forEach 表达式值恒 undefined。
348
361
  */
349
362
  declare function $collectionForEach(recv: Abs, cb: unknown): Abs | undefined;
@@ -457,7 +470,7 @@ declare function transpileBodyNode(node: Node, opts: TranspileOptions): string;
457
470
  declare function transpileExpression(expr: Expression, opts?: TranspileOptions): string;
458
471
 
459
472
  /**
460
- * B 路径 transpile:JS AST → 可在 Node 上执行的抽象值程序(源码字符串)。
473
+ * 求值引擎 transpile:JS AST → 可在 Node 上执行的抽象值程序(源码字符串)。
461
474
  * 运算符改为 $add/$sub/…;if 改为 $fork;for 改为 $for。
462
475
  * 值类型是 Abs;副作用与模块仍由 host mock/注入。
463
476
  *
@@ -474,7 +487,7 @@ declare function transpile(source: string, opts?: TranspileOptions): string;
474
487
 
475
488
  /**
476
489
  * 调用 Abs 一等函数(absFunction impl)或 mock apply。
477
- * 供 B 路径 import 绑定包装:`(...args) => $call(absFn, args)`。
490
+ * 供 求值引擎 import 绑定包装:`(...args) => $call(absFn, args)`。
478
491
  *
479
492
  * 统一顺序:apply → body → relation → isRelFn(委托 applyAbsFn)。
480
493
  * 行为对齐说明(与旧 $call 的差异,均属刻意):
@@ -490,11 +503,11 @@ declare function $call(fn: Abs, args: Abs[], thisVal?: Abs): Abs;
490
503
  * Abs-eval registerClassDecl 与 transpile $class 共用。
491
504
  */
492
505
 
493
- type BClassAccessor = {
506
+ type EvalClassAccessor = {
494
507
  get?: (thisVal: Abs) => Abs;
495
508
  set?: (thisVal: Abs, v: Abs) => Abs;
496
509
  };
497
- type BClassSpec = {
510
+ type EvalClassSpec = {
498
511
  name: string;
499
512
  superName?: string;
500
513
  ctor?: (thisVal: Abs, ...args: Abs[]) => Abs;
@@ -506,12 +519,12 @@ type BClassSpec = {
506
519
  staticMethodParams?: Record<string, string[]>;
507
520
  statics?: Record<string, Abs>;
508
521
  /** 实例 get/set:get 无参返回 Abs;set 收到 (thisVal, v) 返回更新后的 thisVal */
509
- accessors?: Record<string, BClassAccessor>;
522
+ accessors?: Record<string, EvalClassAccessor>;
510
523
  /** 静态 get/set:挂在类构造器上,不在实例原型链 */
511
- staticAccessors?: Record<string, BClassAccessor>;
524
+ staticAccessors?: Record<string, EvalClassAccessor>;
512
525
  };
513
- declare function registerBClass(spec: BClassSpec): void;
514
- declare function getBClass(name: string): BClassSpec | undefined;
526
+ declare function registerEvalClass(spec: EvalClassSpec): void;
527
+ declare function getEvalClass(name: string): EvalClassSpec | undefined;
515
528
  declare function clearBClasses(): void;
516
529
 
517
530
  /**
@@ -526,12 +539,12 @@ declare function clearBClasses(): void;
526
539
  declare function $reStateCall(re: Abs, method: string, args: Abs[]): Abs;
527
540
 
528
541
  /**
529
- * B 路径 class:brand 实例 + ctor/method 闭包 + 继承链。
542
+ * 求值引擎 class:brand 实例 + ctor/method 闭包 + 继承链。
530
543
  * 方法内 this 由 transpile 改写为 thisVal 参数。
531
544
  */
532
545
 
533
546
  /** 定义类 → 可 new 的 Abs(brand 标记;静态字段挂在 slots) */
534
- declare function $class(name: string, spec: Omit<BClassSpec, "name"> & {
547
+ declare function $class(name: string, spec: Omit<EvalClassSpec, "name"> & {
535
548
  extends?: string | Abs | unknown;
536
549
  }): Abs;
537
550
  /** new C(...) → 空 brand 实例 + ctor 写字段;非类构造走 impl/$call */
@@ -560,12 +573,12 @@ declare function $staticInvoke(cls: Abs, method: string, args: Abs[]): Abs;
560
573
  declare function $setKey(o: Abs, key: Abs, value: Abs): Abs;
561
574
 
562
575
  /**
563
- * B 路径调用点记录:transpile 把 `f(args)` 改成 $callNamed,
576
+ * 求值引擎调用点记录:transpile 把 `f(args)` 改成 $callNamed,
564
577
  * 分析时可收集 call@ 所需的 AbsCallRecord。
565
578
  * 成员缺失诊断见 member-diag.ts(共用,避免循环依赖)。
566
579
  */
567
580
 
568
- type BCallRecord = {
581
+ type EvalCallRecord = {
569
582
  fnName: string;
570
583
  args: Abs[];
571
584
  result: Abs;
@@ -576,7 +589,7 @@ type BCallRecord = {
576
589
  threw?: boolean;
577
590
  };
578
591
  /** B 赋值记录(与 ast-records.ts AbsAssignRecord 同形;structuralAssignIssues 消费) */
579
- type BAbsAssignRecord = {
592
+ type EvalAbsAssignRecord = {
580
593
  name: string;
581
594
  prev: Abs | undefined;
582
595
  next: Abs;
@@ -585,29 +598,29 @@ type BAbsAssignRecord = {
585
598
  conditional?: boolean;
586
599
  };
587
600
  /** 返回先前 collector,便于嵌套调用 save/restore(禁止 finally 置 null 砸外层) */
588
- declare function setBAssignCollector(collector: ((r: BAbsAssignRecord) => void) | null): ((r: BAbsAssignRecord) => void) | null;
601
+ declare function setEvalAssignCollector(collector: ((r: EvalAbsAssignRecord) => void) | null): ((r: EvalAbsAssignRecord) => void) | null;
589
602
  /** 结构赋值记录(transpile 插桩调用;无收集器时 no-op) */
590
603
  declare function $assignRecord(name: string, prev: Abs | undefined, next: Abs, line: number, column: number, conditional: boolean): void;
591
- declare function setBBindingSink(sink: Map<string, unknown> | null): void;
604
+ declare function setEvalBindingSink(sink: Map<string, unknown> | null): void;
592
605
  /** 顶层绑定记录(transpile 插桩调用) */
593
606
  declare function $recordBinding(name: string, value: unknown): void;
594
607
  /** 返回先前 collector,便于嵌套调用 save/restore(禁止 finally 置 null 砸外层) */
595
608
  /** 成员/方法调用点打点($invoke 等;无收集器时 no-op)。不进 $callNamed 预算。 */
596
- declare function noteBCallRecord(r: BCallRecord): void;
597
- declare function setBCallCollector(collector: ((r: BCallRecord) => void) | null): ((r: BCallRecord) => void) | null;
598
- declare function getBCallCollector(): ((r: BCallRecord) => void) | null;
609
+ declare function noteEvalCallRecord(r: EvalCallRecord): void;
610
+ declare function setEvalCallCollector(collector: ((r: EvalCallRecord) => void) | null): ((r: EvalCallRecord) => void) | null;
611
+ declare function getEvalCallCollector(): ((r: EvalCallRecord) => void) | null;
599
612
  /**
600
613
  * 按名调用并记录。
601
614
  * loc: [line, column](1-based line,0-based column,与 Babel 一致)
602
615
  * argLocs: 与 args 对齐的实参字面量源位置(provenance;无 loc 用 null)
603
616
  */
604
- declare const MAX_B_CALL_DEPTH = 64;
617
+ declare const MAX_EVAL_CALL_DEPTH = 64;
605
618
  /** 总调用上限:与 call-budget.MAX_TOTAL_CALLS 同阀(递归×循环×分支展开的
606
619
  * 规模阀)。200k 在病态展开(lodash _baseFlatten)下 ~30s,20k 收口到
607
620
  * ~3s——截断 → opaque(更保守,zero-FP 安全)。 */
608
- declare const MAX_B_TOTAL_CALLS = 20000;
621
+ declare const MAX_EVAL_TOTAL_CALLS = 20000;
609
622
  /** 宿主入口(runTranspiled / callTranspiledExportFull)前重置 */
610
- declare function resetBCallBudget(): void;
623
+ declare function resetEvalCallBudget(): void;
611
624
  declare function $callNamed(name: string, fn: unknown, args: Abs[], loc?: [number, number], argLocs?: Array<[number, number] | null | undefined>): Abs;
612
625
 
613
626
  /**
@@ -667,11 +680,11 @@ declare function runTranspiledOptionsMemoKey(opts: RunTranspiledOptions | undefi
667
680
  declare const RUNTIME_IMPORT_RE: RegExp;
668
681
  declare function bindingsOf(run: Record<string, unknown>): Map<string, unknown> | undefined;
669
682
  /**
670
- * 执行一段 B 路径程序,返回顶层 `export function` / `export const`。
683
+ * 执行一段 求值引擎程序,返回顶层 `export function` / `export const`。
671
684
  */
672
685
  declare function runTranspiled(source: string, opts?: RunTranspiledOptions): Record<string, unknown>;
673
- /** B-path 回落事件(观测单一埋点;reason: unsupported:* = 能力边界,internal = B 自身缺陷) */
674
- type BPathFallback = {
686
+ /** evaluator 回落事件(观测单一埋点;reason: unsupported:* = 能力边界,internal = 引擎自身缺陷) */
687
+ type EvalFallback = {
675
688
  reason: string;
676
689
  message: string;
677
690
  loc?: {
@@ -679,13 +692,13 @@ type BPathFallback = {
679
692
  column: number;
680
693
  };
681
694
  };
682
- declare function setBPathFallbackCollector(collector: ((f: BPathFallback) => void) | null): void;
695
+ declare function setEvalFallbackCollector(collector: ((f: EvalFallback) => void) | null): void;
683
696
  /** 表达式级求值(scan 的 case 字面量实参等静态求值面):编译单表达式经
684
- * B 运行时执行。bindings:表达式自由标识符 → Abs(调用方按绑定表注入)。
697
+ * eval 运行时执行。bindings:表达式自由标识符 → Abs(调用方按绑定表注入)。
685
698
  * 编译失败抛错(调用方按需 catch)。 */
686
699
  declare function evalExprAbs(expr: _babel_types.Expression, bindings?: Record<string, Abs>): Abs;
687
700
  /** 记录一次 B 回落(body-fn 等非 runTranspiled 入口共用) */
688
- declare function noteBPathFallback(e: unknown): void;
701
+ declare function noteEvalFallback(e: unknown): void;
689
702
  /**
690
703
  * B 单一入口:runTranspiled + 类型化回落观测。
691
704
  * unsupported:*(能力边界)/ internal(B 缺陷)都记录到收集器;
@@ -698,7 +711,7 @@ type TranspiledCallResult = {
698
711
  throws: Abs;
699
712
  };
700
713
  /** 调用 runTranspiled 导出(捕获 $throw)。opts.phi:入口 Φ 种子
701
- * (instantiate/symbolic 的约束入口——B 侧路径条件收窄)。 */
714
+ * (instantiate/symbolic 的约束入口——eval 侧路径条件收窄)。 */
702
715
  declare function callTranspiledExportFull(exports: Record<string, unknown>, name: string, args: Abs[], opts?: {
703
716
  phi?: Phi;
704
717
  }): TranspiledCallResult;
@@ -709,7 +722,7 @@ declare function callTranspiledExport(exports: Record<string, unknown>, name: st
709
722
  * 转译器无法正确 lowering 的构造:抛此错误(替代静默降级注释)。
710
723
  * 消费方(tryRunTranspiled / body-fn)捕获后记录并 fail-closed
711
724
  * 结构化回落理由(unsupported:*)——能力知识单一事实源在转译点,
712
- * 不再依赖带外的 isBPathCapable 清单。
725
+ * 不再依赖带外的 isEvalCapable 清单。
713
726
  */
714
727
  declare class NudoUnsupportedError extends Error {
715
728
  readonly reason: string;
@@ -723,4 +736,4 @@ declare class NudoUnsupportedError extends Error {
723
736
  });
724
737
  }
725
738
 
726
- export { $add as $, type AbsModuleExports as A, $eq as B, $eqLoose as C, $fnVal as D, $for as E, $forInKeys as F, $forIter as G, $forOf as H, $fork as I, $ge as J, $gen as K, $get as L, $gt as M, $idx as N, $idxSet as O, $importMeta as P, $in as Q, type RunTranspiledOptions as R, $instanceof as S, $instanceofNonIdent as T, $invoke as U, $invokeSuper as V, $isBreakTo as W, $isForkExit as X, $join as Y, $le as Z, $len as _, $arguments as a, NudoReturn as a$, $lit as a0, $loopBreak as a1, $loopContinue as a2, $loopReturn as a3, $lt as a4, $mod as a5, $mul as a6, $ne as a7, $neLoose as a8, $neg as a9, $thisSet as aA, $throw as aB, $toNumber as aC, $tryCurrentMark as aD, $tryDetachSoftCatch as aE, $tryDigestSoftCatch as aF, $tryDiscardSoft as aG, $tryMark as aH, $tryOrphanSoft as aI, $tryPopMark as aJ, $tryReleaseSoftCatch as aK, $tryReleaseSoftOut as aL, $tryTakeSince as aM, $typeof as aN, $unknown as aO, $ushr as aP, $while as aQ, $whileSeq as aR, $yield as aS, type BAbsAssignRecord as aT, type BCallRecord as aU, type BClassSpec as aV, type BPathFallback as aW, DEFAULT_MAX_LOOP_ITERS as aX, MAX_B_CALL_DEPTH as aY, MAX_B_TOTAL_CALLS as aZ, NudoLoopSignal as a_, $new as aa, $not as ab, $nullishTest as ac, $obj as ad, $objAccessor as ae, $objRest as af, $optionalGet as ag, $optionalInvoke as ah, $orDefault as ai, $pow as aj, $pushLoopExit as ak, $rawThis as al, $reStateCall as am, $recordBinding as an, $regex as ao, $rethrowIfNudoReturn as ap, $set as aq, $setKey as ar, $shl as as, $shr as at, $spread as au, $staticInvoke as av, $sub as aw, $super as ax, $switch as ay, $thisGet as az, $arr as b, NudoThrow as b0, NudoUnsupportedError as b1, RUNTIME_IMPORT_RE as b2, type TranspileOptions as b3, type TranspiledCallResult as b4, asAbsVal as b5, bindImports as b6, bindingsOf as b7, callAtFunctionBoundary as b8, callTranspiledExport as b9, resetBCallBudget as bA, runTranspiled as bB, runTranspiledOptionsMemoKey as bC, runWithLoopExits as bD, runtimeImportOf as bE, setBAssignCollector as bF, setBBindingSink as bG, setBCallCollector as bH, setBPathFallbackCollector as bI, takeLoopExits as bJ, takeThrowExits as bK, transpile as bL, transpileBodyNode as bM, transpileExpression as bN, transpileFile as bO, transpileSource as bP, tryRunTranspiled as bQ, withExecPhi as bR, callTranspiledExportFull as ba, clearBClasses as bb, clearStaleTermPred as bc, collectAbsExports as bd, currentExecPhi as be, evalExprAbs as bf, fillTuple as bg, foldRequireSpecArg as bh, foldStaticStringExpr as bi, getBCallCollector as bj, getBClass as bk, isArrMutator as bl, isDefinitelyFalse as bm, isDefinitelyTrue as bn, isNudoBreak as bo, isNudoContinue as bp, isNudoReturn as bq, isNudoThrow as br, litTruth as bs, lookupObjAccessor as bt, namespaceNameOf as bu, noteBCallRecord as bv, noteBPathFallback as bw, pushLoopExit as bx, pushThrowExit as by, registerBClass as bz, $arrMutContainer as c, $arrRest as d, $arrWithHoles as e, $assignRecord as f, $async as g, $asyncReturn as h, $await as i, $bitand as j, $bitnot as k, $bitor as l, $bitxor as m, $call as n, $callNamed as o, $catchVal as p, $class as q, $classExpr as r, $collectionForEach as s, $concat as t, $copy as u, $del as v, $delRes as w, $div as x, $dynamicImport as y, $elems as z };
739
+ export { $add as $, type AbsModuleExports as A, $eq as B, $eqLoose as C, $fnVal as D, $for as E, $forInKeys as F, $forIter as G, $forOf as H, $fork as I, $ge as J, $gen as K, $get as L, $gt as M, $idx as N, $idxSet as O, $importMeta as P, $in as Q, type RunTranspiledOptions as R, $instanceof as S, $instanceofNonIdent as T, $invoke as U, $invokeSuper as V, $isBreakTo as W, $isForkExit as X, $join as Y, $le as Z, $len as _, $arguments as a, MAX_EVAL_CALL_DEPTH as a$, $lit as a0, $loopBreak as a1, $loopContinue as a2, $loopReturn as a3, $lt as a4, $mod as a5, $mul as a6, $ne as a7, $neLoose as a8, $neg as a9, $thisSet as aA, $throw as aB, $toNumber as aC, $toNumeric as aD, $tryCurrentMark as aE, $tryDetachSoftCatch as aF, $tryDigestSoftCatch as aG, $tryDiscardSoft as aH, $tryMark as aI, $tryOrphanSoft as aJ, $tryPopMark as aK, $tryReleaseSoftCatch as aL, $tryReleaseSoftOut as aM, $tryTakeSince as aN, $typeof as aO, $unknown as aP, $updateAdd as aQ, $updateSub as aR, $ushr as aS, $while as aT, $whileSeq as aU, $yield as aV, DEFAULT_MAX_LOOP_ITERS as aW, type EvalAbsAssignRecord as aX, type EvalCallRecord as aY, type EvalClassSpec as aZ, type EvalFallback as a_, $new as aa, $not as ab, $nullishTest as ac, $obj as ad, $objAccessor as ae, $objRest as af, $optionalGet as ag, $optionalInvoke as ah, $orDefault as ai, $pow as aj, $pushLoopExit as ak, $rawThis as al, $reStateCall as am, $recordBinding as an, $regex as ao, $rethrowIfNudoReturn as ap, $set as aq, $setKey as ar, $shl as as, $shr as at, $spread as au, $staticInvoke as av, $sub as aw, $super as ax, $switch as ay, $thisGet as az, $arr as b, MAX_EVAL_TOTAL_CALLS as b0, NudoLoopSignal as b1, NudoReturn as b2, NudoThrow as b3, NudoUnsupportedError as b4, RUNTIME_IMPORT_RE as b5, type TranspileOptions as b6, type TranspiledCallResult as b7, asAbsVal as b8, bindImports as b9, pushLoopExit as bA, pushThrowExit as bB, registerEvalClass as bC, resetEvalCallBudget as bD, runTranspiled as bE, runTranspiledOptionsMemoKey as bF, runWithLoopExits as bG, runtimeImportOf as bH, setEvalAssignCollector as bI, setEvalBindingSink as bJ, setEvalCallCollector as bK, setEvalFallbackCollector as bL, takeLoopExits as bM, takeThrowExits as bN, transpile as bO, transpileBodyNode as bP, transpileExpression as bQ, transpileFile as bR, transpileSource as bS, tryRunTranspiled as bT, withExecPhi as bU, $setProto as bV, bindingsOf as ba, callAtFunctionBoundary as bb, callTranspiledExport as bc, callTranspiledExportFull as bd, clearBClasses as be, clearStaleTermPred as bf, collectAbsExports as bg, currentExecPhi as bh, evalExprAbs as bi, fillTuple as bj, foldRequireSpecArg as bk, foldStaticStringExpr as bl, getEvalCallCollector as bm, getEvalClass as bn, isArrMutator as bo, isDefinitelyFalse as bp, isDefinitelyTrue as bq, isNudoBreak as br, isNudoContinue as bs, isNudoReturn as bt, isNudoThrow as bu, litTruth as bv, lookupObjAccessor as bw, namespaceNameOf as bx, noteEvalCallRecord as by, noteEvalFallback as bz, $arrMutContainer as c, $arrRest as d, $arrWithHoles as e, $assignRecord as f, $async as g, $asyncReturn as h, $await as i, $bitand as j, $bitnot as k, $bitor as l, $bitxor as m, $call as n, $callNamed as o, $catchVal as p, $class as q, $classExpr as r, $collectionForEach as s, $concat as t, $copy as u, $del as v, $delRes as w, $div as x, $dynamicImport as y, $elems as z };
package/dist/index.d.ts CHANGED
@@ -1,16 +1,16 @@
1
- import { c as AstEnv, A as Abs, b as Phi, C as Confidence, T as Term, H as HofCollectCtx, S as Shape, a as Pred, R as RelSource, w as HofSite } from './hof-types-tAeoYvzY.js';
2
- export { I as ImplicationOracle, L as LiteralValue, P as PrimName, x as TYPEOF_NAMES, y as TypeofName, z as abs, B as absToString, D as and, F as anyAbs, G as anyVar, J as app, K as bigintLit, N as bool, O as boolLit, Q as confJoin, U as emptyPhi, V as eq, W as ge, X as geNum, Y as getImplicationOracle, Z as gt, _ as gtNum, a0 as implies, a1 as isBigPrim, a2 as isExactLit, a3 as isNumPrim, a4 as isStrPrim, a5 as le, a6 as leNum, a7 as lit, a8 as litValue, a9 as lt, aa as ltNum, ab as ne, ac as negatePred, ad as never, ae as not, af as num, ag as numLit, ah as numVar, ai as obj, aj as or, ak as pFalse, al as pTrue, am as phiAnd, an as predEquals, ao as predToString, ap as predVars, aq as primToTypeof, ar as ptypeof, as as setImplicationOracle, at as shapeOfTerm, au as shapeToString, av as simplifyTerm, aw as str, ax as strLit, ay as substPred, az as termEquals, aA as termToString, aB as unknown, aC as v } from './hof-types-tAeoYvzY.js';
1
+ import { c as AstEnv, A as Abs, b as Phi, C as Confidence, T as Term, H as HofCollectCtx, S as Shape, a as Pred, R as RelSource, w as HofSite } from './hof-types-DqDpAxfh.js';
2
+ export { I as ImplicationOracle, L as LiteralValue, P as PrimName, x as TYPEOF_NAMES, y as TypeofName, z as abs, B as absToString, D as and, F as anyAbs, G as anyVar, J as app, K as bigintLit, N as bool, O as boolLit, Q as confJoin, U as emptyPhi, V as eq, W as ge, X as geNum, Y as getImplicationOracle, Z as gt, _ as gtNum, a0 as implies, a1 as isBigPrim, a2 as isExactLit, a3 as isNumPrim, a4 as isStrPrim, a5 as le, a6 as leNum, a7 as lit, a8 as litValue, a9 as lt, aa as ltNum, ab as ne, ac as negatePred, ad as never, ae as not, af as num, ag as numLit, ah as numVar, ai as obj, aj as or, ak as pFalse, al as pTrue, am as phiAnd, an as predEquals, ao as predToString, ap as predVars, aq as primToTypeof, ar as ptypeof, as as setImplicationOracle, at as shapeOfTerm, au as shapeToString, av as simplifyTerm, aw as str, ax as strLit, ay as substPred, az as termEquals, aA as termToString, aB as unknown, aC as v } from './hof-types-DqDpAxfh.js';
3
3
  import { Node } from '@babel/types';
4
- import { p as parseSource, L as LeakBudget, E as EffectiveInterfaceOpts, b as LoadDepsFingerprint, i as CheckReport, N as NudoConstraint } from './check-report-AtnAfY9U.js';
5
- export { j as CheckAction, C as CheckIssue, k as CheckJson, o as CheckJsonMulti, q as ConstraintBuilder, D as Diagnostic, u as EffectiveInterface, G as GitlabCodeQualityIssue, v as InterfaceDiag, I as InterfaceSource, w as InterfaceTierInfo, a as InterfaceTierOpts, x as NamedImport, y as NudoField, z as NudoFnConstraint, A as NudoSidecarError, B as NudoSig, R as RefineDiag, F as RefineEntry, H as RefineResolveOpts, S as SELF, J as actionsForIssue, K as andC, M as any, O as array, P as boolean, Q as checkArg, T as checkCall, U as constraintToEntryAbs, V as effectiveInterface, W as execNudoModule, X as extractDeclaredThrows, Y as extractNudoImports, Z as extractRefineReturnFromSource, _ as extractRefinesFromSource, $ as fn, a0 as fnConstraintToEntryReqs, a1 as formatCheckReport, a2 as formatConstraint, a3 as formatDiagnostics, a4 as formatEffectiveInterfaceDisplay, a5 as formatGithubAnnotations, a6 as formatGitlabCodeQuality, a7 as formatInterfaceTierLine, a8 as generatedExportNames, a9 as getParseSourceCacheSize, aa as getTerm, ab as instantiateConstraint, ac as interfaceDiagCount, ad as interfaceSourceOf, ae as interfaceTierOf, af as isIntFlag, ag as isNodeModulesPath, ah as isNudoConstraint, ai as lenTerm, aj as litC, ak as localNamedExports, al as number, am as omit, an as partial, ao as pick, ap as refineDiagCount, aq as refineToIndexedFull, ar as resetNudoModuleExecCache, as as resetParseSourceCache, at as serializeCheckJson, au as serializeCheckJsonMulti, av as setInterfaceDiagCollector, aw as setRefineDiagCollector, ax as shape, ay as sidecarClosureFingerprint, az as sidecarPathOf, aA as string, aB as takeInterfaceDiags, aC as takeInterfaceDiagsSince, aD as takeRefineDiags, aE as takeRefineDiagsSince, aF as throwConstraintToKinds, aG as union } from './check-report-AtnAfY9U.js';
6
- import { A as AbsModuleExports, R as RunTranspiledOptions } from './index-D4rnOHre.js';
7
- export { $ as $add, a as $arguments, b as $arr, c as $arrMutContainer, d as $arrRest, e as $arrWithHoles, f as $assignRecord, g as $async, h as $asyncReturn, i as $await, j as $bitand, k as $bitnot, l as $bitor, m as $bitxor, n as $call, o as $callNamed, p as $catchVal, q as $class, r as $classExpr, s as $collectionForEach, t as $concat, u as $copy, v as $del, w as $delRes, x as $div, y as $dynamicImport, z as $elems, B as $eq, C as $eqLoose, D as $fnVal, E as $for, F as $forInKeys, G as $forIter, H as $forOf, I as $fork, J as $ge, K as $gen, L as $get, M as $gt, N as $idx, O as $idxSet, P as $importMeta, Q as $in, S as $instanceof, T as $instanceofNonIdent, U as $invoke, V as $invokeSuper, W as $isBreakTo, X as $isForkExit, Y as $join, Z as $le, _ as $len, a0 as $lit, a1 as $loopBreak, a2 as $loopContinue, a3 as $loopReturn, a4 as $lt, a5 as $mod, a6 as $mul, a7 as $ne, a8 as $neLoose, a9 as $neg, aa as $new, ab as $not, ac as $nullishTest, ad as $obj, ae as $objAccessor, af as $objRest, ag as $optionalGet, ah as $optionalInvoke, ai as $orDefault, aj as $pow, ak as $pushLoopExit, al as $rawThis, am as $reStateCall, an as $recordBinding, ao as $regex, ap as $rethrowIfNudoReturn, aq as $set, ar as $setKey, as as $shl, at as $shr, au as $spread, av as $staticInvoke, aw as $sub, ax as $super, ay as $switch, az as $thisGet, aA as $thisSet, aB as $throw, aC as $toNumber, aD as $tryCurrentMark, aE as $tryDetachSoftCatch, aF as $tryDigestSoftCatch, aG as $tryDiscardSoft, aH as $tryMark, aI as $tryOrphanSoft, aJ as $tryPopMark, aK as $tryReleaseSoftCatch, aL as $tryReleaseSoftOut, aM as $tryTakeSince, aN as $typeof, aO as $unknown, aP as $ushr, aQ as $while, aR as $whileSeq, aS as $yield, aT as BAbsAssignRecord, aU as BCallRecord, aV as BClassSpec, aW as BPathFallback, aX as DEFAULT_MAX_LOOP_ITERS, aY as MAX_B_CALL_DEPTH, aZ as MAX_B_TOTAL_CALLS, a_ as NudoLoopSignal, a$ as NudoReturn, b0 as NudoThrow, b1 as NudoUnsupportedError, b2 as RUNTIME_IMPORT_RE, b3 as TranspileOptions, b4 as TranspiledCallResult, b5 as asAbsVal, b6 as bindImports, b7 as bindingsOf, b8 as callAtFunctionBoundary, b9 as callTranspiledExport, ba as callTranspiledExportFull, bb as clearBClasses, bc as clearStaleTermPred, bd as collectAbsExports, be as currentExecPhi, bf as evalExprAbs, bg as fillTuple, bh as foldRequireSpecArg, bi as foldStaticStringExpr, bj as getBCallCollector, bk as getBClass, bl as isArrMutator, bm as isDefinitelyFalse, bn as isDefinitelyTrue, bo as isNudoBreak, bp as isNudoContinue, bq as isNudoReturn, br as isNudoThrow, bs as litTruth, bt as lookupObjAccessor, bu as namespaceNameOf, bv as noteBCallRecord, bw as noteBPathFallback, bx as pushLoopExit, by as pushThrowExit, bz as registerBClass, bA as resetBCallBudget, bB as runTranspiled, bC as runTranspiledOptionsMemoKey, bD as runWithLoopExits, bE as runtimeImportOf, bF as setBAssignCollector, bG as setBBindingSink, bH as setBCallCollector, bI as setBPathFallbackCollector, bJ as takeLoopExits, bK as takeThrowExits, bL as transpile, bM as transpileBodyNode, bN as transpileExpression, bO as transpileFile, bP as transpileSource, bQ as tryRunTranspiled, bR as withExecPhi } from './index-D4rnOHre.js';
4
+ import { p as parseSource, L as LeakBudget, E as EffectiveInterfaceOpts, b as LoadDepsFingerprint, i as CheckReport, N as NudoConstraint } from './check-report-0B9Z66n0.js';
5
+ export { j as CheckAction, C as CheckIssue, k as CheckJson, o as CheckJsonMulti, q as ConstraintBuilder, D as Diagnostic, u as EffectiveInterface, G as GitlabCodeQualityIssue, v as InterfaceDiag, I as InterfaceSource, w as InterfaceTierInfo, a as InterfaceTierOpts, x as NamedImport, y as NudoField, z as NudoFnConstraint, A as NudoSidecarError, B as NudoSig, R as RefineDiag, F as RefineEntry, H as RefineResolveOpts, S as SELF, J as actionsForIssue, K as andC, M as any, O as array, P as boolean, Q as checkArg, T as checkCall, U as constraintToEntryAbs, V as effectiveInterface, W as execNudoModule, X as extractDeclaredThrows, Y as extractNudoImports, Z as extractRefineReturnFromSource, _ as extractRefinesFromSource, $ as fn, a0 as fnConstraintToEntryReqs, a1 as formatCheckReport, a2 as formatConstraint, a3 as formatDiagnostics, a4 as formatEffectiveInterfaceDisplay, a5 as formatGithubAnnotations, a6 as formatGitlabCodeQuality, a7 as formatInterfaceTierLine, a8 as generatedExportNames, a9 as getParseSourceCacheSize, aa as getTerm, ab as instantiateConstraint, ac as interfaceDiagCount, ad as interfaceSourceOf, ae as interfaceTierOf, af as isIntFlag, ag as isNodeModulesPath, ah as isNudoConstraint, ai as lenTerm, aj as litC, ak as localNamedExports, al as number, am as omit, an as partial, ao as pick, ap as refineDiagCount, aq as refineToIndexedFull, ar as resetNudoModuleExecCache, as as resetParseSourceCache, at as serializeCheckJson, au as serializeCheckJsonMulti, av as setInterfaceDiagCollector, aw as setRefineDiagCollector, ax as shape, ay as sidecarClosureFingerprint, az as sidecarPathOf, aA as string, aB as takeInterfaceDiags, aC as takeInterfaceDiagsSince, aD as takeRefineDiags, aE as takeRefineDiagsSince, aF as throwConstraintToKinds, aG as union } from './check-report-0B9Z66n0.js';
6
+ import { A as AbsModuleExports, R as RunTranspiledOptions } from './index-BNiZvVHw.js';
7
+ export { $ as $add, a as $arguments, b as $arr, c as $arrMutContainer, d as $arrRest, e as $arrWithHoles, f as $assignRecord, g as $async, h as $asyncReturn, i as $await, j as $bitand, k as $bitnot, l as $bitor, m as $bitxor, n as $call, o as $callNamed, p as $catchVal, q as $class, r as $classExpr, s as $collectionForEach, t as $concat, u as $copy, v as $del, w as $delRes, x as $div, y as $dynamicImport, z as $elems, B as $eq, C as $eqLoose, D as $fnVal, E as $for, F as $forInKeys, G as $forIter, H as $forOf, I as $fork, J as $ge, K as $gen, L as $get, M as $gt, N as $idx, O as $idxSet, P as $importMeta, Q as $in, S as $instanceof, T as $instanceofNonIdent, U as $invoke, V as $invokeSuper, W as $isBreakTo, X as $isForkExit, Y as $join, Z as $le, _ as $len, a0 as $lit, a1 as $loopBreak, a2 as $loopContinue, a3 as $loopReturn, a4 as $lt, a5 as $mod, a6 as $mul, a7 as $ne, a8 as $neLoose, a9 as $neg, aa as $new, ab as $not, ac as $nullishTest, ad as $obj, ae as $objAccessor, af as $objRest, ag as $optionalGet, ah as $optionalInvoke, ai as $orDefault, aj as $pow, ak as $pushLoopExit, al as $rawThis, am as $reStateCall, an as $recordBinding, ao as $regex, ap as $rethrowIfNudoReturn, aq as $set, ar as $setKey, as as $shl, at as $shr, au as $spread, av as $staticInvoke, aw as $sub, ax as $super, ay as $switch, az as $thisGet, aA as $thisSet, aB as $throw, aC as $toNumber, aD as $toNumeric, aE as $tryCurrentMark, aF as $tryDetachSoftCatch, aG as $tryDigestSoftCatch, aH as $tryDiscardSoft, aI as $tryMark, aJ as $tryOrphanSoft, aK as $tryPopMark, aL as $tryReleaseSoftCatch, aM as $tryReleaseSoftOut, aN as $tryTakeSince, aO as $typeof, aP as $unknown, aQ as $updateAdd, aR as $updateSub, aS as $ushr, aT as $while, aU as $whileSeq, aV as $yield, aW as DEFAULT_MAX_LOOP_ITERS, aX as EvalAbsAssignRecord, aY as EvalCallRecord, aZ as EvalClassSpec, a_ as EvalFallback, a$ as MAX_EVAL_CALL_DEPTH, b0 as MAX_EVAL_TOTAL_CALLS, b1 as NudoLoopSignal, b2 as NudoReturn, b3 as NudoThrow, b4 as NudoUnsupportedError, b5 as RUNTIME_IMPORT_RE, b6 as TranspileOptions, b7 as TranspiledCallResult, b8 as asAbsVal, b9 as bindImports, ba as bindingsOf, bb as callAtFunctionBoundary, bc as callTranspiledExport, bd as callTranspiledExportFull, be as clearBClasses, bf as clearStaleTermPred, bg as collectAbsExports, bh as currentExecPhi, bi as evalExprAbs, bj as fillTuple, bk as foldRequireSpecArg, bl as foldStaticStringExpr, bm as getEvalCallCollector, bn as getEvalClass, bo as isArrMutator, bp as isDefinitelyFalse, bq as isDefinitelyTrue, br as isNudoBreak, bs as isNudoContinue, bt as isNudoReturn, bu as isNudoThrow, bv as litTruth, bw as lookupObjAccessor, bx as namespaceNameOf, by as noteEvalCallRecord, bz as noteEvalFallback, bA as pushLoopExit, bB as pushThrowExit, bC as registerEvalClass, bD as resetEvalCallBudget, bE as runTranspiled, bF as runTranspiledOptionsMemoKey, bG as runWithLoopExits, bH as runtimeImportOf, bI as setEvalAssignCollector, bJ as setEvalBindingSink, bK as setEvalCallCollector, bL as setEvalFallbackCollector, bM as takeLoopExits, bN as takeThrowExits, bO as transpile, bP as transpileBodyNode, bQ as transpileExpression, bR as transpileFile, bS as transpileSource, bT as tryRunTranspiled, bU as withExecPhi } from './index-BNiZvVHw.js';
8
8
 
9
9
  /**
10
10
  * AstEnv:抽象求值环境类型面(ast-eval 删除后保留)。
11
11
  * 类型定义在 hof-types.ts(打破 ast-env ↔ hof ↔ abs-fn 类型环);
12
12
  * 本文件保留空环境 / withVar 的便捷构造并重导出 AstEnv 供稳定路径导入。
13
- * 仍被 B 路径 check / leq / generalize / builtins 消费。
13
+ * 仍被 求值引擎 check / leq / generalize / builtins 消费。
14
14
  */
15
15
 
16
16
  /** 空求值环境(分析宿主用:不带任何绑定) */
@@ -113,7 +113,7 @@ declare function describePhi(): string;
113
113
  * 与 term-registry 同一纪律:不给共享单例挂 impl。
114
114
  */
115
115
 
116
- /** Abs 原生 env/builtin 实现(B-path 优先) */
116
+ /** Abs 原生 env/builtin 实现(evaluator 优先) */
117
117
  type AbsSigImpl = (args: Abs[], thisVal?: Abs) => Abs | undefined;
118
118
  type AbsFnImpl = {
119
119
  params: string[];
@@ -164,7 +164,17 @@ declare function markPureFn(target: object, name: string): void;
164
164
  /** 读纯函数标记(Abs impl 或对象属性 `_memoize`) */
165
165
  declare function pureFnNameOf(fn: unknown): string | undefined;
166
166
  /** 造一个带实现的 Abs 函数值 */
167
- declare function absFunction(params: string[], impl: Omit<AbsFnImpl, "params">): Abs;
167
+ declare function absFunction(params: string[], impl: Omit<AbsFnImpl, "params">, opts?: {
168
+ name?: string;
169
+ paramTypes?: Abs[];
170
+ returnType?: Abs;
171
+ slots?: Record<string, {
172
+ value: Abs;
173
+ optional?: boolean;
174
+ readonly?: boolean;
175
+ }>;
176
+ conf?: Confidence;
177
+ }): Abs;
168
178
  /** relationFn 稳定 fingerprint(同签名共享,见 §3.3 已知限制) */
169
179
  declare function relationFingerprint(paramTypes: Abs[], returnType: Abs): string;
170
180
  /**
@@ -250,7 +260,7 @@ declare function tryPromoteDirectCall(env: AstEnv, calleeName: string, args: Abs
250
260
  * 按方法名提升:map/flatMap → fn([αOf(el)], B:param);filter → fn([αOf(el)], bool);
251
261
  * reduce → fn([αOf(init), αOf(el)], B:param)。
252
262
  */
253
- declare function tryPromoteHofCallback(env: AstEnv, cbName: string, method: string, argAbses: Abs[], loc?: {
263
+ declare function tryPromoteHofCallback(env: AstEnv, cevalName: string, method: string, argAbses: Abs[], loc?: {
254
264
  line: number;
255
265
  column: number;
256
266
  }): Abs | undefined;
@@ -297,7 +307,7 @@ declare function instantiateReturn(fn: Abs, args: Abs[]): Abs;
297
307
  *
298
308
  * 为避免 hof ↔ exec 循环依赖,本函数由宿主在运行时绑定。
299
309
  *
300
- * 依赖说明:宿主在 `exec/call.ts`(B-path `$call` 宿主)加载时注册(副作用)。
310
+ * 依赖说明:宿主在 `exec/call.ts`(evaluator `$call` 宿主)加载时注册(副作用)。
301
311
  * 只 import hof.ts 而未加载 exec/call 时,fallback 仅认 relation/isRelFn。
302
312
  * 与 §5.1 的「禁止全局 collector」不同——这里是无状态委托钩子,不是 run 局部状态。
303
313
  */
@@ -305,7 +315,7 @@ type ApplyCallbackHost = (cb: Abs | {
305
315
  type: string;
306
316
  }, args: Abs[], env: unknown, phi: unknown, budget: unknown) => Abs;
307
317
  /**
308
- * B-path 宿主 `exec/call.ts` 加载时注册(副作用)。
318
+ * evaluator 宿主 `exec/call.ts` 加载时注册(副作用)。
309
319
  * 必须经 `exec/call.ts`(或其依赖方:exec/class、generalize)加载,
310
320
  * 才能启用 Identifier/env.fns/inline body 路径;只 import hof.ts 时 fallback
311
321
  * 仅认 relation/isRelFn。勿在多份实例下各写各的——双包/双副本会覆盖。
@@ -314,7 +324,7 @@ declare function setApplyCallbackHost(fn: ApplyCallbackHost): void;
314
324
  /**
315
325
  * 通用回调实参调用(exec/class invokeArrMethod 与 builtins Array.from 共用):
316
326
  * 原始 JS 函数直调(展开实参);Abs fn 走 applyCallbackAbs(sum 分发/宿主)。
317
- * B 路径 transpile 的箭头回调是 $fnVal Abs——$fnVal.apply 自带调用边界。
327
+ * 求值引擎 transpile 的箭头回调是 $fnVal Abs——$fnVal.apply 自带调用边界。
318
328
  */
319
329
  declare function applyCallbackValue(fn: unknown, args: Abs[], env: unknown, phi: unknown, budget: unknown): Abs;
320
330
  declare function applyCallbackAbs(cb: Abs | {
@@ -410,7 +420,7 @@ declare function shrAbs(a: Abs, b: Abs): Abs;
410
420
  declare function ushrAbs(a: Abs, b: Abs): Abs;
411
421
  /** ** —— 幂(右结合由 AST 保证);负指数 bigint 原生 RangeError → 不可折叠 */
412
422
  declare function powAbs(a: Abs, b: Abs): Abs;
413
- /** 一元 + —— ToNumber 折叠;bigint 原生恒抛 TypeError → 不可折叠 */
423
+ /** 一元 + —— ToNumber 折叠;bigint(含抽象 prim)原生恒抛 TypeError → 硬抛 */
414
424
  declare function toNumberAbs(a: Abs): Abs;
415
425
  /** JS typeof:结果域永远是 string */
416
426
  declare function typeofAbs(a: Abs): Abs;
@@ -510,7 +520,7 @@ declare function evalDateMethod(name: string, _recv: Abs, _args: Abs[]): Abs | u
510
520
  */
511
521
 
512
522
  declare function evalRegExpCtor(args: Abs[]): Abs;
513
- /** RegExp brand:source/flags/lastIndex 进 slots(B-path evalRegExpCtor / $regex 共用) */
523
+ /** RegExp brand:source/flags/lastIndex 进 slots(evaluator evalRegExpCtor / $regex 共用) */
514
524
  declare function regexBrandAbsFrom(pattern: string, flags: string): Abs;
515
525
  /**
516
526
  * new RegExp(pattern, flags) 字面量真构造验证($new 与 evalRegExpCtor 共用):
@@ -635,7 +645,7 @@ declare function stringOfSymbol(a: Abs): Abs;
635
645
  */
636
646
 
637
647
  /**
638
- * Object.prototype 方法语义(B-path $invoke 与 Object.prototype.X.call 共用)。
648
+ * Object.prototype 方法语义(evaluator $invoke 与 Object.prototype.X.call 共用)。
639
649
  * null-proto 接收者无这些方法——返回 undefined(调用方走 TypeError 路径)。
640
650
  * 返回 undefined = 未接管。
641
651
  */
@@ -669,6 +679,13 @@ type Slot = {
669
679
  };
670
680
  /** ES 规范数组下标(无前导零、< 2^32-1);非规范键返回 undefined */
671
681
  declare function canonicalArrayIndex(v: unknown): number | undefined;
682
+ /**
683
+ * ES ToPropertyKey 的字面量折叠:null→"null"、undefined→"undefined"、
684
+ * true/false→"true"/"false"、number/bigint/string → String(v)(ToString)。
685
+ * 必须看 term——litValue 把 lit(undefined) 吞成哨兵 undefined。
686
+ * 抽象 / symbol 返回 undefined(调用方保守处理)。
687
+ */
688
+ declare function propertyKeyOf(a: Abs | undefined): string | undefined;
672
689
  type ObjShape = {
673
690
  k: "obj";
674
691
  slots: Record<string, Slot>;
@@ -852,11 +869,11 @@ declare function leqAbs(src: Abs, tgt: Abs, opts?: {
852
869
 
853
870
  /**
854
871
  * Abs 域记录类型面(ast-eval 执行器删除后保留)。
855
- * 运行时记录由 B 通道(BCallRecord/$assignRecord)产生;此处的类型是
872
+ * 运行时记录由 eval 通道(EvalCallRecord/$assignRecord)产生;此处的类型是
856
873
  * checkSource drift / 结构赋值诊断的共享形状,仍被 check.ts 等消费。
857
874
  */
858
875
 
859
- /** Abs 域调用记录(B 通道 BCallRecord 的同形投影) */
876
+ /** Abs 域调用记录(eval 通道 EvalCallRecord 的同形投影) */
860
877
  type AbsCallRecord = {
861
878
  fnName: string;
862
879
  args: Abs[];
@@ -867,7 +884,7 @@ type AbsCallRecord = {
867
884
  };
868
885
  threw?: boolean;
869
886
  };
870
- /** Abs 域赋值记录(B 通道 $assignRecord 的同形投影) */
887
+ /** Abs 域赋值记录(eval 通道 $assignRecord 的同形投影) */
871
888
  type AbsAssignRecord = {
872
889
  name: string;
873
890
  prev?: Abs;
@@ -1198,4 +1215,4 @@ declare function absToConstraint(a: Abs): NudoConstraint | undefined;
1198
1215
  */
1199
1216
  declare function joinThenProject(absList: Abs[]): NudoConstraint | undefined;
1200
1217
 
1201
- export { Abs, type AbsAssignRecord, type AbsCallRecord, type AbsFnImpl, AbsModuleExports, type AbsSigImpl, AstEnv, type CheckOptions, CheckReport, Confidence, EffectiveInterfaceOpts, type Environment, type ExtState, type FnAbs, type FormalParam, type FormatOptions, HofCollectCtx, HofSite, type LeqResult, type MockHelper, NudoConstraint, OBJECT_PROTO_METHOD_NAMES, type ObjShape, Phi, type PolyFn, Pred, type PropFlags, RelSource, RunTranspiledOptions, Shape, type Slot, Term, type TypeParam, absFunction, absShapeKey, absToConstraint, add, alphaOf, applyCallbackAbs, applyCallbackValue, asAbs, assignSourceSlots, attachFnImpl, beginCollectionFork, betaOf, bitandAbs, bitnotAbs, bitorAbs, bitxorAbs, buildArgsFromAssume, builtinCtorAbs, builtinCtorNameOf, callAbsMethod, canonicalArrayIndex, checkSource, clearCollectionTables, cmp, collectAbsFreeVars, collectionElementJoin, collectionExactLen, contractParamNameSet, createEnvironment, createHofCollectCtx, ctorArgDefinitelyInvalid, ctorNameOfRecv, currentPhi, definitelyNotNullishShape, describePhi, div, drainPromiseMicros, emptyEnv, endCollectionFork, enterPromiseExecutorScope, errorBrandAbs, evalArrayStatic, evalBuiltinInstanceMethod, evalBuiltinNew, evalDateCtor, evalDateMethod, evalDateStatic, evalGlobalFn, evalJsonMethod, evalMathMethod, evalNamespaceCall, evalNumberStatic, evalObjectMethod, evalObjectProtoMethod, evalPromiseCtor, evalPromiseMethod, evalPromiseStatic, evalRegExpCtor, evalRegExpMethod, evalStringStatic, evalSymbolCtor, evictCheckSourceMemoForPaths, evictGeneralizeMemoForPaths, extStateOf, extractFn, falseConstraint, fnOf, formalParamDisplayNames, formalParamsFromNodes, formatAbs, formatAbsMultiline, formatShape, formatShapeSlot, generalizeAll, generalizeFromAst, getAbsProperty, getFnImpl, getGeneralizeMemoSize, getPropFlags, getSlot, hostBuiltinCtorName, instantiateReturn, isErrorCtorName, isMapAbs, isNullProtoObj, isNullishLitAbs, isObj, isObjectProtoBrand, isRelFn, isSetAbs, isSymbolAbs, joinAbs, joinFunctions, joinObjects, joinThenProject, joinValues, leavePromiseExecutorScope, leqAbs, listFunctionNames, literalMeetsConstraint, locateContractParam, looseEqAbs, makeArrayCtorAbs, makeMapAbs, makeSetAbs, makeSum, makeSymbolAbs, mapClearEntries, mapDeleteEntry, mapElementFallback, mapEntriesAbs, mapGetEntry, mapHasEntry, mapSetEntry, mapSizeAbs, mapValuesAbs, markExtState, markNullProtoObj, markPureFn, matchRelIdentLit, mergeCollectionArms, migrateInvariants, migrateNullProto, mock, mod, mul, negAbs, notAbs, noteCollectionWrite, notePromiseExecutorFork, objOf, objectProtoBrand, objectProtoMethodAbs, parseSource, popCollectionArm, popPhi, powAbs, projectFlatMapResult, promoteParamShape, protoBrandAbs, protoOfRecv, pureFnNameOf, pushCollectionArm, pushPhi, queuePromiseMicro, refineAbsForRelTrue, regexBrandAbsFrom, relationFingerprint, relationFn, requiredFnArity, resetCheckSourceMemo, resetGeneralizeMemo, resetPhi, setAddEntry, setApplyCallbackHost, setClearEntries, setDeleteEntry, setElementsAbs, setHasEntry, setPropFlags, setSizeAbs, shapeOnlyFn, shlAbs, shrAbs, snapshotAbs, spread, spy, strictEqAbs, stringOfSymbol, stripTypes, stub, sub, substAbs, substPredAbs, symbolDescriptionAbs, symbolIdOf, toNumberAbs, trueConstraint, tryMakeRegexAbs, tryPromoteDirectCall, tryPromoteForOfIteratee, tryPromoteHofCallback, tryPromoteReceiverAsArr, typeofAbs, undefAbs, ushrAbs, withPhiConstraint, withVar };
1218
+ export { Abs, type AbsAssignRecord, type AbsCallRecord, type AbsFnImpl, AbsModuleExports, type AbsSigImpl, AstEnv, type CheckOptions, CheckReport, Confidence, EffectiveInterfaceOpts, type Environment, type ExtState, type FnAbs, type FormalParam, type FormatOptions, HofCollectCtx, HofSite, type LeqResult, type MockHelper, NudoConstraint, OBJECT_PROTO_METHOD_NAMES, type ObjShape, Phi, type PolyFn, Pred, type PropFlags, RelSource, RunTranspiledOptions, Shape, type Slot, Term, type TypeParam, absFunction, absShapeKey, absToConstraint, add, alphaOf, applyCallbackAbs, applyCallbackValue, asAbs, assignSourceSlots, attachFnImpl, beginCollectionFork, betaOf, bitandAbs, bitnotAbs, bitorAbs, bitxorAbs, buildArgsFromAssume, builtinCtorAbs, builtinCtorNameOf, callAbsMethod, canonicalArrayIndex, checkSource, clearCollectionTables, cmp, collectAbsFreeVars, collectionElementJoin, collectionExactLen, contractParamNameSet, createEnvironment, createHofCollectCtx, ctorArgDefinitelyInvalid, ctorNameOfRecv, currentPhi, definitelyNotNullishShape, describePhi, div, drainPromiseMicros, emptyEnv, endCollectionFork, enterPromiseExecutorScope, errorBrandAbs, evalArrayStatic, evalBuiltinInstanceMethod, evalBuiltinNew, evalDateCtor, evalDateMethod, evalDateStatic, evalGlobalFn, evalJsonMethod, evalMathMethod, evalNamespaceCall, evalNumberStatic, evalObjectMethod, evalObjectProtoMethod, evalPromiseCtor, evalPromiseMethod, evalPromiseStatic, evalRegExpCtor, evalRegExpMethod, evalStringStatic, evalSymbolCtor, evictCheckSourceMemoForPaths, evictGeneralizeMemoForPaths, extStateOf, extractFn, falseConstraint, fnOf, formalParamDisplayNames, formalParamsFromNodes, formatAbs, formatAbsMultiline, formatShape, formatShapeSlot, generalizeAll, generalizeFromAst, getAbsProperty, getFnImpl, getGeneralizeMemoSize, getPropFlags, getSlot, hostBuiltinCtorName, instantiateReturn, isErrorCtorName, isMapAbs, isNullProtoObj, isNullishLitAbs, isObj, isObjectProtoBrand, isRelFn, isSetAbs, isSymbolAbs, joinAbs, joinFunctions, joinObjects, joinThenProject, joinValues, leavePromiseExecutorScope, leqAbs, listFunctionNames, literalMeetsConstraint, locateContractParam, looseEqAbs, makeArrayCtorAbs, makeMapAbs, makeSetAbs, makeSum, makeSymbolAbs, mapClearEntries, mapDeleteEntry, mapElementFallback, mapEntriesAbs, mapGetEntry, mapHasEntry, mapSetEntry, mapSizeAbs, mapValuesAbs, markExtState, markNullProtoObj, markPureFn, matchRelIdentLit, mergeCollectionArms, migrateInvariants, migrateNullProto, mock, mod, mul, negAbs, notAbs, noteCollectionWrite, notePromiseExecutorFork, objOf, objectProtoBrand, objectProtoMethodAbs, parseSource, popCollectionArm, popPhi, powAbs, projectFlatMapResult, promoteParamShape, propertyKeyOf, protoBrandAbs, protoOfRecv, pureFnNameOf, pushCollectionArm, pushPhi, queuePromiseMicro, refineAbsForRelTrue, regexBrandAbsFrom, relationFingerprint, relationFn, requiredFnArity, resetCheckSourceMemo, resetGeneralizeMemo, resetPhi, setAddEntry, setApplyCallbackHost, setClearEntries, setDeleteEntry, setElementsAbs, setHasEntry, setPropFlags, setSizeAbs, shapeOnlyFn, shlAbs, shrAbs, snapshotAbs, spread, spy, strictEqAbs, stringOfSymbol, stripTypes, stub, sub, substAbs, substPredAbs, symbolDescriptionAbs, symbolIdOf, toNumberAbs, trueConstraint, tryMakeRegexAbs, tryPromoteDirectCall, tryPromoteForOfIteratee, tryPromoteHofCallback, tryPromoteReceiverAsArr, typeofAbs, undefAbs, ushrAbs, withPhiConstraint, withVar };