@scriptc/compiler 0.0.32 → 0.0.34
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/backend/cc-cache.test.js +430 -1
- package/dist/backend/cc-cache.test.js.map +1 -1
- package/dist/backend/cc.d.ts +25 -0
- package/dist/backend/cc.js +818 -88
- package/dist/backend/cc.js.map +1 -1
- package/dist/backend/emission/emit-exprs.js +79 -3
- package/dist/backend/emission/emit-exprs.js.map +1 -1
- package/dist/backend/emission/emit-shapes.js +37 -4
- package/dist/backend/emission/emit-shapes.js.map +1 -1
- package/dist/backend/emission/emitter.d.ts +23 -7
- package/dist/backend/emission/emitter.js +171 -27
- package/dist/backend/emission/emitter.js.map +1 -1
- package/dist/backend/emission/may-throw.js +7 -4
- package/dist/backend/emission/may-throw.js.map +1 -1
- package/dist/backend/ffi-callbacks.d.ts +38 -1
- package/dist/backend/ffi-callbacks.js +76 -3
- package/dist/backend/ffi-callbacks.js.map +1 -1
- package/dist/backend/library-identity.d.ts +22 -0
- package/dist/backend/library-identity.js +103 -0
- package/dist/backend/library-identity.js.map +1 -0
- package/dist/backend/llvm/emitter.d.ts +3 -0
- package/dist/backend/llvm/emitter.js +278 -17
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/shapes.d.ts +1 -0
- package/dist/backend/llvm/shapes.js +25 -1
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/mangle.d.ts +1 -0
- package/dist/backend/mangle.js +3 -0
- package/dist/backend/mangle.js.map +1 -1
- package/dist/backend/object-localize.d.ts +5 -5
- package/dist/backend/object-localize.js +19 -16
- package/dist/backend/object-localize.js.map +1 -1
- package/dist/backend/object-localize.test.js +37 -13
- package/dist/backend/object-localize.test.js.map +1 -1
- package/dist/diagnostics/diagnostic.js +2 -0
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/ffi/profile.d.ts +17 -5
- package/dist/ffi/profile.js +169 -22
- package/dist/ffi/profile.js.map +1 -1
- package/dist/frontend/input-tracker.d.ts +82 -0
- package/dist/frontend/input-tracker.js +380 -0
- package/dist/frontend/input-tracker.js.map +1 -0
- package/dist/frontend/input-tracker.test.d.ts +1 -0
- package/dist/frontend/input-tracker.test.js +137 -0
- package/dist/frontend/input-tracker.test.js.map +1 -0
- package/dist/frontend/lowering/lower-builtins.js +2 -8
- package/dist/frontend/lowering/lower-builtins.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +1 -0
- package/dist/frontend/lowering/lower-calls.js +244 -163
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.js +3 -0
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-containers.js +113 -28
- package/dist/frontend/lowering/lower-containers.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.js +67 -1
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +45 -26
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.js +1 -1
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.js +48 -3
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +79 -29
- package/dist/frontend/lowering/lowerer.js +429 -87
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/npm-static-rewrite.js +25 -26
- package/dist/frontend/npm-static-rewrite.js.map +1 -1
- package/dist/frontend/npm-static.js +29 -30
- package/dist/frontend/npm-static.js.map +1 -1
- package/dist/frontend/npm-static.test.d.ts +1 -0
- package/dist/frontend/npm-static.test.js +15 -0
- package/dist/frontend/npm-static.test.js.map +1 -0
- package/dist/frontend/npm.js +5 -17
- package/dist/frontend/npm.js.map +1 -1
- package/dist/frontend/program.js +2 -6
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/resolve.js +8 -29
- package/dist/frontend/resolve.js.map +1 -1
- package/dist/frontend/ts7/checker.d.ts +2 -0
- package/dist/frontend/ts7/checker.js +20 -3
- package/dist/frontend/ts7/checker.js.map +1 -1
- package/dist/frontend/ts7/program.js +17 -18
- package/dist/frontend/ts7/program.js.map +1 -1
- package/dist/frontend/types.d.ts +41 -0
- package/dist/frontend/types.js +147 -8
- package/dist/frontend/types.js.map +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +275 -41
- package/dist/index.js.map +1 -1
- package/dist/ir/nodes.d.ts +42 -12
- package/dist/ir/nodes.js +7 -1
- package/dist/ir/nodes.js.map +1 -1
- package/dist/ir/serialize.d.ts +1 -1
- package/dist/ir/serialize.js +1 -1
- package/dist/ir/validate.js +104 -1
- package/dist/ir/validate.js.map +1 -1
- package/dist/library/early-cache.d.ts +65 -0
- package/dist/library/early-cache.js +380 -0
- package/dist/library/early-cache.js.map +1 -0
- package/dist/library/early-cache.test.d.ts +1 -0
- package/dist/library/early-cache.test.js +528 -0
- package/dist/library/early-cache.test.js.map +1 -0
- package/dist/library/int-infer.js +14 -0
- package/dist/library/int-infer.js.map +1 -1
- package/dist/library/int-infer.test.js +21 -4
- package/dist/library/int-infer.test.js.map +1 -1
- package/dist/library/profile.d.ts +3 -0
- package/dist/library/profile.js +9 -1
- package/dist/library/profile.js.map +1 -1
- package/dist/library/semantic-source.d.ts +13 -0
- package/dist/library/semantic-source.js +257 -0
- package/dist/library/semantic-source.js.map +1 -0
- package/dist/library/semantic-source.test.d.ts +1 -0
- package/dist/library/semantic-source.test.js +113 -0
- package/dist/library/semantic-source.test.js.map +1 -0
- package/dist/library/sidecar.d.ts +6 -0
- package/dist/library/sidecar.js +11 -0
- package/dist/library/sidecar.js.map +1 -1
- package/package.json +2 -2
- package/surface-manifest.json +1 -1
package/dist/backend/cc.d.ts
CHANGED
|
@@ -173,6 +173,10 @@ export interface CcOptions {
|
|
|
173
173
|
* scr_watch.c into the binary — the net gating precedent, so watch-free
|
|
174
174
|
* binaries keep their exact link line. */
|
|
175
175
|
watch?: boolean;
|
|
176
|
+
/** The executable manifest has a format-5 foreign callback descriptor:
|
|
177
|
+
* compiles the MPSC queue/self-pipe unit. Other FFI and non-FFI binaries
|
|
178
|
+
* keep their existing runtime size class. */
|
|
179
|
+
foreignFfi?: boolean;
|
|
176
180
|
/** The program uses node:test (moduleUsesNodeTest on the IR): compiles
|
|
177
181
|
* scr_test.c into the binary — the net gating precedent, so test-free
|
|
178
182
|
* binaries keep their exact link line. */
|
|
@@ -267,6 +271,15 @@ export declare function vendorCacheBuildIdentity(environmentFingerprint: string,
|
|
|
267
271
|
export interface LibArchiveOptions {
|
|
268
272
|
/** The program TU (.c or .ll — clang compiles either with -c). */
|
|
269
273
|
cPath: string;
|
|
274
|
+
/** Invocation-owned program source to compile under `cPath`'s public
|
|
275
|
+
* spelling. Library assembly uses this for the identity-free projection of
|
|
276
|
+
* a complete caller-visible TU; its bytes drive every native cache key. */
|
|
277
|
+
programSource?: string;
|
|
278
|
+
/** Tiny generated C source carrying volatile library identity getters.
|
|
279
|
+
* Its bytes join the complete archive key, but the source itself exists
|
|
280
|
+
* only in the invocation-private build directory and the large program-
|
|
281
|
+
* object cache is keyed independently. */
|
|
282
|
+
identityCSource?: string;
|
|
270
283
|
/** The archive to produce (<name>.lib.a). */
|
|
271
284
|
outPath: string;
|
|
272
285
|
/** Caller-owned identity for the generated TU's complete non-system
|
|
@@ -274,6 +287,8 @@ export interface LibArchiveOptions {
|
|
|
274
287
|
* matching compileC's arbitrary-input safety boundary. */
|
|
275
288
|
cacheIdentity?: string;
|
|
276
289
|
sanitize?: boolean;
|
|
290
|
+
/** Native optimization posture: release = -O2, dev = -O0. */
|
|
291
|
+
optimization?: "release" | "dev";
|
|
277
292
|
/** Multi-instance library mode (the profile's abi.localize_runtime): the
|
|
278
293
|
* external symbols to KEEP global — every other scriptc external
|
|
279
294
|
* definition in the archive (the runtime's internals, the program TU's
|
|
@@ -312,6 +327,16 @@ export declare function compileLibArchive(opts: LibArchiveOptions): Promise<void
|
|
|
312
327
|
/** Resolve the build cache without touching the filesystem. Exported from this
|
|
313
328
|
* internal module so its platform and override behavior can be pinned directly. */
|
|
314
329
|
export declare function resolveBuildCacheRoot(env?: NodeJS.ProcessEnv, platform?: NodeJS.Platform, userHome?: string): string | null;
|
|
330
|
+
/** Shared persistent-cache root for compiler-level tiers. The early library
|
|
331
|
+
* cache deliberately follows the native cache's activation and hard-disable
|
|
332
|
+
* contract, while native compilation retains ownership of toolchain safety. */
|
|
333
|
+
export declare function buildCacheRoot(): string | null;
|
|
334
|
+
/** Harden/create a compiler-level cache root using the same privacy policy as
|
|
335
|
+
* the artifact caches. Failure disables only the optional caller's tier. */
|
|
336
|
+
export declare function prepareBuildCacheRoot(root: string | null): Promise<string | null>;
|
|
337
|
+
/** Register a successful compiler-level cache write with the shared bounded
|
|
338
|
+
* LRU policy. */
|
|
339
|
+
export declare function pruneBuildCache(root: string | null): Promise<void>;
|
|
315
340
|
export declare function ccVersionOnce(argv: string[], environmentFingerprint?: string, fresh?: boolean): Promise<string>;
|
|
316
341
|
/** Every system-header spelling consumed by a source tree scriptc owns. The
|
|
317
342
|
* dependency probe preprocesses these spellings with the selected driver and
|