@scriptc/compiler 0.0.11 → 0.0.12
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/ambient/scriptc-node-fallback.d.ts +12 -9
- package/ambient/scriptc.d.ts +2 -2
- package/dist/backend/cc.d.ts +2 -2
- package/dist/backend/emission/emit-async.js +1 -1
- package/dist/backend/emission/emit-exprs.js +97 -52
- package/dist/backend/emission/emit-exprs.js.map +1 -1
- package/dist/backend/emission/emit-island.js +1 -1
- package/dist/backend/emission/emit-shapes.js +1 -1
- package/dist/backend/emission/emit-walkers.d.ts +14 -14
- package/dist/backend/emission/emit-walkers.js +44 -44
- package/dist/backend/emission/emit-walkers.js.map +1 -1
- package/dist/backend/emission/emitter.d.ts +3 -3
- package/dist/backend/emission/emitter.js +8 -8
- package/dist/backend/emission/may-throw.js +1 -1
- package/dist/backend/llvm/dyn.d.ts +10 -10
- package/dist/backend/llvm/dyn.js +26 -26
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.js +97 -43
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/shapes.js +1 -1
- package/dist/backend/llvm/walkers.js +2 -2
- package/dist/backend/llvm/walkers.js.map +1 -1
- package/dist/diagnostics/diagnostic.d.ts +1 -1
- package/dist/diagnostics/diagnostic.js +4 -3
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/frontend/lowering/lib-boundary.js +5 -5
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lower-assert.js +12 -12
- package/dist/frontend/lowering/lower-assert.js.map +1 -1
- package/dist/frontend/lowering/lower-builtins.d.ts +7 -7
- package/dist/frontend/lowering/lower-builtins.js +92 -31
- package/dist/frontend/lowering/lower-builtins.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +4 -4
- package/dist/frontend/lowering/lower-calls.js +66 -66
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.js +31 -5
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-containers.d.ts +5 -5
- package/dist/frontend/lowering/lower-containers.js +19 -19
- package/dist/frontend/lowering/lower-containers.js.map +1 -1
- package/dist/frontend/lowering/lower-emitter.js +2 -2
- package/dist/frontend/lowering/lower-emitter.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +7 -7
- package/dist/frontend/lowering/lower-exprs.js +158 -112
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +5 -5
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-island.js +12 -3
- package/dist/frontend/lowering/lower-island.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.js +16 -16
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-namespaces.d.ts +11 -1
- package/dist/frontend/lowering/lower-namespaces.js +41 -6
- package/dist/frontend/lowering/lower-namespaces.js.map +1 -1
- package/dist/frontend/lowering/lower-server.js +11 -11
- package/dist/frontend/lowering/lower-server.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.d.ts +1 -1
- package/dist/frontend/lowering/lower-stmts.js +191 -30
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stream.js +66 -22
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +10 -10
- package/dist/frontend/lowering/lowerer.js +51 -37
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/surfaces.js +2 -2
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/program.js +1 -1
- package/dist/frontend/shared.js +7 -7
- package/dist/frontend/shared.js.map +1 -1
- package/dist/frontend/types.d.ts +2 -2
- package/dist/frontend/types.js +15 -15
- package/dist/frontend/types.js.map +1 -1
- package/dist/index.js +38 -7
- package/dist/index.js.map +1 -1
- package/dist/ir/nodes.d.ts +110 -98
- package/dist/ir/nodes.js +48 -21
- package/dist/ir/nodes.js.map +1 -1
- package/dist/ir/validate.js +44 -34
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/int-infer.js +13 -0
- package/dist/library/int-infer.js.map +1 -1
- package/dist/library/profile.d.ts +8 -6
- package/dist/library/profile.js.map +1 -1
- package/dist/library/sidecar-validate.js +1 -1
- package/dist/library/sidecar-validate.js.map +1 -1
- package/dist/library/sidecar.d.ts +1 -1
- package/dist/library/sidecar.js +20 -7
- package/dist/library/sidecar.js.map +1 -1
- package/package.json +2 -2
- package/surface-manifest.json +4 -4
|
@@ -474,6 +474,32 @@ export function collectClassShape(L, decl) {
|
|
|
474
474
|
}
|
|
475
475
|
}
|
|
476
476
|
}
|
|
477
|
+
// A poisoned BASE this class EXTENDS must report EAGERLY for the same
|
|
478
|
+
// reason: the derived statement evaluates its heritage when module
|
|
479
|
+
// init reaches it (these are top-level declarations), and the base's
|
|
480
|
+
// fence is the COMPILER's, not Node's — Node defines the base fine and
|
|
481
|
+
// runs on — so a deferred trap there is a manufactured divergence, not
|
|
482
|
+
// the Node-parity deferral is licensed by (classFieldSuperAccessibleJs2:
|
|
483
|
+
// the binary refused at `class D extends C` where Node prints five
|
|
484
|
+
// lines). Leaf poisoned classes stay deferred — only the extends edge
|
|
485
|
+
// reports. Resolution runs under the collect pass's guard (this is
|
|
486
|
+
// collectProgram), so the lookup neither flushes nor fences.
|
|
487
|
+
{
|
|
488
|
+
const baseIdent = decl.heritageClauses
|
|
489
|
+
?.find((h) => h.token === ts.SyntaxKind.ExtendsKeyword)
|
|
490
|
+
?.types.map((t) => t.expression)
|
|
491
|
+
.filter(ts.isIdentifier)[0];
|
|
492
|
+
const baseSym = baseIdent ? L.resolveValueSymbol(baseIdent) : null;
|
|
493
|
+
const baseDiags = baseSym ? L.deferredDiags.get(baseSym) : undefined;
|
|
494
|
+
if (baseSym && baseDiags) {
|
|
495
|
+
L.deferredDiags.delete(baseSym);
|
|
496
|
+
if (!L.alreadyFlushed.has(baseSym)) {
|
|
497
|
+
L.flushedSymbols.add(baseSym);
|
|
498
|
+
for (const d of baseDiags)
|
|
499
|
+
L.pushDiag(d);
|
|
500
|
+
}
|
|
501
|
+
}
|
|
502
|
+
}
|
|
477
503
|
}
|
|
478
504
|
export function collectClassShapeInner(L, decl, jsNameOverride, inst,
|
|
479
505
|
/** MIXIN instantiation mode (lower-mixins.ts): the class inside a
|
|
@@ -4362,7 +4388,7 @@ export function lowerNew(L, expr) {
|
|
|
4362
4388
|
// like Node's message property default.
|
|
4363
4389
|
const errInfo = L.builtinErrorInfoOf(symbol);
|
|
4364
4390
|
// `new DOMException(message?, nameOrOptions?)`: both arguments cross
|
|
4365
|
-
// as
|
|
4391
|
+
// as dyn values (absent → the dyn undefined), and the runtime owns
|
|
4366
4392
|
// WebIDL's resolution — ToString of the message ("" for undefined),
|
|
4367
4393
|
// name from a string / an options object's `name` member (with the
|
|
4368
4394
|
// `cause` own-property record) / "Error" for absent, and the legacy
|
|
@@ -4623,7 +4649,7 @@ export function lowerNew(L, expr) {
|
|
|
4623
4649
|
const targs = L.checker.getTypeArguments(tsType);
|
|
4624
4650
|
// JAVASCRIPT `new Map()` whose arguments never resolved past
|
|
4625
4651
|
// Map<any, any> (no annotation, no contextual type, no seed): the
|
|
4626
|
-
// WeakMap stance below — the VALUE lowers as an opaque
|
|
4652
|
+
// WeakMap stance below — the VALUE lowers as an opaque dyn object
|
|
4627
4653
|
// (identity and truthiness are real), and every reached METHOD use
|
|
4628
4654
|
// meets its own per-site fence at runtime. The formatter's
|
|
4629
4655
|
// config-cache shape: module init constructs the caches
|
|
@@ -4656,7 +4682,7 @@ export function lowerNew(L, expr) {
|
|
|
4656
4682
|
// `new WeakMap()` / `new WeakSet()` in JAVASCRIPT sources: no weak
|
|
4657
4683
|
// container exists in the value model, but harness code constructs
|
|
4658
4684
|
// one unconditionally and touches it only on paths tests don't
|
|
4659
|
-
// reach — the value lowers as an opaque
|
|
4685
|
+
// reach — the value lowers as an opaque dyn object (identity only;
|
|
4660
4686
|
// every reached METHOD use meets its own per-site fence → runtime
|
|
4661
4687
|
// fence). TypeScript keeps the compile fence.
|
|
4662
4688
|
if ((symbol?.name === "WeakMap" || symbol?.name === "WeakSet") &&
|
|
@@ -4756,14 +4782,14 @@ export function lowerNew(L, expr) {
|
|
|
4756
4782
|
// `new Promise(setImmediate)` (the Node-suite early-exit shape):
|
|
4757
4783
|
// the executor IS the stdlib setImmediate, so resolve rides the
|
|
4758
4784
|
// immediate queue — a dedicated runtime constructor arms an
|
|
4759
|
-
// immediate that fulfills with the undefined
|
|
4785
|
+
// immediate that fulfills with the undefined dyn value.
|
|
4760
4786
|
{
|
|
4761
4787
|
const a0 = args[0];
|
|
4762
4788
|
if (ts.isIdentifier(a0) && a0.text === "setImmediate") {
|
|
4763
4789
|
const sym = L.checker.getSymbolAtLocation(a0);
|
|
4764
4790
|
const decls = sym ? L.checker.declarationsOf(sym) : [];
|
|
4765
4791
|
if (decls.length > 0 && decls.every((d) => L.isStdlibFile(d.getSourceFile()))) {
|
|
4766
|
-
// The settled value is the undefined
|
|
4792
|
+
// The settled value is the undefined dyn value — the result
|
|
4767
4793
|
// is promise<dyn> whatever T the checker inferred for the
|
|
4768
4794
|
// unusual executor (Promise<unknown> in the suite's shape).
|
|
4769
4795
|
return {
|