@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.
@@ -41,7 +41,7 @@ import {
41
41
  unknown,
42
42
  v,
43
43
  withExecPhi
44
- } from "./chunk-SQSO4NKT.js";
44
+ } from "./chunk-4V3CRVSD.js";
45
45
 
46
46
  // src/algebra/constraint.ts
47
47
  var SELF = "__nudo_self__";
@@ -2541,9 +2541,9 @@ function promoteAsFn(ctx, name, args, loc) {
2541
2541
  loc
2542
2542
  });
2543
2543
  }
2544
- function promoteCb(ctx, cbName, method, argTerms, loc) {
2545
- if (!ctx.params.has(cbName)) return;
2546
- const prev = ctx.shapes.get(cbName);
2544
+ function promoteCb(ctx, cevalName, method, argTerms, loc) {
2545
+ if (!ctx.params.has(cevalName)) return;
2546
+ const prev = ctx.shapes.get(cevalName);
2547
2547
  if (!prev) return;
2548
2548
  if (prev.shape.k !== "any" && prev.shape.k !== "unknown") return;
2549
2549
  let paramTypes;
@@ -2553,7 +2553,7 @@ function promoteCb(ctx, cbName, method, argTerms, loc) {
2553
2553
  returnType = abs({ k: "prim", type: "boolean" }, void 0, void 0, "path");
2554
2554
  } else {
2555
2555
  paramTypes = argTerms.map((t) => abs({ k: "any" }, t, void 0, "path"));
2556
- returnType = abs({ k: "any" }, v(`B:${cbName}`), void 0, "path");
2556
+ returnType = abs({ k: "any" }, v(`B:${cevalName}`), void 0, "path");
2557
2557
  }
2558
2558
  const fnShape = {
2559
2559
  k: "fn",
@@ -2561,9 +2561,9 @@ function promoteCb(ctx, cbName, method, argTerms, loc) {
2561
2561
  paramTypes,
2562
2562
  returnType
2563
2563
  };
2564
- promoteShape(ctx, cbName, fnShape, loc, false);
2564
+ promoteShape(ctx, cevalName, fnShape, loc, false);
2565
2565
  ctx.sites.push({
2566
- param: cbName,
2566
+ param: cevalName,
2567
2567
  argTerms,
2568
2568
  result: returnType,
2569
2569
  loc
@@ -2675,14 +2675,14 @@ function scanPromotions(body, params, paramTermIds, initialShapes) {
2675
2675
  }
2676
2676
 
2677
2677
  // src/algebra/generalize.ts
2678
- var bRunMemo = /* @__PURE__ */ new Map();
2679
- function bPathRunOf(source, modules, inject) {
2678
+ var evalRunMemo = /* @__PURE__ */ new Map();
2679
+ function evalRunOf(source, modules, inject) {
2680
2680
  const mKey = `${source}|${runTranspiledOptionsMemoKey({ ...inject ?? {}, ...modules ? { modules } : {} })}`;
2681
- if (bRunMemo.size >= 256) {
2682
- const oldest = bRunMemo.keys().next().value;
2683
- if (oldest !== void 0) bRunMemo.delete(oldest);
2681
+ if (evalRunMemo.size >= 256) {
2682
+ const oldest = evalRunMemo.keys().next().value;
2683
+ if (oldest !== void 0) evalRunMemo.delete(oldest);
2684
2684
  }
2685
- let run = bRunMemo.get(mKey);
2685
+ let run = evalRunMemo.get(mKey);
2686
2686
  if (run === void 0) {
2687
2687
  const merged = modules ?? inject?.modules;
2688
2688
  const r = tryRunTranspiled(source, {
@@ -2692,7 +2692,7 @@ function bPathRunOf(source, modules, inject) {
2692
2692
  });
2693
2693
  if (r === void 0) return void 0;
2694
2694
  run = r;
2695
- bRunMemo.set(mKey, run);
2695
+ evalRunMemo.set(mKey, run);
2696
2696
  }
2697
2697
  return run;
2698
2698
  }
@@ -3090,7 +3090,7 @@ function generalizeFromAstUncached(fnName, source, opts = {}) {
3090
3090
  );
3091
3091
  const envGated = envGatedSource && freeIdentifiers(body, boundNames).size > 0;
3092
3092
  const replaceGated = /@nudo:replace\b/.test(source) && !hasReps;
3093
- const bEligible = !unresolvableImports && !mockGated && !envGated && !replaceGated;
3093
+ const evalEligible = !unresolvableImports && !mockGated && !envGated && !replaceGated;
3094
3094
  const run = (args, phi = pTrue) => {
3095
3095
  const { key, varOrder } = instantiateMemoKey(args, phi);
3096
3096
  const hit = instMemo.get(key);
@@ -3098,27 +3098,27 @@ function generalizeFromAstUncached(fnName, source, opts = {}) {
3098
3098
  return alphaRenameResult(hit.result, hit.varOrder, varOrder);
3099
3099
  }
3100
3100
  let result;
3101
- if (bEligible) {
3101
+ if (evalEligible) {
3102
3102
  try {
3103
- const bRun = bPathRunOf(source, opts.modules, opts.inject);
3104
- if (!bRun) {
3103
+ const evalRun = evalRunOf(source, opts.modules, opts.inject);
3104
+ if (!evalRun) {
3105
3105
  } else if (fnName.includes(".")) {
3106
3106
  const [clsName, methodName] = fnName.split(".", 2);
3107
- const clsAbs = bRun[clsName ?? ""];
3107
+ const clsAbs = evalRun[clsName ?? ""];
3108
3108
  if (clsAbs && typeof clsAbs === "object" && "shape" in clsAbs) {
3109
3109
  const nCtor = ctorParamCountOf(fileAst, clsName ?? "");
3110
3110
  const inst = $new(clsAbs, Array.from({ length: nCtor }, () => abs({ k: "any" }, void 0, pTrue, "path")));
3111
3111
  result = withExecPhi(phi, () => $invoke(inst, methodName ?? "", args));
3112
3112
  }
3113
- } else if (fnName in bRun) {
3114
- const bArgs = args.map((a, i) => {
3113
+ } else if (fnName in evalRun) {
3114
+ const evalArgs = args.map((a, i) => {
3115
3115
  const shape2 = promoteScan.promotedShapes.get(params[i]);
3116
3116
  if (shape2 && (a.shape.k === "any" || a.shape.k === "unknown")) {
3117
3117
  return { shape: shape2, term: a.term, pred: a.pred, conf: "path" };
3118
3118
  }
3119
3119
  return a;
3120
3120
  });
3121
- result = callTranspiledExportFull(bRun, fnName, bArgs, { phi }).result;
3121
+ result = callTranspiledExportFull(evalRun, fnName, evalArgs, { phi }).result;
3122
3122
  }
3123
3123
  } catch {
3124
3124
  }
@@ -4029,17 +4029,17 @@ function scanLiteralCalls(source, knownFns, phi, opts) {
4029
4029
  const resolve = collectCallResolvers(source, knownFns, opts);
4030
4030
  const forwards = collectForwarders(source, knownSet, resolve, file);
4031
4031
  const varAbs = opts?.varAbs ?? /* @__PURE__ */ new Map();
4032
- const bCallIndex = /* @__PURE__ */ new Map();
4032
+ const evalCallIndex = /* @__PURE__ */ new Map();
4033
4033
  for (const r of opts?.bCalls ?? []) {
4034
4034
  if (!r.callLoc) continue;
4035
4035
  const key = `${r.fnName}\0${r.callLoc.line}`;
4036
- const list = bCallIndex.get(key) ?? [];
4036
+ const list = evalCallIndex.get(key) ?? [];
4037
4037
  list.push(r.args);
4038
- bCallIndex.set(key, list);
4038
+ evalCallIndex.set(key, list);
4039
4039
  }
4040
4040
  const takeBCallArgs = (fnName, line) => {
4041
4041
  if (line === void 0) return void 0;
4042
- const list = bCallIndex.get(`${fnName}\0${line}`);
4042
+ const list = evalCallIndex.get(`${fnName}\0${line}`);
4043
4043
  if (!list || list.length === 0) return void 0;
4044
4044
  return list.shift();
4045
4045
  };
@@ -4632,10 +4632,10 @@ function scanLiteralCalls(source, knownFns, phi, opts) {
4632
4632
  let absArgs = parsed.absArgs;
4633
4633
  let hasInfo = parsed.hasInfo;
4634
4634
  if (!hasInfo) {
4635
- const bArgs = takeBCallArgs(fnName, loc?.start.line);
4636
- if (bArgs && bArgs.length > 0) {
4637
- absArgs = bArgs;
4638
- hasInfo = bArgs.some(isInformativeArg);
4635
+ const evalArgs = takeBCallArgs(fnName, loc?.start.line);
4636
+ if (evalArgs && evalArgs.length > 0) {
4637
+ absArgs = evalArgs;
4638
+ hasInfo = evalArgs.some(isInformativeArg);
4639
4639
  }
4640
4640
  }
4641
4641
  if (!hasInfo || absArgs.length === 0) return;
@@ -4698,10 +4698,10 @@ function scanLiteralCalls(source, knownFns, phi, opts) {
4698
4698
  let absArgs = parsedExt.absArgs;
4699
4699
  let hasInfo = parsedExt.hasInfo;
4700
4700
  if (!hasInfo) {
4701
- const bArgs = takeBCallArgs(ext.fnName, loc?.start.line);
4702
- if (bArgs && bArgs.length > 0) {
4703
- absArgs = bArgs;
4704
- hasInfo = bArgs.some(isInformativeArg);
4701
+ const evalArgs = takeBCallArgs(ext.fnName, loc?.start.line);
4702
+ if (evalArgs && evalArgs.length > 0) {
4703
+ absArgs = evalArgs;
4704
+ hasInfo = evalArgs.some(isInformativeArg);
4705
4705
  }
4706
4706
  }
4707
4707
  if (!hasInfo || absArgs.length === 0) return;
package/dist/exec.d.ts CHANGED
@@ -1,3 +1,3 @@
1
- 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, R as RunTranspiledOptions, b3 as TranspileOptions, b4 as TranspiledCallResult, b5 as asAbsVal, b7 as bindingsOf, b8 as callAtFunctionBoundary, b9 as callTranspiledExport, ba as callTranspiledExportFull, bb as clearBClasses, bc as clearStaleTermPred, 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';
2
- import './hof-types-tAeoYvzY.js';
1
+ 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, bV as $setProto, 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, R as RunTranspiledOptions, b6 as TranspileOptions, b7 as TranspiledCallResult, b8 as asAbsVal, ba as bindingsOf, bb as callAtFunctionBoundary, bc as callTranspiledExport, bd as callTranspiledExportFull, be as clearBClasses, bf as clearStaleTermPred, 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';
2
+ import './hof-types-DqDpAxfh.js';
3
3
  import '@babel/types';
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,13 +105,15 @@ import {
103
105
  $tryTakeSince,
104
106
  $typeof,
105
107
  $unknown,
108
+ $updateAdd,
109
+ $updateSub,
106
110
  $ushr,
107
111
  $while,
108
112
  $whileSeq,
109
113
  $yield,
110
114
  DEFAULT_MAX_LOOP_ITERS,
111
- MAX_B_CALL_DEPTH,
112
- MAX_B_TOTAL_CALLS,
115
+ MAX_EVAL_CALL_DEPTH,
116
+ MAX_EVAL_TOTAL_CALLS,
113
117
  NudoLoopSignal,
114
118
  NudoReturn,
115
119
  NudoThrow,
@@ -127,8 +131,8 @@ import {
127
131
  fillTuple,
128
132
  foldRequireSpecArg,
129
133
  foldStaticStringExpr,
130
- getBCallCollector,
131
- getBClass,
134
+ getEvalCallCollector,
135
+ getEvalClass,
132
136
  isArrMutator,
133
137
  isDefinitelyFalse,
134
138
  isDefinitelyTrue,
@@ -139,20 +143,20 @@ import {
139
143
  litTruth,
140
144
  lookupObjAccessor,
141
145
  namespaceNameOf,
142
- noteBCallRecord,
143
- noteBPathFallback,
146
+ noteEvalCallRecord,
147
+ noteEvalFallback,
144
148
  pushLoopExit,
145
149
  pushThrowExit,
146
- registerBClass,
147
- resetBCallBudget,
150
+ registerEvalClass,
151
+ resetEvalCallBudget,
148
152
  runTranspiled,
149
153
  runTranspiledOptionsMemoKey,
150
154
  runWithLoopExits,
151
155
  runtimeImportOf,
152
- setBAssignCollector,
153
- setBBindingSink,
154
- setBCallCollector,
155
- setBPathFallbackCollector,
156
+ setEvalAssignCollector,
157
+ setEvalBindingSink,
158
+ setEvalCallCollector,
159
+ setEvalFallbackCollector,
156
160
  takeLoopExits,
157
161
  takeThrowExits,
158
162
  transpile,
@@ -162,7 +166,7 @@ import {
162
166
  transpileSource,
163
167
  tryRunTranspiled,
164
168
  withExecPhi
165
- } from "./chunk-SQSO4NKT.js";
169
+ } from "./chunk-4V3CRVSD.js";
166
170
  export {
167
171
  $add,
168
172
  $arguments,
@@ -244,6 +248,7 @@ export {
244
248
  $rethrowIfNudoReturn,
245
249
  $set,
246
250
  $setKey,
251
+ $setProto,
247
252
  $shl,
248
253
  $shr,
249
254
  $spread,
@@ -255,6 +260,7 @@ export {
255
260
  $thisSet,
256
261
  $throw,
257
262
  $toNumber,
263
+ $toNumeric,
258
264
  $tryCurrentMark,
259
265
  $tryDetachSoftCatch,
260
266
  $tryDigestSoftCatch,
@@ -267,13 +273,15 @@ export {
267
273
  $tryTakeSince,
268
274
  $typeof,
269
275
  $unknown,
276
+ $updateAdd,
277
+ $updateSub,
270
278
  $ushr,
271
279
  $while,
272
280
  $whileSeq,
273
281
  $yield,
274
282
  DEFAULT_MAX_LOOP_ITERS,
275
- MAX_B_CALL_DEPTH,
276
- MAX_B_TOTAL_CALLS,
283
+ MAX_EVAL_CALL_DEPTH,
284
+ MAX_EVAL_TOTAL_CALLS,
277
285
  NudoLoopSignal,
278
286
  NudoReturn,
279
287
  NudoThrow,
@@ -291,8 +299,8 @@ export {
291
299
  fillTuple,
292
300
  foldRequireSpecArg,
293
301
  foldStaticStringExpr,
294
- getBCallCollector,
295
- getBClass,
302
+ getEvalCallCollector,
303
+ getEvalClass,
296
304
  isArrMutator,
297
305
  isDefinitelyFalse,
298
306
  isDefinitelyTrue,
@@ -303,20 +311,20 @@ export {
303
311
  litTruth,
304
312
  lookupObjAccessor,
305
313
  namespaceNameOf,
306
- noteBCallRecord,
307
- noteBPathFallback,
314
+ noteEvalCallRecord,
315
+ noteEvalFallback,
308
316
  pushLoopExit,
309
317
  pushThrowExit,
310
- registerBClass,
311
- resetBCallBudget,
318
+ registerEvalClass,
319
+ resetEvalCallBudget,
312
320
  runTranspiled,
313
321
  runTranspiledOptionsMemoKey,
314
322
  runWithLoopExits,
315
323
  runtimeImportOf,
316
- setBAssignCollector,
317
- setBBindingSink,
318
- setBCallCollector,
319
- setBPathFallbackCollector,
324
+ setEvalAssignCollector,
325
+ setEvalBindingSink,
326
+ setEvalCallCollector,
327
+ setEvalFallbackCollector,
320
328
  takeLoopExits,
321
329
  takeThrowExits,
322
330
  transpile,
@@ -88,6 +88,11 @@ declare function not(p: Pred): Pred;
88
88
  * 逻辑否定(De Morgan):¬(A∧B)=¬A∨¬B;¬(A∨B)=¬A∧¬B;双重否定消去。
89
89
  * typeof 否定展开为其余 TypeofName 标签的析取——8 标签域是 JS typeof 的
90
90
  * 完整结果域,展开健全且相对完备。
91
+ *
92
+ * 关系比较(lt/le/gt/ge)的否定 **不是** 全序对偶:JS 里 NaN 参与时
93
+ * 全部关系为 false,故 ¬(x<5) 真而 x≥5 假。精确否定是 not(lt);
94
+ * 正向全序事实(Φ ⊢ x≥5 ⇒ x<5 为假)仍由 totalOrderDual 处理。
95
+ * eq↔ne 是精确否定,不受 NaN 影响。
91
96
  */
92
97
  declare function negatePred(p: Pred): Pred;
93
98
  declare function predEquals(a: Pred, b: Pred): boolean;
@@ -162,6 +167,15 @@ type Shape = {
162
167
  name?: string;
163
168
  paramTypes?: Abs[];
164
169
  returnType?: Abs;
170
+ /**
171
+ * Dual-facet globals (Number/Array/…): callable AND carries static members.
172
+ * `$get` reads these before falling back to Function.prototype names.
173
+ */
174
+ slots?: Record<string, {
175
+ value: Abs;
176
+ optional?: boolean;
177
+ readonly?: boolean;
178
+ }>;
165
179
  } | {
166
180
  k: "brand";
167
181
  name: string;
@@ -254,11 +268,11 @@ declare function popMayThrowFrame(discard: boolean): MayThrowEffect[];
254
268
  * 否则交给 collector。不得在栈非空时直接 flush,否则 outer catch 被旁路。
255
269
  */
256
270
  declare function orphanMayThrowEffects(effects: MayThrowEffect[]): void;
257
- /** B-path:try 开始时压 soft 帧 */
271
+ /** evaluator:try 开始时压 soft 帧 */
258
272
  declare function $tryMarkSoft(): void;
259
- /** B-path catch 消化 try 内 soft may-throw */
273
+ /** evaluator catch 消化 try 内 soft may-throw */
260
274
  declare function $tryDigestSoft(): void;
261
- /** B-path 无 handler / 出口 / rethrow:上浮未消化 soft may-throw(外层 try 可再消化) */
275
+ /** evaluator 无 handler / 出口 / rethrow:上浮未消化 soft may-throw(外层 try 可再消化) */
262
276
  declare function $tryReleaseSoft(): MayThrowEffect[];
263
277
  declare function flushMayThrowEffects(effects: MayThrowEffect[]): void;
264
278
  declare function recordMayThrow(e: MayThrowEffect): void;