@scriptc/compiler 0.0.21 → 0.0.22
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 +78 -34
- package/dist/backend/cc-cache.test.d.ts +1 -0
- package/dist/backend/cc-cache.test.js +2507 -0
- package/dist/backend/cc-cache.test.js.map +1 -0
- package/dist/backend/cc.d.ts +69 -11
- package/dist/backend/cc.js +1937 -222
- package/dist/backend/cc.js.map +1 -1
- package/dist/backend/emission/emit-exprs.js +355 -8
- package/dist/backend/emission/emit-exprs.js.map +1 -1
- package/dist/backend/emission/emit-walkers.js +108 -7
- package/dist/backend/emission/emit-walkers.js.map +1 -1
- package/dist/backend/emission/emitter.d.ts +16 -0
- package/dist/backend/emission/emitter.js +23 -2
- package/dist/backend/emission/emitter.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +1 -0
- package/dist/backend/llvm/dyn.js +305 -8
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.js +527 -2
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/compat/fetch-profile.d.ts +108 -0
- package/dist/compat/fetch-profile.js +482 -0
- package/dist/compat/fetch-profile.js.map +1 -0
- package/dist/coverage/surface-manifest.js +54 -0
- package/dist/coverage/surface-manifest.js.map +1 -1
- package/dist/frontend/lowering/lower-builtins.d.ts +21 -8
- package/dist/frontend/lowering/lower-builtins.js +137 -14
- package/dist/frontend/lowering/lower-builtins.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.js +40 -0
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.js +4 -3
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +2 -2
- package/dist/frontend/lowering/lower-exprs.js +63 -12
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-island.d.ts +102 -7
- package/dist/frontend/lowering/lower-island.js +1702 -26
- package/dist/frontend/lowering/lower-island.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.js +17 -1
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.js +25 -5
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +39 -0
- package/dist/frontend/lowering/lowerer.js +286 -18
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/surfaces.js +12 -0
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/program.d.ts +16 -0
- package/dist/frontend/program.js +130 -6
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/types.d.ts +14 -7
- package/dist/frontend/types.js +95 -31
- package/dist/frontend/types.js.map +1 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +70 -14
- package/dist/index.js.map +1 -1
- package/dist/ir/nodes.d.ts +32 -16
- package/dist/ir/nodes.js +36 -28
- package/dist/ir/nodes.js.map +1 -1
- package/dist/ir/validate.js +61 -1
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/int-infer.js +7 -1
- package/dist/library/int-infer.js.map +1 -1
- package/dist/library/int-infer.test.js +80 -0
- package/dist/library/int-infer.test.js.map +1 -1
- package/dist/library/sidecar-validate.js +5 -0
- package/dist/library/sidecar-validate.js.map +1 -1
- package/dist/library/sidecar.d.ts +3 -0
- package/dist/library/sidecar.js.map +1 -1
- package/package.json +2 -2
- package/surface-manifest.json +859 -1
|
@@ -473,10 +473,11 @@ interface BufferConstructor {
|
|
|
473
473
|
}
|
|
474
474
|
declare var Buffer: BufferConstructor;
|
|
475
475
|
|
|
476
|
-
/* The WHATWG encoders (Node globals).
|
|
477
|
-
* `new TextEncoder().encode(s)` and `new TextDecoder().decode(bytes)
|
|
478
|
-
*
|
|
479
|
-
*
|
|
476
|
+
/* The WHATWG encoders (Node globals). The COMPOSED forms lower —
|
|
477
|
+
* `new TextEncoder().encode(s)` and `new TextDecoder().decode(bytes)` —
|
|
478
|
+
* as do same-scope const store-then-call forms. The label is typed as the
|
|
479
|
+
* utf-8 spellings (the one supported decoder; other labels and the
|
|
480
|
+
* fatal/ignoreBOM options fence at the use site). */
|
|
480
481
|
interface TextEncoder {
|
|
481
482
|
encode(input?: string): Uint8Array;
|
|
482
483
|
}
|
|
@@ -587,10 +588,9 @@ declare var MessageChannel: {
|
|
|
587
588
|
readonly prototype: MessageChannel;
|
|
588
589
|
};
|
|
589
590
|
|
|
590
|
-
/* AbortSignal, the fetch-cancellation slice
|
|
591
|
-
*
|
|
592
|
-
*
|
|
593
|
-
* statically, with the island's real implementation behind --dynamic). */
|
|
591
|
+
/* AbortSignal, the native fetch-cancellation slice. The three statics,
|
|
592
|
+
* state/reason reads, throwIfAborted, and abort listeners all lower in
|
|
593
|
+
* static builds; dynamic builds use the island's Web implementation. */
|
|
594
594
|
interface AbortSignal extends EventTarget {
|
|
595
595
|
readonly aborted: boolean;
|
|
596
596
|
readonly reason: unknown;
|
|
@@ -604,22 +604,55 @@ declare var AbortSignal: {
|
|
|
604
604
|
readonly prototype: AbortSignal;
|
|
605
605
|
};
|
|
606
606
|
|
|
607
|
-
|
|
608
|
-
|
|
609
|
-
|
|
610
|
-
|
|
611
|
-
|
|
612
|
-
|
|
613
|
-
|
|
614
|
-
|
|
615
|
-
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
|
|
622
|
-
|
|
607
|
+
interface ReadableStreamReadValueResult<T> {
|
|
608
|
+
done: false;
|
|
609
|
+
value: T;
|
|
610
|
+
}
|
|
611
|
+
interface ReadableStreamReadDoneResult<T> {
|
|
612
|
+
done: true;
|
|
613
|
+
value: T | undefined;
|
|
614
|
+
}
|
|
615
|
+
type ReadableStreamReadResult<T> =
|
|
616
|
+
| ReadableStreamReadValueResult<T>
|
|
617
|
+
| ReadableStreamReadDoneResult<T>;
|
|
618
|
+
interface ReadableStreamDefaultReader<T = unknown> {
|
|
619
|
+
readonly closed: Promise<void>;
|
|
620
|
+
read(): Promise<ReadableStreamReadResult<T>>;
|
|
621
|
+
cancel(reason?: unknown): Promise<void>;
|
|
622
|
+
releaseLock(): void;
|
|
623
|
+
}
|
|
624
|
+
interface ReadableStreamDefaultController<T = unknown> {
|
|
625
|
+
readonly desiredSize: number | null;
|
|
626
|
+
enqueue(chunk?: T): void;
|
|
627
|
+
close(): void;
|
|
628
|
+
error(reason?: unknown): void;
|
|
629
|
+
}
|
|
630
|
+
interface UnderlyingSource<T = unknown> {
|
|
631
|
+
start?(controller: ReadableStreamDefaultController<T>): unknown;
|
|
632
|
+
pull?(controller: ReadableStreamDefaultController<T>): unknown;
|
|
633
|
+
cancel?(reason?: unknown): unknown;
|
|
634
|
+
}
|
|
635
|
+
interface ReadableStream<T = unknown> {
|
|
636
|
+
readonly locked: boolean;
|
|
637
|
+
cancel(reason?: unknown): Promise<void>;
|
|
638
|
+
getReader(): ReadableStreamDefaultReader<T>;
|
|
639
|
+
}
|
|
640
|
+
declare var ReadableStream: {
|
|
641
|
+
new <T = unknown>(source?: UnderlyingSource<T>): ReadableStream<T>;
|
|
642
|
+
from<T>(iterable: readonly T[]): ReadableStream<T>;
|
|
643
|
+
from(iterable: Uint8Array): ReadableStream<number>;
|
|
644
|
+
from(iterable: string): ReadableStream<string>;
|
|
645
|
+
readonly prototype: ReadableStream<unknown>;
|
|
646
|
+
};
|
|
647
|
+
|
|
648
|
+
/* fetch, typed as the native JSON + readable-stream slice: one URL, an
|
|
649
|
+
* optional init with the members CLI requests carry, and a Response
|
|
650
|
+
* whose body is the same stream consumed by json(). json() returns
|
|
651
|
+
* unknown — the same dynamic boundary as JSON.parse: cast and validate. */
|
|
652
|
+
/* Headers — a response's native header map (lowercase names,
|
|
653
|
+
* combine-on-append, sorted iteration). The value is a checked-dynamic
|
|
654
|
+
* native handle like Response itself; constructing one statically
|
|
655
|
+
* (`new Headers()`) keeps the constructor fence. */
|
|
623
656
|
interface Headers {
|
|
624
657
|
append(name: string, value: string): void;
|
|
625
658
|
delete(name: string): void;
|
|
@@ -627,8 +660,16 @@ interface Headers {
|
|
|
627
660
|
getSetCookie(): string[];
|
|
628
661
|
has(name: string): boolean;
|
|
629
662
|
set(name: string, value: string): void;
|
|
630
|
-
forEach(
|
|
663
|
+
forEach(
|
|
664
|
+
callbackfn: (value: string, key: string, parent: Headers) => void,
|
|
665
|
+
thisArg?: unknown,
|
|
666
|
+
): void;
|
|
667
|
+
[Symbol.iterator](): IterableIterator<[string, string]>;
|
|
631
668
|
}
|
|
669
|
+
declare var Headers: {
|
|
670
|
+
new (init?: Record<string, string> | readonly (readonly [string, string])[]): Headers;
|
|
671
|
+
readonly prototype: Headers;
|
|
672
|
+
};
|
|
632
673
|
interface Response {
|
|
633
674
|
readonly ok: boolean;
|
|
634
675
|
readonly status: number;
|
|
@@ -636,23 +677,26 @@ interface Response {
|
|
|
636
677
|
readonly url: string;
|
|
637
678
|
readonly redirected: boolean;
|
|
638
679
|
readonly headers: Headers;
|
|
639
|
-
readonly body:
|
|
680
|
+
readonly body: ReadableStream<Uint8Array> | null;
|
|
640
681
|
readonly bodyUsed: boolean;
|
|
641
682
|
json(): Promise<unknown>;
|
|
642
683
|
text(): Promise<string>;
|
|
643
|
-
/* The whole body as bytes:
|
|
644
|
-
*
|
|
645
|
-
*
|
|
646
|
-
*
|
|
647
|
-
* boundary (`const b: Uint8Array = await r.bytes()` is a validated
|
|
648
|
-
* copy — divergence 44's aliasing stance). */
|
|
684
|
+
/* The whole body as bytes: bytes() answers a Uint8Array in both tiers.
|
|
685
|
+
* arrayBuffer() remains dynamic-only because static programs have no
|
|
686
|
+
* free-standing ArrayBuffer representation; the compiler diagnoses its
|
|
687
|
+
* direct use and points at bytes(). */
|
|
649
688
|
arrayBuffer(): Promise<ArrayBuffer>;
|
|
650
689
|
bytes(): Promise<Uint8Array>;
|
|
651
690
|
}
|
|
652
691
|
interface RequestInit {
|
|
653
692
|
method?: string;
|
|
654
|
-
headers?:
|
|
655
|
-
|
|
693
|
+
headers?:
|
|
694
|
+
| Headers
|
|
695
|
+
| Record<string, string>
|
|
696
|
+
| readonly (readonly [string, string])[];
|
|
697
|
+
body?: string | Uint8Array | ReadableStream<Uint8Array> | null;
|
|
698
|
+
duplex?: "half";
|
|
699
|
+
redirect?: "follow" | "error" | "manual";
|
|
656
700
|
signal?: AbortSignal;
|
|
657
701
|
}
|
|
658
702
|
declare function fetch(input: string | URL, init?: RequestInit): Promise<Response>;
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export {};
|