@scriptc/compiler 0.2.0 → 0.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.
- package/ambient/scriptc-node-fallback.d.ts +84 -19
- package/dist/backend/cycle-analysis.js +1 -0
- package/dist/backend/cycle-analysis.js.map +1 -1
- package/dist/backend/llvm/classes.js +21 -5
- package/dist/backend/llvm/classes.js.map +1 -1
- package/dist/backend/llvm/dyn.d.ts +8 -0
- package/dist/backend/llvm/dyn.js +247 -108
- package/dist/backend/llvm/dyn.js.map +1 -1
- package/dist/backend/llvm/emitter.d.ts +6 -3
- package/dist/backend/llvm/emitter.js +99 -25
- package/dist/backend/llvm/emitter.js.map +1 -1
- package/dist/backend/llvm/emitter.test.js +9 -1
- package/dist/backend/llvm/emitter.test.js.map +1 -1
- package/dist/backend/llvm/expr-bytes.d.ts +1 -1
- package/dist/backend/llvm/expr-bytes.js +28 -17
- package/dist/backend/llvm/expr-bytes.js.map +1 -1
- package/dist/backend/llvm/expr-containers.js +5 -0
- package/dist/backend/llvm/expr-containers.js.map +1 -1
- package/dist/backend/llvm/expr-control.js +1 -1
- package/dist/backend/llvm/expr-control.js.map +1 -1
- package/dist/backend/llvm/expr-dynamic.js +47 -13
- package/dist/backend/llvm/expr-dynamic.js.map +1 -1
- package/dist/backend/llvm/expr-primitives.js +11 -1
- package/dist/backend/llvm/expr-primitives.js.map +1 -1
- package/dist/backend/llvm/expr-records.js +11 -3
- package/dist/backend/llvm/expr-records.js.map +1 -1
- package/dist/backend/llvm/expr-stream-bridges.js +187 -18
- package/dist/backend/llvm/expr-stream-bridges.js.map +1 -1
- package/dist/backend/llvm/expr-stream-callbacks.d.ts +2 -2
- package/dist/backend/llvm/expr-stream-callbacks.js +7 -57
- package/dist/backend/llvm/expr-stream-callbacks.js.map +1 -1
- package/dist/backend/llvm/lib-dispatch.js +41 -3
- package/dist/backend/llvm/lib-dispatch.js.map +1 -1
- package/dist/backend/llvm/lib-filesystem.js +12 -9
- package/dist/backend/llvm/lib-filesystem.js.map +1 -1
- package/dist/backend/llvm/lib-process.js +23 -3
- package/dist/backend/llvm/lib-process.js.map +1 -1
- package/dist/backend/llvm/lib-shared.js +80 -3
- package/dist/backend/llvm/lib-shared.js.map +1 -1
- package/dist/backend/llvm/shapes.js +8 -2
- package/dist/backend/llvm/shapes.js.map +1 -1
- package/dist/backend/may-throw.js +4 -0
- package/dist/backend/may-throw.js.map +1 -1
- package/dist/backend/native-codegen.d.ts +1 -1
- package/dist/backend/native-codegen.js +4 -3
- package/dist/backend/native-codegen.js.map +1 -1
- package/dist/backend/native-codegen.test.js +11 -0
- package/dist/backend/native-codegen.test.js.map +1 -1
- package/dist/backend/native-toolchain.d.ts +3 -6
- package/dist/backend/native-toolchain.js +53 -23
- package/dist/backend/native-toolchain.js.map +1 -1
- package/dist/backend/native-toolchain.test.js +72 -0
- package/dist/backend/native-toolchain.test.js.map +1 -1
- package/dist/backend/runtime-abi.d.ts +2 -2
- package/dist/backend/runtime-abi.js +2 -2
- package/dist/backend/runtime-pack-native.js +4 -1
- package/dist/backend/runtime-pack-native.js.map +1 -1
- package/dist/backend/runtime-pack-targets.test.js +1 -1
- package/dist/backend/runtime-pack.test.js +1 -1
- package/dist/backend/target-diagnostics.d.ts +5 -0
- package/dist/backend/target-diagnostics.js +72 -1
- package/dist/backend/target-diagnostics.js.map +1 -1
- package/dist/backend/target-diagnostics.test.d.ts +1 -0
- package/dist/backend/target-diagnostics.test.js +68 -0
- package/dist/backend/target-diagnostics.test.js.map +1 -0
- package/dist/backend/targets.js +10 -6
- package/dist/backend/targets.js.map +1 -1
- package/dist/backend/targets.test.js +7 -0
- package/dist/backend/targets.test.js.map +1 -1
- package/dist/compat/fetch-profile.js +34 -4
- package/dist/compat/fetch-profile.js.map +1 -1
- package/dist/coverage/surface-manifest.js +5 -3
- package/dist/coverage/surface-manifest.js.map +1 -1
- package/dist/diagnostics/diagnostic.js +2 -7
- package/dist/diagnostics/diagnostic.js.map +1 -1
- package/dist/executable/executable-cache.d.ts +7 -3
- package/dist/executable/executable-cache.js +47 -11
- package/dist/executable/executable-cache.js.map +1 -1
- package/dist/executable/executable-cache.test.js +109 -2
- package/dist/executable/executable-cache.test.js.map +1 -1
- package/dist/executable/prepare.js +2 -1
- package/dist/executable/prepare.js.map +1 -1
- package/dist/frontend/builtin-modules.d.ts +1 -1
- package/dist/frontend/builtin-modules.js +1 -1
- package/dist/frontend/builtin-modules.js.map +1 -1
- package/dist/frontend/function-completion.d.ts +6 -0
- package/dist/frontend/function-completion.js +50 -0
- package/dist/frontend/function-completion.js.map +1 -0
- package/dist/frontend/lowering/abstract-equality.js +5 -1
- package/dist/frontend/lowering/abstract-equality.js.map +1 -1
- package/dist/frontend/lowering/checked-iterable-spread.d.ts +4 -0
- package/dist/frontend/lowering/checked-iterable-spread.js +30 -0
- package/dist/frontend/lowering/checked-iterable-spread.js.map +1 -0
- package/dist/frontend/lowering/checked-promise-all.d.ts +5 -0
- package/dist/frontend/lowering/checked-promise-all.js +31 -0
- package/dist/frontend/lowering/checked-promise-all.js.map +1 -0
- package/dist/frontend/lowering/class-callbacks.d.ts +4 -4
- package/dist/frontend/lowering/class-callbacks.js +29 -17
- package/dist/frontend/lowering/class-callbacks.js.map +1 -1
- package/dist/frontend/lowering/class-construction.d.ts +14 -0
- package/dist/frontend/lowering/class-construction.js +185 -0
- package/dist/frontend/lowering/class-construction.js.map +1 -0
- package/dist/frontend/lowering/class-descriptors.d.ts +2 -1
- package/dist/frontend/lowering/class-descriptors.js +58 -10
- package/dist/frontend/lowering/class-descriptors.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.d.ts +36 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.js +965 -91
- package/dist/frontend/lowering/class-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js +66 -3
- package/dist/frontend/lowering/class-dynamic-dispatch.test.js.map +1 -1
- package/dist/frontend/lowering/class-instance-constructor.d.ts +1 -1
- package/dist/frontend/lowering/class-instance-constructor.js +15 -42
- package/dist/frontend/lowering/class-instance-constructor.js.map +1 -1
- package/dist/frontend/lowering/class-method-values.d.ts +20 -1
- package/dist/frontend/lowering/class-method-values.js +120 -24
- package/dist/frontend/lowering/class-method-values.js.map +1 -1
- package/dist/frontend/lowering/class-prototypes.d.ts +10 -3
- package/dist/frontend/lowering/class-prototypes.js +188 -21
- package/dist/frontend/lowering/class-prototypes.js.map +1 -1
- package/dist/frontend/lowering/class-runtime-statics.d.ts +8 -0
- package/dist/frontend/lowering/class-runtime-statics.js +84 -0
- package/dist/frontend/lowering/class-runtime-statics.js.map +1 -0
- package/dist/frontend/lowering/class-static-data.d.ts +1 -0
- package/dist/frontend/lowering/class-static-data.js +6 -4
- package/dist/frontend/lowering/class-static-data.js.map +1 -1
- package/dist/frontend/lowering/containers/bytes.js +66 -17
- package/dist/frontend/lowering/containers/bytes.js.map +1 -1
- package/dist/frontend/lowering/containers/string-and-regexp.js +24 -47
- package/dist/frontend/lowering/containers/string-and-regexp.js.map +1 -1
- package/dist/frontend/lowering/deferred-module-initializers.d.ts +13 -0
- package/dist/frontend/lowering/deferred-module-initializers.js +410 -0
- package/dist/frontend/lowering/deferred-module-initializers.js.map +1 -0
- package/dist/frontend/lowering/deferred-module-initializers.test.d.ts +1 -0
- package/dist/frontend/lowering/deferred-module-initializers.test.js +92 -0
- package/dist/frontend/lowering/deferred-module-initializers.test.js.map +1 -0
- package/dist/frontend/lowering/error-methods.d.ts +4 -1
- package/dist/frontend/lowering/error-methods.js +100 -1
- package/dist/frontend/lowering/error-methods.js.map +1 -1
- package/dist/frontend/lowering/expressions/native-proxy.js +3 -1
- package/dist/frontend/lowering/expressions/native-proxy.js.map +1 -1
- package/dist/frontend/lowering/expressions/nullish-assignment.js +19 -11
- package/dist/frontend/lowering/expressions/nullish-assignment.js.map +1 -1
- package/dist/frontend/lowering/expressions/object-literals.js +68 -7
- package/dist/frontend/lowering/expressions/object-literals.js.map +1 -1
- package/dist/frontend/lowering/expressions/optional-chains.d.ts +3 -4
- package/dist/frontend/lowering/expressions/optional-chains.js +72 -20
- package/dist/frontend/lowering/expressions/optional-chains.js.map +1 -1
- package/dist/frontend/lowering/function-context.d.ts +11 -3
- package/dist/frontend/lowering/function-context.js +11 -5
- package/dist/frontend/lowering/function-context.js.map +1 -1
- package/dist/frontend/lowering/generator-dynamic-dispatch.d.ts +1 -0
- package/dist/frontend/lowering/generator-dynamic-dispatch.js +39 -1
- package/dist/frontend/lowering/generator-dynamic-dispatch.js.map +1 -1
- package/dist/frontend/lowering/lib-boundary.d.ts +2 -0
- package/dist/frontend/lowering/lib-boundary.js +54 -1
- package/dist/frontend/lowering/lib-boundary.js.map +1 -1
- package/dist/frontend/lowering/lower-builtin-values.d.ts +7 -1
- package/dist/frontend/lowering/lower-builtin-values.js +113 -3
- package/dist/frontend/lowering/lower-builtin-values.js.map +1 -1
- package/dist/frontend/lowering/lower-builtins.d.ts +10 -14
- package/dist/frontend/lowering/lower-builtins.js +443 -88
- package/dist/frontend/lowering/lower-builtins.js.map +1 -1
- package/dist/frontend/lowering/lower-calls.d.ts +8 -5
- package/dist/frontend/lowering/lower-calls.js +717 -142
- package/dist/frontend/lowering/lower-calls.js.map +1 -1
- package/dist/frontend/lowering/lower-classes.d.ts +18 -13
- package/dist/frontend/lowering/lower-classes.js +1076 -188
- package/dist/frontend/lowering/lower-classes.js.map +1 -1
- package/dist/frontend/lowering/lower-containers.d.ts +9 -0
- package/dist/frontend/lowering/lower-containers.js +172 -51
- package/dist/frontend/lowering/lower-containers.js.map +1 -1
- package/dist/frontend/lowering/lower-dgram.js +3 -2
- package/dist/frontend/lowering/lower-dgram.js.map +1 -1
- package/dist/frontend/lowering/lower-exprs.d.ts +12 -8
- package/dist/frontend/lowering/lower-exprs.js +802 -232
- package/dist/frontend/lowering/lower-exprs.js.map +1 -1
- package/dist/frontend/lowering/lower-generators.js +17 -2
- package/dist/frontend/lowering/lower-generators.js.map +1 -1
- package/dist/frontend/lowering/lower-inspect.js +15 -1
- package/dist/frontend/lowering/lower-inspect.js.map +1 -1
- package/dist/frontend/lowering/lower-island.d.ts +2 -0
- package/dist/frontend/lowering/lower-island.js +36 -10
- package/dist/frontend/lowering/lower-island.js.map +1 -1
- package/dist/frontend/lowering/lower-island.test.d.ts +1 -0
- package/dist/frontend/lowering/lower-island.test.js +51 -0
- package/dist/frontend/lowering/lower-island.test.js.map +1 -0
- package/dist/frontend/lowering/lower-modules.d.ts +1 -3
- package/dist/frontend/lowering/lower-modules.js +380 -73
- package/dist/frontend/lowering/lower-modules.js.map +1 -1
- package/dist/frontend/lowering/lower-modules.test.d.ts +1 -0
- package/dist/frontend/lowering/lower-modules.test.js +107 -0
- package/dist/frontend/lowering/lower-modules.test.js.map +1 -0
- package/dist/frontend/lowering/lower-stmts.d.ts +7 -3
- package/dist/frontend/lowering/lower-stmts.js +221 -47
- package/dist/frontend/lowering/lower-stmts.js.map +1 -1
- package/dist/frontend/lowering/lower-stmts.test.d.ts +1 -0
- package/dist/frontend/lowering/lower-stmts.test.js +77 -0
- package/dist/frontend/lowering/lower-stmts.test.js.map +1 -0
- package/dist/frontend/lowering/lower-stream.js +3 -1
- package/dist/frontend/lowering/lower-stream.js.map +1 -1
- package/dist/frontend/lowering/lower-url.d.ts +2 -1
- package/dist/frontend/lowering/lower-url.js +32 -9
- package/dist/frontend/lowering/lower-url.js.map +1 -1
- package/dist/frontend/lowering/lowerer.d.ts +53 -10
- package/dist/frontend/lowering/lowerer.js +390 -77
- package/dist/frontend/lowering/lowerer.js.map +1 -1
- package/dist/frontend/lowering/lowerer.test.js +187 -3
- package/dist/frontend/lowering/lowerer.test.js.map +1 -1
- package/dist/frontend/lowering/module-namespace-elements.d.ts +7 -0
- package/dist/frontend/lowering/module-namespace-elements.js +54 -0
- package/dist/frontend/lowering/module-namespace-elements.js.map +1 -0
- package/dist/frontend/lowering/object-factory-new.d.ts +4 -3
- package/dist/frontend/lowering/object-factory-new.js +27 -14
- package/dist/frontend/lowering/object-factory-new.js.map +1 -1
- package/dist/frontend/lowering/surfaces.d.ts +3 -0
- package/dist/frontend/lowering/surfaces.js +48 -19
- package/dist/frontend/lowering/surfaces.js.map +1 -1
- package/dist/frontend/lowering/text-decoder-encoding.d.ts +2 -0
- package/dist/frontend/lowering/text-decoder-encoding.js +8 -0
- package/dist/frontend/lowering/text-decoder-encoding.js.map +1 -1
- package/dist/frontend/lowering/text-decoder-encoding.test.js +2 -1
- package/dist/frontend/lowering/text-decoder-encoding.test.js.map +1 -1
- package/dist/frontend/lowering/unregistered-class-types.test.js +3 -3
- package/dist/frontend/lowering/unregistered-class-types.test.js.map +1 -1
- package/dist/frontend/npm-static-prune.js +116 -34
- package/dist/frontend/npm-static-prune.js.map +1 -1
- package/dist/frontend/npm-static-prune.test.js +8 -0
- package/dist/frontend/npm-static-prune.test.js.map +1 -1
- package/dist/frontend/program.d.ts +1 -1
- package/dist/frontend/program.js +57 -26
- package/dist/frontend/program.js.map +1 -1
- package/dist/frontend/program.test.js +18 -0
- package/dist/frontend/program.test.js.map +1 -1
- package/dist/frontend/ts7/ast.js +4 -3
- package/dist/frontend/ts7/ast.js.map +1 -1
- package/dist/frontend/ts7/semantic-json.js +5 -10
- package/dist/frontend/ts7/semantic-json.js.map +1 -1
- package/dist/frontend/type-mapper.d.ts +9 -1
- package/dist/frontend/type-mapper.js +169 -23
- package/dist/frontend/type-mapper.js.map +1 -1
- package/dist/frontend/type-mapper.test.js +23 -0
- package/dist/frontend/type-mapper.test.js.map +1 -1
- package/dist/frontend/union-discriminants.d.ts +1 -1
- package/dist/frontend/union-discriminants.js +24 -9
- package/dist/frontend/union-discriminants.js.map +1 -1
- package/dist/index.js +16 -10
- package/dist/index.js.map +1 -1
- package/dist/ir/analysis.js +2 -0
- package/dist/ir/analysis.js.map +1 -1
- package/dist/ir/ir.d.ts +74 -41
- package/dist/ir/ir.js +167 -43
- package/dist/ir/ir.js.map +1 -1
- package/dist/ir/ir.test.js +35 -0
- package/dist/ir/ir.test.js.map +1 -1
- package/dist/ir/serialize.js +35 -3
- package/dist/ir/serialize.js.map +1 -1
- package/dist/ir/serialize.test.js +26 -1
- package/dist/ir/serialize.test.js.map +1 -1
- package/dist/ir/traverse.d.ts +0 -3
- package/dist/ir/traverse.js +33 -20
- package/dist/ir/traverse.js.map +1 -1
- package/dist/ir/validate.js +136 -16
- package/dist/ir/validate.js.map +1 -1
- package/dist/ir/validate.test.js +77 -1
- package/dist/ir/validate.test.js.map +1 -1
- package/dist/library/compiler-self-identity.js +1 -1
- package/dist/library/compiler-self-identity.test.js +2 -2
- package/dist/library/compiler-self-identity.test.js.map +1 -1
- package/dist/library/int-infer.d.ts +2 -2
- package/dist/library/int-infer.js +10 -7
- package/dist/library/int-infer.js.map +1 -1
- package/dist/library/int-infer.test.js +44 -0
- package/dist/library/int-infer.test.js.map +1 -1
- package/dist/library/prepare.js +2 -1
- package/dist/library/prepare.js.map +1 -1
- package/dist/native/sanitizer.js +3 -1
- package/dist/native/sanitizer.js.map +1 -1
- package/dist/native/toolchain.d.ts +1 -1
- package/dist/native/toolchain.js +26 -6
- package/dist/native/toolchain.js.map +1 -1
- package/dist/native/toolchain.test.js +53 -1
- package/dist/native/toolchain.test.js.map +1 -1
- package/package.json +20 -20
- package/surface-manifest.json +170 -93
|
@@ -25,6 +25,8 @@ export interface LlvmTargetOptions {
|
|
|
25
25
|
runtimeAbiMarker?: boolean;
|
|
26
26
|
}
|
|
27
27
|
export declare function emitLlvmModule(mod: IrModule, options?: LlvmTargetOptions): string;
|
|
28
|
+
/** Keep large translation units below the host's single-string limit. */
|
|
29
|
+
export declare function emitLlvmModuleSource(mod: IrModule, options?: LlvmTargetOptions): string | readonly string[];
|
|
28
30
|
export declare class LlEmitter {
|
|
29
31
|
readonly mod: IrModule;
|
|
30
32
|
private readonly debug;
|
|
@@ -42,8 +44,8 @@ export declare class LlEmitter {
|
|
|
42
44
|
* immortal (rc == SIZE_MAX) static per (union, unit tag).
|
|
43
45
|
* RC entry points and the collector skip immortals. */
|
|
44
46
|
private readonly unitInstances;
|
|
45
|
-
/**
|
|
46
|
-
* source/flags literal refs } — one immortal ScrRegex per distinct
|
|
47
|
+
/** Regex literal templates: "<flags>/<pattern>" → { symbol, interned
|
|
48
|
+
* source/flags literal refs } — one immortal ScrRegex template per distinct
|
|
47
49
|
* (pattern, flags) pair; the bytecode slot starts null and the runtime
|
|
48
50
|
* compiles it lazily on first use. The source/flags strings intern at
|
|
49
51
|
* REGISTRATION (bodies emit before the literal table flushes). */
|
|
@@ -216,6 +218,7 @@ export declare class LlEmitter {
|
|
|
216
218
|
* outer native call. */
|
|
217
219
|
private emitFfiCallbackDefs;
|
|
218
220
|
emit(): string;
|
|
221
|
+
emitParts(): string[];
|
|
219
222
|
/** LIBRARY mode: the profile-declared external definitions — the
|
|
220
223
|
* export-map wrappers plus init / sink-registration / reset / collect.
|
|
221
224
|
* Plain `define` (not `define internal`) — the exact linkage distinction
|
|
@@ -538,7 +541,7 @@ export declare class LlEmitter {
|
|
|
538
541
|
}): string;
|
|
539
542
|
cryptoBytesThunkFor(cbT: IrType & {
|
|
540
543
|
kind: "func";
|
|
541
|
-
}): string;
|
|
544
|
+
}, arrayBuffer?: boolean): string;
|
|
542
545
|
zlibBytesThunkFor(cbT: IrType & {
|
|
543
546
|
kind: "func";
|
|
544
547
|
}): string;
|
|
@@ -30,7 +30,7 @@ import { findConstantNumericTables } from "../../ir/constant-tables.js";
|
|
|
30
30
|
import { allocateFfiCallbackAdapters, hasForeignFfiCallback, hasRetainedFfiCallback } from "../ffi-callbacks.js";
|
|
31
31
|
import { RUNTIME_ABI_MARKER } from "../runtime-abi.js";
|
|
32
32
|
import { computeMayThrow } from "../may-throw.js";
|
|
33
|
-
import { mangleArgPack, mangleAsyncSpawn, mangleClassObj, mangleClassStruct, mangleFnClosure, mangleFunction, mangleGenDrop, mangleGenSpawn, mangleGlobal, mangleLocal, mangleRecordStruct, mangleTrampoline, mangleWrapper } from "../mangle.js";
|
|
33
|
+
import { mangleArgPack, mangleAsyncSpawn, mangleClassObj, mangleClassStruct, mangleFnClosure, mangleFunction, mangleGenDrop, mangleGenSpawn, mangleGlobal, mangleLocal, mangleRecordStruct, mangleTrampoline, mangleWrapper, mangleVtInstance } from "../mangle.js";
|
|
34
34
|
import { BlockBuilder } from "./blocks.js";
|
|
35
35
|
import { LlvmDebugInfo } from "./debug-info.js";
|
|
36
36
|
import { f64Lit, ffiNativeTypeLl, ffiNativeParamLl, ffiNativeReturnLl, llvmCommentText } from "./common.js";
|
|
@@ -57,7 +57,7 @@ import { buildClassGraph, classEnvironmentIndex, classFieldIndex, classStructSym
|
|
|
57
57
|
import { LlDyn } from "./dyn.js";
|
|
58
58
|
import { LlvmUnsupportedError } from "./unsupported.js";
|
|
59
59
|
import { LlWalkers } from "./walkers.js";
|
|
60
|
-
import { arrNewCall, boxAccess, boxNewCall, computeTraced, elemAccess, FN_ATTRS, llFieldType, releaseSym, retainSym, traceArg, vAdapters, } from "./shapes.js";
|
|
60
|
+
import { arrNewCall, boxAccess, boxNewCall, computeTraced, elemAccess, FN_ATTRS, llFieldType, releaseSym, retainSym, traceArg, typedRefConstructor, vAdapters, } from "./shapes.js";
|
|
61
61
|
export { LlvmUnsupportedError } from "./unsupported.js";
|
|
62
62
|
function ffiCallbackDummyLl(callback) {
|
|
63
63
|
switch (callback.returns) {
|
|
@@ -88,6 +88,14 @@ export function emitLlvmModule(mod, options = {}) {
|
|
|
88
88
|
// Keep source storage intact for debugger inspection in dev builds.
|
|
89
89
|
return new LlEmitter(options.debugSources === undefined ? scalarizeNumericRecords(mod) : mod, options).emit();
|
|
90
90
|
}
|
|
91
|
+
/** Keep large translation units below the host's single-string limit. */
|
|
92
|
+
export function emitLlvmModuleSource(mod, options = {}) {
|
|
93
|
+
const parts = new LlEmitter(options.debugSources === undefined ? scalarizeNumericRecords(mod) : mod, options).emitParts();
|
|
94
|
+
const length = parts.reduce((total, part) => total + part.length, Math.max(0, parts.length - 1));
|
|
95
|
+
if (length <= 256 * 1024 * 1024)
|
|
96
|
+
return parts.join("\n");
|
|
97
|
+
return parts.flatMap((part, index) => index === 0 ? [part] : ["\n", part]);
|
|
98
|
+
}
|
|
91
99
|
function llStrBytes(text) {
|
|
92
100
|
return llBytes(Buffer.from(text, "utf8"));
|
|
93
101
|
}
|
|
@@ -108,8 +116,8 @@ export class LlEmitter {
|
|
|
108
116
|
* immortal (rc == SIZE_MAX) static per (union, unit tag).
|
|
109
117
|
* RC entry points and the collector skip immortals. */
|
|
110
118
|
unitInstances = new Map();
|
|
111
|
-
/**
|
|
112
|
-
* source/flags literal refs } — one immortal ScrRegex per distinct
|
|
119
|
+
/** Regex literal templates: "<flags>/<pattern>" → { symbol, interned
|
|
120
|
+
* source/flags literal refs } — one immortal ScrRegex template per distinct
|
|
113
121
|
* (pattern, flags) pair; the bytecode slot starts null and the runtime
|
|
114
122
|
* compiles it lazily on first use. The source/flags strings intern at
|
|
115
123
|
* REGISTRATION (bodies emit before the literal table flushes). */
|
|
@@ -310,6 +318,8 @@ export class LlEmitter {
|
|
|
310
318
|
cstr: (text) => this.cstr(text),
|
|
311
319
|
unitInstanceRef: (unionId, tag) => this.unitInstanceRef(unionId, tag),
|
|
312
320
|
liveDynRefAdapter: (type) => this.liveDynRefAdapter(type),
|
|
321
|
+
liveDynUnionRefAdapter: (type) => this.liveDynUnionRefAdapter(type),
|
|
322
|
+
dynPromiseAdapter: (type) => this.dynPromiseAdapter(type),
|
|
313
323
|
isErrorClass: (name) => this.classMeta.get(name)?.root.def.name === "%Error",
|
|
314
324
|
classSubtypes: (name) => {
|
|
315
325
|
const target = this.classMetaOf(name);
|
|
@@ -670,11 +680,32 @@ export class LlEmitter {
|
|
|
670
680
|
return { globals, defs };
|
|
671
681
|
}
|
|
672
682
|
emit() {
|
|
683
|
+
return this.emitParts().join("\n");
|
|
684
|
+
}
|
|
685
|
+
emitParts() {
|
|
673
686
|
// Function bodies first (the literal/unit/fn-value tables fill as they
|
|
674
687
|
// emit), then the file assembles around them — the runtime ABI’s order.
|
|
675
688
|
const fnDefs = [];
|
|
676
689
|
for (const fn of this.mod.functions)
|
|
677
690
|
fnDefs.push(this.emitFunction(fn));
|
|
691
|
+
const errorViews = [];
|
|
692
|
+
for (const property of ["name", "message"])
|
|
693
|
+
if (this.mod.functions.some((fn) => fn.name === `%error.${property}.read`)) {
|
|
694
|
+
this.declare(`declare void @scr_error_install_${property}_reader(ptr)`);
|
|
695
|
+
errorViews.push(` call void @scr_error_install_${property}_reader(ptr @${mangleFunction(`%error.${property}.read`)})`);
|
|
696
|
+
}
|
|
697
|
+
for (const meta of this.classMeta.values()) {
|
|
698
|
+
if (meta.def.runtime || meta.root.def.name !== "%Error")
|
|
699
|
+
continue;
|
|
700
|
+
const type = { kind: "object", className: meta.def.name };
|
|
701
|
+
const adapter = this.liveDynRefAdapter(type);
|
|
702
|
+
const rc = vAdapters(this.shapeHost, type);
|
|
703
|
+
const key = typeKey(type);
|
|
704
|
+
const name = `sc_error_view_${errorViews.length}`;
|
|
705
|
+
this.resolveThunkDefs.push(`define internal ptr @${name}(ptr %v) ${FN_ATTRS} {`, `entry:`, ` %d = call ptr ${typedRefConstructor(this.shapeHost, type)}(ptr %v, ptr ${rc.retain}, ptr ${rc.release}, ptr ${this.cstr(key)}, ${this.sizeType} ${Buffer.byteLength(key, "utf8")}, ptr @${adapter.snapshot}, ptr ${adapter.commit})`, ` ret ptr %d`, `}`, ``);
|
|
706
|
+
this.declare(`declare void @scr_error_register_dyn(ptr, ptr)`);
|
|
707
|
+
errorViews.push(` call void @scr_error_register_dyn(ptr @${mangleVtInstance(meta.def.name)}, ptr @${name})`);
|
|
708
|
+
}
|
|
678
709
|
const layouts = emitLlvmLayouts(this.shapeHost, this.mod, this.classMeta, this.classObjs, this.fnByName, (t) => this.llType(t));
|
|
679
710
|
const shapes = layouts.records;
|
|
680
711
|
const classShapes = layouts.classes;
|
|
@@ -723,9 +754,11 @@ export class LlEmitter {
|
|
|
723
754
|
// sc_release_globals tail). Only when the dispatch unit is even
|
|
724
755
|
// linked (defineProps is the only writer).
|
|
725
756
|
const runtimeFeatures = moduleRuntimeFeatures(this.mod);
|
|
726
|
-
const fnValueProps =
|
|
757
|
+
const fnValueProps = [...this.fnValues];
|
|
727
758
|
if (fnValueProps.length > 0)
|
|
728
759
|
this.declare(`declare void @scr_box_release(ptr)`);
|
|
760
|
+
if (this.classObjs.size > 0)
|
|
761
|
+
this.declare(`declare void @scr_classobj_clear_properties(ptr)`);
|
|
729
762
|
const globalReleaseLines = (prefix) => {
|
|
730
763
|
const lines = [];
|
|
731
764
|
globals.forEach((g, i) => {
|
|
@@ -738,6 +771,8 @@ export class LlEmitter {
|
|
|
738
771
|
// cleared so a second release path stays idempotent.
|
|
739
772
|
lines.push(` %${prefix}fp${i} = load ptr, ptr getelementptr inbounds (%ScrClosure, ptr @${mangleFnClosure(name)}, i64 0, i32 3)`, ` call void @scr_box_release(ptr %${prefix}fp${i}) ; ${name}.props`, ` store ptr null, ptr getelementptr inbounds (%ScrClosure, ptr @${mangleFnClosure(name)}, i64 0, i32 3)`);
|
|
740
773
|
});
|
|
774
|
+
for (const name of this.classObjs.keys())
|
|
775
|
+
lines.push(` call void @scr_classobj_clear_properties(ptr @${mangleClassObj(name)})`);
|
|
741
776
|
return lines;
|
|
742
777
|
};
|
|
743
778
|
// Exit listeners can read MODULE GLOBALS directly, so they must run
|
|
@@ -781,6 +816,15 @@ export class LlEmitter {
|
|
|
781
816
|
this.declare(`declare void @scr_events_install()`);
|
|
782
817
|
if (usesChildProcess)
|
|
783
818
|
this.declare(`declare void @scr_child_dyn_install()`);
|
|
819
|
+
const childStreamBoxes = usesChildProcess && usesStream &&
|
|
820
|
+
this.classMeta.has("%Readable") && this.classMeta.has("%Writable")
|
|
821
|
+
? [this.dyn.toDynHelper({ kind: "object", className: "%Readable" }),
|
|
822
|
+
this.dyn.toDynHelper({ kind: "object", className: "%Writable" })]
|
|
823
|
+
: null;
|
|
824
|
+
if (childStreamBoxes) {
|
|
825
|
+
this.declare(`@scr_stream_child_ops = external constant { ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr, ptr }`);
|
|
826
|
+
this.declare(`declare void @scr_child_dyn_streams_install(ptr, ptr, ptr)`);
|
|
827
|
+
}
|
|
784
828
|
if (usesFsWatch)
|
|
785
829
|
this.declare(`declare void @scr_watch_install()`);
|
|
786
830
|
if (this.ffiHasForeignCallback)
|
|
@@ -970,16 +1014,16 @@ export class LlEmitter {
|
|
|
970
1014
|
`%ScrUnion = type { ${this.sizeType}, i32, ptr, ptr, ptr, i64 }`,
|
|
971
1015
|
`%ScrClosure = type { ${this.sizeType}, ptr, ${this.sizeType}, ptr, i32 }`,
|
|
972
1016
|
`%ScrFfiTable = type { ptr, ${this.sizeType}, ${this.sizeType}, ptr, i8, ptr, ptr, ${this.sizeType}, ${this.sizeType}, ${this.sizeType}, ptr, ptr }`,
|
|
973
|
-
`%ScrRegex = type { ${this.sizeType}, ptr, ptr, ptr }`,
|
|
1017
|
+
`%ScrRegex = type { ${this.sizeType}, ptr, ptr, ptr, double, ptr }`,
|
|
974
1018
|
// ScrArr mirrors scr_runtime.h field-for-field. Live dynamic stream
|
|
975
1019
|
// commits swap its mutable dense, sparse, presence, and property
|
|
976
1020
|
// storage while preserving the target object's identity.
|
|
977
|
-
`%ScrArr = type { ${this.sizeType}, ${this.sizeType}, ${this.sizeType}, i32, ptr, ptr, ptr, ptr, ptr, ptr, ${this.sizeType}, ${this.sizeType}, ptr, ${this.sizeType}, ${this.sizeType} }`,
|
|
1021
|
+
`%ScrArr = type { ${this.sizeType}, ${this.sizeType}, ${this.sizeType}, i32, ptr, ptr, ptr, ptr, ptr, ptr, ${this.sizeType}, ${this.sizeType}, ptr, ${this.sizeType}, ${this.sizeType}, ptr }`,
|
|
978
1022
|
// The runtime error prefix { rc, vt, name, message, code, cause } and the
|
|
979
1023
|
// class-object shape { rc, pre, post, ctor, name } — field reads on
|
|
980
1024
|
// builtin errors and classval loads GEP through these.
|
|
981
|
-
`%ScrError = type { ${this.sizeType}, ptr, ptr, ptr, ptr, ptr }`,
|
|
982
|
-
`%ScrClassObj = type { ${this.sizeType}, ${this.sizeType}, ${this.sizeType}, ptr, ptr, ${this.sizeType}, ${this.sizeType}, ptr }`,
|
|
1025
|
+
`%ScrError = type { ${this.sizeType}, ptr, ptr, ptr, ptr, ptr, i8, i8, i8, i8, i8, ptr, ptr }`,
|
|
1026
|
+
`%ScrClassObj = type { ${this.sizeType}, ${this.sizeType}, ${this.sizeType}, ptr, ptr, ${this.sizeType}, ${this.sizeType}, ptr, ptr }`,
|
|
983
1027
|
// The runtime emitter prefix { rc, vt, reg, cls } — user subclasses
|
|
984
1028
|
// embed it (classes.ts), and bare-emitter GEPs address through it.
|
|
985
1029
|
`%ScrEmitter = type { ${this.sizeType}, ptr, ptr, ptr }`,
|
|
@@ -1054,7 +1098,7 @@ export class LlEmitter {
|
|
|
1054
1098
|
// One immortal ScrRegex per (pattern, flags) literal, pointing at
|
|
1055
1099
|
// the interned source/flags strings. The bc slot starts null (lazy
|
|
1056
1100
|
// compile, cached by the runtime) — a mutable global, not constant.
|
|
1057
|
-
out.push(`@${re.sym} = internal ${tl}global %ScrRegex { ${this.sizeType} -1, ptr ${re.src}, ptr ${re.fl}, ptr null } ; ${key.replace(/\n/g, "\\n")}`);
|
|
1101
|
+
out.push(`@${re.sym} = internal ${tl}global %ScrRegex { ${this.sizeType} -1, ptr ${re.src}, ptr ${re.fl}, ptr null, double 0.0, ptr null } ; ${key.replace(/\n/g, "\\n")}`);
|
|
1058
1102
|
}
|
|
1059
1103
|
if (this.regexInstances.size > 0)
|
|
1060
1104
|
out.push(``);
|
|
@@ -1068,7 +1112,7 @@ export class LlEmitter {
|
|
|
1068
1112
|
const present = n === 0
|
|
1069
1113
|
? "zeroinitializer"
|
|
1070
1114
|
: `[ ${inst.slots.map(() => "i8 1").join(", ")} ]`;
|
|
1071
|
-
out.push(`@${inst.sym}_data = internal constant [${n} x ptr] [ ${inst.slots.map((s) => `ptr ${s}`).join(", ")} ]`, `@${inst.sym}_present = internal constant [${n} x i8] ${present}`, `@${inst.sym} = internal global %ScrArr { ${this.sizeType} -1, ${this.sizeType} ${n}, ${this.sizeType} ${n}, i32 2, ptr null, ptr null, ptr null, ptr @${inst.sym}_data, ptr @${inst.sym}_present, ptr null, ${this.sizeType} 0, ${this.sizeType} 0, ptr null, ${this.sizeType} 0, ${this.sizeType} 0 }`);
|
|
1115
|
+
out.push(`@${inst.sym}_data = internal constant [${n} x ptr] [ ${inst.slots.map((s) => `ptr ${s}`).join(", ")} ]`, `@${inst.sym}_present = internal constant [${n} x i8] ${present}`, `@${inst.sym} = internal global %ScrArr { ${this.sizeType} -1, ${this.sizeType} ${n}, ${this.sizeType} ${n}, i32 2, ptr null, ptr null, ptr null, ptr @${inst.sym}_data, ptr @${inst.sym}_present, ptr null, ${this.sizeType} 0, ${this.sizeType} 0, ptr null, ${this.sizeType} 0, ${this.sizeType} 0, ptr null }`);
|
|
1072
1116
|
}
|
|
1073
1117
|
if (this.templateStringsInstances.size > 0)
|
|
1074
1118
|
out.push(``);
|
|
@@ -1145,12 +1189,15 @@ export class LlEmitter {
|
|
|
1145
1189
|
out.push(line);
|
|
1146
1190
|
for (const line of this.resolveThunkDefs)
|
|
1147
1191
|
out.push(line);
|
|
1148
|
-
out.push(fnDefs
|
|
1192
|
+
out.push(fnDefs[0] ?? "");
|
|
1193
|
+
for (let i = 1; i < fnDefs.length; i++)
|
|
1194
|
+
out.push("", fnDefs[i]);
|
|
1195
|
+
out.push("");
|
|
1149
1196
|
// main(): scr_init, the program-dependent error-vt interval stamps,
|
|
1150
1197
|
// scr_lib_init(argc, argv), then the entry function. An uncaught
|
|
1151
1198
|
// exception escaping top-level code prints and exits 1 (Node).
|
|
1152
1199
|
// The exception epilogue is emitted when the entry may throw.
|
|
1153
|
-
const stamps = [];
|
|
1200
|
+
const stamps = [...errorViews];
|
|
1154
1201
|
for (const iv of this.errorIntervals) {
|
|
1155
1202
|
const fields = [[0, iv.pre], [1, iv.post]];
|
|
1156
1203
|
for (const [field, value] of fields) {
|
|
@@ -1202,13 +1249,13 @@ export class LlEmitter {
|
|
|
1202
1249
|
out.push(``);
|
|
1203
1250
|
if (this.debug !== null)
|
|
1204
1251
|
out.push(this.debug.render());
|
|
1205
|
-
return out
|
|
1252
|
+
return out;
|
|
1206
1253
|
}
|
|
1207
1254
|
out.push(`define i32 @${this.wasi ? "__main_argc_argv" : "main"}(i32 %argc, ptr %argv) ${FN_ATTRS} {`, `entry:`, ...(this.runtimeAbiMarker ? [` call void @${RUNTIME_ABI_MARKER}()`] : []), ` call void @scr_init()`, ...stamps,
|
|
1208
1255
|
// Event-surface programs (signal/exit listeners) fill the loop's
|
|
1209
1256
|
// nullable event hooks before %main — scr_events.c links only when
|
|
1210
1257
|
// this line is emitted (native-toolchain.ts gates on the same predicate).
|
|
1211
|
-
...(usesEvents ? [` call void @scr_events_install()`] : []), ...(usesChildProcess ? [` call void @scr_child_dyn_install()`] : []),
|
|
1258
|
+
...(usesEvents ? [` call void @scr_events_install()`] : []), ...(usesChildProcess ? [` call void @scr_child_dyn_install()`] : []), ...(childStreamBoxes ? [` call void @scr_child_dyn_streams_install(ptr @scr_stream_child_ops, ptr @${childStreamBoxes[0]}, ptr @${childStreamBoxes[1]})`] : []),
|
|
1212
1259
|
// fs.watch programs fill the loop's watch hooks the same way —
|
|
1213
1260
|
// scr_watch.c links only when this line is emitted.
|
|
1214
1261
|
...(usesFsWatch ? [` call void @scr_watch_install()`] : []), ...(this.ffiHasForeignCallback ? [` call void @scr_ffi_install()`] : []), ...(snapshotsTlsCa ? [` call void @scr_tls_ca_install()`] : []), ...(usesFetch ? [` call void @scr_fetch_install()`] : []), ...(embedsZlib ? [` call void @scr_zlib_island_install()`] : []), ...(embedsNet ? [` call void @scr_net_island_install()`] : []), ...(usesNet ? [` call void @scr_net_install()`, ` call void @scr_net_dyn_install()`] : []), ...(usesHttp ? [` call void @scr_http_dyn_install()`] : []), ...(usesDgram ? [` call void @scr_dgram_install()`] : []), ...(usesHttp2 ? [` call void @scr_http2_dyn_install()`] : []), ...(usesStream ? [` call void @scr_stream_install()`] : []), ` call void @scr_lib_init(i32 %argc, ptr %argv)`, ...(usesIsland
|
|
@@ -1314,7 +1361,7 @@ export class LlEmitter {
|
|
|
1314
1361
|
`attributes #0 = { sanitize_address }`, ...(this.wasi ? [`attributes #1 = { sanitize_address presplitcoroutine }`] : []), ...(hasNoInlineRecordClone ? [`attributes #2 = { noinline sanitize_address }`] : []), ``);
|
|
1315
1362
|
if (this.debug !== null)
|
|
1316
1363
|
out.push(this.debug.render());
|
|
1317
|
-
return out
|
|
1364
|
+
return out;
|
|
1318
1365
|
}
|
|
1319
1366
|
/** LIBRARY mode: the profile-declared external definitions — the
|
|
1320
1367
|
* export-map wrappers plus init / sink-registration / reset / collect.
|
|
@@ -1682,6 +1729,10 @@ export class LlEmitter {
|
|
|
1682
1729
|
this.declare(`declare void @scr_promise_fulfill_str(ptr, ptr)`);
|
|
1683
1730
|
tr.push(` call void @scr_promise_fulfill_str(ptr %pr, ptr %r) ; moves in`);
|
|
1684
1731
|
break;
|
|
1732
|
+
case "dyn":
|
|
1733
|
+
this.declare(`declare void @scr_promise_resolve_dyn(ptr, ptr)`);
|
|
1734
|
+
tr.push(` call void @scr_promise_resolve_dyn(ptr %pr, ptr %r) ; moves in`);
|
|
1735
|
+
break;
|
|
1685
1736
|
default: {
|
|
1686
1737
|
const v = vAdapters(this.shapeHost, ret);
|
|
1687
1738
|
this.declare(`declare void @scr_promise_fulfill_ref(ptr, ptr, ptr, ptr, ptr)`);
|
|
@@ -2784,6 +2835,10 @@ export class LlEmitter {
|
|
|
2784
2835
|
this.declare(`declare void @scr_promise_fulfill_str(ptr, ptr)`);
|
|
2785
2836
|
this.B.line(`call void @scr_promise_fulfill_str(ptr ${pr}, ptr ${v.name}) ; moves in`);
|
|
2786
2837
|
break;
|
|
2838
|
+
case "dyn":
|
|
2839
|
+
this.declare(`declare void @scr_promise_resolve_dyn(ptr, ptr)`);
|
|
2840
|
+
this.B.line(`call void @scr_promise_resolve_dyn(ptr ${pr}, ptr ${v.name}) ; moves in`);
|
|
2841
|
+
break;
|
|
2787
2842
|
default: {
|
|
2788
2843
|
const rc = vAdapters(this.shapeHost, ret);
|
|
2789
2844
|
this.declare(`declare void @scr_promise_fulfill_ref(ptr, ptr, ptr, ptr, ptr)`);
|
|
@@ -3151,8 +3206,8 @@ export class LlEmitter {
|
|
|
3151
3206
|
case "bytesSet": {
|
|
3152
3207
|
// Typed-array element write: same evaluation order as arraySet;
|
|
3153
3208
|
// the value is a scalar (the kind-specific inline path coerces
|
|
3154
|
-
// JS-exactly), so no ownership moves.
|
|
3155
|
-
//
|
|
3209
|
+
// JS-exactly), so no ownership moves. Invalid writes are ignored.
|
|
3210
|
+
// IrBytesElem is static, so never rediscover it through the
|
|
3156
3211
|
// generic runtime switch in a hot loop.
|
|
3157
3212
|
const arr = this.emitStableReceiver(s.arr, [s.index, s.value]);
|
|
3158
3213
|
const integerIndex = this.emitIntegerLoopIndex(s.index);
|
|
@@ -3185,6 +3240,17 @@ export class LlEmitter {
|
|
|
3185
3240
|
else {
|
|
3186
3241
|
this.storeField(ptr, type, v.name);
|
|
3187
3242
|
}
|
|
3243
|
+
if (s.kind === "fieldSet" && s.field === "name" && this.classMeta.get(s.className)?.root.def.name === "%Error") {
|
|
3244
|
+
const present = this.classFieldPtr(obj.name, s.className, "%namePresent").ptr;
|
|
3245
|
+
const enumerable = this.classFieldPtr(obj.name, s.className, "%nameEnumerable").ptr;
|
|
3246
|
+
const wasPresent = B.tmp(), wasEnumerable = B.tmp(), isPresent = B.tmp(), nextEnumerable = B.tmp();
|
|
3247
|
+
B.line(`${wasPresent} = load i8, ptr ${present}`);
|
|
3248
|
+
B.line(`${wasEnumerable} = load i8, ptr ${enumerable}`);
|
|
3249
|
+
B.line(`${isPresent} = icmp ne i8 ${wasPresent}, 0`);
|
|
3250
|
+
B.line(`${nextEnumerable} = select i1 ${isPresent}, i8 ${wasEnumerable}, i8 1`);
|
|
3251
|
+
B.line(`store i8 1, ptr ${present}`);
|
|
3252
|
+
B.line(`store i8 ${nextEnumerable}, ptr ${enumerable}`);
|
|
3253
|
+
}
|
|
3188
3254
|
break;
|
|
3189
3255
|
}
|
|
3190
3256
|
case "recordKeyDelete": {
|
|
@@ -3709,10 +3775,9 @@ export class LlEmitter {
|
|
|
3709
3775
|
case "rethrow": {
|
|
3710
3776
|
// Re-raise the saved snapshot (payload retained — the binding
|
|
3711
3777
|
// local releases with its scope) and unwind like `throw`.
|
|
3712
|
-
const c =
|
|
3713
|
-
B.line(`${c} = load ptr, ptr %${mangleLocal(s.localId)}`);
|
|
3778
|
+
const c = this.emitExpr({ kind: "varRef", localId: s.localId, type: CAUGHT, loc: s.loc });
|
|
3714
3779
|
this.declare(`declare void @scr_rethrow(ptr)`);
|
|
3715
|
-
B.line(`call void @scr_rethrow(ptr ${c})`);
|
|
3780
|
+
B.line(`call void @scr_rethrow(ptr ${c.name})`);
|
|
3716
3781
|
this.emitUnwind();
|
|
3717
3782
|
break;
|
|
3718
3783
|
}
|
|
@@ -3830,8 +3895,17 @@ export class LlEmitter {
|
|
|
3830
3895
|
this.emitBlock(s.catchBody, (scope) => {
|
|
3831
3896
|
const c = B.tmp();
|
|
3832
3897
|
B.line(`${c} = call ptr @scr_exc_take() ; catch binding`);
|
|
3833
|
-
|
|
3834
|
-
|
|
3898
|
+
if (this.currentLocals.get(s.catchLocalId)?.boxed) {
|
|
3899
|
+
const box = B.tmp();
|
|
3900
|
+
B.line(`${box} = ${boxNewCall(this.shapeHost, CAUGHT)} ; captured exception`);
|
|
3901
|
+
this.boxSet(box, CAUGHT, c);
|
|
3902
|
+
B.line(`store ptr ${box}, ptr ${slot}`);
|
|
3903
|
+
scope.push({ slot, type: CAUGHT, boxed: true });
|
|
3904
|
+
}
|
|
3905
|
+
else {
|
|
3906
|
+
B.line(`store ptr ${c}, ptr ${slot}`);
|
|
3907
|
+
scope.push({ slot, type: CAUGHT });
|
|
3908
|
+
}
|
|
3835
3909
|
});
|
|
3836
3910
|
}
|
|
3837
3911
|
else {
|
|
@@ -4189,8 +4263,8 @@ export class LlEmitter {
|
|
|
4189
4263
|
fsRenameThunkFor(cbT) {
|
|
4190
4264
|
return fsRenameThunkFor(this, cbT);
|
|
4191
4265
|
}
|
|
4192
|
-
cryptoBytesThunkFor(cbT) {
|
|
4193
|
-
return cryptoBytesThunkFor(this, cbT);
|
|
4266
|
+
cryptoBytesThunkFor(cbT, arrayBuffer = false) {
|
|
4267
|
+
return cryptoBytesThunkFor(this, cbT, arrayBuffer);
|
|
4194
4268
|
}
|
|
4195
4269
|
zlibBytesThunkFor(cbT) {
|
|
4196
4270
|
return zlibBytesThunkFor(this, cbT);
|