@nudojs/core 1.2.0 → 1.3.0

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.
package/dist/exec.js CHANGED
@@ -80,6 +80,7 @@ import {
80
80
  $rethrowIfNudoReturn,
81
81
  $set,
82
82
  $setKey,
83
+ $setProto,
83
84
  $shl,
84
85
  $shr,
85
86
  $spread,
@@ -91,6 +92,7 @@ import {
91
92
  $thisSet,
92
93
  $throw,
93
94
  $toNumber,
95
+ $toNumeric,
94
96
  $tryCurrentMark,
95
97
  $tryDetachSoftCatch,
96
98
  $tryDigestSoftCatch,
@@ -103,6 +105,8 @@ import {
103
105
  $tryTakeSince,
104
106
  $typeof,
105
107
  $unknown,
108
+ $updateAdd,
109
+ $updateSub,
106
110
  $ushr,
107
111
  $while,
108
112
  $whileSeq,
@@ -123,12 +127,16 @@ import {
123
127
  clearBClasses,
124
128
  clearStaleTermPred,
125
129
  currentExecPhi,
130
+ enterEvalCallBudgetSession,
126
131
  evalExprAbs,
132
+ exitEvalCallBudgetSession,
127
133
  fillTuple,
128
134
  foldRequireSpecArg,
129
135
  foldStaticStringExpr,
136
+ getEvalCallBudgetState,
130
137
  getEvalCallCollector,
131
138
  getEvalClass,
139
+ getEvalFallbackStats,
132
140
  isArrMutator,
133
141
  isDefinitelyFalse,
134
142
  isDefinitelyTrue,
@@ -145,6 +153,7 @@ import {
145
153
  pushThrowExit,
146
154
  registerEvalClass,
147
155
  resetEvalCallBudget,
156
+ resetEvalFallbackStats,
148
157
  runTranspiled,
149
158
  runTranspiledOptionsMemoKey,
150
159
  runWithLoopExits,
@@ -161,8 +170,9 @@ import {
161
170
  transpileFile,
162
171
  transpileSource,
163
172
  tryRunTranspiled,
173
+ withEvalBudgetOverride,
164
174
  withExecPhi
165
- } from "./chunk-WB565PQK.js";
175
+ } from "./chunk-CKH6GQAI.js";
166
176
  export {
167
177
  $add,
168
178
  $arguments,
@@ -244,6 +254,7 @@ export {
244
254
  $rethrowIfNudoReturn,
245
255
  $set,
246
256
  $setKey,
257
+ $setProto,
247
258
  $shl,
248
259
  $shr,
249
260
  $spread,
@@ -255,6 +266,7 @@ export {
255
266
  $thisSet,
256
267
  $throw,
257
268
  $toNumber,
269
+ $toNumeric,
258
270
  $tryCurrentMark,
259
271
  $tryDetachSoftCatch,
260
272
  $tryDigestSoftCatch,
@@ -267,6 +279,8 @@ export {
267
279
  $tryTakeSince,
268
280
  $typeof,
269
281
  $unknown,
282
+ $updateAdd,
283
+ $updateSub,
270
284
  $ushr,
271
285
  $while,
272
286
  $whileSeq,
@@ -287,12 +301,16 @@ export {
287
301
  clearBClasses,
288
302
  clearStaleTermPred,
289
303
  currentExecPhi,
304
+ enterEvalCallBudgetSession,
290
305
  evalExprAbs,
306
+ exitEvalCallBudgetSession,
291
307
  fillTuple,
292
308
  foldRequireSpecArg,
293
309
  foldStaticStringExpr,
310
+ getEvalCallBudgetState,
294
311
  getEvalCallCollector,
295
312
  getEvalClass,
313
+ getEvalFallbackStats,
296
314
  isArrMutator,
297
315
  isDefinitelyFalse,
298
316
  isDefinitelyTrue,
@@ -309,6 +327,7 @@ export {
309
327
  pushThrowExit,
310
328
  registerEvalClass,
311
329
  resetEvalCallBudget,
330
+ resetEvalFallbackStats,
312
331
  runTranspiled,
313
332
  runTranspiledOptionsMemoKey,
314
333
  runWithLoopExits,
@@ -325,5 +344,6 @@ export {
325
344
  transpileFile,
326
345
  transpileSource,
327
346
  tryRunTranspiled,
347
+ withEvalBudgetOverride,
328
348
  withExecPhi
329
349
  };
package/dist/index.d.ts CHANGED
@@ -1,10 +1,9 @@
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-COqDeD5F.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-COqDeD5F.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, G as HofSite, I as AbsModuleExports, J as RunTranspiledOptions } from './run-Dk08Q5zl.js';
2
+ export { K as $assignRecord, L as $callNamed, N as $recordBinding, O as EvalAbsAssignRecord, Q as EvalCallRecord, U as EvalFallback, V as ImplicationOracle, W as LiteralValue, X as MAX_EVAL_CALL_DEPTH, Y as MAX_EVAL_TOTAL_CALLS, P as PrimName, Z as RUNTIME_IMPORT_RE, _ as TYPEOF_NAMES, a0 as TranspiledCallResult, a1 as TypeofName, a2 as abs, a3 as absToString, a4 as and, a5 as anyAbs, a6 as anyVar, a7 as app, a8 as assumeFinite, a9 as bigintLit, aa as bindImports, ab as bindingsOf, ac as bool, ad as boolLit, ae as callTranspiledExport, af as callTranspiledExportFull, ag as collectAbsExports, ah as confJoin, ai as emptyPhi, aj as eq, ak as evalExprAbs, al as ge, am as geNum, an as getEvalCallCollector, ao as getImplicationOracle, ap as gt, aq as gtNum, ar as implies, as as isBigPrim, at as isExactLit, au as isNumPrim, av as isStrPrim, aw as le, ax as leNum, ay as lit, az as litValue, aA as lt, aB as ltNum, aC as namespaceAbsOf, aD as ne, aE as negatePred, aF as never, aG as not, aH as noteEvalCallRecord, aI as noteEvalFallback, aJ as num, aK as numLit, aL as numVar, aM as obj, aN as or, aO as pFalse, aP as pTrue, aQ as phiAnd, aR as predEquals, aS as predToString, aT as predVars, aU as primToTypeof, aV as ptypeof, aW as resetEvalCallBudget, aX as runTranspiled, aY as runTranspiledOptionsMemoKey, aZ as setEvalAssignCollector, a_ as setEvalBindingSink, a$ as setEvalCallCollector, b0 as setEvalFallbackCollector, b1 as setImplicationOracle, b2 as shapeOfTerm, b3 as shapeToString, b4 as simplifyTerm, b5 as str, b6 as strLit, b7 as substPred, b8 as termEquals, b9 as termToString, ba as tryRunTranspiled, bb as unknown, bc as v } from './run-Dk08Q5zl.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-TEOZ4cPZ.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-TEOZ4cPZ.js';
6
- import { A as AbsModuleExports, R as RunTranspiledOptions } from './index-DMjMPLV0.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 DEFAULT_MAX_LOOP_ITERS, aU as EvalAbsAssignRecord, aV as EvalCallRecord, aW as EvalClassSpec, aX as EvalFallback, aY as MAX_EVAL_CALL_DEPTH, aZ as MAX_EVAL_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 getEvalCallCollector, bk as getEvalClass, 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 noteEvalCallRecord, bw as noteEvalFallback, bx as pushLoopExit, by as pushThrowExit, bz as registerEvalClass, bA as resetEvalCallBudget, bB as runTranspiled, bC as runTranspiledOptionsMemoKey, bD as runWithLoopExits, bE as runtimeImportOf, bF as setEvalAssignCollector, bG as setEvalBindingSink, bH as setEvalCallCollector, bI as setEvalFallbackCollector, 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-DMjMPLV0.js';
4
+ import { p as parseSource, L as LeakBudget, E as EffectiveInterfaceOpts, b as LoadDepsFingerprint, j as CheckReport, N as NudoConstraint } from './check-report-BWmfy810.js';
5
+ export { k as CheckAction, C as CheckIssue, o as CheckJson, q as CheckJsonMulti, u as ConstraintBuilder, D as Diagnostic, v as EffectiveInterface, G as GitlabCodeQualityIssue, w as InterfaceDiag, I as InterfaceSource, x as InterfaceTierInfo, a as InterfaceTierOpts, y as NamedImport, z as NudoField, A as NudoFnConstraint, B as NudoSidecarError, F as NudoSig, R as RefineDiag, H as RefineEntry, J as RefineResolveOpts, S as SELF, K as actionsForIssue, O as andC, P as any, Q as array, T as boolean, U as checkArg, V as checkCall, W as constraintAdmitsNullish, X as constraintToEntryAbs, Y as drainPromiseMicros, Z as effectiveInterface, _ as enterPromiseExecutorScope, $ as evalPromiseCtor, a0 as evalPromiseMethod, a1 as evalPromiseStatic, a2 as execNudoModule, a3 as extractDeclaredThrows, a4 as extractFnBudget, a5 as extractNudoImports, a6 as extractRefineReturnFromSource, a7 as extractRefinesFromSource, a8 as fn, a9 as fnConstraintToEntryReqs, aa as formatCheckReport, ab as formatConstraint, ac as formatDiagnostics, ad as formatEffectiveInterfaceDisplay, ae as formatGithubAnnotations, af as formatGitlabCodeQuality, ag as formatInterfaceTierLine, ah as generatedExportNames, ai as getParseSourceCacheSize, aj as getTerm, ak as instantiateConstraint, al as interfaceDiagCount, am as interfaceSourceOf, an as interfaceTierOf, ao as isIntFlag, ap as isNodeModulesPath, aq as isNudoConstraint, ar as leavePromiseExecutorScope, as as lenTerm, at as litC, au as localNamedExports, av as notePromiseExecutorFork, aw as nullable, ax as number, ay as omit, az as partial, aA as pick, aB as queuePromiseMicro, aC as refineDiagCount, aD as refineToIndexedFull, aE as resetNudoModuleExecCache, aF as resetParseSourceCache, aG as resetSidecarLoadFailureCache, aH as serializeCheckJson, aI as serializeCheckJsonMulti, aJ as setInterfaceDiagCollector, aK as setRefineDiagCollector, aL as shape, aM as sidecarClosureFingerprint, aN as sidecarPathOf, aO as string, aP as takeInterfaceDiags, aQ as takeInterfaceDiagsSince, aR as takeRefineDiags, aS as takeRefineDiagsSince, aT as throwConstraintToKinds, aU as union } from './check-report-BWmfy810.js';
6
+ export { $add, $arguments, $arr, $arrMutContainer, $arrRest, $arrWithHoles, $async, $asyncReturn, $await, $bitand, $bitnot, $bitor, $bitxor, $call, $catchVal, $class, $classExpr, $collectionForEach, $concat, $copy, $del, $delRes, $div, $dynamicImport, $elems, $eq, $eqLoose, $fnVal, $for, $forInKeys, $forIter, $forOf, $fork, $ge, $gen, $get, $gt, $idx, $idxSet, $importMeta, $in, $instanceof, $instanceofNonIdent, $invoke, $invokeSuper, $isBreakTo, $isForkExit, $join, $le, $len, $lit, $loopBreak, $loopContinue, $loopReturn, $lt, $mod, $mul, $ne, $neLoose, $neg, $new, $not, $nullishTest, $obj, $objAccessor, $objRest, $optionalGet, $optionalInvoke, $orDefault, $pow, $pushLoopExit, $rawThis, $reStateCall, $regex, $rethrowIfNudoReturn, $set, $setKey, $shl, $shr, $spread, $staticInvoke, $sub, $super, $switch, $thisGet, $thisSet, $throw, $toNumber, $toNumeric, $tryCurrentMark, $tryDetachSoftCatch, $tryDigestSoftCatch, $tryDiscardSoft, $tryMark, $tryOrphanSoft, $tryPopMark, $tryReleaseSoftCatch, $tryReleaseSoftOut, $tryTakeSince, $typeof, $unknown, $updateAdd, $updateSub, $ushr, $while, $whileSeq, $yield, DEFAULT_MAX_LOOP_ITERS, EvalClassSpec, NudoLoopSignal, NudoReturn, NudoThrow, NudoUnsupportedError, TranspileOptions, asAbsVal, callAtFunctionBoundary, clearBClasses, clearStaleTermPred, currentExecPhi, fillTuple, foldRequireSpecArg, foldStaticStringExpr, getEvalClass, isArrMutator, isDefinitelyFalse, isDefinitelyTrue, isNudoBreak, isNudoContinue, isNudoReturn, isNudoThrow, litTruth, lookupObjAccessor, namespaceNameOf, pushLoopExit, pushThrowExit, registerEvalClass, runWithLoopExits, runtimeImportOf, takeLoopExits, takeThrowExits, transpile, transpileBodyNode, transpileExpression, transpileFile, transpileSource, withExecPhi } from './exec.js';
8
7
 
9
8
  /**
10
9
  * AstEnv:抽象求值环境类型面(ast-eval 删除后保留)。
@@ -164,7 +163,17 @@ declare function markPureFn(target: object, name: string): void;
164
163
  /** 读纯函数标记(Abs impl 或对象属性 `_memoize`) */
165
164
  declare function pureFnNameOf(fn: unknown): string | undefined;
166
165
  /** 造一个带实现的 Abs 函数值 */
167
- declare function absFunction(params: string[], impl: Omit<AbsFnImpl, "params">): Abs;
166
+ declare function absFunction(params: string[], impl: Omit<AbsFnImpl, "params">, opts?: {
167
+ name?: string;
168
+ paramTypes?: Abs[];
169
+ returnType?: Abs;
170
+ slots?: Record<string, {
171
+ value: Abs;
172
+ optional?: boolean;
173
+ readonly?: boolean;
174
+ }>;
175
+ conf?: Confidence;
176
+ }): Abs;
168
177
  /** relationFn 稳定 fingerprint(同签名共享,见 §3.3 已知限制) */
169
178
  declare function relationFingerprint(paramTypes: Abs[], returnType: Abs): string;
170
179
  /**
@@ -410,7 +419,7 @@ declare function shrAbs(a: Abs, b: Abs): Abs;
410
419
  declare function ushrAbs(a: Abs, b: Abs): Abs;
411
420
  /** ** —— 幂(右结合由 AST 保证);负指数 bigint 原生 RangeError → 不可折叠 */
412
421
  declare function powAbs(a: Abs, b: Abs): Abs;
413
- /** 一元 + —— ToNumber 折叠;bigint 原生恒抛 TypeError → 不可折叠 */
422
+ /** 一元 + —— ToNumber 折叠;bigint(含抽象 prim)原生恒抛 TypeError → 硬抛 */
414
423
  declare function toNumberAbs(a: Abs): Abs;
415
424
  /** JS typeof:结果域永远是 string */
416
425
  declare function typeofAbs(a: Abs): Abs;
@@ -484,7 +493,8 @@ declare function evalJsonMethod(name: string, args: Abs[]): Abs | undefined;
484
493
  declare function evalNumberStatic(name: string, args: Abs[]): Abs | undefined;
485
494
 
486
495
  /**
487
- * 全局转换函数(parseInt / Number / String / Boolean / Object / Array / Symbol …)
496
+ * 全局转换函数(parseInt / Number / String / Boolean / Object / Array / Symbol / BigInt …)
497
+ * 以及无 `new` 的原生构造器调用(Error 家族 / Map / Set / Promise …)。
488
498
  */
489
499
 
490
500
  declare function evalGlobalFn(name: string, args: Abs[]): Abs | undefined;
@@ -550,27 +560,6 @@ declare const OBJECT_PROTO_METHOD_NAMES: Set<string>;
550
560
  declare function objectProtoBrand(): Abs;
551
561
  declare function isObjectProtoBrand(a: Abs | undefined): boolean;
552
562
 
553
- /**
554
- * Promise 构造 / then 链 / 静态方法 + micro 队列
555
- */
556
-
557
- declare function enterPromiseExecutorScope(): void;
558
- declare function leavePromiseExecutorScope(): number;
559
- /** $fork 在 executor 内发生时打点(多臂 resolve 需 join,不得 first-wins 假精确) */
560
- declare function notePromiseExecutorFork(): void;
561
- declare function queuePromiseMicro(task: () => void): void;
562
- declare function drainPromiseMicros(): void;
563
- /**
564
- * new Promise(executor):调用 executor(resolve, reject),收集 resolve 实参作为
565
- * promise inner。原生只认第一次 settle——顺序双 resolve 取第一次;执行器内
566
- * $fork 分叉时各臂 settle 值 join(路径敏感,不得 first-wins 假精确)。
567
- * reject 不填 resolved 通道;永不 settle / 抽象 fn / 执行抛 → promise<unknown>。
568
- */
569
- declare function evalPromiseCtor(args: Abs[]): Abs;
570
- /** then/catch/finally:可映射回调 → 新 inner;做不到诚实 promise<unknown> */
571
- declare function evalPromiseMethod(name: string, recv: Abs, args: Abs[]): Abs | undefined;
572
- declare function evalPromiseStatic(name: string, args: Abs[]): Abs | undefined;
573
-
574
563
  /**
575
564
  * Error 家族 + evalBuiltinNew / evalBuiltinInstanceMethod + namespace 分派
576
565
  */
@@ -669,6 +658,13 @@ type Slot = {
669
658
  };
670
659
  /** ES 规范数组下标(无前导零、< 2^32-1);非规范键返回 undefined */
671
660
  declare function canonicalArrayIndex(v: unknown): number | undefined;
661
+ /**
662
+ * ES ToPropertyKey 的字面量折叠:null→"null"、undefined→"undefined"、
663
+ * true/false→"true"/"false"、number/bigint/string → String(v)(ToString)。
664
+ * 必须看 term——litValue 把 lit(undefined) 吞成哨兵 undefined。
665
+ * 抽象 / symbol 返回 undefined(调用方保守处理)。
666
+ */
667
+ declare function propertyKeyOf(a: Abs | undefined): string | undefined;
672
668
  type ObjShape = {
673
669
  k: "obj";
674
670
  slots: Record<string, Slot>;
@@ -951,6 +947,12 @@ type AstParam = {
951
947
  declare function formalParamsFromNodes(params: AstParam[] | undefined | null): FormalParam[];
952
948
  /** 求值/签名用形参名(与 analyzer extractParamNames / dts 对齐) */
953
949
  declare function formalParamDisplayNames(formals: FormalParam[]): string[];
950
+ /**
951
+ * 签名展示名(C4.1 #64):解构形参渲染为 `{ grade, findings }`,
952
+ * 不落回求值占位 `_p0`——否则读签名的人以为没有契约。
953
+ * 求值/内部键仍用 formalParamDisplayNames(`_p0`)。
954
+ */
955
+ declare function formalParamSignatureNames(formals: FormalParam[]): string[];
954
956
  /** 侧车契约可绑定的参数名全集 */
955
957
  declare function contractParamNameSet(formals: FormalParam[]): Set<string>;
956
958
  /**
@@ -1198,4 +1200,4 @@ declare function absToConstraint(a: Abs): NudoConstraint | undefined;
1198
1200
  */
1199
1201
  declare function joinThenProject(absList: Abs[]): NudoConstraint | undefined;
1200
1202
 
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 };
1203
+ 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, emptyEnv, endCollectionFork, errorBrandAbs, evalArrayStatic, evalBuiltinInstanceMethod, evalBuiltinNew, evalDateCtor, evalDateMethod, evalDateStatic, evalGlobalFn, evalJsonMethod, evalMathMethod, evalNamespaceCall, evalNumberStatic, evalObjectMethod, evalObjectProtoMethod, evalRegExpCtor, evalRegExpMethod, evalStringStatic, evalSymbolCtor, evictCheckSourceMemoForPaths, evictGeneralizeMemoForPaths, extStateOf, extractFn, falseConstraint, fnOf, formalParamDisplayNames, formalParamSignatureNames, 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, 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, objOf, objectProtoBrand, objectProtoMethodAbs, parseSource, popCollectionArm, popPhi, powAbs, projectFlatMapResult, promoteParamShape, propertyKeyOf, protoBrandAbs, protoOfRecv, pureFnNameOf, pushCollectionArm, pushPhi, 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 };