@nudojs/core 1.16.0 → 1.17.1

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
@@ -1,4 +1,4 @@
1
- import "./chunk-US532PZA.js";
1
+ import "./chunk-II73GZOY.js";
2
2
  import {
3
3
  $absVal,
4
4
  $add,
@@ -8,8 +8,9 @@ import {
8
8
  $arrRest,
9
9
  $arrWithHoles,
10
10
  $assignRecord,
11
+ $assumeAnchor,
11
12
  $async,
12
- $asyncReturn,
13
+ $asyncGen,
13
14
  $await,
14
15
  $bitand,
15
16
  $bitnot,
@@ -17,6 +18,7 @@ import {
17
18
  $bitxor,
18
19
  $call,
19
20
  $callNamed,
21
+ $catchReturn,
20
22
  $catchVal,
21
23
  $class,
22
24
  $classExpr,
@@ -34,7 +36,6 @@ import {
34
36
  $fnVal,
35
37
  $for,
36
38
  $forInKeys,
37
- $forIter,
38
39
  $forOf,
39
40
  $fork,
40
41
  $ge,
@@ -61,6 +62,7 @@ import {
61
62
  $le,
62
63
  $len,
63
64
  $lit,
65
+ $litTruth,
64
66
  $loopBreak,
65
67
  $loopContinue,
66
68
  $loopReturn,
@@ -107,15 +109,13 @@ import {
107
109
  $shl,
108
110
  $shr,
109
111
  $spread,
110
- $staticInit,
111
- $staticInvoke,
112
112
  $staticSuperInvoke,
113
113
  $sub,
114
114
  $super,
115
115
  $switch,
116
- $thisGet,
117
- $thisSet,
118
116
  $throw,
117
+ $throwConstAssign,
118
+ $throwFreeArguments,
119
119
  $toNumber,
120
120
  $toNumeric,
121
121
  $tpl,
@@ -134,7 +134,6 @@ import {
134
134
  $updateAdd,
135
135
  $updateSub,
136
136
  $ushr,
137
- $while,
138
137
  $whileSeq,
139
138
  $yield,
140
139
  $yieldStar,
@@ -209,7 +208,7 @@ import {
209
208
  withAssumePremises,
210
209
  withEvalBudgetOverride,
211
210
  withExecPhi
212
- } from "./chunk-OM6SAY2M.js";
211
+ } from "./chunk-CUFP2AYV.js";
213
212
  export {
214
213
  $absVal,
215
214
  $add,
@@ -219,8 +218,9 @@ export {
219
218
  $arrRest,
220
219
  $arrWithHoles,
221
220
  $assignRecord,
221
+ $assumeAnchor,
222
222
  $async,
223
- $asyncReturn,
223
+ $asyncGen,
224
224
  $await,
225
225
  $bitand,
226
226
  $bitnot,
@@ -228,6 +228,7 @@ export {
228
228
  $bitxor,
229
229
  $call,
230
230
  $callNamed,
231
+ $catchReturn,
231
232
  $catchVal,
232
233
  $class,
233
234
  $classExpr,
@@ -245,7 +246,6 @@ export {
245
246
  $fnVal,
246
247
  $for,
247
248
  $forInKeys,
248
- $forIter,
249
249
  $forOf,
250
250
  $fork,
251
251
  $ge,
@@ -272,6 +272,7 @@ export {
272
272
  $le,
273
273
  $len,
274
274
  $lit,
275
+ $litTruth,
275
276
  $loopBreak,
276
277
  $loopContinue,
277
278
  $loopReturn,
@@ -318,15 +319,13 @@ export {
318
319
  $shl,
319
320
  $shr,
320
321
  $spread,
321
- $staticInit,
322
- $staticInvoke,
323
322
  $staticSuperInvoke,
324
323
  $sub,
325
324
  $super,
326
325
  $switch,
327
- $thisGet,
328
- $thisSet,
329
326
  $throw,
327
+ $throwConstAssign,
328
+ $throwFreeArguments,
330
329
  $toNumber,
331
330
  $toNumeric,
332
331
  $tpl,
@@ -345,7 +344,6 @@ export {
345
344
  $updateAdd,
346
345
  $updateSub,
347
346
  $ushr,
348
- $while,
349
347
  $whileSeq,
350
348
  $yield,
351
349
  $yieldStar,
package/dist/index.d.ts CHANGED
@@ -1,9 +1,9 @@
1
- import { d as AstEnv, A as Abs, b as Phi, T as Term, Q as HofCollectCtx, C as Confidence, S as Shape, a as Pred, U as RelSource, V as HofSite, c as AbsModuleExports, R as RunTranspiledOptions, L as LiteralValue } from './run-T9HWTziZ.js';
2
- export { W as $assignRecord, X as $call, Y as $callNamed, Z as $recordBinding, _ as AbsApplyNoThrow, a0 as AbsApplyNoThrowFn, a1 as AbsApplyResult, a2 as AbsApplyReturn, a3 as AbsFnImpl, a4 as AbsSigImpl, a5 as EvalAbsAssignRecord, a6 as EvalCallRecord, a7 as EvalFallback, a8 as EvalPosRecord, a9 as ImplicationOracle, aa as LitValueResult, ab as MAX_EVAL_CALL_DEPTH, ac as MAX_EVAL_TOTAL_CALLS, P as PrimName, ad as RUNTIME_IMPORT_RE, ae as TYPEOF_NAMES, af as TranspiledCallResult, ag as TypeofName, ah as abs, ai as absFunction, aj as absOnly, ak as absToString, al as and, am as anyAbs, an as anyVar, ao as app, ap as assumeFinite, aq as attachFnImpl, ar as bigintLit, as as bindImports, at as bindingsOf, au as bool, av as boolLit, aw as callTranspiledExport, ax as callTranspiledExportApply, ay as callTranspiledExportFull, az as collectAbsExports, aA as confJoin, aB as emptyPhi, aC as eq, aD as evalExprAbs, aE as ge, aF as geNum, aG as getEvalCallCollector, aH as getFnImpl, aI as getImplicationOracle, aJ as gt, aK as gtNum, aL as hostFnCtorFacet, aM as implies, aN as isAbsApplyResult, aO as isAbsVal, aP as isBigPrim, aQ as isCjsMainRun, aR as isExactLit, aS as isNumPrim, aT as isStrPrim, aU as le, aV as leNum, aW as lit, aX as litValue, aY as lt, aZ as ltNum, a_ as makeAbsApplyResult, a$ as markPureFn, b0 as namespaceAbsOf, b1 as ne, b2 as negatePred, b3 as never, b4 as not, b5 as noteEvalCallRecord, b6 as noteEvalFallback, b7 as num, b8 as numLit, b9 as numVar, ba as obj, bb as or, bc as pFalse, bd as pTrue, be as phiAnd, bf as predEquals, bg as predToString, bh as predVars, bi as primToTypeof, bj as ptypeof, bk as pureFnNameOf, bl as relationFingerprint, bm as relationFn, bn as resetEvalCallBudget, bo as runTranspiled, bp as runTranspiledOptionsMemoKey, bq as setEvalAssignCollector, br as setEvalBindingSink, bs as setEvalCallCollector, bt as setEvalFallbackCollector, bu as setImplicationOracle, bv as setPosCollector, bw as shapeOfTerm, bx as shapeOnlyFn, by as shapeToString, bz as simplifyTerm, bA as str, bB as strLit, bC as substPred, bD as termEquals, bE as termToString, bF as tryRunTranspiled, bG as unknown, bH as v } from './run-T9HWTziZ.js';
1
+ import { d as AstEnv, A as Abs, C as Confidence, a as Pred, b as Phi, S as Shape, Q as RelSource, U as HofSite, c as AbsModuleExports, R as RunTranspiledOptions, L as LiteralValue } from './run-DeKkteRZ.js';
2
+ export { V as $assignRecord, W as $call, X as $callNamed, Y as $recordBinding, Z as AbsApplyNoThrow, _ as AbsApplyNoThrowFn, a0 as AbsApplyResult, a1 as AbsApplyReturn, a2 as AbsFnImpl, a3 as AbsSigImpl, a4 as EvalAbsAssignRecord, a5 as EvalCallRecord, a6 as EvalFallback, a7 as EvalPosRecord, a8 as ImplicationOracle, a9 as LitValueResult, aa as MAX_EVAL_CALL_DEPTH, ab as MAX_EVAL_TOTAL_CALLS, P as PrimName, ac as TYPEOF_NAMES, T as Term, ad as TranspiledCallResult, ae as TypeofName, af as abs, ag as absFunction, ah as absOnly, ai as absToString, aj as and, ak as anyAbs, al as anyVar, am as app, an as assumeFinite, ao as attachFnImpl, ap as bigintLit, aq as bindImports, ar as bindingsOf, as as bool, at as boolLit, au as callTranspiledExport, av as callTranspiledExportApply, aw as callTranspiledExportFull, ax as collectAbsExports, ay as confJoin, az as emptyPhi, aA as eq, aB as evalExprAbs, aC as ge, aD as geNum, aE as getEvalCallCollector, aF as getFnImpl, aG as getImplicationOracle, aH as gt, aI as gtNum, aJ as hostFnCtorFacet, aK as implies, aL as isAbsApplyResult, aM as isAbsVal, aN as isBigPrim, aO as isCjsMainRun, aP as isExactLit, aQ as isNumPrim, aR as isStrPrim, aS as le, aT as leNum, aU as lit, aV as litValue, aW as lt, aX as ltNum, aY as makeAbsApplyResult, aZ as markPureFn, a_ as namespaceAbsOf, a$ as ne, b0 as negatePred, b1 as never, b2 as not, b3 as noteEvalCallRecord, b4 as noteEvalFallback, b5 as num, b6 as numLit, b7 as numVar, b8 as obj, b9 as or, ba as pFalse, bb as pTrue, bc as phiAnd, bd as predEquals, be as predToString, bf as predVars, bg as primToTypeof, bh as ptypeof, bi as pureFnNameOf, bj as relationFingerprint, bk as relationFn, bl as resetEvalCallBudget, bm as runTranspiled, bn as runTranspiledOptionsMemoKey, bo as setEvalAssignCollector, bp as setEvalBindingSink, bq as setEvalCallCollector, br as setEvalFallbackCollector, bs as setImplicationOracle, bt as setPosCollector, bu as shapeOfTerm, bv as shapeOnlyFn, bw as shapeToString, bx as simplifyTerm, by as str, bz as strLit, bA as substPred, bB as termEquals, bC as termToString, bD as tryRunTranspiled, bE as unknown, bF as v } from './run-DeKkteRZ.js';
3
3
  import { Node, File } from '@babel/types';
4
- import { p as parseSource, L as LeakBudget, E as EffectiveInterfaceOpts, b as LoadDepsFingerprint, w as CheckReport, N as NudoConstraint, c as ProjectionBudget } from './projection-budget-DW-svmIf.js';
5
- export { x as CONSTRAINT_BUILDERS, y as CONSTRAINT_BUILDER_NAMES, z as CONSTRAINT_EXPR_RE, A as CheckAction, C as CheckIssue, B as CheckJson, D as CheckJsonMulti, F as ConstraintBuilder, G as Diagnostic, H as EffectiveInterface, J as GitlabCodeQualityIssue, K as INTERFACE_SOURCE_ABBR, O as InterfaceDiag, I as InterfaceSource, Q as InterfaceTierInfo, a as InterfaceTierOpts, R as NamedImport, S as NudoField, T as NudoFnConstraint, U as NudoSidecarError, V as NudoSig, W as RefineDiag, X as RefineEntry, Y as RefineResolveOpts, Z as SELF, _ as actionsForIssue, $ as andC, a0 as any, a1 as array, a2 as boolean, a3 as checkArg, a4 as checkCall, a5 as constraintAdmitsNullish, a6 as constraintToEntryAbs, a7 as derefConstraint, a8 as drainPromiseMicros, a9 as effectiveInterface, aa as enterPromiseExecutorScope, ab as evalPromiseCtor, ac as evalPromiseMethod, ad as evalPromiseStatic, ae as execNudoModule, af as extractDeclaredThrows, ag as extractFnBudget, ah as extractNudoImports, ai as extractRefineReturnFromSource, aj as extractRefinesFromSource, ak as fn, al as fnConstraintToEntryReqs, am as formatCheckReport, an as formatConstraint, ao as formatDiagnostics, ap as formatEffectiveInterfaceDisplay, aq as formatGithubAnnotations, ar as formatGitlabCodeQuality, as as formatInterfaceTierLine, at as generatedExportNames, au as getParseSourceCacheSize, av as getTerm, aw as instantiateConstraint, ax as interfaceDiagCount, ay as interfaceSourceOf, az as interfaceTierOf, aA as isIntFlag, aB as isNodeModulesPath, aC as isNudoConstraint, aD as lazy, aE as leavePromiseExecutorScope, aF as lenTerm, aG as litC, aH as localNamedExports, aI as notePromiseExecutorFork, aJ as nullable, aK as number, aL as omit, aM as partial, aN as pick, aO as queuePromiseMicro, aP as refineDiagCount, aQ as refineToIndexedFull, aR as resetNudoModuleExecCache, aS as resetParseSourceCache, aT as resetSidecarLoadFailureCache, aU as serializeCheckJson, aV as serializeCheckJsonMulti, aW as setInterfaceDiagCollector, aX as setRefineDiagCollector, aY as shape, aZ as sidecarClosureFingerprint, a_ as sidecarPathOf, a$ as string, b0 as takeInterfaceDiags, b1 as takeInterfaceDiagsSince, b2 as takeRefineDiags, b3 as takeRefineDiagsSince, b4 as throwConstraintToKinds, b5 as union } from './projection-budget-DW-svmIf.js';
6
- export { $add, $arguments, $arr, $arrMutContainer, $arrRest, $arrWithHoles, $async, $asyncReturn, $await, $bitand, $bitnot, $bitor, $bitxor, $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';
4
+ import { p as parseSource, L as LeakBudget, E as EffectiveInterfaceOpts, b as LoadDepsFingerprint, w as CheckReport, N as NudoConstraint, c as ProjectionBudget } from './projection-budget-NCXMnUDn.js';
5
+ export { x as CONSTRAINT_BUILDERS, y as CONSTRAINT_BUILDER_NAMES, z as CONSTRAINT_EXPR_RE, A as CheckAction, C as CheckIssue, B as CheckJson, D as CheckJsonMulti, F as ConstraintBuilder, G as Diagnostic, H as EffectiveInterface, J as GitlabCodeQualityIssue, K as INTERFACE_SOURCE_ABBR, O as InterfaceDiag, I as InterfaceSource, Q as InterfaceTierInfo, a as InterfaceTierOpts, R as NamedImport, S as NudoField, T as NudoFnConstraint, U as NudoSidecarError, V as NudoSig, W as RefineDiag, X as RefineEntry, Y as RefineResolveOpts, Z as SELF, _ as actionsForIssue, $ as andC, a0 as any, a1 as array, a2 as boolean, a3 as checkArg, a4 as checkCall, a5 as constraintAdmitsNullish, a6 as constraintToEntryAbs, a7 as derefConstraint, a8 as drainPromiseMicros, a9 as effectiveInterface, aa as enterPromiseExecutorScope, ab as evalPromiseCtor, ac as evalPromiseMethod, ad as evalPromiseStatic, ae as execNudoModule, af as extractDeclaredThrows, ag as extractFnBudget, ah as extractNudoImports, ai as extractRefineReturnFromSource, aj as extractRefinesFromSource, ak as fn, al as fnConstraintToEntryReqs, am as formatCheckReport, an as formatConstraint, ao as formatDiagnostics, ap as formatEffectiveInterfaceDisplay, aq as formatGithubAnnotations, ar as formatGitlabCodeQuality, as as formatInterfaceTierLine, at as generatedExportNames, au as getParseSourceCacheSize, av as getTerm, aw as instantiateConstraint, ax as interfaceDiagCount, ay as interfaceSourceOf, az as interfaceTierOf, aA as isIntFlag, aB as isNodeModulesPath, aC as isNudoConstraint, aD as lazy, aE as leavePromiseExecutorScope, aF as lenTerm, aG as litC, aH as localNamedExports, aI as notePromiseExecutorFork, aJ as nullable, aK as number, aL as omit, aM as partial, aN as pick, aO as queuePromiseMicro, aP as refineDiagCount, aQ as refineToIndexedFull, aR as resetNudoModuleExecCache, aS as resetParseSourceCache, aT as resetSidecarLoadFailureCache, aU as serializeCheckJson, aV as serializeCheckJsonMulti, aW as setInterfaceDiagCollector, aX as setRefineDiagCollector, aY as shape, aZ as sidecarClosureFingerprint, a_ as sidecarPathOf, a$ as string, b0 as takeInterfaceDiags, b1 as takeInterfaceDiagsSince, b2 as takeRefineDiags, b3 as takeRefineDiagsSince, b4 as throwConstraintToKinds, b5 as union } from './projection-budget-NCXMnUDn.js';
6
+ export { $add, $arguments, $arr, $arrMutContainer, $arrRest, $arrWithHoles, $async, $await, $bitand, $bitnot, $bitor, $bitxor, $catchVal, $class, $classExpr, $collectionForEach, $concat, $copy, $del, $delRes, $div, $dynamicImport, $elems, $eq, $eqLoose, $fnVal, $for, $forInKeys, $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, $sub, $super, $switch, $throw, $toNumber, $toNumeric, $tryCurrentMark, $tryDetachSoftCatch, $tryDigestSoftCatch, $tryDiscardSoft, $tryMark, $tryOrphanSoft, $tryPopMark, $tryReleaseSoftCatch, $tryReleaseSoftOut, $tryTakeSince, $typeof, $unknown, $updateAdd, $updateSub, $ushr, $whileSeq, $yield, DEFAULT_MAX_LOOP_ITERS, EvalClassSpec, NudoLoopSignal, NudoReturn, NudoThrow, NudoUnsupportedError, RUNTIME_IMPORT_RE, 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';
7
7
 
8
8
  /**
9
9
  * AstEnv:抽象求值环境类型面(ast-eval 删除后保留)。
@@ -145,79 +145,11 @@ type StripOptions = {
145
145
  */
146
146
  declare function stripTypes<T extends Node>(ast: T, source?: string, opts?: StripOptions): T;
147
147
 
148
- /**
149
- * 路径约束栈(Φ)。
150
- *
151
- * Φ 是当前控制流路径上的合取前提。代数运算(add/cmp/…)读取它做单调传播;
152
- * evaluator 在 if 守卫处 push/pop。栈属于类型系统,不属于 host CLI。
153
- */
154
-
155
- declare function currentPhi(): Phi;
156
- declare function pushPhi(p: Phi): void;
157
- declare function popPhi(): void;
158
- declare function resetPhi(): void;
159
- /** 在当前 Φ 上合取额外约束,body 结束后恢复 */
160
- declare function withPhiConstraint(extra: Phi, body: () => void): void;
161
- declare function describePhi(): string;
162
-
163
148
  /**
164
149
  * HOF 关系 Abs:无 body 的外延关系(paramTypes → returnType)的判定、
165
150
  * α 替换与应用。类型变量仍是 term var;关系仍是 fn 形状上的外延槽。
166
151
  */
167
152
 
168
- declare function createHofCollectCtx(paramNames: ReadonlySet<string>, alphaIds: Iterable<string>): HofCollectCtx;
169
- /**
170
- * 仅当 term 是 var 且 id ∈ alphaIds(本次 typeParams)时复用;否则 fresh α。
171
- * 绝不把调用点具体值/字面量冻进关系。
172
- */
173
- declare function alphaOf(absOrTerm: Abs | Term | undefined, ctx: HofCollectCtx): Term;
174
- /** 共享输出变量 B:${param}(§5.1 P2 钉死) */
175
- declare function betaOf(param: string): Term;
176
- /**
177
- * 提升写入载体:替换 env.vars map 项,禁止 mutate 共享 Abs。
178
- * arrival-first:已有 fn/arr 形状 → 拒绝新观测。
179
- * 返回是否真正写入。
180
- */
181
- declare function promoteParamShape(env: AstEnv, param: string, promotedShape: Shape, opts?: {
182
- loc?: {
183
- line: number;
184
- column: number;
185
- };
186
- recordSite?: boolean;
187
- }): boolean;
188
- /**
189
- * 挂载点①:方法派发 miss。receiver 是形参 Identifier 且 shape 为 any/未知,
190
- * 方法名为 filter/map/reduce/flatMap → 提升为 arr(自身 var)。
191
- */
192
- declare function tryPromoteReceiverAsArr(env: AstEnv, receiverName: string, method: string, loc?: {
193
- line: number;
194
- column: number;
195
- }): Abs | undefined;
196
- /**
197
- * for-of 迭代对象提升(applyEach 型):`for (const x of items)`,
198
- * items 为形参且仍是 any/unknown → arr(自身 var)。不依赖方法名。
199
- */
200
- declare function tryPromoteForOfIteratee(env: AstEnv, iterateeName: string, loc?: {
201
- line: number;
202
- column: number;
203
- }): Abs | undefined;
204
- /**
205
- * 挂载点②:CallExpression callee = 形参 Identifier 直接调用 p(x) / p(a,b)。
206
- * 提升为 fn(paramTypes=[αOf(args)], returnType=B:param)。
207
- */
208
- declare function tryPromoteDirectCall(env: AstEnv, calleeName: string, args: Abs[], loc?: {
209
- line: number;
210
- column: number;
211
- }): Abs | undefined;
212
- /**
213
- * 挂载点③:HOF 回调实参。回调是 Identifier ∈ paramNames 且尚未有 fn 形状。
214
- * 按方法名提升:map/flatMap → fn([αOf(el)], B:param);filter → fn([αOf(el)], bool);
215
- * reduce → fn([αOf(init), αOf(el)], B:param)。
216
- */
217
- declare function tryPromoteHofCallback(env: AstEnv, cevalName: string, method: string, argAbses: Abs[], loc?: {
218
- line: number;
219
- column: number;
220
- }): Abs | undefined;
221
153
  /** deep-ish copy for snapshot(新对象,不是 env.vars 同一引用) */
222
154
  declare function snapshotAbs(a: Abs): Abs;
223
155
  /**
@@ -516,6 +448,21 @@ declare function evalMathMethod(name: string, args: Abs[]): Abs | undefined;
516
448
  * - classifyAssignSet(Bug 128)是 Object.assign 逐键 [[Set]] 单一分类:
517
449
  * 自有访问器 setter / __proto__ 原型 setter(null|对象设原型、原始值
518
450
  * 忽略、抽象 open)/ 自有·继承非可写定抛 / 其余建自有键。
451
+ * - performObjectAssign 是 Object.assign 的**单一实现**(runtime 直接面
452
+ * exec/class/assign.ts 与 second-class 静态面 methods.ts 共用):obj /
453
+ * tuple / brand(原型对象)目标**就地**写并返回同一 Abs(原生引用语义——
454
+ * 别名/语句位可见),prim/boxed 目标的抛错域与降级口径不变。
455
+ * - frozen 目标的抛错门:**只在实际执行 Set(target, key, value, true) 时**
456
+ * 失败(原生 oracle:assign(freeze({}), {}) / assign(freeze({}), null) 不抛,
457
+ * assign(freeze({}), {a:1}) 抛 TypeError)——源零可枚举自有键 ⇒ 不抛;
458
+ * 源键集不可判 ⇒ may-throw(不定抛);键集已知非空 ⇒ 逐键判定(新建键 /
459
+ * 不可写数据属性 / 改原型 ⇒ TypeError,setter 派发 ⇒ 成功)。
460
+ * - sealed / nonext 目标的写门(**obj 与 brand 同规则**):只拒绝**新自有
461
+ * 键**(不可扩展 ⇒ [[Set]] 建键失败 ⇒ TypeError);已有自有可写数据属性 /
462
+ * 自有 setter 照常成功(seal 不改 writable、不禁访问器)。brand 目标的自有
463
+ * 面 = 内层 obj 槽 + 访问器侧表 + owner 类的自有方法/访问器(brandKeyIsNew);
464
+ * 自有键集不可判(内层开箱 / 内建原型品牌无类注册表条目)⇒ 不抛(保守)。
465
+ * frozen brand 仍走 frozenBrandGuard 的整目标拒写门。
519
466
  * - Bug 210:Proxy [[OwnPropertyKeys]] 的单一实现(proxyOwnKeysTrapKeys
520
467
  * 派发 + enforceProxyOwnKeysInvariant 校验)——重复名 / 非字符串键 /
521
468
  * 漏靶的不可配置自有键 / 不可扩展靶的多余键 → 原生定抛 TypeError;
@@ -744,8 +691,11 @@ declare function isObjectProtoBrand(a: Abs | undefined): boolean;
744
691
  */
745
692
  declare function evalNamespaceCall(ns: string, method: string, args: Abs[], thisVal?: Abs): Abs | undefined;
746
693
 
694
+ declare function isErrorCtorName(name: string | undefined): boolean;
695
+
747
696
  /**
748
- * Error 家族(ERROR_CTOR_NAMES/isErrorCtorName/errorBrandAbs)+ 宿主构造器
697
+ * Error 家族(isErrorCtorName/errorBrandAbs;构造器名集合在
698
+ * algebra/error-names.ts 叶子)+ 宿主构造器
749
699
  * 实参校验谓词(sumHasPrimMember/isNullishLit/enforceCanBeHeldWeakly/
750
700
  * isDefinitelyUndefinedArg)+ Proxy 构造(makeProxyAbs)。
751
701
  *
@@ -767,7 +717,6 @@ declare function evalNamespaceCall(ns: string, method: string, args: Abs[], this
767
717
  * 靶形态);target/handler 引用挂 match-iter 侧表(Bug 57/71 陷阱派发)。
768
718
  */
769
719
 
770
- declare function isErrorCtorName(name: string | undefined): boolean;
771
720
  /**
772
721
  * Error brand:shape 带 name/message(字面量 message 保精确)。
773
722
  * AggregateError(errors, message[, options]):message 在第二实参,errors
@@ -991,6 +940,12 @@ declare function joinObjects(a: Abs, b: Abs): Abs;
991
940
  /** 值级 join:同型双字面量保留为枚举 sum;其余 prim 同型收成 path */
992
941
  declare function joinValues(a: Abs, b: Abs): Abs;
993
942
  declare function makeSum(a: Abs, b: Abs): Abs;
943
+ /**
944
+ * 结构键的最小面(join 去重 / 槽相等 / env 声明去重共用)。
945
+ * 实现见 abs-key.ts(shape × term × pred 的单一序列化);本函数保持
946
+ * **纯结构**契约——fn 实现身份不进键(env-loader 的「同一声明」去重依赖
947
+ * 结构相等)。makeSum/flattenSum 的去重键另有 sumDedupeKey 附加 impl 身份。
948
+ */
994
949
  declare function absShapeKey(a: Abs, seen?: Set<object>): string;
995
950
  type FnAbs = Abs & {
996
951
  shape: {
@@ -1006,6 +961,7 @@ type FnAbs = Abs & {
1006
961
  declare function fnOf(params: string[], name?: string): Abs;
1007
962
  /**
1008
963
  * 函数 join:签名并(重载),禁止 (A|C)→(B|D)。
964
+ * 同名同参且**可观察元数据全同** → 同一值(折叠成 a);否则 sum。
1009
965
  */
1010
966
  declare function joinFunctions(a: Abs, b: Abs): Abs;
1011
967
  /** 通用 join:分派到对象/函数/值 */
@@ -1183,6 +1139,18 @@ type AbsAssignRecord = {
1183
1139
  column?: number;
1184
1140
  /** 分支/循环体内发生:可变绑定在路径上取并集是合法 JS,不参与结构检查 */
1185
1141
  conditional?: boolean;
1142
+ /**
1143
+ * 写目标是**函数形参**(不是 let/const/var 声明绑定)。
1144
+ *
1145
+ * JS 形参没有声明类型——分析面看到的 `prev` 是**本次调用实参**的形状,
1146
+ * 不是绑定的声明的域。真实代码里「归一化形参」是常规写法:
1147
+ * `global(globals) { globals = [].concat(globals); … }`(yargs)在某个
1148
+ * 调用点上传入 `"_"` 时,`prev = "_"`、`next = ["_"]` ⇒ 结构检查判
1149
+ * 「arr ⊭ prim string」**假阳性**(形参的真实域是 `string | string[]`)。
1150
+ * ⇒ 形参重赋值不参与 `nudo:assign-mismatch`(该通道只对**有声明值的绑定**
1151
+ * 负义务;调用点实参的形状义务归契约 / `nudo:arg-structure` 通道)。
1152
+ */
1153
+ paramBinding?: boolean;
1186
1154
  };
1187
1155
 
1188
1156
  /**
@@ -1359,6 +1327,9 @@ declare function locateContractParam(formals: FormalParam[], contractName: strin
1359
1327
 
1360
1328
  /**
1361
1329
  * Abs 键 / α-rename(从 generalize.ts 拆出的纯结构变换)。
1330
+ *
1331
+ * 结构键的唯一实现在 abs-key.ts(shape × term × pred);本模块只保留
1332
+ * generalize 侧需要的能力:α-rename、自由变元收集、instantiate 记忆键。
1362
1333
  */
1363
1334
 
1364
1335
  /** 公开:收集 Abs 自由 term 变元(dts 泛型投影 / α 作用域判定复用 L2 基建)。 */
@@ -1444,9 +1415,6 @@ declare function generalizeFromAst(fnName: string, source: string, opts?: {
1444
1415
  * runTranspiled;对象身份进 memo 键(调用方同文件内复用同一对象) */
1445
1416
  inject?: RunTranspiledOptions;
1446
1417
  }): PolyFn | undefined;
1447
- declare function generalizeAll(source: string, opts?: {
1448
- budget?: LeakBudget;
1449
- }): PolyFn[];
1450
1418
  /**
1451
1419
  * 列出源码中的顶层函数名。
1452
1420
  * 与 scan.listTopFunctions 对齐:解 export default / export const 箭头与函数表达式。
@@ -1543,6 +1511,16 @@ type CheckOptions = {
1543
1511
  */
1544
1512
 
1545
1513
  declare function resetCheckSourceMemo(): void;
1514
+ /**
1515
+ * ⚠ `checkDepsFingerprint` 已删除(Bug 1139 修复线引入的副作用):
1516
+ * 指纹的 **ambient 侧车探测**必须与「分析读」区分(`autoBind:false` 下
1517
+ * 不可读的 ambient 侧车**不得**让门禁变红)⇒ 探测要走**未经降级闸**的
1518
+ * 推测性 loader,并受 `sidecarAutoBindAllowed` 约束 ⇒ 调用点必须直接调
1519
+ * `loadModuleDepsFingerprint`(带上 ambient 选项)⇒ 本包装器(无法传
1520
+ * ambient 选项)失去唯一用途 ⇒ 删。
1521
+ *
1522
+ * `loadModuleDepsFingerprint` 见 `load-deps-fp.ts`。
1523
+ */
1546
1524
  /** `*.nudo.js` 变更后定向逐出依赖它的整文件 check 缓存。查找与索引同走 stablePathKey */
1547
1525
  declare function evictCheckSourceMemoForPaths(paths: string[]): number;
1548
1526
 
@@ -1798,4 +1776,4 @@ declare function absToConstraint(a: Abs, budget?: ProjectionBudget): NudoConstra
1798
1776
  */
1799
1777
  declare function joinThenProject(absList: Abs[]): NudoConstraint | undefined;
1800
1778
 
1801
- export { Abs, type AbsAssignRecord, type AbsCallRecord, AbsModuleExports, AstEnv, type CaseTag, type CheckOptions, CheckReport, Confidence, EffectiveInterfaceOpts, type Environment, type ExtState, type FnAbs, type FnDirectiveScope, type FormalParam, type FormatOptions, HofCollectCtx, HofSite, type LeqResult, LiteralValue, type MockHelper, type MockModuleRecord, NudoConstraint, type NudoImportRecord, OBJECT_PROTO_METHOD_NAMES, type ObjShape, Phi, type PolyFn, Pred, type PropFlags, RelSource, RunTranspiledOptions, Shape, type Slot, Term, type TypeParam, absShapeKey, absToConstraint, add, alphaOf, applyCallbackAbs, applyCallbackValue, asAbs, assignSourceSlots, 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, extractBalancedParens, extractFileEnvNames, extractFn, extractMockModuleRecords, extractNudoImportRecords, falseConstraint, findFnDirectiveScope, fnDirectiveCommentLines, fnOf, formalParamDisplayNames, formalParamSignatureNames, formalParamsFromNodes, formatAbs, formatAbsMultiline, formatShape, formatShapeSlot, generalizeAll, generalizeFromAst, getAbsProperty, getGeneralizeMemoSize, getPropFlags, getSlot, hostBuiltinCtorName, instantiateReturn, isErrorCtorName, isMapAbs, isNullProtoObj, isNullishLitAbs, isObj, isObjectProtoBrand, isRelFn, isSetAbs, isSymbolAbs, joinAbs, joinFunctions, joinObjects, joinThenProject, joinValues, leqAbs, listFnDirectiveScopes, listFunctionNames, literalMeetsConstraint, locateContractParam, looseEqAbs, makeArrayCtorAbs, makeMapAbs, makeSetAbs, makeSum, makeSymbolAbs, mapClearEntries, mapDeleteEntry, mapElementFallback, mapEntriesAbs, mapGetEntry, mapHasEntry, mapSetEntry, mapSizeAbs, mapValuesAbs, markExtState, markNullProtoObj, matchRelIdentLit, mergeCollectionArms, migrateInvariants, migrateNullProto, mock, mod, mul, negAbs, notAbs, noteCollectionWrite, objOf, objectProtoBrand, objectProtoMethodAbs, parseEnvPayload, parseMockModulePayload, parseNudoImportPayload, parseSource, popCollectionArm, popPhi, powAbs, projectFlatMapResult, promoteParamShape, propertyKeyOf, protoBrandAbs, protoOfRecv, pushCollectionArm, pushPhi, refineAbsForRelTrue, regexBrandAbsFrom, requiredFnArity, resetCheckSourceMemo, resetGeneralizeMemo, resetPhi, scanBudgetDecl, scanCaseArgSpans, scanCaseTags, scanContractSegments, scanThrowsDecl, setAddEntry, setApplyCallbackHost, setClearEntries, setDeleteEntry, setElementsAbs, setHasEntry, setPropFlags, setSizeAbs, 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 };
1779
+ export { Abs, type AbsAssignRecord, type AbsCallRecord, AbsModuleExports, AstEnv, type CaseTag, type CheckOptions, CheckReport, Confidence, EffectiveInterfaceOpts, type Environment, type ExtState, type FnAbs, type FnDirectiveScope, type FormalParam, type FormatOptions, HofSite, type LeqResult, LiteralValue, type MockHelper, type MockModuleRecord, NudoConstraint, type NudoImportRecord, OBJECT_PROTO_METHOD_NAMES, type ObjShape, Phi, type PolyFn, Pred, type PropFlags, RelSource, RunTranspiledOptions, Shape, type Slot, type TypeParam, absShapeKey, absToConstraint, add, applyCallbackAbs, applyCallbackValue, asAbs, assignSourceSlots, beginCollectionFork, bitandAbs, bitnotAbs, bitorAbs, bitxorAbs, buildArgsFromAssume, builtinCtorAbs, builtinCtorNameOf, callAbsMethod, canonicalArrayIndex, checkSource, clearCollectionTables, cmp, collectAbsFreeVars, collectionElementJoin, collectionExactLen, contractParamNameSet, createEnvironment, ctorArgDefinitelyInvalid, ctorNameOfRecv, definitelyNotNullishShape, div, emptyEnv, endCollectionFork, errorBrandAbs, evalArrayStatic, evalBuiltinInstanceMethod, evalBuiltinNew, evalDateCtor, evalDateMethod, evalDateStatic, evalGlobalFn, evalJsonMethod, evalMathMethod, evalNamespaceCall, evalNumberStatic, evalObjectMethod, evalObjectProtoMethod, evalRegExpCtor, evalRegExpMethod, evalStringStatic, evalSymbolCtor, evictCheckSourceMemoForPaths, evictGeneralizeMemoForPaths, extStateOf, extractBalancedParens, extractFileEnvNames, extractFn, extractMockModuleRecords, extractNudoImportRecords, falseConstraint, findFnDirectiveScope, fnDirectiveCommentLines, fnOf, formalParamDisplayNames, formalParamSignatureNames, formalParamsFromNodes, formatAbs, formatAbsMultiline, formatShape, formatShapeSlot, generalizeFromAst, getAbsProperty, getGeneralizeMemoSize, getPropFlags, getSlot, hostBuiltinCtorName, instantiateReturn, isErrorCtorName, isMapAbs, isNullProtoObj, isNullishLitAbs, isObj, isObjectProtoBrand, isRelFn, isSetAbs, isSymbolAbs, joinAbs, joinFunctions, joinObjects, joinThenProject, joinValues, leqAbs, listFnDirectiveScopes, listFunctionNames, literalMeetsConstraint, locateContractParam, looseEqAbs, makeArrayCtorAbs, makeMapAbs, makeSetAbs, makeSum, makeSymbolAbs, mapClearEntries, mapDeleteEntry, mapElementFallback, mapEntriesAbs, mapGetEntry, mapHasEntry, mapSetEntry, mapSizeAbs, mapValuesAbs, markExtState, markNullProtoObj, matchRelIdentLit, mergeCollectionArms, migrateInvariants, migrateNullProto, mock, mod, mul, negAbs, notAbs, noteCollectionWrite, objOf, objectProtoBrand, objectProtoMethodAbs, parseEnvPayload, parseMockModulePayload, parseNudoImportPayload, parseSource, popCollectionArm, powAbs, projectFlatMapResult, propertyKeyOf, protoBrandAbs, protoOfRecv, pushCollectionArm, refineAbsForRelTrue, regexBrandAbsFrom, requiredFnArity, resetCheckSourceMemo, resetGeneralizeMemo, scanBudgetDecl, scanCaseArgSpans, scanCaseTags, scanContractSegments, scanThrowsDecl, setAddEntry, setApplyCallbackHost, setClearEntries, setDeleteEntry, setElementsAbs, setHasEntry, setPropFlags, setSizeAbs, shlAbs, shrAbs, snapshotAbs, spread, spy, strictEqAbs, stringOfSymbol, stripTypes, stub, sub, substAbs, substPredAbs, symbolDescriptionAbs, symbolIdOf, toNumberAbs, trueConstraint, tryMakeRegexAbs, typeofAbs, undefAbs, ushrAbs, withVar };