aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar dave caruso <me@paperdave.net> 2023-06-27 18:18:04 -0400
committerGravatar dave caruso <me@paperdave.net> 2023-06-29 23:37:20 -0400
commit4b27aaaac78de307f65a2e3359a0598363c25ad1 (patch)
tree9c5630734d5b69b6de763210dd39cc8a5faa45a2
parent8fbf24fc2fcca36fa78f36c7fd21f729c46c5cdb (diff)
downloadbun-4b27aaaac78de307f65a2e3359a0598363c25ad1.tar.gz
bun-4b27aaaac78de307f65a2e3359a0598363c25ad1.tar.zst
bun-4b27aaaac78de307f65a2e3359a0598363c25ad1.zip
call cancel properly and lightly clean up ReadableStream
-rw-r--r--src/bun.js/api/server.zig1
-rw-r--r--src/bun.js/scripts/generate-jssink.js1
-rw-r--r--src/js/builtins/EventStream.ts8
-rw-r--r--src/js/builtins/ReadableByteStreamInternals.ts4
-rw-r--r--src/js/builtins/ReadableStream.ts14
-rw-r--r--src/js/builtins/ReadableStreamBYOBReader.ts10
-rw-r--r--src/js/builtins/ReadableStreamInternals.ts47
-rw-r--r--src/js/builtins/TransformStreamInternals.ts2
-rw-r--r--src/js/builtins/WritableStreamDefaultWriter.ts8
-rw-r--r--src/js/builtins/WritableStreamInternals.ts16
-rw-r--r--src/js/builtins/builtins.d.ts11
-rw-r--r--src/js/out/WebCoreJSBuiltins.cpp142
-rw-r--r--src/js/out/WebCoreJSBuiltins.h2
13 files changed, 138 insertions, 128 deletions
diff --git a/src/bun.js/api/server.zig b/src/bun.js/api/server.zig
index 1167e6b0f..7d2a5641d 100644
--- a/src/bun.js/api/server.zig
+++ b/src/bun.js/api/server.zig
@@ -2062,7 +2062,6 @@ fn NewRequestContext(comptime ssl_enabled: bool, comptime debug_mode: bool, comp
onRejectStream,
);
// the response_stream should be GC'd
-
},
.Fulfilled => {
streamLog("promise Fulfilled", .{});
diff --git a/src/bun.js/scripts/generate-jssink.js b/src/bun.js/scripts/generate-jssink.js
index 715df1f82..6dfac021f 100644
--- a/src/bun.js/scripts/generate-jssink.js
+++ b/src/bun.js/scripts/generate-jssink.js
@@ -1,7 +1,6 @@
import { resolve } from "path";
const classes = ["ArrayBufferSink", "FileSink", "HTTPResponseSink", "HTTPSResponseSink"];
-const SINK_COUNT = 5;
function names(name) {
return {
diff --git a/src/js/builtins/EventStream.ts b/src/js/builtins/EventStream.ts
index c82195eb2..c2ce30f17 100644
--- a/src/js/builtins/EventStream.ts
+++ b/src/js/builtins/EventStream.ts
@@ -12,17 +12,17 @@ export function getEventStream() {
opts?.start?.(this);
},
cancel: () => {
- console.log("Cancel!");
opts?.cancel?.(this);
+ this.#ctrl = undefined;
},
});
}
send(event?: unknown, data?: unknown): void {
var ctrl = this.#ctrl!;
- // if (!ctrl) {
- // throw new Error("EventStream has ended");
- // }
+ if (!ctrl) {
+ throw new Error("EventStream has ended");
+ }
if (!data) {
data = event;
event = undefined;
diff --git a/src/js/builtins/ReadableByteStreamInternals.ts b/src/js/builtins/ReadableByteStreamInternals.ts
index f44c385b4..84186c628 100644
--- a/src/js/builtins/ReadableByteStreamInternals.ts
+++ b/src/js/builtins/ReadableByteStreamInternals.ts
@@ -133,7 +133,7 @@ export function readableByteStreamControllerClose(controller) {
var first = $getByIdDirectPrivate(controller, "pendingPullIntos")?.peek();
if (first) {
if (first.bytesFilled > 0) {
- const e = $makeTypeError("Close requested while there remain pending bytes");
+ const e = new TypeError("Close requested while there remain pending bytes");
$readableByteStreamControllerError(controller, e);
throw e;
}
@@ -629,7 +629,7 @@ export function readableByteStreamControllerPullInto(controller, view) {
return $createFulfilledPromise({ value: filledView, done: false });
}
if ($getByIdDirectPrivate(controller, "closeRequested")) {
- const e = $makeTypeError("Closing stream has been requested");
+ const e = new TypeError("Closing stream has been requested");
$readableByteStreamControllerError(controller, e);
return Promise.$reject(e);
}
diff --git a/src/js/builtins/ReadableStream.ts b/src/js/builtins/ReadableStream.ts
index a265ff7d8..34806d53d 100644
--- a/src/js/builtins/ReadableStream.ts
+++ b/src/js/builtins/ReadableStream.ts
@@ -288,7 +288,7 @@ export function createNativeReadableStream(nativePtr, nativeType, autoAllocateCh
export function cancel(this, reason) {
if (!$isReadableStream(this)) return Promise.$reject($makeThisTypeError("ReadableStream", "cancel"));
- if ($isReadableStreamLocked(this)) return Promise.$reject($makeTypeError("ReadableStream is locked"));
+ if ($isReadableStreamLocked(this)) return Promise.$reject(new TypeError("ReadableStream is locked"));
return $readableStreamCancel(this, reason);
}
@@ -329,21 +329,21 @@ export function pipeThrough(this, streams, options) {
let preventCancel = false;
let signal;
if (!$isUndefinedOrNull(options)) {
- if (!$isObject(options)) throw $makeTypeError("options must be an object");
+ if (!$isObject(options)) throw new TypeError("options must be an object");
preventAbort = !!options["preventAbort"];
preventCancel = !!options["preventCancel"];
preventClose = !!options["preventClose"];
signal = options["signal"];
- if (signal !== undefined && !$isAbortSignal(signal)) throw $makeTypeError("options.signal must be AbortSignal");
+ if (signal !== undefined && !$isAbortSignal(signal)) throw new TypeError("options.signal must be AbortSignal");
}
if (!$isReadableStream(this)) throw $makeThisTypeError("ReadableStream", "pipeThrough");
- if ($isReadableStreamLocked(this)) throw $makeTypeError("ReadableStream is locked");
+ if ($isReadableStreamLocked(this)) throw new TypeError("ReadableStream is locked");
- if ($isWritableStreamLocked(internalWritable)) throw $makeTypeError("WritableStream is locked");
+ if ($isWritableStreamLocked(internalWritable)) throw new TypeError("WritableStream is locked");
$readableStreamPipeToWritableStream(this, internalWritable, preventClose, preventAbort, preventCancel, signal);
@@ -353,7 +353,7 @@ export function pipeThrough(this, streams, options) {
export function pipeTo(this, destination) {
if (!$isReadableStream(this)) return Promise.$reject($makeThisTypeError("ReadableStream", "pipeTo"));
- if ($isReadableStreamLocked(this)) return Promise.$reject($makeTypeError("ReadableStream is locked"));
+ if ($isReadableStreamLocked(this)) return Promise.$reject(new TypeError("ReadableStream is locked"));
// FIXME: https://bugs.webkit.org/show_bug.cgi?id=159869.
// Built-in generator should be able to parse function signature to compute the function length correctly.
@@ -364,7 +364,7 @@ export function pipeTo(this, destination) {
let preventCancel = false;
let signal;
if (!$isUndefinedOrNull(options)) {
- if (!$isObject(options)) return Promise.$reject($makeTypeError("options must be an object"));
+ if (!$isObject(options)) return Promise.$reject(new TypeError("options must be an object"));
try {
preventAbort = !!options["preventAbort"];
diff --git a/src/js/builtins/ReadableStreamBYOBReader.ts b/src/js/builtins/ReadableStreamBYOBReader.ts
index 5ebfddb19..7a4dbf060 100644
--- a/src/js/builtins/ReadableStreamBYOBReader.ts
+++ b/src/js/builtins/ReadableStreamBYOBReader.ts
@@ -39,7 +39,7 @@ export function cancel(this, reason) {
return Promise.$reject($makeThisTypeError("ReadableStreamBYOBReader", "cancel"));
if (!$getByIdDirectPrivate(this, "ownerReadableStream"))
- return Promise.$reject($makeTypeError("cancel() called on a reader owned by no readable stream"));
+ return Promise.$reject(new TypeError("cancel() called on a reader owned by no readable stream"));
return $readableStreamReaderGenericCancel(this, reason);
}
@@ -49,13 +49,13 @@ export function read(this, view: DataView) {
return Promise.$reject($makeThisTypeError("ReadableStreamBYOBReader", "read"));
if (!$getByIdDirectPrivate(this, "ownerReadableStream"))
- return Promise.$reject($makeTypeError("read() called on a reader owned by no readable stream"));
+ return Promise.$reject(new TypeError("read() called on a reader owned by no readable stream"));
- if (!$isObject(view)) return Promise.$reject($makeTypeError("Provided view is not an object"));
+ if (!$isObject(view)) return Promise.$reject(new TypeError("Provided view is not an object"));
- if (!ArrayBuffer.$isView(view)) return Promise.$reject($makeTypeError("Provided view is not an ArrayBufferView"));
+ if (!ArrayBuffer.$isView(view)) return Promise.$reject(new TypeError("Provided view is not an ArrayBufferView"));
- if (view.byteLength === 0) return Promise.$reject($makeTypeError("Provided view cannot have a 0 byteLength"));
+ if (view.byteLength === 0) return Promise.$reject(new TypeError("Provided view cannot have a 0 byteLength"));
return $readableStreamBYOBReaderRead(this, view);
}
diff --git a/src/js/builtins/ReadableStreamInternals.ts b/src/js/builtins/ReadableStreamInternals.ts
index 0c4e816f4..9e2caba4f 100644
--- a/src/js/builtins/ReadableStreamInternals.ts
+++ b/src/js/builtins/ReadableStreamInternals.ts
@@ -151,10 +151,11 @@ export function createReadableStreamController(stream, underlyingSource, strateg
if (typeString === "bytes") {
// if (!$readableByteStreamAPIEnabled())
- // $throwTypeError("ReadableByteStreamController is not implemented");
+ // throw new TypeError("ReadableByteStreamController is not implemented");
if (strategy.highWaterMark === undefined) strategy.highWaterMark = 0;
- if (strategy.size !== undefined) $throwRangeError("Strategy for a ReadableByteStreamController cannot have a size");
+ if (strategy.size !== undefined)
+ throw new RangeError("Strategy for a ReadableByteStreamController cannot have a size");
$putByIdDirectPrivate(
stream,
@@ -603,16 +604,17 @@ export function readDirectStream(stream, sink, underlyingSource) {
$putByIdDirectPrivate(stream, "underlyingSource", undefined);
$putByIdDirectPrivate(stream, "start", undefined);
- function close(stream, reason) {
- if (reason && underlyingSource?.cancel) {
+ function close(stream: ReadableStream, reason?: any) {
+ var cancel = underlyingSource?.cancel;
+ if (cancel) {
try {
- var prom = underlyingSource.cancel(reason);
- $markPromiseAsHandled(prom);
+ var prom = cancel.$apply(underlyingSource, reason);
+ if ($isPromise(prom)) {
+ $markPromiseAsHandled(prom);
+ }
} catch (e) {}
-
underlyingSource = undefined;
}
-
if (stream) {
$putByIdDirectPrivate(stream, "readableStreamController", undefined);
$putByIdDirectPrivate(stream, "reader", undefined);
@@ -622,19 +624,17 @@ export function readDirectStream(stream, sink, underlyingSource) {
} else {
$putByIdDirectPrivate(stream, "state", $streamClosed);
}
- stream = undefined;
}
}
if (!underlyingSource.pull) {
- close();
+ close(stream);
return;
}
if (!$isCallable(underlyingSource.pull)) {
- close();
- $throwTypeError("pull is not a function");
- return;
+ close(stream);
+ throw new TypeError("pull is not a function");
}
$putByIdDirectPrivate(stream, "readableStreamController", sink);
@@ -766,7 +766,7 @@ export async function readStreamIntoSink(stream, sink, isNative) {
}
}
-export function handleDirectStreamError(e) {
+export function handleDirectStreamError(this, e) {
var controller = this;
var sink = controller.$sink;
if (sink) {
@@ -870,10 +870,10 @@ export function noopDoneFunction() {
}
export function onReadableStreamDirectControllerClosed(reason) {
- $throwTypeError("ReadableStreamDirectController is now closed");
+ throw new TypeError("ReadableStreamDirectController is now closed");
}
-export function onCloseDirectStream(reason) {
+export function onCloseDirectStream(this, reason) {
var stream = this.$controlledReadableStream;
if (!stream || $getByIdDirectPrivate(stream, "state") !== $streamReadable) return;
@@ -1169,16 +1169,19 @@ export function initializeArrayStream(underlyingSource, highWaterMark) {
return closingPromise;
}
-export function initializeArrayBufferStream(underlyingSource, highWaterMark) {
+export function initializeArrayBufferStream(
+ this: ReadableStream,
+ underlyingSource: UnderlyingSource,
+ highWaterMark: number,
+) {
// This is the fallback implementation for direct streams
// When we don't know what the destination type is
// We assume it is a Uint8Array.
-
var opts =
highWaterMark && typeof highWaterMark === "number"
? { highWaterMark, stream: true, asUint8Array: true }
: { stream: true, asUint8Array: true };
- var sink = new $Bun.ArrayBufferSink();
+ var sink = new Bun.ArrayBufferSink();
sink.start(opts);
var controller = {
@@ -1323,7 +1326,7 @@ export function readableStreamCancel(stream, reason) {
return Promise.$resolve(controller.close(reason));
}
- $throwTypeError("ReadableStreamController has no cancel or close method");
+ return Promise.$reject(new TypeError("ReadableStreamController has no cancel or close method"));
}
export function readableStreamDefaultControllerCancel(controller, reason) {
@@ -1440,11 +1443,11 @@ export function readableStreamReaderGenericRelease(reader) {
if ($getByIdDirectPrivate($getByIdDirectPrivate(reader, "ownerReadableStream"), "state") === $streamReadable)
$getByIdDirectPrivate(reader, "closedPromiseCapability").$reject.$call(
undefined,
- $makeTypeError("releasing lock of reader whose stream is still in readable state"),
+ new TypeError("releasing lock of reader whose stream is still in readable state"),
);
else
$putByIdDirectPrivate(reader, "closedPromiseCapability", {
- $promise: $newHandledRejectedPromise($makeTypeError("reader released lock")),
+ $promise: $newHandledRejectedPromise(new TypeError("reader released lock")),
});
const promise = $getByIdDirectPrivate(reader, "closedPromiseCapability").$promise;
diff --git a/src/js/builtins/TransformStreamInternals.ts b/src/js/builtins/TransformStreamInternals.ts
index 9994d1282..a1228e87e 100644
--- a/src/js/builtins/TransformStreamInternals.ts
+++ b/src/js/builtins/TransformStreamInternals.ts
@@ -258,7 +258,7 @@ export function transformStreamDefaultControllerTerminate(controller) {
// FIXME: Update readableStreamDefaultControllerClose to make this check.
if ($readableStreamDefaultControllerCanCloseOrEnqueue(readableController))
$readableStreamDefaultControllerClose(readableController);
- const error = $makeTypeError("the stream has been terminated");
+ const error = new TypeError("the stream has been terminated");
$transformStreamErrorWritableAndUnblockWrite(stream, error);
}
diff --git a/src/js/builtins/WritableStreamDefaultWriter.ts b/src/js/builtins/WritableStreamDefaultWriter.ts
index 795b43892..16f0293e6 100644
--- a/src/js/builtins/WritableStreamDefaultWriter.ts
+++ b/src/js/builtins/WritableStreamDefaultWriter.ts
@@ -65,7 +65,7 @@ export function abort(reason) {
return Promise.$reject($makeThisTypeError("WritableStreamDefaultWriter", "abort"));
if ($getByIdDirectPrivate(this, "stream") === undefined)
- return Promise.$reject($makeTypeError("WritableStreamDefaultWriter has no stream"));
+ return Promise.$reject(new TypeError("WritableStreamDefaultWriter has no stream"));
return $writableStreamDefaultWriterAbort(this, reason);
}
@@ -75,10 +75,10 @@ export function close() {
return Promise.$reject($makeThisTypeError("WritableStreamDefaultWriter", "close"));
const stream = $getByIdDirectPrivate(this, "stream");
- if (stream === undefined) return Promise.$reject($makeTypeError("WritableStreamDefaultWriter has no stream"));
+ if (stream === undefined) return Promise.$reject(new TypeError("WritableStreamDefaultWriter has no stream"));
if ($writableStreamCloseQueuedOrInFlight(stream))
- return Promise.$reject($makeTypeError("WritableStreamDefaultWriter is being closed"));
+ return Promise.$reject(new TypeError("WritableStreamDefaultWriter is being closed"));
return $writableStreamDefaultWriterClose(this);
}
@@ -98,7 +98,7 @@ export function write(chunk) {
return Promise.$reject($makeThisTypeError("WritableStreamDefaultWriter", "write"));
if ($getByIdDirectPrivate(this, "stream") === undefined)
- return Promise.$reject($makeTypeError("WritableStreamDefaultWriter has no stream"));
+ return Promise.$reject(new TypeError("WritableStreamDefaultWriter has no stream"));
return $writableStreamDefaultWriterWrite(this, chunk);
}
diff --git a/src/js/builtins/WritableStreamInternals.ts b/src/js/builtins/WritableStreamInternals.ts
index f436a285e..27d60e7f4 100644
--- a/src/js/builtins/WritableStreamInternals.ts
+++ b/src/js/builtins/WritableStreamInternals.ts
@@ -127,11 +127,11 @@ export function initializeWritableStreamSlots(stream, underlyingSink) {
export function writableStreamCloseForBindings(stream) {
if ($isWritableStreamLocked(stream))
- return Promise.$reject($makeTypeError("WritableStream.close method can only be used on non locked WritableStream"));
+ return Promise.$reject(new TypeError("WritableStream.close method can only be used on non locked WritableStream"));
if ($writableStreamCloseQueuedOrInFlight(stream))
return Promise.$reject(
- $makeTypeError("WritableStream.close method can only be used on a being close WritableStream"),
+ new TypeError("WritableStream.close method can only be used on a being close WritableStream"),
);
return $writableStreamClose(stream);
@@ -139,7 +139,7 @@ export function writableStreamCloseForBindings(stream) {
export function writableStreamAbortForBindings(stream, reason) {
if ($isWritableStreamLocked(stream))
- return Promise.$reject($makeTypeError("WritableStream.abort method can only be used on non locked WritableStream"));
+ return Promise.$reject(new TypeError("WritableStream.abort method can only be used on non locked WritableStream"));
return $writableStreamAbort(stream, reason);
}
@@ -207,7 +207,7 @@ export function writableStreamAbort(stream, reason) {
export function writableStreamClose(stream) {
const state = $getByIdDirectPrivate(stream, "state");
if (state === "closed" || state === "errored")
- return Promise.$reject($makeTypeError("Cannot close a writable stream that is closed or errored"));
+ return Promise.$reject(new TypeError("Cannot close a writable stream that is closed or errored"));
$assert(state === "writable" || state === "erroring");
$assert(!$writableStreamCloseQueuedOrInFlight(stream));
@@ -509,7 +509,7 @@ export function writableStreamDefaultWriterRelease(writer) {
$assert(stream !== undefined);
$assert($getByIdDirectPrivate(stream, "writer") === writer);
- const releasedError = $makeTypeError("writableStreamDefaultWriterRelease");
+ const releasedError = new TypeError("writableStreamDefaultWriterRelease");
$writableStreamDefaultWriterEnsureReadyPromiseRejected(writer, releasedError);
$writableStreamDefaultWriterEnsureClosedPromiseRejected(writer, releasedError);
@@ -527,16 +527,16 @@ export function writableStreamDefaultWriterWrite(writer, chunk) {
const chunkSize = $writableStreamDefaultControllerGetChunkSize(controller, chunk);
if (stream !== $getByIdDirectPrivate(writer, "stream"))
- return Promise.$reject($makeTypeError("writer is not stream's writer"));
+ return Promise.$reject(new TypeError("writer is not stream's writer"));
const state = $getByIdDirectPrivate(stream, "state");
if (state === "errored") return Promise.$reject($getByIdDirectPrivate(stream, "storedError"));
if ($writableStreamCloseQueuedOrInFlight(stream) || state === "closed")
- return Promise.$reject($makeTypeError("stream is closing or closed"));
+ return Promise.$reject(new TypeError("stream is closing or closed"));
if ($writableStreamCloseQueuedOrInFlight(stream) || state === "closed")
- return Promise.$reject($makeTypeError("stream is closing or closed"));
+ return Promise.$reject(new TypeError("stream is closing or closed"));
if (state === "erroring") return Promise.$reject($getByIdDirectPrivate(stream, "storedError"));
diff --git a/src/js/builtins/builtins.d.ts b/src/js/builtins/builtins.d.ts
index 2de8d8206..0ef033e7d 100644
--- a/src/js/builtins/builtins.d.ts
+++ b/src/js/builtins/builtins.d.ts
@@ -357,7 +357,15 @@ declare function $size(): TODO;
declare function $start(): TODO;
declare function $startAlgorithm(): TODO;
declare function $startConsumingStream(): TODO;
-declare function $startDirectStream(): TODO;
+/** C++ functionStartDirectStream
+ * @param this - the sink
+ */
+declare function $startDirectStream(
+ this: any,
+ stream: ReadableStream,
+ pull: DirectUnderlyingSource["pull"] | undefined,
+ close: ((stream: ReadableStream, reason: any) => void) | undefined,
+): TODO;
declare function $started(): TODO;
declare function $startedPromise(): TODO;
declare function $state(): TODO;
@@ -401,6 +409,7 @@ declare function $writeRequests(): TODO;
declare function $writer(): TODO;
declare function $writing(): TODO;
declare function $written(): TODO;
+declare function $rejectPromise(promise: Promise, error: any): void;
declare function $createCommonJSModule(id: string, exports: any, hasEvaluated: boolean): NodeModule;
diff --git a/src/js/out/WebCoreJSBuiltins.cpp b/src/js/out/WebCoreJSBuiltins.cpp
index ec666cb1d..d7985cd85 100644
--- a/src/js/out/WebCoreJSBuiltins.cpp
+++ b/src/js/out/WebCoreJSBuiltins.cpp
@@ -116,7 +116,7 @@ const JSC::ConstructorKind s_writableStreamInternalsCreateInternalWritableStream
const JSC::ImplementationVisibility s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeLength = 956;
static const JSC::Intrinsic s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode = "(function (o,w){\"use strict\";const C={};if(o===@undefined)o={};if(w===@undefined)w={};if(!@isObject(o))@throwTypeError(\"WritableStream constructor takes an object as first argument\");if(\"type\"in o)@throwRangeError(\"Invalid type is specified\");const E=@extractSizeAlgorithm(w),_=@extractHighWaterMark(w,1),f={};if(\"start\"in o){if(f[\"start\"]=o[\"start\"],typeof f[\"start\"]!==\"function\")@throwTypeError(\"underlyingSink.start should be a function\")}if(\"write\"in o){if(f[\"write\"]=o[\"write\"],typeof f[\"write\"]!==\"function\")@throwTypeError(\"underlyingSink.write should be a function\")}if(\"close\"in o){if(f[\"close\"]=o[\"close\"],typeof f[\"close\"]!==\"function\")@throwTypeError(\"underlyingSink.close should be a function\")}if(\"abort\"in o){if(f[\"abort\"]=o[\"abort\"],typeof f[\"abort\"]!==\"function\")@throwTypeError(\"underlyingSink.abort should be a function\")}return @initializeWritableStreamSlots(C,o),@setUpWritableStreamDefaultControllerFromUnderlyingSink(C,o,f,_,E),C})\n";
+const char* const s_writableStreamInternalsCreateInternalWritableStreamFromUnderlyingSinkCode = "(function (f,o){\"use strict\";const w={};if(f===@undefined)f={};if(o===@undefined)o={};if(!@isObject(f))@throwTypeError(\"WritableStream constructor takes an object as first argument\");if(\"type\"in f)@throwRangeError(\"Invalid type is specified\");const C=@extractSizeAlgorithm(o),E=@extractHighWaterMark(o,1),_={};if(\"start\"in f){if(_[\"start\"]=f[\"start\"],typeof _[\"start\"]!==\"function\")@throwTypeError(\"underlyingSink.start should be a function\")}if(\"write\"in f){if(_[\"write\"]=f[\"write\"],typeof _[\"write\"]!==\"function\")@throwTypeError(\"underlyingSink.write should be a function\")}if(\"close\"in f){if(_[\"close\"]=f[\"close\"],typeof _[\"close\"]!==\"function\")@throwTypeError(\"underlyingSink.close should be a function\")}if(\"abort\"in f){if(_[\"abort\"]=f[\"abort\"],typeof _[\"abort\"]!==\"function\")@throwTypeError(\"underlyingSink.abort should be a function\")}return @initializeWritableStreamSlots(w,f),@setUpWritableStreamDefaultControllerFromUnderlyingSink(w,f,_,E,C),w})\n";
// initializeWritableStreamSlots
const JSC::ConstructAbility s_writableStreamInternalsInitializeWritableStreamSlotsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -180,7 +180,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamAddWriteReques
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamAddWriteRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamAddWriteRequestCodeLength = 227;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamAddWriteRequestCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamAddWriteRequestCode = "(function (d){\"use strict\";@assert(@isWritableStreamLocked(d)),@assert(@getByIdDirectPrivate(d,\"state\")===\"writable\");const h=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(d,\"writeRequests\").push(h),h.@promise})\n";
+const char* const s_writableStreamInternalsWritableStreamAddWriteRequestCode = "(function (c){\"use strict\";@assert(@isWritableStreamLocked(c)),@assert(@getByIdDirectPrivate(c,\"state\")===\"writable\");const d=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(c,\"writeRequests\").push(d),d.@promise})\n";
// writableStreamCloseQueuedOrInFlight
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamCloseQueuedOrInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -212,7 +212,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlight
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeLength = 751;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightCloseCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseCode = "(function (d){\"use strict\";@getByIdDirectPrivate(d,\"inFlightCloseRequest\").@resolve.@call(),@putByIdDirectPrivate(d,\"inFlightCloseRequest\",@undefined);const n=@getByIdDirectPrivate(d,\"state\");if(@assert(n===\"writable\"||n===\"erroring\"),n===\"erroring\"){@putByIdDirectPrivate(d,\"storedError\",@undefined);const c=@getByIdDirectPrivate(d,\"pendingAbortRequest\");if(c!==@undefined)c.promise.@resolve.@call(),@putByIdDirectPrivate(d,\"pendingAbortRequest\",@undefined)}@putByIdDirectPrivate(d,\"state\",\"closed\");const _=@getByIdDirectPrivate(d,\"writer\");if(_!==@undefined)@getByIdDirectPrivate(_,\"closedPromise\").@resolve.@call();@assert(@getByIdDirectPrivate(d,\"pendingAbortRequest\")===@undefined),@assert(@getByIdDirectPrivate(d,\"storedError\")===@undefined)})\n";
+const char* const s_writableStreamInternalsWritableStreamFinishInFlightCloseCode = "(function (d){\"use strict\";@getByIdDirectPrivate(d,\"inFlightCloseRequest\").@resolve.@call(),@putByIdDirectPrivate(d,\"inFlightCloseRequest\",@undefined);const i=@getByIdDirectPrivate(d,\"state\");if(@assert(i===\"writable\"||i===\"erroring\"),i===\"erroring\"){@putByIdDirectPrivate(d,\"storedError\",@undefined);const c=@getByIdDirectPrivate(d,\"pendingAbortRequest\");if(c!==@undefined)c.promise.@resolve.@call(),@putByIdDirectPrivate(d,\"pendingAbortRequest\",@undefined)}@putByIdDirectPrivate(d,\"state\",\"closed\");const _=@getByIdDirectPrivate(d,\"writer\");if(_!==@undefined)@getByIdDirectPrivate(_,\"closedPromise\").@resolve.@call();@assert(@getByIdDirectPrivate(d,\"pendingAbortRequest\")===@undefined),@assert(@getByIdDirectPrivate(d,\"storedError\")===@undefined)})\n";
// writableStreamFinishInFlightCloseWithError
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamFinishInFlightCloseWithErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -236,7 +236,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamFinishInFlight
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeLength = 319;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCode = "(function (_,c){\"use strict\";const p=@getByIdDirectPrivate(_,\"inFlightWriteRequest\");@assert(p!==@undefined),p.@reject.@call(@undefined,c),@putByIdDirectPrivate(_,\"inFlightWriteRequest\",@undefined);const d=@getByIdDirectPrivate(_,\"state\");@assert(d===\"writable\"||d===\"erroring\"),@writableStreamDealWithRejection(_,c)})\n";
+const char* const s_writableStreamInternalsWritableStreamFinishInFlightWriteWithErrorCode = "(function (_,c){\"use strict\";const d=@getByIdDirectPrivate(_,\"inFlightWriteRequest\");@assert(d!==@undefined),d.@reject.@call(@undefined,c),@putByIdDirectPrivate(_,\"inFlightWriteRequest\",@undefined);const p=@getByIdDirectPrivate(_,\"state\");@assert(p===\"writable\"||p===\"erroring\"),@writableStreamDealWithRejection(_,c)})\n";
// writableStreamHasOperationMarkedInFlight
const JSC::ConstructAbility s_writableStreamInternalsWritableStreamHasOperationMarkedInFlightCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -348,7 +348,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultWriterW
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeLength = 919;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultWriterWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultWriterWriteCode = "(function (d,g){\"use strict\";const P=@getByIdDirectPrivate(d,\"stream\");@assert(P!==@undefined);const W=@getByIdDirectPrivate(P,\"controller\");@assert(W!==@undefined);const _=@writableStreamDefaultControllerGetChunkSize(W,g);if(P!==@getByIdDirectPrivate(d,\"stream\"))return @Promise.@reject(@makeTypeError(\"writer is not stream's writer\"));const b=@getByIdDirectPrivate(P,\"state\");if(b===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(P,\"storedError\"));if(@writableStreamCloseQueuedOrInFlight(P)||b===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(@writableStreamCloseQueuedOrInFlight(P)||b===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(b===\"erroring\")return @Promise.@reject(@getByIdDirectPrivate(P,\"storedError\"));@assert(b===\"writable\");const f=@writableStreamAddWriteRequest(P);return @writableStreamDefaultControllerWrite(W,g,_),f})\n";
+const char* const s_writableStreamInternalsWritableStreamDefaultWriterWriteCode = "(function (d,P){\"use strict\";const _=@getByIdDirectPrivate(d,\"stream\");@assert(_!==@undefined);const W=@getByIdDirectPrivate(_,\"controller\");@assert(W!==@undefined);const b=@writableStreamDefaultControllerGetChunkSize(W,P);if(_!==@getByIdDirectPrivate(d,\"stream\"))return @Promise.@reject(@makeTypeError(\"writer is not stream's writer\"));const f=@getByIdDirectPrivate(_,\"state\");if(f===\"errored\")return @Promise.@reject(@getByIdDirectPrivate(_,\"storedError\"));if(@writableStreamCloseQueuedOrInFlight(_)||f===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(@writableStreamCloseQueuedOrInFlight(_)||f===\"closed\")return @Promise.@reject(@makeTypeError(\"stream is closing or closed\"));if(f===\"erroring\")return @Promise.@reject(@getByIdDirectPrivate(_,\"storedError\"));@assert(f===\"writable\");const g=@writableStreamAddWriteRequest(_);return @writableStreamDefaultControllerWrite(W,P,b),g})\n";
// setUpWritableStreamDefaultController
const JSC::ConstructAbility s_writableStreamInternalsSetUpWritableStreamDefaultControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -380,7 +380,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControl
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeLength = 582;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCode = "(function (_){\"use strict\";const f=@getByIdDirectPrivate(_,\"stream\");if(@getByIdDirectPrivate(_,\"started\")!==1)return;if(@assert(f!==@undefined),@getByIdDirectPrivate(f,\"inFlightWriteRequest\")!==@undefined)return;const h=@getByIdDirectPrivate(f,\"state\");if(@assert(h!==\"closed\"||h!==\"errored\"),h===\"erroring\"){@writableStreamFinishErroring(f);return}const d=@getByIdDirectPrivate(_,\"queue\");if(d.content\?.isEmpty()\?\?!1)return;const i=@peekQueueValue(d);if(i===@isCloseSentinel)@writableStreamDefaultControllerProcessClose(_);else @writableStreamDefaultControllerProcessWrite(_,i)})\n";
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCode = "(function (_){\"use strict\";const d=@getByIdDirectPrivate(_,\"stream\");if(@getByIdDirectPrivate(_,\"started\")!==1)return;if(@assert(d!==@undefined),@getByIdDirectPrivate(d,\"inFlightWriteRequest\")!==@undefined)return;const f=@getByIdDirectPrivate(d,\"state\");if(@assert(f!==\"closed\"||f!==\"errored\"),f===\"erroring\"){@writableStreamFinishErroring(d);return}const h=@getByIdDirectPrivate(_,\"queue\");if(h.content\?.isEmpty()\?\?!1)return;const i=@peekQueueValue(h);if(i===@isCloseSentinel)@writableStreamDefaultControllerProcessClose(_);else @writableStreamDefaultControllerProcessWrite(_,i)})\n";
// isCloseSentinel
const JSC::ConstructAbility s_writableStreamInternalsIsCloseSentinelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -468,7 +468,7 @@ const JSC::ConstructorKind s_writableStreamInternalsWritableStreamDefaultControl
const JSC::ImplementationVisibility s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeLength = 450;
static const JSC::Intrinsic s_writableStreamInternalsWritableStreamDefaultControllerWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_writableStreamInternalsWritableStreamDefaultControllerWriteCode = "(function (y,B,D){\"use strict\";try{@enqueueValueWithSize(@getByIdDirectPrivate(y,\"queue\"),B,D);const I=@getByIdDirectPrivate(y,\"stream\"),_=@getByIdDirectPrivate(I,\"state\");if(!@writableStreamCloseQueuedOrInFlight(I)&&_===\"writable\"){const d=@writableStreamDefaultControllerGetBackpressure(y);@writableStreamUpdateBackpressure(I,d)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(y)}catch(I){@writableStreamDefaultControllerErrorIfNeeded(y,I)}})\n";
+const char* const s_writableStreamInternalsWritableStreamDefaultControllerWriteCode = "(function (d,B,D){\"use strict\";try{@enqueueValueWithSize(@getByIdDirectPrivate(d,\"queue\"),B,D);const y=@getByIdDirectPrivate(d,\"stream\"),I=@getByIdDirectPrivate(y,\"state\");if(!@writableStreamCloseQueuedOrInFlight(y)&&I===\"writable\"){const _=@writableStreamDefaultControllerGetBackpressure(d);@writableStreamUpdateBackpressure(y,_)}@writableStreamDefaultControllerAdvanceQueueIfNeeded(d)}catch(y){@writableStreamDefaultControllerErrorIfNeeded(d,y)}})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
@@ -502,7 +502,7 @@ const JSC::ConstructorKind s_transformStreamInternalsCreateTransformStreamCodeCo
const JSC::ImplementationVisibility s_transformStreamInternalsCreateTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsCreateTransformStreamCodeLength = 513;
static const JSC::Intrinsic s_transformStreamInternalsCreateTransformStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamInternalsCreateTransformStreamCode = "(function (q,x,B,D,_,F,j){\"use strict\";if(D===@undefined)D=1;if(_===@undefined)_=()=>1;if(F===@undefined)F=0;if(j===@undefined)j=()=>1;@assert(D>=0),@assert(F>=0);const G={};@putByIdDirectPrivate(G,\"TransformStream\",!0);const I=new @TransformStream(G),v=@newPromiseCapability(@Promise);@initializeTransformStream(I,v.@promise,D,_,F,j);const E=new @TransformStreamDefaultController;return @setUpTransformStreamDefaultController(I,E,x,B),q().@then(()=>{v.@resolve.@call()},(c)=>{v.@reject.@call(@undefined,c)}),I})\n";
+const char* const s_transformStreamInternalsCreateTransformStreamCode = "(function (_,B,c,j,v,x,D){\"use strict\";if(j===@undefined)j=1;if(v===@undefined)v=()=>1;if(x===@undefined)x=0;if(D===@undefined)D=()=>1;@assert(j>=0),@assert(x>=0);const E={};@putByIdDirectPrivate(E,\"TransformStream\",!0);const F=new @TransformStream(E),q=@newPromiseCapability(@Promise);@initializeTransformStream(F,q.@promise,j,v,x,D);const G=new @TransformStreamDefaultController;return @setUpTransformStreamDefaultController(F,G,B,c),_().@then(()=>{q.@resolve.@call()},(I)=>{q.@reject.@call(@undefined,I)}),F})\n";
// initializeTransformStream
const JSC::ConstructAbility s_transformStreamInternalsInitializeTransformStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -510,7 +510,7 @@ const JSC::ConstructorKind s_transformStreamInternalsInitializeTransformStreamCo
const JSC::ImplementationVisibility s_transformStreamInternalsInitializeTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsInitializeTransformStreamCodeLength = 1015;
static const JSC::Intrinsic s_transformStreamInternalsInitializeTransformStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamInternalsInitializeTransformStreamCode = "(function (T,j,v,C,D,E){\"use strict\";const F=()=>{return j},G=(N)=>{return @transformStreamDefaultSinkWriteAlgorithm(T,N)},I=(N)=>{return @transformStreamDefaultSinkAbortAlgorithm(T,N)},J=()=>{return @transformStreamDefaultSinkCloseAlgorithm(T)},f=@createWritableStream(F,G,J,I,v,C),B=()=>{return @transformStreamDefaultSourcePullAlgorithm(T)},q=(N)=>{return @transformStreamErrorWritableAndUnblockWrite(T,N),@Promise.@resolve()},x={};@putByIdDirectPrivate(x,\"start\",F),@putByIdDirectPrivate(x,\"pull\",B),@putByIdDirectPrivate(x,\"cancel\",q);const K={};@putByIdDirectPrivate(K,\"size\",E),@putByIdDirectPrivate(K,\"highWaterMark\",D);const L=new @ReadableStream(x,K);@putByIdDirectPrivate(T,\"writable\",f),@putByIdDirectPrivate(T,\"internalWritable\",@getInternalWritableStream(f)),@putByIdDirectPrivate(T,\"readable\",L),@putByIdDirectPrivate(T,\"backpressure\",@undefined),@putByIdDirectPrivate(T,\"backpressureChangePromise\",@undefined),@transformStreamSetBackpressure(T,!0),@putByIdDirectPrivate(T,\"controller\",@undefined)})\n";
+const char* const s_transformStreamInternalsInitializeTransformStreamCode = "(function (f,G,B,T,C,F){\"use strict\";const I=()=>{return G},J=(x)=>{return @transformStreamDefaultSinkWriteAlgorithm(f,x)},K=(x)=>{return @transformStreamDefaultSinkAbortAlgorithm(f,x)},j=()=>{return @transformStreamDefaultSinkCloseAlgorithm(f)},L=@createWritableStream(I,J,j,K,B,T),N=()=>{return @transformStreamDefaultSourcePullAlgorithm(f)},q=(x)=>{return @transformStreamErrorWritableAndUnblockWrite(f,x),@Promise.@resolve()},D={};@putByIdDirectPrivate(D,\"start\",I),@putByIdDirectPrivate(D,\"pull\",N),@putByIdDirectPrivate(D,\"cancel\",q);const E={};@putByIdDirectPrivate(E,\"size\",F),@putByIdDirectPrivate(E,\"highWaterMark\",C);const v=new @ReadableStream(D,E);@putByIdDirectPrivate(f,\"writable\",L),@putByIdDirectPrivate(f,\"internalWritable\",@getInternalWritableStream(L)),@putByIdDirectPrivate(f,\"readable\",v),@putByIdDirectPrivate(f,\"backpressure\",@undefined),@putByIdDirectPrivate(f,\"backpressureChangePromise\",@undefined),@transformStreamSetBackpressure(f,!0),@putByIdDirectPrivate(f,\"controller\",@undefined)})\n";
// transformStreamError
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -542,7 +542,7 @@ const JSC::ConstructorKind s_transformStreamInternalsSetUpTransformStreamDefault
const JSC::ImplementationVisibility s_transformStreamInternalsSetUpTransformStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsSetUpTransformStreamDefaultControllerCodeLength = 294;
static const JSC::Intrinsic s_transformStreamInternalsSetUpTransformStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamInternalsSetUpTransformStreamDefaultControllerCode = "(function (d,P,_,b){\"use strict\";@assert(@isTransformStream(d)),@assert(@getByIdDirectPrivate(d,\"controller\")===@undefined),@putByIdDirectPrivate(P,\"stream\",d),@putByIdDirectPrivate(d,\"controller\",P),@putByIdDirectPrivate(P,\"transformAlgorithm\",_),@putByIdDirectPrivate(P,\"flushAlgorithm\",b)})\n";
+const char* const s_transformStreamInternalsSetUpTransformStreamDefaultControllerCode = "(function (d,b,P,_){\"use strict\";@assert(@isTransformStream(d)),@assert(@getByIdDirectPrivate(d,\"controller\")===@undefined),@putByIdDirectPrivate(b,\"stream\",d),@putByIdDirectPrivate(d,\"controller\",b),@putByIdDirectPrivate(b,\"transformAlgorithm\",P),@putByIdDirectPrivate(b,\"flushAlgorithm\",_)})\n";
// setUpTransformStreamDefaultControllerFromTransformer
const JSC::ConstructAbility s_transformStreamInternalsSetUpTransformStreamDefaultControllerFromTransformerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -566,7 +566,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultContr
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeLength = 622;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCode = "(function (S,W){\"use strict\";const f=@getByIdDirectPrivate(S,\"stream\"),g=@getByIdDirectPrivate(f,\"readable\"),j=@getByIdDirectPrivate(g,\"readableStreamController\");if(@assert(j!==@undefined),!@readableStreamDefaultControllerCanCloseOrEnqueue(j))@throwTypeError(\"TransformStream.readable cannot close or enqueue\");try{@readableStreamDefaultControllerEnqueue(j,W)}catch(i){throw @transformStreamErrorWritableAndUnblockWrite(f,i),@getByIdDirectPrivate(g,\"storedError\")}const _=!@readableStreamDefaultControllerShouldCallPull(j);if(_!==@getByIdDirectPrivate(f,\"backpressure\"))@assert(_),@transformStreamSetBackpressure(f,!0)})\n";
+const char* const s_transformStreamInternalsTransformStreamDefaultControllerEnqueueCode = "(function (_,S){\"use strict\";const W=@getByIdDirectPrivate(_,\"stream\"),f=@getByIdDirectPrivate(W,\"readable\"),g=@getByIdDirectPrivate(f,\"readableStreamController\");if(@assert(g!==@undefined),!@readableStreamDefaultControllerCanCloseOrEnqueue(g))@throwTypeError(\"TransformStream.readable cannot close or enqueue\");try{@readableStreamDefaultControllerEnqueue(g,S)}catch(j){throw @transformStreamErrorWritableAndUnblockWrite(W,j),@getByIdDirectPrivate(f,\"storedError\")}const i=!@readableStreamDefaultControllerShouldCallPull(g);if(i!==@getByIdDirectPrivate(W,\"backpressure\"))@assert(i),@transformStreamSetBackpressure(W,!0)})\n";
// transformStreamDefaultControllerError
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -582,7 +582,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultContr
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeLength = 277;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCode = "(function (_,f){\"use strict\";const d=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(_,\"transformAlgorithm\").@call(@undefined,f).@then(()=>{d.@resolve()},(j)=>{@transformStreamError(@getByIdDirectPrivate(_,\"stream\"),j),d.@reject.@call(@undefined,j)}),d.@promise})\n";
+const char* const s_transformStreamInternalsTransformStreamDefaultControllerPerformTransformCode = "(function (_,d){\"use strict\";const f=@newPromiseCapability(@Promise);return @getByIdDirectPrivate(_,\"transformAlgorithm\").@call(@undefined,d).@then(()=>{f.@resolve()},(j)=>{@transformStreamError(@getByIdDirectPrivate(_,\"stream\"),j),f.@reject.@call(@undefined,j)}),f.@promise})\n";
// transformStreamDefaultControllerTerminate
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultControllerTerminateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -606,7 +606,7 @@ const JSC::ConstructorKind s_transformStreamInternalsTransformStreamDefaultSinkA
const JSC::ImplementationVisibility s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCodeLength = 85;
static const JSC::Intrinsic s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCode = "(function (t,d){\"use strict\";return @transformStreamError(t,d),@Promise.@resolve()})\n";
+const char* const s_transformStreamInternalsTransformStreamDefaultSinkAbortAlgorithmCode = "(function (d,t){\"use strict\";return @transformStreamError(d,t),@Promise.@resolve()})\n";
// transformStreamDefaultSinkCloseAlgorithm
const JSC::ConstructAbility s_transformStreamInternalsTransformStreamDefaultSinkCloseAlgorithmCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -648,7 +648,7 @@ const JSC::ConstructorKind s_processObjectInternalsGetStdioWriteStreamCodeConstr
const JSC::ImplementationVisibility s_processObjectInternalsGetStdioWriteStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_processObjectInternalsGetStdioWriteStreamCodeLength = 4250;
static const JSC::Intrinsic s_processObjectInternalsGetStdioWriteStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (P,L){\"use strict\";var U={path:\"node:process\",require:L},M=(X)=>U.require(X);function N(X){var{Duplex:T,eos:x,destroy:Z}=M(\"node:stream\"),j=class B extends T{#$;#B;#j=!0;#z=!0;#G;#H;#J;#K;#L;#M;get isTTY(){return this.#M\?\?=M(\"node:tty\").isatty(X)}get fd(){return X}constructor(O){super({readable:!0,writable:!0});this.#G=`/dev/fd/${O}`}#N(O){const K=this.#H;if(this.#H=null,K)K(O);else if(O)this.destroy(O);else if(!this.#j&&!this.#z)this.destroy()}_destroy(O,K){if(!O&&this.#H!==null){var Q=class G extends Error{code;name;constructor(z=\"The operation was aborted\",Y=void 0){if(Y!==void 0&&typeof Y!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(Y,null,2)}`);super(z,Y);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};O=new Q}if(this.#J=null,this.#K=null,this.#H===null)K(O);else{if(this.#H=K,this.#$)Z(this.#$,O);if(this.#B)Z(this.#B,O)}}_write(O,K,Q){if(!this.#$){var{createWriteStream:G}=M(\"node:fs\"),z=this.#$=G(this.#G);z.on(\"finish\",()=>{if(this.#K){const Y=this.#K;this.#K=null,Y()}}),z.on(\"drain\",()=>{if(this.#J){const Y=this.#J;this.#J=null,Y()}}),x(z,(Y)=>{if(this.#z=!1,Y)Z(z,Y);this.#N(Y)})}if(z.write(O,K))Q();else this.#J=Q}_final(O){this.#$&&this.#$.end(),this.#K=O}#O(){var{createReadStream:O}=M(\"node:fs\"),K=this.#B=O(this.#G);return K.on(\"readable\",()=>{if(this.#L){const Q=this.#L;this.#L=null,Q()}else this.read()}),K.on(\"end\",()=>{this.push(null)}),x(K,(Q)=>{if(this.#j=!1,Q)Z(K,Q);this.#N(Q)}),K}_read(){var O=this.#B;if(!O)O=this.#O();while(!0){const K=O.read();if(K===null||!this.push(K))return}}};return new j(X)}var{EventEmitter:H}=M(\"node:events\");function A(X){if(!X)return!0;var T=X.toLowerCase();return T===\"utf8\"||T===\"utf-8\"||T===\"buffer\"||T===\"binary\"}var J,V=class X extends H{#$;#B;#j;#z;bytesWritten=0;setDefaultEncoding(T){if(this.#B||!A(T))return this.#J(),this.#B.setDefaultEncoding(T)}#G(){switch(this.#$){case 1:{var T=@Bun.stdout.writer({highWaterMark:0});return T.unref(),T}case 2:{var T=@Bun.stderr.writer({highWaterMark:0});return T.unref(),T}default:throw new Error(\"Unsupported writer\")}}#H(){return this.#j\?\?=this.#G()}constructor(T){super();this.#$=T}get fd(){return this.#$}get isTTY(){return this.#z\?\?=M(\"node:tty\").isatty(this.#$)}cursorTo(T,x,Z){return(J\?\?=M(\"readline\")).cursorTo(this,T,x,Z)}moveCursor(T,x,Z){return(J\?\?=M(\"readline\")).moveCursor(this,T,x,Z)}clearLine(T,x){return(J\?\?=M(\"readline\")).clearLine(this,T,x)}clearScreenDown(T){return(J\?\?=M(\"readline\")).clearScreenDown(this,T)}ref(){this.#H().ref()}unref(){this.#H().unref()}on(T,x){if(T===\"close\"||T===\"finish\")return this.#J(),this.#B.on(T,x);if(T===\"drain\")return super.on(\"drain\",x);if(T===\"error\")return super.on(\"error\",x);return super.on(T,x)}get _writableState(){return this.#J(),this.#B._writableState}get _readableState(){return this.#J(),this.#B._readableState}pipe(T){return this.#J(),this.#B.pipe(T)}unpipe(T){return this.#J(),this.#B.unpipe(T)}#J(){if(this.#B)return;this.#B=N(this.#$);const T=this.eventNames();for(let x of T)this.#B.on(x,(...Z)=>{this.emit(x,...Z)})}#K(T){var x=this.#H();const Z=x.write(T);this.bytesWritten+=Z;const j=x.flush(!1);return!!(Z||j)}#L(T,x){if(!A(x))return this.#J(),this.#B.write(T,x);return this.#K(T)}#M(T,x){if(x)this.emit(\"error\",x);try{T(x\?x:null)}catch(Z){this.emit(\"error\",Z)}}#N(T,x,Z){if(!A(x))return this.#J(),this.#B.write(T,x,Z);var j=this.#H();const B=j.write(T),O=j.flush(!0);if(O\?.then)return O.then(()=>{this.#M(Z),this.emit(\"drain\")},(K)=>this.#M(Z,K)),!1;return queueMicrotask(()=>{this.#M(Z)}),!!(B||O)}write(T,x,Z){const j=this._write(T,x,Z);if(j)this.emit(\"drain\");return j}get hasColors(){return @Bun.tty[this.#$].hasColors}_write(T,x,Z){var j=this.#B;if(j)return j.write(T,x,Z);switch(arguments.length){case 0:{var B=new Error(\"Invalid arguments\");throw B.code=\"ERR_INVALID_ARG_TYPE\",B}case 1:return this.#K(T);case 2:if(typeof x===\"function\")return this.#N(T,\"\",x);else if(typeof x===\"string\")return this.#L(T,x);default:{if(typeof x!==\"undefined\"&&typeof x!==\"string\"||typeof Z!==\"undefined\"&&typeof Z!==\"function\"){var B=new Error(\"Invalid arguments\");throw B.code=\"ERR_INVALID_ARG_TYPE\",B}if(typeof Z===\"undefined\")return this.#L(T,x);return this.#N(T,x,Z)}}}destroy(){return this}end(){return this}};return new V(P)})\n";
+const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (j,z){\"use strict\";var L={path:\"node:process\",require:z},J=(N)=>L.require(N);function G(N){var{Duplex:O,eos:Q,destroy:U}=J(\"node:stream\"),V=class X extends O{#$;#B;#j=!0;#z=!0;#G;#H;#J;#K;#L;#M;get isTTY(){return this.#M\?\?=J(\"node:tty\").isatty(N)}get fd(){return N}constructor(Z){super({readable:!0,writable:!0});this.#G=`/dev/fd/${Z}`}#N(Z){const Y=this.#H;if(this.#H=null,Y)Y(Z);else if(Z)this.destroy(Z);else if(!this.#j&&!this.#z)this.destroy()}_destroy(Z,Y){if(!Z&&this.#H!==null){var P=class A extends Error{code;name;constructor(T=\"The operation was aborted\",x=void 0){if(x!==void 0&&typeof x!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(x,null,2)}`);super(T,x);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};Z=new P}if(this.#J=null,this.#K=null,this.#H===null)Y(Z);else{if(this.#H=Y,this.#$)U(this.#$,Z);if(this.#B)U(this.#B,Z)}}_write(Z,Y,P){if(!this.#$){var{createWriteStream:A}=J(\"node:fs\"),T=this.#$=A(this.#G);T.on(\"finish\",()=>{if(this.#K){const x=this.#K;this.#K=null,x()}}),T.on(\"drain\",()=>{if(this.#J){const x=this.#J;this.#J=null,x()}}),Q(T,(x)=>{if(this.#z=!1,x)U(T,x);this.#N(x)})}if(T.write(Z,Y))P();else this.#J=P}_final(Z){this.#$&&this.#$.end(),this.#K=Z}#O(){var{createReadStream:Z}=J(\"node:fs\"),Y=this.#B=Z(this.#G);return Y.on(\"readable\",()=>{if(this.#L){const P=this.#L;this.#L=null,P()}else this.read()}),Y.on(\"end\",()=>{this.push(null)}),Q(Y,(P)=>{if(this.#j=!1,P)U(Y,P);this.#N(P)}),Y}_read(){var Z=this.#B;if(!Z)Z=this.#O();while(!0){const Y=Z.read();if(Y===null||!this.push(Y))return}}};return new V(N)}var{EventEmitter:H}=J(\"node:events\");function M(N){if(!N)return!0;var O=N.toLowerCase();return O===\"utf8\"||O===\"utf-8\"||O===\"buffer\"||O===\"binary\"}var K,B=class N extends H{#$;#B;#j;#z;bytesWritten=0;setDefaultEncoding(O){if(this.#B||!M(O))return this.#J(),this.#B.setDefaultEncoding(O)}#G(){switch(this.#$){case 1:{var O=@Bun.stdout.writer({highWaterMark:0});return O.unref(),O}case 2:{var O=@Bun.stderr.writer({highWaterMark:0});return O.unref(),O}default:throw new Error(\"Unsupported writer\")}}#H(){return this.#j\?\?=this.#G()}constructor(O){super();this.#$=O}get fd(){return this.#$}get isTTY(){return this.#z\?\?=J(\"node:tty\").isatty(this.#$)}cursorTo(O,Q,U){return(K\?\?=J(\"readline\")).cursorTo(this,O,Q,U)}moveCursor(O,Q,U){return(K\?\?=J(\"readline\")).moveCursor(this,O,Q,U)}clearLine(O,Q){return(K\?\?=J(\"readline\")).clearLine(this,O,Q)}clearScreenDown(O){return(K\?\?=J(\"readline\")).clearScreenDown(this,O)}ref(){this.#H().ref()}unref(){this.#H().unref()}on(O,Q){if(O===\"close\"||O===\"finish\")return this.#J(),this.#B.on(O,Q);if(O===\"drain\")return super.on(\"drain\",Q);if(O===\"error\")return super.on(\"error\",Q);return super.on(O,Q)}get _writableState(){return this.#J(),this.#B._writableState}get _readableState(){return this.#J(),this.#B._readableState}pipe(O){return this.#J(),this.#B.pipe(O)}unpipe(O){return this.#J(),this.#B.unpipe(O)}#J(){if(this.#B)return;this.#B=G(this.#$);const O=this.eventNames();for(let Q of O)this.#B.on(Q,(...U)=>{this.emit(Q,...U)})}#K(O){var Q=this.#H();const U=Q.write(O);this.bytesWritten+=U;const V=Q.flush(!1);return!!(U||V)}#L(O,Q){if(!M(Q))return this.#J(),this.#B.write(O,Q);return this.#K(O)}#M(O,Q){if(Q)this.emit(\"error\",Q);try{O(Q\?Q:null)}catch(U){this.emit(\"error\",U)}}#N(O,Q,U){if(!M(Q))return this.#J(),this.#B.write(O,Q,U);var V=this.#H();const X=V.write(O),Z=V.flush(!0);if(Z\?.then)return Z.then(()=>{this.#M(U),this.emit(\"drain\")},(Y)=>this.#M(U,Y)),!1;return queueMicrotask(()=>{this.#M(U)}),!!(X||Z)}write(O,Q,U){const V=this._write(O,Q,U);if(V)this.emit(\"drain\");return V}get hasColors(){return @Bun.tty[this.#$].hasColors}_write(O,Q,U){var V=this.#B;if(V)return V.write(O,Q,U);switch(arguments.length){case 0:{var X=new Error(\"Invalid arguments\");throw X.code=\"ERR_INVALID_ARG_TYPE\",X}case 1:return this.#K(O);case 2:if(typeof Q===\"function\")return this.#N(O,\"\",Q);else if(typeof Q===\"string\")return this.#L(O,Q);default:{if(typeof Q!==\"undefined\"&&typeof Q!==\"string\"||typeof U!==\"undefined\"&&typeof U!==\"function\"){var X=new Error(\"Invalid arguments\");throw X.code=\"ERR_INVALID_ARG_TYPE\",X}if(typeof U===\"undefined\")return this.#L(O,Q);return this.#N(O,Q,U)}}}destroy(){return this}end(){return this}};return new B(j)})\n";
// getStdinStream
const JSC::ConstructAbility s_processObjectInternalsGetStdinStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -656,7 +656,7 @@ const JSC::ConstructorKind s_processObjectInternalsGetStdinStreamCodeConstructor
const JSC::ImplementationVisibility s_processObjectInternalsGetStdinStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_processObjectInternalsGetStdinStreamCodeLength = 1799;
static const JSC::Intrinsic s_processObjectInternalsGetStdinStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_processObjectInternalsGetStdinStreamCode = "(function (Y,j,z){\"use strict\";var K={path:\"node:process\",require:j},G=(U)=>K.require(U),{Duplex:M,eos:P,destroy:Q}=G(\"node:stream\"),T=class U extends M{#Y;#$;#j;#z=!0;#G=!1;#H=!0;#I;#J;#K;get isTTY(){return G(\"tty\").isatty(Y)}get fd(){return Y}constructor(){super({readable:!0,writable:!0})}#L(N){const H=this.#J;if(this.#J=null,H)H(N);else if(N)this.destroy(N);else if(!this.#z&&!this.#H)this.destroy()}_destroy(N,H){if(!N&&this.#J!==null){var V=class I extends Error{constructor(J=\"The operation was aborted\",L=void 0){if(L!==void 0&&typeof L!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(L,null,2)}`);super(J,L);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};N=new V}if(this.#J===null)H(N);else if(this.#J=H,this.#j)Q(this.#j,N)}setRawMode(N){}on(N,H){if(N===\"readable\")this.ref(),this.#G=!0;return super.on(N,H)}pause(){return this.unref(),super.pause()}resume(){return this.ref(),super.resume()}ref(){this.#Y\?\?=z.stdin.stream().getReader(),this.#$\?\?=setInterval(()=>{},1<<30)}unref(){if(this.#$)clearInterval(this.#$),this.#$=null}async#M(){try{var N,H;const V=this.#Y.readMany();if(!V\?.then)({done:N,value:H}=V);else({done:N,value:H}=await V);if(!N){this.push(H[0]);const I=H.length;for(let J=1;J<I;J++)this.push(H[J])}else this.push(null),this.pause(),this.#z=!1,this.#L()}catch(V){this.#z=!1,this.#L(V)}}_read(N){if(this.#G)this.unref(),this.#G=!1;this.#M()}#N(){var{createWriteStream:N}=G(\"node:fs\"),H=this.#j=N(\"/dev/fd/0\");return H.on(\"finish\",()=>{if(this.#I){const V=this.#I;this.#I=null,V()}}),H.on(\"drain\",()=>{if(this.#K){const V=this.#K;this.#K=null,V()}}),P(H,(V)=>{if(this.#H=!1,V)Q(H,V);this.#L(V)}),H}_write(N,H,V){var I=this.#j;if(!I)I=this.#N();if(I.write(N,H))V();else this.#K=V}_final(N){this.#j.end(),this.#I=(...H)=>N(...H)}};return new T})\n";
+const char* const s_processObjectInternalsGetStdinStreamCode = "(function (Y,j,z){\"use strict\";var G={path:\"node:process\",require:j},H=(M)=>G.require(M),{Duplex:I,eos:J,destroy:K}=H(\"node:stream\"),L=class M extends I{#Y;#$;#j;#z=!0;#G=!1;#H=!0;#I;#J;#K;get isTTY(){return H(\"tty\").isatty(Y)}get fd(){return Y}constructor(){super({readable:!0,writable:!0})}#L(N){const P=this.#J;if(this.#J=null,P)P(N);else if(N)this.destroy(N);else if(!this.#z&&!this.#H)this.destroy()}_destroy(N,P){if(!N&&this.#J!==null){var Q=class T extends Error{constructor(U=\"The operation was aborted\",V=void 0){if(V!==void 0&&typeof V!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(V,null,2)}`);super(U,V);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};N=new Q}if(this.#J===null)P(N);else if(this.#J=P,this.#j)K(this.#j,N)}setRawMode(N){}on(N,P){if(N===\"readable\")this.ref(),this.#G=!0;return super.on(N,P)}pause(){return this.unref(),super.pause()}resume(){return this.ref(),super.resume()}ref(){this.#Y\?\?=z.stdin.stream().getReader(),this.#$\?\?=setInterval(()=>{},1<<30)}unref(){if(this.#$)clearInterval(this.#$),this.#$=null}async#M(){try{var N,P;const Q=this.#Y.readMany();if(!Q\?.then)({done:N,value:P}=Q);else({done:N,value:P}=await Q);if(!N){this.push(P[0]);const T=P.length;for(let U=1;U<T;U++)this.push(P[U])}else this.push(null),this.pause(),this.#z=!1,this.#L()}catch(Q){this.#z=!1,this.#L(Q)}}_read(N){if(this.#G)this.unref(),this.#G=!1;this.#M()}#N(){var{createWriteStream:N}=H(\"node:fs\"),P=this.#j=N(\"/dev/fd/0\");return P.on(\"finish\",()=>{if(this.#I){const Q=this.#I;this.#I=null,Q()}}),P.on(\"drain\",()=>{if(this.#K){const Q=this.#K;this.#K=null,Q()}}),J(P,(Q)=>{if(this.#H=!1,Q)K(P,Q);this.#L(Q)}),P}_write(N,P,Q){var T=this.#j;if(!T)T=this.#N();if(T.write(N,P))Q();else this.#K=Q}_final(N){this.#j.end(),this.#I=(...P)=>N(...P)}};return new L})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
@@ -674,7 +674,7 @@ const JSC::ConstructorKind s_transformStreamInitializeTransformStreamCodeConstru
const JSC::ImplementationVisibility s_transformStreamInitializeTransformStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_transformStreamInitializeTransformStreamCodeLength = 1334;
static const JSC::Intrinsic s_transformStreamInitializeTransformStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_transformStreamInitializeTransformStreamCode = "(function (){\"use strict\";let _=arguments[0];if(@isObject(_)&&@getByIdDirectPrivate(_,\"TransformStream\"))return this;let B=arguments[1],u=arguments[2];if(_===@undefined)_=null;if(u===@undefined)u={};if(B===@undefined)B={};let j={};if(_!==null){if(\"start\"in _){if(j[\"start\"]=_[\"start\"],typeof j[\"start\"]!==\"function\")@throwTypeError(\"transformer.start should be a function\")}if(\"transform\"in _){if(j[\"transform\"]=_[\"transform\"],typeof j[\"transform\"]!==\"function\")@throwTypeError(\"transformer.transform should be a function\")}if(\"flush\"in _){if(j[\"flush\"]=_[\"flush\"],typeof j[\"flush\"]!==\"function\")@throwTypeError(\"transformer.flush should be a function\")}if(\"readableType\"in _)@throwRangeError(\"TransformStream transformer has a readableType\");if(\"writableType\"in _)@throwRangeError(\"TransformStream transformer has a writableType\")}const v=@extractHighWaterMark(u,0),x=@extractSizeAlgorithm(u),E=@extractHighWaterMark(B,1),F=@extractSizeAlgorithm(B),G=@newPromiseCapability(@Promise);if(@initializeTransformStream(this,G.@promise,E,F,v,x),@setUpTransformStreamDefaultControllerFromTransformer(this,_,j),(\"start\"in j)){const q=@getByIdDirectPrivate(this,\"controller\");(()=>@promiseInvokeOrNoopMethodNoCatch(_,j[\"start\"],[q]))().@then(()=>{G.@resolve.@call()},(J)=>{G.@reject.@call(@undefined,J)})}else G.@resolve.@call();return this})\n";
+const char* const s_transformStreamInitializeTransformStreamCode = "(function (){\"use strict\";let _=arguments[0];if(@isObject(_)&&@getByIdDirectPrivate(_,\"TransformStream\"))return this;let u=arguments[1],j=arguments[2];if(_===@undefined)_=null;if(j===@undefined)j={};if(u===@undefined)u={};let q={};if(_!==null){if(\"start\"in _){if(q[\"start\"]=_[\"start\"],typeof q[\"start\"]!==\"function\")@throwTypeError(\"transformer.start should be a function\")}if(\"transform\"in _){if(q[\"transform\"]=_[\"transform\"],typeof q[\"transform\"]!==\"function\")@throwTypeError(\"transformer.transform should be a function\")}if(\"flush\"in _){if(q[\"flush\"]=_[\"flush\"],typeof q[\"flush\"]!==\"function\")@throwTypeError(\"transformer.flush should be a function\")}if(\"readableType\"in _)@throwRangeError(\"TransformStream transformer has a readableType\");if(\"writableType\"in _)@throwRangeError(\"TransformStream transformer has a writableType\")}const v=@extractHighWaterMark(j,0),x=@extractSizeAlgorithm(j),B=@extractHighWaterMark(u,1),E=@extractSizeAlgorithm(u),F=@newPromiseCapability(@Promise);if(@initializeTransformStream(this,F.@promise,B,E,v,x),@setUpTransformStreamDefaultControllerFromTransformer(this,_,q),(\"start\"in q)){const G=@getByIdDirectPrivate(this,\"controller\");(()=>@promiseInvokeOrNoopMethodNoCatch(_,q[\"start\"],[G]))().@then(()=>{F.@resolve.@call()},(J)=>{F.@reject.@call(@undefined,J)})}else F.@resolve.@call();return this})\n";
// readable
const JSC::ConstructAbility s_transformStreamReadableCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -950,7 +950,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteInt16BECodeConstructorKind =
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteInt16BECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteInt16BECodeLength = 135;
static const JSC::Intrinsic s_jsBufferPrototypeWriteInt16BECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteInt16BECode = "(function (d,c){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt16(c,d,!1),c+2})\n";
+const char* const s_jsBufferPrototypeWriteInt16BECode = "(function (c,d){\"use strict\";return(this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength)).setInt16(d,c,!1),d+2})\n";
// writeUInt16LE
const JSC::ConstructAbility s_jsBufferPrototypeWriteUInt16LECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1006,7 +1006,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteIntLECodeConstructorKind = JS
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteIntLECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteIntLECodeLength = 573;
static const JSC::Intrinsic s_jsBufferPrototypeWriteIntLECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteIntLECode = "(function (d,c,j){\"use strict\";const r=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(j){case 1:{r.setInt8(c,d);break}case 2:{r.setInt16(c,d,!0);break}case 3:{r.setUint16(c,d&65535,!0),r.setInt8(c+2,Math.floor(d*0.0000152587890625));break}case 4:{r.setInt32(c,d,!0);break}case 5:{r.setUint32(c,d|0,!0),r.setInt8(c+4,Math.floor(d*0.00000000023283064365386964));break}case 6:{r.setUint32(c,d|0,!0),r.setInt16(c+4,Math.floor(d*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return c+j})\n";
+const char* const s_jsBufferPrototypeWriteIntLECode = "(function (d,r,c){\"use strict\";const j=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(c){case 1:{j.setInt8(r,d);break}case 2:{j.setInt16(r,d,!0);break}case 3:{j.setUint16(r,d&65535,!0),j.setInt8(r+2,Math.floor(d*0.0000152587890625));break}case 4:{j.setInt32(r,d,!0);break}case 5:{j.setUint32(r,d|0,!0),j.setInt8(r+4,Math.floor(d*0.00000000023283064365386964));break}case 6:{j.setUint32(r,d|0,!0),j.setInt16(r+4,Math.floor(d*0.00000000023283064365386964),!0);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return r+c})\n";
// writeIntBE
const JSC::ConstructAbility s_jsBufferPrototypeWriteIntBECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1030,7 +1030,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeWriteUIntBECodeConstructorKind = J
const JSC::ImplementationVisibility s_jsBufferPrototypeWriteUIntBECodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeWriteUIntBECodeLength = 579;
static const JSC::Intrinsic s_jsBufferPrototypeWriteUIntBECodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeWriteUIntBECode = "(function (d,r,p){\"use strict\";const _=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(p){case 1:{_.setUint8(r,d);break}case 2:{_.setUint16(r,d,!1);break}case 3:{_.setUint16(r+1,d&65535,!1),_.setUint8(r,Math.floor(d*0.0000152587890625));break}case 4:{_.setUint32(r,d,!1);break}case 5:{_.setUint32(r+1,d|0,!1),_.setUint8(r,Math.floor(d*0.00000000023283064365386964));break}case 6:{_.setUint32(r+2,d|0,!1),_.setUint16(r,Math.floor(d*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return r+p})\n";
+const char* const s_jsBufferPrototypeWriteUIntBECode = "(function (d,r,_){\"use strict\";const p=this.@dataView||=new DataView(this.buffer,this.byteOffset,this.byteLength);switch(_){case 1:{p.setUint8(r,d);break}case 2:{p.setUint16(r,d,!1);break}case 3:{p.setUint16(r+1,d&65535,!1),p.setUint8(r,Math.floor(d*0.0000152587890625));break}case 4:{p.setUint32(r,d,!1);break}case 5:{p.setUint32(r+1,d|0,!1),p.setUint8(r,Math.floor(d*0.00000000023283064365386964));break}case 6:{p.setUint32(r+2,d|0,!1),p.setUint16(r,Math.floor(d*0.00000000023283064365386964),!1);break}default:@throwRangeError(\"byteLength must be >= 1 and <= 6\")}return r+_})\n";
// writeFloatLE
const JSC::ConstructAbility s_jsBufferPrototypeWriteFloatLECodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1190,7 +1190,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeLatin1SliceCodeConstructorKind = J
const JSC::ImplementationVisibility s_jsBufferPrototypeLatin1SliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeLatin1SliceCodeLength = 66;
static const JSC::Intrinsic s_jsBufferPrototypeLatin1SliceCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeLatin1SliceCode = "(function (r,d){\"use strict\";return this.toString(r,d,\"latin1\")})\n";
+const char* const s_jsBufferPrototypeLatin1SliceCode = "(function (d,r){\"use strict\";return this.toString(d,r,\"latin1\")})\n";
// asciiSlice
const JSC::ConstructAbility s_jsBufferPrototypeAsciiSliceCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1238,7 +1238,7 @@ const JSC::ConstructorKind s_jsBufferPrototypeSliceCodeConstructorKind = JSC::Co
const JSC::ImplementationVisibility s_jsBufferPrototypeSliceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferPrototypeSliceCodeLength = 260;
static const JSC::Intrinsic s_jsBufferPrototypeSliceCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferPrototypeSliceCode = "(function (i,q){\"use strict\";var{buffer:c,byteOffset:v,byteLength:p}=this;function w(z,m){if(z=@trunc(z),z===0||@isNaN(z))return 0;else if(z<0)return z+=m,z>0\?z:0;else return z<m\?z:m}var k=w(i,p),x=q!==@undefined\?w(q,p):p;return new @Buffer(c,v+k,x>k\?x-k:0)})\n";
+const char* const s_jsBufferPrototypeSliceCode = "(function (c,p){\"use strict\";var{buffer:i,byteOffset:k,byteLength:m}=this;function q(x,z){if(x=@trunc(x),x===0||@isNaN(x))return 0;else if(x<0)return x+=z,x>0\?x:0;else return x<z\?x:z}var v=q(c,m),w=p!==@undefined\?q(p,m):m;return new @Buffer(i,k+v,w>v\?w-v:0)})\n";
// parent
const JSC::ConstructAbility s_jsBufferPrototypeParentCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1338,7 +1338,7 @@ const JSC::ConstructorKind s_consoleObjectAsyncIteratorCodeConstructorKind = JSC
const JSC::ImplementationVisibility s_consoleObjectAsyncIteratorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_consoleObjectAsyncIteratorCodeLength = 577;
static const JSC::Intrinsic s_consoleObjectAsyncIteratorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_consoleObjectAsyncIteratorCode = "(function (){\"use strict\";const j=async function*w(){var _=@Bun.stdin.stream().getReader(),D=new globalThis.TextDecoder(\"utf-8\",{fatal:!1}),m,F=@Bun.indexOfLine;try{while(!0){var G,q,H;const L=_.readMany();if(@isPromise(L))({done:G,value:q}=await L);else({done:G,value:q}=L);if(G){if(H)yield D.decode(H);return}var J;for(let M of q){if(J=M,H)J=@Buffer.concat([H,M]),H=null;var z=0,K=F(J,z);while(K!==-1)yield D.decode(J.subarray(z,K)),z=K+1,K=F(J,z);H=J.subarray(z)}}}catch(L){m=L}finally{if(_.releaseLock(),m)throw m}},A=globalThis.Symbol.asyncIterator;return this[A]=j,j()})\n";
+const char* const s_consoleObjectAsyncIteratorCode = "(function (){\"use strict\";const w=async function*_(){var A=@Bun.stdin.stream().getReader(),F=new globalThis.TextDecoder(\"utf-8\",{fatal:!1}),H,J=@Bun.indexOfLine;try{while(!0){var K,m,L;const D=A.readMany();if(@isPromise(D))({done:K,value:m}=await D);else({done:K,value:m}=D);if(K){if(L)yield F.decode(L);return}var M;for(let z of m){if(M=z,L)M=@Buffer.concat([L,z]),L=null;var q=0,B=J(M,q);while(B!==-1)yield F.decode(M.subarray(q,B)),q=B+1,B=J(M,q);L=M.subarray(q)}}}catch(D){H=D}finally{if(A.releaseLock(),H)throw H}},G=globalThis.Symbol.asyncIterator;return this[G]=w,w()})\n";
// write
const JSC::ConstructAbility s_consoleObjectWriteCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1346,7 +1346,7 @@ const JSC::ConstructorKind s_consoleObjectWriteCodeConstructorKind = JSC::Constr
const JSC::ImplementationVisibility s_consoleObjectWriteCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_consoleObjectWriteCodeLength = 310;
static const JSC::Intrinsic s_consoleObjectWriteCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_consoleObjectWriteCode = "(function (d){\"use strict\";var _=@getByIdDirectPrivate(this,\"writer\");if(!_){var b=@toLength(d\?.length\?\?0);_=@Bun.stdout.writer({highWaterMark:b>65536\?b:65536}),@putByIdDirectPrivate(this,\"writer\",_)}var c=_.write(d);const f=@argumentCount();for(var a=1;a<f;a++)c+=_.write(@argument(a));return _.flush(!0),c})\n";
+const char* const s_consoleObjectWriteCode = "(function (a){\"use strict\";var _=@getByIdDirectPrivate(this,\"writer\");if(!_){var b=@toLength(a\?.length\?\?0);_=@Bun.stdout.writer({highWaterMark:b>65536\?b:65536}),@putByIdDirectPrivate(this,\"writer\",_)}var d=_.write(a);const c=@argumentCount();for(var f=1;f<c;f++)d+=_.write(@argument(f));return _.flush(!0),d})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
@@ -1404,7 +1404,7 @@ const JSC::ConstructorKind s_readableStreamInternalsSetupReadableStreamDefaultCo
const JSC::ImplementationVisibility s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeLength = 523;
static const JSC::Intrinsic s_readableStreamInternalsSetupReadableStreamDefaultControllerCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsSetupReadableStreamDefaultControllerCode = "(function (b,j,q,v,_,x,f){\"use strict\";const B=new @ReadableStreamDefaultController(b,j,q,v,@isReadableStream),C=()=>@promiseInvokeOrNoopMethod(j,x,[B]),D=(w)=>@promiseInvokeOrNoopMethod(j,f,[w]);@putByIdDirectPrivate(B,\"pullAlgorithm\",C),@putByIdDirectPrivate(B,\"cancelAlgorithm\",D),@putByIdDirectPrivate(B,\"pull\",@readableStreamDefaultControllerPull),@putByIdDirectPrivate(B,\"cancel\",@readableStreamDefaultControllerCancel),@putByIdDirectPrivate(b,\"readableStreamController\",B),@readableStreamDefaultControllerStart(B)})\n";
+const char* const s_readableStreamInternalsSetupReadableStreamDefaultControllerCode = "(function (_,w,f,b,q,v,x){\"use strict\";const B=new @ReadableStreamDefaultController(_,w,f,b,@isReadableStream),C=()=>@promiseInvokeOrNoopMethod(w,v,[B]),j=(D)=>@promiseInvokeOrNoopMethod(w,x,[D]);@putByIdDirectPrivate(B,\"pullAlgorithm\",C),@putByIdDirectPrivate(B,\"cancelAlgorithm\",j),@putByIdDirectPrivate(B,\"pull\",@readableStreamDefaultControllerPull),@putByIdDirectPrivate(B,\"cancel\",@readableStreamDefaultControllerCancel),@putByIdDirectPrivate(_,\"readableStreamController\",B),@readableStreamDefaultControllerStart(B)})\n";
// createReadableStreamController
const JSC::ConstructAbility s_readableStreamInternalsCreateReadableStreamControllerCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1412,7 +1412,7 @@ const JSC::ConstructorKind s_readableStreamInternalsCreateReadableStreamControll
const JSC::ImplementationVisibility s_readableStreamInternalsCreateReadableStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsCreateReadableStreamControllerCodeLength = 671;
static const JSC::Intrinsic s_readableStreamInternalsCreateReadableStreamControllerCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsCreateReadableStreamControllerCode = "(function (v,w,A){\"use strict\";const C=w.type,b=@toString(C);if(b===\"bytes\"){if(A.highWaterMark===@undefined)A.highWaterMark=0;if(A.size!==@undefined)@throwRangeError(\"Strategy for a ReadableByteStreamController cannot have a size\");@putByIdDirectPrivate(v,\"readableStreamController\",new @ReadableByteStreamController(v,w,A.highWaterMark,@isReadableStream))}else if(b===\"direct\"){var f=A\?.highWaterMark;@initializeArrayBufferStream.@call(v,w,f)}else if(C===@undefined){if(A.highWaterMark===@undefined)A.highWaterMark=1;@setupReadableStreamDefaultController(v,w,A.size,A.highWaterMark,w.start,w.pull,w.cancel)}else @throwRangeError(\"Invalid type for underlying source\")})\n";
+const char* const s_readableStreamInternalsCreateReadableStreamControllerCode = "(function (A,C,b){\"use strict\";const f=C.type,j=@toString(f);if(j===\"bytes\"){if(b.highWaterMark===@undefined)b.highWaterMark=0;if(b.size!==@undefined)@throwRangeError(\"Strategy for a ReadableByteStreamController cannot have a size\");@putByIdDirectPrivate(A,\"readableStreamController\",new @ReadableByteStreamController(A,C,b.highWaterMark,@isReadableStream))}else if(j===\"direct\"){var _=b\?.highWaterMark;@initializeArrayBufferStream.@call(A,C,_)}else if(f===@undefined){if(b.highWaterMark===@undefined)b.highWaterMark=1;@setupReadableStreamDefaultController(A,C,b.size,b.highWaterMark,C.start,C.pull,C.cancel)}else @throwRangeError(\"Invalid type for underlying source\")})\n";
// readableStreamDefaultControllerStart
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1428,7 +1428,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamPipeToWritable
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeLength = 1631;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamPipeToWritableStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsReadableStreamPipeToWritableStreamCode = "(function (_,z,G,f,x,B){\"use strict\";if(@assert(@isReadableStream(_)),@assert(@isWritableStream(z)),@assert(!@isReadableStreamLocked(_)),@assert(!@isWritableStreamLocked(z)),@assert(B===@undefined||@isAbortSignal(B)),@getByIdDirectPrivate(_,\"underlyingByteSource\")!==@undefined)return @Promise.@reject(\"Piping to a readable bytestream is not supported\");let H={source:_,destination:z,preventAbort:f,preventCancel:x,preventClose:G,signal:B};if(H.reader=@acquireReadableStreamDefaultReader(_),H.writer=@acquireWritableStreamDefaultWriter(z),@putByIdDirectPrivate(_,\"disturbed\",!0),H.finalized=!1,H.shuttingDown=!1,H.promiseCapability=@newPromiseCapability(@Promise),H.pendingReadPromiseCapability=@newPromiseCapability(@Promise),H.pendingReadPromiseCapability.@resolve.@call(),H.pendingWritePromise=@Promise.@resolve(),B!==@undefined){const I=(J)=>{if(H.finalized)return;@pipeToShutdownWithAction(H,()=>{const K=!H.preventAbort&&@getByIdDirectPrivate(H.destination,\"state\")===\"writable\"\?@writableStreamAbort(H.destination,J):@Promise.@resolve(),E=!H.preventCancel&&@getByIdDirectPrivate(H.source,\"state\")===@streamReadable\?@readableStreamCancel(H.source,J):@Promise.@resolve();let q=@newPromiseCapability(@Promise),w=!0,T=()=>{if(w){w=!1;return}q.@resolve.@call()},k=(F)=>{q.@reject.@call(@undefined,F)};return K.@then(T,k),E.@then(T,k),q.@promise},J)};if(@whenSignalAborted(B,I))return H.promiseCapability.@promise}return @pipeToErrorsMustBePropagatedForward(H),@pipeToErrorsMustBePropagatedBackward(H),@pipeToClosingMustBePropagatedForward(H),@pipeToClosingMustBePropagatedBackward(H),@pipeToLoop(H),H.promiseCapability.@promise})\n";
+const char* const s_readableStreamInternalsReadableStreamPipeToWritableStreamCode = "(function (f,H,D,E,x,G){\"use strict\";if(@assert(@isReadableStream(f)),@assert(@isWritableStream(H)),@assert(!@isReadableStreamLocked(f)),@assert(!@isWritableStreamLocked(H)),@assert(G===@undefined||@isAbortSignal(G)),@getByIdDirectPrivate(f,\"underlyingByteSource\")!==@undefined)return @Promise.@reject(\"Piping to a readable bytestream is not supported\");let I={source:f,destination:H,preventAbort:E,preventCancel:x,preventClose:D,signal:G};if(I.reader=@acquireReadableStreamDefaultReader(f),I.writer=@acquireWritableStreamDefaultWriter(H),@putByIdDirectPrivate(f,\"disturbed\",!0),I.finalized=!1,I.shuttingDown=!1,I.promiseCapability=@newPromiseCapability(@Promise),I.pendingReadPromiseCapability=@newPromiseCapability(@Promise),I.pendingReadPromiseCapability.@resolve.@call(),I.pendingWritePromise=@Promise.@resolve(),G!==@undefined){const J=(K)=>{if(I.finalized)return;@pipeToShutdownWithAction(I,()=>{const z=!I.preventAbort&&@getByIdDirectPrivate(I.destination,\"state\")===\"writable\"\?@writableStreamAbort(I.destination,K):@Promise.@resolve(),k=!I.preventCancel&&@getByIdDirectPrivate(I.source,\"state\")===@streamReadable\?@readableStreamCancel(I.source,K):@Promise.@resolve();let B=@newPromiseCapability(@Promise),F=!0,q=()=>{if(F){F=!1;return}B.@resolve.@call()},w=(L)=>{B.@reject.@call(@undefined,L)};return z.@then(q,w),k.@then(q,w),B.@promise},K)};if(@whenSignalAborted(G,J))return I.promiseCapability.@promise}return @pipeToErrorsMustBePropagatedForward(I),@pipeToErrorsMustBePropagatedBackward(I),@pipeToClosingMustBePropagatedForward(I),@pipeToClosingMustBePropagatedBackward(I),@pipeToLoop(I),I.promiseCapability.@promise})\n";
// pipeToLoop
const JSC::ConstructAbility s_readableStreamInternalsPipeToLoopCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1468,7 +1468,7 @@ const JSC::ConstructorKind s_readableStreamInternalsPipeToClosingMustBePropagate
const JSC::ImplementationVisibility s_readableStreamInternalsPipeToClosingMustBePropagatedForwardCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPipeToClosingMustBePropagatedForwardCodeLength = 405;
static const JSC::Intrinsic s_readableStreamInternalsPipeToClosingMustBePropagatedForwardCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsPipeToClosingMustBePropagatedForwardCode = "(function (d){\"use strict\";const m=()=>{if(d.pendingReadPromiseCapability.@resolve.@call(@undefined,!1),!d.preventClose){@pipeToShutdownWithAction(d,()=>@writableStreamDefaultWriterCloseWithErrorPropagation(d.writer));return}@pipeToShutdown(d)};if(@getByIdDirectPrivate(d.source,\"state\")===@streamClosed){m();return}@getByIdDirectPrivate(d.reader,\"closedPromiseCapability\").@promise.@then(m,@undefined)})\n";
+const char* const s_readableStreamInternalsPipeToClosingMustBePropagatedForwardCode = "(function (m){\"use strict\";const d=()=>{if(m.pendingReadPromiseCapability.@resolve.@call(@undefined,!1),!m.preventClose){@pipeToShutdownWithAction(m,()=>@writableStreamDefaultWriterCloseWithErrorPropagation(m.writer));return}@pipeToShutdown(m)};if(@getByIdDirectPrivate(m.source,\"state\")===@streamClosed){d();return}@getByIdDirectPrivate(m.reader,\"closedPromiseCapability\").@promise.@then(d,@undefined)})\n";
// pipeToClosingMustBePropagatedBackward
const JSC::ConstructAbility s_readableStreamInternalsPipeToClosingMustBePropagatedBackwardCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1476,7 +1476,7 @@ const JSC::ConstructorKind s_readableStreamInternalsPipeToClosingMustBePropagate
const JSC::ImplementationVisibility s_readableStreamInternalsPipeToClosingMustBePropagatedBackwardCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPipeToClosingMustBePropagatedBackwardCodeLength = 324;
static const JSC::Intrinsic s_readableStreamInternalsPipeToClosingMustBePropagatedBackwardCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsPipeToClosingMustBePropagatedBackwardCode = "(function (k){\"use strict\";if(!@writableStreamCloseQueuedOrInFlight(k.destination)&&@getByIdDirectPrivate(k.destination,\"state\")!==\"closed\")return;const m=@makeTypeError(\"closing is propagated backward\");if(!k.preventCancel){@pipeToShutdownWithAction(k,()=>@readableStreamCancel(k.source,m),m);return}@pipeToShutdown(k,m)})\n";
+const char* const s_readableStreamInternalsPipeToClosingMustBePropagatedBackwardCode = "(function (m){\"use strict\";if(!@writableStreamCloseQueuedOrInFlight(m.destination)&&@getByIdDirectPrivate(m.destination,\"state\")!==\"closed\")return;const k=@makeTypeError(\"closing is propagated backward\");if(!m.preventCancel){@pipeToShutdownWithAction(m,()=>@readableStreamCancel(m.source,k),k);return}@pipeToShutdown(m,k)})\n";
// pipeToShutdownWithAction
const JSC::ConstructAbility s_readableStreamInternalsPipeToShutdownWithActionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1484,7 +1484,7 @@ const JSC::ConstructorKind s_readableStreamInternalsPipeToShutdownWithActionCode
const JSC::ImplementationVisibility s_readableStreamInternalsPipeToShutdownWithActionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsPipeToShutdownWithActionCodeLength = 458;
static const JSC::Intrinsic s_readableStreamInternalsPipeToShutdownWithActionCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsPipeToShutdownWithActionCode = "(function (_,d){\"use strict\";if(_.shuttingDown)return;_.shuttingDown=!0;const g=arguments.length>2,b=arguments[2],h=()=>{d().@then(()=>{if(g)@pipeToFinalize(_,b);else @pipeToFinalize(_)},(m)=>{@pipeToFinalize(_,m)})};if(@getByIdDirectPrivate(_.destination,\"state\")===\"writable\"&&!@writableStreamCloseQueuedOrInFlight(_.destination)){_.pendingReadPromiseCapability.@promise.@then(()=>{_.pendingWritePromise.@then(h,h)},(j)=>@pipeToFinalize(_,j));return}h()})\n";
+const char* const s_readableStreamInternalsPipeToShutdownWithActionCode = "(function (m,b){\"use strict\";if(m.shuttingDown)return;m.shuttingDown=!0;const d=arguments.length>2,g=arguments[2],j=()=>{b().@then(()=>{if(d)@pipeToFinalize(m,g);else @pipeToFinalize(m)},(h)=>{@pipeToFinalize(m,h)})};if(@getByIdDirectPrivate(m.destination,\"state\")===\"writable\"&&!@writableStreamCloseQueuedOrInFlight(m.destination)){m.pendingReadPromiseCapability.@promise.@then(()=>{m.pendingWritePromise.@then(j,j)},(_)=>@pipeToFinalize(m,_));return}j()})\n";
// pipeToShutdown
const JSC::ConstructAbility s_readableStreamInternalsPipeToShutdownCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1508,7 +1508,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamTeeCodeConstru
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamTeeCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamTeeCodeLength = 1104;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamTeeCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsReadableStreamTeeCode = "(function (i,j){\"use strict\";@assert(@isReadableStream(i)),@assert(typeof j===\"boolean\");var k=@getByIdDirectPrivate(i,\"start\");if(k)@putByIdDirectPrivate(i,\"start\",@undefined),k();const g=new @ReadableStreamDefaultReader(i),q={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:@undefined,reason2:@undefined};q.cancelPromiseCapability=@newPromiseCapability(@Promise);const v=@readableStreamTeePullFunction(q,g,j),_={};@putByIdDirectPrivate(_,\"pull\",v),@putByIdDirectPrivate(_,\"cancel\",@readableStreamTeeBranch1CancelFunction(q,i));const w={};@putByIdDirectPrivate(w,\"pull\",v),@putByIdDirectPrivate(w,\"cancel\",@readableStreamTeeBranch2CancelFunction(q,i));const x=new @ReadableStream(_),f=new @ReadableStream(w);return @getByIdDirectPrivate(g,\"closedPromiseCapability\").@promise.@then(@undefined,function(y){if(q.closedOrErrored)return;if(@readableStreamDefaultControllerError(x.@readableStreamController,y),@readableStreamDefaultControllerError(f.@readableStreamController,y),q.closedOrErrored=!0,!q.canceled1||!q.canceled2)q.cancelPromiseCapability.@resolve.@call()}),q.branch1=x,q.branch2=f,[x,f]})\n";
+const char* const s_readableStreamInternalsReadableStreamTeeCode = "(function (f,k){\"use strict\";@assert(@isReadableStream(f)),@assert(typeof k===\"boolean\");var i=@getByIdDirectPrivate(f,\"start\");if(i)@putByIdDirectPrivate(f,\"start\",@undefined),i();const q=new @ReadableStreamDefaultReader(f),_={closedOrErrored:!1,canceled1:!1,canceled2:!1,reason1:@undefined,reason2:@undefined};_.cancelPromiseCapability=@newPromiseCapability(@Promise);const v=@readableStreamTeePullFunction(_,q,k),g={};@putByIdDirectPrivate(g,\"pull\",v),@putByIdDirectPrivate(g,\"cancel\",@readableStreamTeeBranch1CancelFunction(_,f));const w={};@putByIdDirectPrivate(w,\"pull\",v),@putByIdDirectPrivate(w,\"cancel\",@readableStreamTeeBranch2CancelFunction(_,f));const x=new @ReadableStream(g),j=new @ReadableStream(w);return @getByIdDirectPrivate(q,\"closedPromiseCapability\").@promise.@then(@undefined,function(y){if(_.closedOrErrored)return;if(@readableStreamDefaultControllerError(x.@readableStreamController,y),@readableStreamDefaultControllerError(j.@readableStreamController,y),_.closedOrErrored=!0,!_.canceled1||!_.canceled2)_.cancelPromiseCapability.@resolve.@call()}),_.branch1=x,_.branch2=j,[x,j]})\n";
// readableStreamTeePullFunction
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamTeePullFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1516,7 +1516,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamTeePullFunctio
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamTeePullFunctionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamTeePullFunctionCodeLength = 764;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamTeePullFunctionCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsReadableStreamTeePullFunctionCode = "(function (i,_,f){\"use strict\";return function(){@Promise.prototype.@then.@call(@readableStreamDefaultReaderRead(_),function(m){if(@assert(@isObject(m)),@assert(typeof m.done===\"boolean\"),m.done&&!i.closedOrErrored){if(!i.canceled1)@readableStreamDefaultControllerClose(i.branch1.@readableStreamController);if(!i.canceled2)@readableStreamDefaultControllerClose(i.branch2.@readableStreamController);if(i.closedOrErrored=!0,!i.canceled1||!i.canceled2)i.cancelPromiseCapability.@resolve.@call()}if(i.closedOrErrored)return;if(!i.canceled1)@readableStreamDefaultControllerEnqueue(i.branch1.@readableStreamController,m.value);if(!i.canceled2)@readableStreamDefaultControllerEnqueue(i.branch2.@readableStreamController,f\?@structuredCloneForStream(m.value):m.value)})}})\n";
+const char* const s_readableStreamInternalsReadableStreamTeePullFunctionCode = "(function (i,_,m){\"use strict\";return function(){@Promise.prototype.@then.@call(@readableStreamDefaultReaderRead(_),function(f){if(@assert(@isObject(f)),@assert(typeof f.done===\"boolean\"),f.done&&!i.closedOrErrored){if(!i.canceled1)@readableStreamDefaultControllerClose(i.branch1.@readableStreamController);if(!i.canceled2)@readableStreamDefaultControllerClose(i.branch2.@readableStreamController);if(i.closedOrErrored=!0,!i.canceled1||!i.canceled2)i.cancelPromiseCapability.@resolve.@call()}if(i.closedOrErrored)return;if(!i.canceled1)@readableStreamDefaultControllerEnqueue(i.branch1.@readableStreamController,f.value);if(!i.canceled2)@readableStreamDefaultControllerEnqueue(i.branch2.@readableStreamController,m\?@structuredCloneForStream(f.value):f.value)})}})\n";
// readableStreamTeeBranch1CancelFunction
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamTeeBranch1CancelFunctionCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1532,7 +1532,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamTeeBranch2Canc
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamTeeBranch2CancelFunctionCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamTeeBranch2CancelFunctionCodeLength = 258;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamTeeBranch2CancelFunctionCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsReadableStreamTeeBranch2CancelFunctionCode = "(function (c,d){\"use strict\";return function(i){if(c.canceled2=!0,c.reason2=i,c.canceled1)@readableStreamCancel(d,[c.reason1,c.reason2]).@then(c.cancelPromiseCapability.@resolve,c.cancelPromiseCapability.@reject);return c.cancelPromiseCapability.@promise}})\n";
+const char* const s_readableStreamInternalsReadableStreamTeeBranch2CancelFunctionCode = "(function (c,i){\"use strict\";return function(d){if(c.canceled2=!0,c.reason2=d,c.canceled1)@readableStreamCancel(i,[c.reason1,c.reason2]).@then(c.cancelPromiseCapability.@resolve,c.cancelPromiseCapability.@reject);return c.cancelPromiseCapability.@promise}})\n";
// isReadableStream
const JSC::ConstructAbility s_readableStreamInternalsIsReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1562,9 +1562,9 @@ const char* const s_readableStreamInternalsIsReadableStreamDefaultControllerCode
const JSC::ConstructAbility s_readableStreamInternalsReadDirectStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadDirectStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamInternalsReadDirectStreamCodeLength = 900;
+const int s_readableStreamInternalsReadDirectStreamCodeLength = 903;
static const JSC::Intrinsic s_readableStreamInternalsReadDirectStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsReadDirectStreamCode = "(function (_,j,q){\"use strict\";@putByIdDirectPrivate(_,\"underlyingSource\",@undefined),@putByIdDirectPrivate(_,\"start\",@undefined);function v(z,A){if(A&&q\?.cancel){try{var B=q.cancel(A);@markPromiseAsHandled(B)}catch(f){}q=@undefined}if(z){if(@putByIdDirectPrivate(z,\"readableStreamController\",@undefined),@putByIdDirectPrivate(z,\"reader\",@undefined),A)@putByIdDirectPrivate(z,\"state\",@streamErrored),@putByIdDirectPrivate(z,\"storedError\",A);else @putByIdDirectPrivate(z,\"state\",@streamClosed);z=@undefined}}if(!q.pull){v();return}if(!@isCallable(q.pull)){v(),@throwTypeError(\"pull is not a function\");return}@putByIdDirectPrivate(_,\"readableStreamController\",j);const x=@getByIdDirectPrivate(_,\"highWaterMark\");j.start({highWaterMark:!x||x<64\?64:x}),@startDirectStream.@call(j,_,q.pull,v),@putByIdDirectPrivate(_,\"reader\",{});var w=q.pull(j);if(j=@undefined,w&&@isPromise(w))return w.@then(()=>{})})\n";
+const char* const s_readableStreamInternalsReadDirectStreamCode = "(function (_,f,B){\"use strict\";@putByIdDirectPrivate(_,\"underlyingSource\",@undefined),@putByIdDirectPrivate(_,\"start\",@undefined);function j(w,x){var z=B\?.cancel;if(z){try{var A=z.@apply(B,x);if(@isPromise(A))@markPromiseAsHandled(A)}catch(C){}B=@undefined}if(w)if(@putByIdDirectPrivate(w,\"readableStreamController\",@undefined),@putByIdDirectPrivate(w,\"reader\",@undefined),x)@putByIdDirectPrivate(w,\"state\",@streamErrored),@putByIdDirectPrivate(w,\"storedError\",x);else @putByIdDirectPrivate(w,\"state\",@streamClosed)}if(!B.pull){j(_);return}if(!@isCallable(B.pull))j(_),@throwTypeError(\"pull is not a function\");@putByIdDirectPrivate(_,\"readableStreamController\",f);const q=@getByIdDirectPrivate(_,\"highWaterMark\");f.start({highWaterMark:!q||q<64\?64:q}),@startDirectStream.@call(f,_,B.pull,j),@putByIdDirectPrivate(_,\"reader\",{});var v=B.pull(f);if(f=@undefined,v&&@isPromise(v))return v.@then(()=>{})})\n";
// assignToStream
const JSC::ConstructAbility s_readableStreamInternalsAssignToStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1580,7 +1580,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadStreamIntoSinkCodeConstr
const JSC::ImplementationVisibility s_readableStreamInternalsReadStreamIntoSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadStreamIntoSinkCodeLength = 1395;
static const JSC::Intrinsic s_readableStreamInternalsReadStreamIntoSinkCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsReadStreamIntoSinkCode = "(async function (_,x,c){\"use strict\";var A=!1,F=!1;try{var B=_.getReader(),G=B.readMany();if(G&&@isPromise(G))G=await G;if(G.done)return A=!0,x.end();var z=G.value.length;const K=@getByIdDirectPrivate(_,\"highWaterMark\");if(c)@startDirectStream.@call(x,_,@undefined,()=>!F&&@markPromiseAsHandled(_.cancel()));x.start({highWaterMark:K||0});for(var f=0,D=G.value,H=G.value.length;f<H;f++)x.write(D[f]);var I=@getByIdDirectPrivate(_,\"state\");if(I===@streamClosed)return A=!0,x.end();while(!0){var{value:P,done:J}=await B.read();if(J)return A=!0,x.end();x.write(P)}}catch(K){F=!0;try{B=@undefined;const E=_.cancel(K);@markPromiseAsHandled(E)}catch(E){}if(x&&!A){A=!0;try{x.close(K)}catch(E){throw new globalThis.AggregateError([K,E])}}throw K}finally{if(B){try{B.releaseLock()}catch(E){}B=@undefined}x=@undefined;var I=@getByIdDirectPrivate(_,\"state\");if(_){var q=@getByIdDirectPrivate(_,\"readableStreamController\");if(q){if(@getByIdDirectPrivate(q,\"underlyingSource\"))@putByIdDirectPrivate(q,\"underlyingSource\",@undefined);if(@getByIdDirectPrivate(q,\"controlledReadableStream\"))@putByIdDirectPrivate(q,\"controlledReadableStream\",@undefined);if(@putByIdDirectPrivate(_,\"readableStreamController\",null),@getByIdDirectPrivate(_,\"underlyingSource\"))@putByIdDirectPrivate(_,\"underlyingSource\",@undefined);q=@undefined}if(!F&&I!==@streamClosed&&I!==@streamErrored)@readableStreamClose(_);_=@undefined}}})\n";
+const char* const s_readableStreamInternalsReadStreamIntoSinkCode = "(async function (_,E,c){\"use strict\";var f=!1,z=!1;try{var D=_.getReader(),F=D.readMany();if(F&&@isPromise(F))F=await F;if(F.done)return f=!0,E.end();var G=F.value.length;const q=@getByIdDirectPrivate(_,\"highWaterMark\");if(c)@startDirectStream.@call(E,_,@undefined,()=>!z&&@markPromiseAsHandled(_.cancel()));E.start({highWaterMark:q||0});for(var H=0,I=F.value,J=F.value.length;H<J;H++)E.write(I[H]);var K=@getByIdDirectPrivate(_,\"state\");if(K===@streamClosed)return f=!0,E.end();while(!0){var{value:P,done:A}=await D.read();if(A)return f=!0,E.end();E.write(P)}}catch(q){z=!0;try{D=@undefined;const x=_.cancel(q);@markPromiseAsHandled(x)}catch(x){}if(E&&!f){f=!0;try{E.close(q)}catch(x){throw new globalThis.AggregateError([q,x])}}throw q}finally{if(D){try{D.releaseLock()}catch(x){}D=@undefined}E=@undefined;var K=@getByIdDirectPrivate(_,\"state\");if(_){var B=@getByIdDirectPrivate(_,\"readableStreamController\");if(B){if(@getByIdDirectPrivate(B,\"underlyingSource\"))@putByIdDirectPrivate(B,\"underlyingSource\",@undefined);if(@getByIdDirectPrivate(B,\"controlledReadableStream\"))@putByIdDirectPrivate(B,\"controlledReadableStream\",@undefined);if(@putByIdDirectPrivate(_,\"readableStreamController\",null),@getByIdDirectPrivate(_,\"underlyingSource\"))@putByIdDirectPrivate(_,\"underlyingSource\",@undefined);B=@undefined}if(!z&&K!==@streamClosed&&K!==@streamErrored)@readableStreamClose(_);_=@undefined}}})\n";
// handleDirectStreamError
const JSC::ConstructAbility s_readableStreamInternalsHandleDirectStreamErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1588,7 +1588,7 @@ const JSC::ConstructorKind s_readableStreamInternalsHandleDirectStreamErrorCodeC
const JSC::ImplementationVisibility s_readableStreamInternalsHandleDirectStreamErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsHandleDirectStreamErrorCodeLength = 496;
static const JSC::Intrinsic s_readableStreamInternalsHandleDirectStreamErrorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsHandleDirectStreamErrorCode = "(function (u){\"use strict\";var _=this,h=_.@sink;if(h){@putByIdDirectPrivate(_,\"sink\",@undefined);try{h.close(u)}catch(i){}}if(this.error=this.flush=this.write=this.close=this.end=@onReadableStreamDirectControllerClosed,typeof this.@underlyingSource.close===\"function\")try{this.@underlyingSource.close.@call(this.@underlyingSource,u)}catch(i){}try{var R=_._pendingRead;if(R)_._pendingRead=@undefined,@rejectPromise(R,u)}catch(i){}var a=_.@controlledReadableStream;if(a)@readableStreamError(a,u)})\n";
+const char* const s_readableStreamInternalsHandleDirectStreamErrorCode = "(function (i){\"use strict\";var _=this,u=_.@sink;if(u){@putByIdDirectPrivate(_,\"sink\",@undefined);try{u.close(i)}catch(a){}}if(this.error=this.flush=this.write=this.close=this.end=@onReadableStreamDirectControllerClosed,typeof this.@underlyingSource.close===\"function\")try{this.@underlyingSource.close.@call(this.@underlyingSource,i)}catch(a){}try{var h=_._pendingRead;if(h)_._pendingRead=@undefined,@rejectPromise(h,i)}catch(a){}var R=_.@controlledReadableStream;if(R)@readableStreamError(R,i)})\n";
// handleDirectStreamErrorReject
const JSC::ConstructAbility s_readableStreamInternalsHandleDirectStreamErrorRejectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1628,7 +1628,7 @@ const JSC::ConstructorKind s_readableStreamInternalsOnCloseDirectStreamCodeConst
const JSC::ImplementationVisibility s_readableStreamInternalsOnCloseDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsOnCloseDirectStreamCodeLength = 1460;
static const JSC::Intrinsic s_readableStreamInternalsOnCloseDirectStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsOnCloseDirectStreamCode = "(function (c){\"use strict\";var v=this.@controlledReadableStream;if(!v||@getByIdDirectPrivate(v,\"state\")!==@streamReadable)return;if(this._deferClose!==0){this._deferClose=1,this._deferCloseReason=c;return}if(@putByIdDirectPrivate(v,\"state\",@streamClosing),typeof this.@underlyingSource.close===\"function\")try{this.@underlyingSource.close.@call(this.@underlyingSource,c)}catch(y){}var b;try{b=this.@sink.end(),@putByIdDirectPrivate(this,\"sink\",@undefined)}catch(y){if(this._pendingRead){var B=this._pendingRead;this._pendingRead=@undefined,@rejectPromise(B,y)}@readableStreamError(v,y);return}this.error=this.flush=this.write=this.close=this.end=@onReadableStreamDirectControllerClosed;var C=@getByIdDirectPrivate(v,\"reader\");if(C&&@isReadableStreamDefaultReader(C)){var S=this._pendingRead;if(S&&@isPromise(S)&&b\?.byteLength){this._pendingRead=@undefined,@fulfillPromise(S,{value:b,done:!1}),@readableStreamClose(v);return}}if(b\?.byteLength){var j=@getByIdDirectPrivate(C,\"readRequests\");if(j\?.isNotEmpty()){@readableStreamFulfillReadRequest(v,b,!1),@readableStreamClose(v);return}@putByIdDirectPrivate(v,\"state\",@streamReadable),this.@pull=()=>{var y=@createFulfilledPromise({value:b,done:!1});return b=@undefined,@readableStreamClose(v),v=@undefined,y}}else if(this._pendingRead){var B=this._pendingRead;this._pendingRead=@undefined,@putByIdDirectPrivate(this,\"pull\",@noopDoneFunction),@fulfillPromise(B,{value:@undefined,done:!0})}@readableStreamClose(v)})\n";
+const char* const s_readableStreamInternalsOnCloseDirectStreamCode = "(function (c){\"use strict\";var v=this.@controlledReadableStream;if(!v||@getByIdDirectPrivate(v,\"state\")!==@streamReadable)return;if(this._deferClose!==0){this._deferClose=1,this._deferCloseReason=c;return}if(@putByIdDirectPrivate(v,\"state\",@streamClosing),typeof this.@underlyingSource.close===\"function\")try{this.@underlyingSource.close.@call(this.@underlyingSource,c)}catch(j){}var b;try{b=this.@sink.end(),@putByIdDirectPrivate(this,\"sink\",@undefined)}catch(j){if(this._pendingRead){var y=this._pendingRead;this._pendingRead=@undefined,@rejectPromise(y,j)}@readableStreamError(v,j);return}this.error=this.flush=this.write=this.close=this.end=@onReadableStreamDirectControllerClosed;var B=@getByIdDirectPrivate(v,\"reader\");if(B&&@isReadableStreamDefaultReader(B)){var C=this._pendingRead;if(C&&@isPromise(C)&&b\?.byteLength){this._pendingRead=@undefined,@fulfillPromise(C,{value:b,done:!1}),@readableStreamClose(v);return}}if(b\?.byteLength){var S=@getByIdDirectPrivate(B,\"readRequests\");if(S\?.isNotEmpty()){@readableStreamFulfillReadRequest(v,b,!1),@readableStreamClose(v);return}@putByIdDirectPrivate(v,\"state\",@streamReadable),this.@pull=()=>{var j=@createFulfilledPromise({value:b,done:!1});return b=@undefined,@readableStreamClose(v),v=@undefined,j}}else if(this._pendingRead){var y=this._pendingRead;this._pendingRead=@undefined,@putByIdDirectPrivate(this,\"pull\",@noopDoneFunction),@fulfillPromise(y,{value:@undefined,done:!0})}@readableStreamClose(v)})\n";
// onFlushDirectStream
const JSC::ConstructAbility s_readableStreamInternalsOnFlushDirectStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1636,7 +1636,7 @@ const JSC::ConstructorKind s_readableStreamInternalsOnFlushDirectStreamCodeConst
const JSC::ImplementationVisibility s_readableStreamInternalsOnFlushDirectStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsOnFlushDirectStreamCodeLength = 591;
static const JSC::Intrinsic s_readableStreamInternalsOnFlushDirectStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsOnFlushDirectStreamCode = "(function (){\"use strict\";var c=this.@controlledReadableStream,B=@getByIdDirectPrivate(c,\"reader\");if(!B||!@isReadableStreamDefaultReader(B))return;var b=this._pendingRead;if(this._pendingRead=@undefined,b&&@isPromise(b)){var i=this.@sink.flush();if(i\?.byteLength)this._pendingRead=@getByIdDirectPrivate(c,\"readRequests\")\?.shift(),@fulfillPromise(b,{value:i,done:!1});else this._pendingRead=b}else if(@getByIdDirectPrivate(c,\"readRequests\")\?.isNotEmpty()){var i=this.@sink.flush();if(i\?.byteLength)@readableStreamFulfillReadRequest(c,i,!1)}else if(this._deferFlush===-1)this._deferFlush=1})\n";
+const char* const s_readableStreamInternalsOnFlushDirectStreamCode = "(function (){\"use strict\";var c=this.@controlledReadableStream,b=@getByIdDirectPrivate(c,\"reader\");if(!b||!@isReadableStreamDefaultReader(b))return;var i=this._pendingRead;if(this._pendingRead=@undefined,i&&@isPromise(i)){var B=this.@sink.flush();if(B\?.byteLength)this._pendingRead=@getByIdDirectPrivate(c,\"readRequests\")\?.shift(),@fulfillPromise(i,{value:B,done:!1});else this._pendingRead=i}else if(@getByIdDirectPrivate(c,\"readRequests\")\?.isNotEmpty()){var B=this.@sink.flush();if(B\?.byteLength)@readableStreamFulfillReadRequest(c,B,!1)}else if(this._deferFlush===-1)this._deferFlush=1})\n";
// createTextStream
const JSC::ConstructAbility s_readableStreamInternalsCreateTextStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1644,7 +1644,7 @@ const JSC::ConstructorKind s_readableStreamInternalsCreateTextStreamCodeConstruc
const JSC::ImplementationVisibility s_readableStreamInternalsCreateTextStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsCreateTextStreamCodeLength = 984;
static const JSC::Intrinsic s_readableStreamInternalsCreateTextStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsCreateTextStreamCode = "(function (j){\"use strict\";var w,x=[],z=!1,q=!1,A=\"\",C=@toLength(0),E=@newPromiseCapability(@Promise),v=!1;return w={start(){},write(G){if(typeof G===\"string\"){var F=@toLength(G.length);if(F>0)A+=G,z=!0,C+=F;return F}if(!G||!(@ArrayBuffer.@isView(G)||G instanceof @ArrayBuffer))@throwTypeError(\"Expected text, ArrayBuffer or ArrayBufferView\");const _=@toLength(G.byteLength);if(_>0)if(q=!0,A.length>0)@arrayPush(x,A,G),A=\"\";else @arrayPush(x,G);return C+=_,_},flush(){return 0},end(){if(v)return\"\";return w.fulfill()},fulfill(){v=!0;const G=w.finishInternal();return @fulfillPromise(E.@promise,G),G},finishInternal(){if(!z&&!q)return\"\";if(z&&!q)return A;if(q&&!z)return new globalThis.TextDecoder().decode(@Bun.concatArrayBuffers(x));var G=new @Bun.ArrayBufferSink;G.start({highWaterMark:C,asUint8Array:!0});for(let F of x)G.write(F);if(x.length=0,A.length>0)G.write(A),A=\"\";return new globalThis.TextDecoder().decode(G.end())},close(){try{if(!v)v=!0,w.fulfill()}catch(G){}}},[w,E]})\n";
+const char* const s_readableStreamInternalsCreateTextStreamCode = "(function (v){\"use strict\";var x,z=[],A=!1,j=!1,E=\"\",q=@toLength(0),F=@newPromiseCapability(@Promise),G=!1;return x={start(){},write(w){if(typeof w===\"string\"){var C=@toLength(w.length);if(C>0)E+=w,A=!0,q+=C;return C}if(!w||!(@ArrayBuffer.@isView(w)||w instanceof @ArrayBuffer))@throwTypeError(\"Expected text, ArrayBuffer or ArrayBufferView\");const _=@toLength(w.byteLength);if(_>0)if(j=!0,E.length>0)@arrayPush(z,E,w),E=\"\";else @arrayPush(z,w);return q+=_,_},flush(){return 0},end(){if(G)return\"\";return x.fulfill()},fulfill(){G=!0;const w=x.finishInternal();return @fulfillPromise(F.@promise,w),w},finishInternal(){if(!A&&!j)return\"\";if(A&&!j)return E;if(j&&!A)return new globalThis.TextDecoder().decode(@Bun.concatArrayBuffers(z));var w=new @Bun.ArrayBufferSink;w.start({highWaterMark:q,asUint8Array:!0});for(let C of z)w.write(C);if(z.length=0,E.length>0)w.write(E),E=\"\";return new globalThis.TextDecoder().decode(w.end())},close(){try{if(!G)G=!0,x.fulfill()}catch(w){}}},[x,F]})\n";
// initializeTextStream
const JSC::ConstructAbility s_readableStreamInternalsInitializeTextStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1660,7 +1660,7 @@ const JSC::ConstructorKind s_readableStreamInternalsInitializeArrayStreamCodeCon
const JSC::ImplementationVisibility s_readableStreamInternalsInitializeArrayStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsInitializeArrayStreamCodeLength = 797;
static const JSC::Intrinsic s_readableStreamInternalsInitializeArrayStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsInitializeArrayStreamCode = "(function (_,b){\"use strict\";var t=[],j=@newPromiseCapability(@Promise),q=!1;function m(){return q=!0,j.@resolve.@call(@undefined,t),t}var v={start(){},write(p){return @arrayPush(t,p),p.byteLength||p.length},flush(){return 0},end(){if(q)return[];return m()},close(){if(!q)m()}},d={@underlyingSource:_,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:v,close:@onCloseDirectStream,write:v.write,error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};return @putByIdDirectPrivate(this,\"readableStreamController\",d),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined),j})\n";
+const char* const s_readableStreamInternalsInitializeArrayStreamCode = "(function (_,t){\"use strict\";var p=[],b=@newPromiseCapability(@Promise),d=!1;function j(){return d=!0,b.@resolve.@call(@undefined,p),p}var m={start(){},write(v){return @arrayPush(p,v),v.byteLength||v.length},flush(){return 0},end(){if(d)return[];return j()},close(){if(!d)j()}},q={@underlyingSource:_,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:m,close:@onCloseDirectStream,write:m.write,error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};return @putByIdDirectPrivate(this,\"readableStreamController\",q),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined),b})\n";
// initializeArrayBufferStream
const JSC::ConstructAbility s_readableStreamInternalsInitializeArrayBufferStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1668,7 +1668,7 @@ const JSC::ConstructorKind s_readableStreamInternalsInitializeArrayBufferStreamC
const JSC::ImplementationVisibility s_readableStreamInternalsInitializeArrayBufferStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsInitializeArrayBufferStreamCodeLength = 690;
static const JSC::Intrinsic s_readableStreamInternalsInitializeArrayBufferStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsInitializeArrayBufferStreamCode = "(function (_,m){\"use strict\";var w=m&&typeof m===\"number\"\?{highWaterMark:m,stream:!0,asUint8Array:!0}:{stream:!0,asUint8Array:!0},D=new @Bun.ArrayBufferSink;D.start(w);var b={@underlyingSource:_,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:D,close:@onCloseDirectStream,write:D.write.bind(D),error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};@putByIdDirectPrivate(this,\"readableStreamController\",b),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined)})\n";
+const char* const s_readableStreamInternalsInitializeArrayBufferStreamCode = "(function (_,m){\"use strict\";var d=m&&typeof m===\"number\"\?{highWaterMark:m,stream:!0,asUint8Array:!0}:{stream:!0,asUint8Array:!0},f=new @Bun.ArrayBufferSink;f.start(d);var b={@underlyingSource:_,@pull:@onPullDirectStream,@controlledReadableStream:this,@sink:f,close:@onCloseDirectStream,write:f.write.bind(f),error:@handleDirectStreamError,end:@onCloseDirectStream,@close:@onCloseDirectStream,flush:@onFlushDirectStream,_pendingRead:@undefined,_deferClose:0,_deferFlush:0,_deferCloseReason:@undefined,_handleError:@undefined};@putByIdDirectPrivate(this,\"readableStreamController\",b),@putByIdDirectPrivate(this,\"underlyingSource\",@undefined),@putByIdDirectPrivate(this,\"start\",@undefined)})\n";
// readableStreamError
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1676,7 +1676,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamErrorCodeConst
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamErrorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamErrorCodeLength = 840;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamErrorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsReadableStreamErrorCode = "(function (i,c){\"use strict\";@assert(@isReadableStream(i)),@assert(@getByIdDirectPrivate(i,\"state\")===@streamReadable),@putByIdDirectPrivate(i,\"state\",@streamErrored),@putByIdDirectPrivate(i,\"storedError\",c);const n=@getByIdDirectPrivate(i,\"reader\");if(!n)return;if(@isReadableStreamDefaultReader(n)){const _=@getByIdDirectPrivate(n,\"readRequests\");@putByIdDirectPrivate(n,\"readRequests\",@createFIFO());for(var f=_.shift();f;f=_.shift())@rejectPromise(f,c)}else{@assert(@isReadableStreamBYOBReader(n));const _=@getByIdDirectPrivate(n,\"readIntoRequests\");@putByIdDirectPrivate(n,\"readIntoRequests\",@createFIFO());for(var f=_.shift();f;f=_.shift())@rejectPromise(f,c)}@getByIdDirectPrivate(n,\"closedPromiseCapability\").@reject.@call(@undefined,c);const v=@getByIdDirectPrivate(n,\"closedPromiseCapability\").@promise;@markPromiseAsHandled(v)})\n";
+const char* const s_readableStreamInternalsReadableStreamErrorCode = "(function (i,f){\"use strict\";@assert(@isReadableStream(i)),@assert(@getByIdDirectPrivate(i,\"state\")===@streamReadable),@putByIdDirectPrivate(i,\"state\",@streamErrored),@putByIdDirectPrivate(i,\"storedError\",f);const h=@getByIdDirectPrivate(i,\"reader\");if(!h)return;if(@isReadableStreamDefaultReader(h)){const v=@getByIdDirectPrivate(h,\"readRequests\");@putByIdDirectPrivate(h,\"readRequests\",@createFIFO());for(var _=v.shift();_;_=v.shift())@rejectPromise(_,f)}else{@assert(@isReadableStreamBYOBReader(h));const v=@getByIdDirectPrivate(h,\"readIntoRequests\");@putByIdDirectPrivate(h,\"readIntoRequests\",@createFIFO());for(var _=v.shift();_;_=v.shift())@rejectPromise(_,f)}@getByIdDirectPrivate(h,\"closedPromiseCapability\").@reject.@call(@undefined,f);const c=@getByIdDirectPrivate(h,\"closedPromiseCapability\").@promise;@markPromiseAsHandled(c)})\n";
// readableStreamDefaultControllerShouldCallPull
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerShouldCallPullCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1722,9 +1722,9 @@ const char* const s_readableStreamInternalsReadableStreamReaderGenericCancelCode
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamInternalsReadableStreamCancelCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamInternalsReadableStreamCancelCodeLength = 509;
+const int s_readableStreamInternalsReadableStreamCancelCodeLength = 533;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamCancelCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsReadableStreamCancelCode = "(function (i,_){\"use strict\";@putByIdDirectPrivate(i,\"disturbed\",!0);const d=@getByIdDirectPrivate(i,\"state\");if(d===@streamClosed)return @Promise.@resolve();if(d===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(i,\"storedError\"));@readableStreamClose(i);var h=@getByIdDirectPrivate(i,\"readableStreamController\"),p=h.@cancel;if(p)return p(h,_).@then(function(){});var u=h.close;if(u)return @Promise.@resolve(h.close(_));@throwTypeError(\"ReadableStreamController has no cancel or close method\")})\n";
+const char* const s_readableStreamInternalsReadableStreamCancelCode = "(function (_,d){\"use strict\";@putByIdDirectPrivate(_,\"disturbed\",!0);const h=@getByIdDirectPrivate(_,\"state\");if(h===@streamClosed)return @Promise.@resolve();if(h===@streamErrored)return @Promise.@reject(@getByIdDirectPrivate(_,\"storedError\"));@readableStreamClose(_);var j=@getByIdDirectPrivate(_,\"readableStreamController\"),p=j.@cancel;if(p)return p(j,d).@then(function(){});var i=j.close;if(i)return @Promise.@resolve(j.close(d));return @Promise.@reject(@makeTypeError(\"ReadableStreamController has no cancel or close method\"))})\n";
// readableStreamDefaultControllerCancel
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefaultControllerCancelCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1820,7 +1820,7 @@ const JSC::ConstructorKind s_readableStreamInternalsLazyLoadStreamCodeConstructo
const JSC::ImplementationVisibility s_readableStreamInternalsLazyLoadStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsLazyLoadStreamCodeLength = 1589;
static const JSC::Intrinsic s_readableStreamInternalsLazyLoadStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsLazyLoadStreamCode = "(function (E,m){\"use strict\";var y=@getByIdDirectPrivate(E,\"bunNativeType\"),q=@getByIdDirectPrivate(E,\"bunNativePtr\"),x=@lazyStreamPrototypeMap.@get(y);if(x===@undefined){let U=function(Y){var{c:Z,v:_}=this;this.c=@undefined,this.v=@undefined,K(Y,Z,_)},W=function(Y){try{Y.close()}catch(Z){globalThis.reportError(Z)}},X=function(Y,Z,_,p){p[0]=!1;var z;try{z=F(Y,_,p)}catch(A){return Z.error(A)}return K(z,Z,_)};var P=U,Q=W,O=X,[F,G,H,b,B,D,I]=@lazyLoad(y),J=[!1],K;K=function Y(Z,_,p){if(Z&&@isPromise(Z))return Z.then(U.bind({c:_,v:p}),(z)=>_.error(z));else if(typeof Z===\"number\")if(p&&p.byteLength===Z&&p.buffer===_.byobRequest\?.view\?.buffer)_.byobRequest.respondWithNewView(p);else _.byobRequest.respond(Z);else if(Z.constructor===@Uint8Array)_.enqueue(Z);if(J[0]||Z===!1)@enqueueJob(W,_),J[0]=!1};const j=B\?new FinalizationRegistry(B):null;x=class Y{constructor(Z,_,p){if(this.#f=Z,this.#b={},this.pull=this.#j.bind(this),this.cancel=this.#m.bind(this),this.autoAllocateChunkSize=_,p!==@undefined)this.start=(z)=>{z.enqueue(p)};if(j)j.register(this,Z,this.#b)}#b;pull;cancel;start;#f;type=\"bytes\";autoAllocateChunkSize=0;static startSync=G;#j(Z){var _=this.#f;if(!_){Z.close();return}X(_,Z,Z.byobRequest.view,J)}#m(Z){var _=this.#f;j&&j.unregister(this.#b),D&&D(_,!1),H(_,Z)}static deinit=B;static drain=I},@lazyStreamPrototypeMap.@set(y,x)}const L=x.startSync(q,m);var M;const{drain:f,deinit:N}=x;if(f)M=f(q);if(L===0){if(B&&q&&@enqueueJob(B,q),(M\?.byteLength\?\?0)>0)return{start(U){U.enqueue(M),U.close()},type:\"bytes\"};return{start(U){U.close()},type:\"bytes\"}}return new x(q,L,M)})\n";
+const char* const s_readableStreamInternalsLazyLoadStreamCode = "(function (X,I){\"use strict\";var P=@getByIdDirectPrivate(X,\"bunNativeType\"),J=@getByIdDirectPrivate(X,\"bunNativePtr\"),K=@lazyStreamPrototypeMap.@get(P);if(K===@undefined){let x=function(F){var{c:p,v:z}=this;this.c=@undefined,this.v=@undefined,m(F,p,z)},O=function(F){try{F.close()}catch(p){globalThis.reportError(p)}},_=function(F,p,z,A){A[0]=!1;var G;try{G=j(F,z,A)}catch(H){return p.error(H)}return m(G,p,z)};var q=x,W=O,y=_,[j,b,L,B,Q,Y,Z]=@lazyLoad(P),U=[!1],m;m=function F(p,z,A){if(p&&@isPromise(p))return p.then(x.bind({c:z,v:A}),(G)=>z.error(G));else if(typeof p===\"number\")if(A&&A.byteLength===p&&A.buffer===z.byobRequest\?.view\?.buffer)z.byobRequest.respondWithNewView(A);else z.byobRequest.respond(p);else if(p.constructor===@Uint8Array)z.enqueue(p);if(U[0]||p===!1)@enqueueJob(O,z),U[0]=!1};const E=Q\?new FinalizationRegistry(Q):null;K=class F{constructor(p,z,A){if(this.#f=p,this.#b={},this.pull=this.#j.bind(this),this.cancel=this.#m.bind(this),this.autoAllocateChunkSize=z,A!==@undefined)this.start=(G)=>{G.enqueue(A)};if(E)E.register(this,p,this.#b)}#b;pull;cancel;start;#f;type=\"bytes\";autoAllocateChunkSize=0;static startSync=b;#j(p){var z=this.#f;if(!z){p.close();return}_(z,p,p.byobRequest.view,U)}#m(p){var z=this.#f;E&&E.unregister(this.#b),Y&&Y(z,!1),L(z,p)}static deinit=Q;static drain=Z},@lazyStreamPrototypeMap.@set(P,K)}const f=K.startSync(J,I);var M;const{drain:D,deinit:N}=K;if(D)M=D(J);if(f===0){if(Q&&J&&@enqueueJob(Q,J),(M\?.byteLength\?\?0)>0)return{start(x){x.enqueue(M),x.close()},type:\"bytes\"};return{start(x){x.close()},type:\"bytes\"}}return new K(J,f,M)})\n";
// readableStreamIntoArray
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamIntoArrayCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1828,7 +1828,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamIntoArrayCodeC
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamIntoArrayCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamIntoArrayCodeLength = 247;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamIntoArrayCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsReadableStreamIntoArrayCode = "(function (_){\"use strict\";var g=_.getReader(),p=g.readMany();async function j(q){if(q.done)return[];var f=q.value||[];while(!0){var b=await g.read();if(b.done)break;f=f.concat(b.value)}return f}if(p&&@isPromise(p))return p.@then(j);return j(p)})\n";
+const char* const s_readableStreamInternalsReadableStreamIntoArrayCode = "(function (_){\"use strict\";var b=_.getReader(),g=b.readMany();async function j(q){if(q.done)return[];var f=q.value||[];while(!0){var p=await b.read();if(p.done)break;f=f.concat(p.value)}return f}if(g&&@isPromise(g))return g.@then(j);return j(g)})\n";
// readableStreamIntoText
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamIntoTextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1844,7 +1844,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamToArrayBufferD
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeLength = 727;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamToArrayBufferDirectCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsReadableStreamToArrayBufferDirectCode = "(function (j,w){\"use strict\";var _=new @Bun.ArrayBufferSink;@putByIdDirectPrivate(j,\"underlyingSource\",@undefined);var x=@getByIdDirectPrivate(j,\"highWaterMark\");_.start(x\?{highWaterMark:x}:{});var O=@newPromiseCapability(@Promise),z=!1,q=w.pull,A=w.close,B={start(){},close(C){if(!z){if(z=!0,A)A();@fulfillPromise(O.@promise,_.end())}},end(){if(!z){if(z=!0,A)A();@fulfillPromise(O.@promise,_.end())}},flush(){return 0},write:_.write.bind(_)},v=!1;try{const C=q(B);if(C&&@isObject(C)&&@isPromise(C))return async function(D,F,G){while(!z)await G(D);return await F}(B,promise,q);return O.@promise}catch(C){return v=!0,@readableStreamError(j,C),@Promise.@reject(C)}finally{if(!v&&j)@readableStreamClose(j);B=A=_=q=j=@undefined}})\n";
+const char* const s_readableStreamInternalsReadableStreamToArrayBufferDirectCode = "(function (O,_){\"use strict\";var q=new @Bun.ArrayBufferSink;@putByIdDirectPrivate(O,\"underlyingSource\",@undefined);var x=@getByIdDirectPrivate(O,\"highWaterMark\");q.start(x\?{highWaterMark:x}:{});var v=@newPromiseCapability(@Promise),A=!1,z=_.pull,B=_.close,C={start(){},close(F){if(!A){if(A=!0,B)B();@fulfillPromise(v.@promise,q.end())}},end(){if(!A){if(A=!0,B)B();@fulfillPromise(v.@promise,q.end())}},flush(){return 0},write:q.write.bind(q)},D=!1;try{const F=z(C);if(F&&@isObject(F)&&@isPromise(F))return async function(G,j,w){while(!A)await w(G);return await j}(C,promise,z);return v.@promise}catch(F){return D=!0,@readableStreamError(O,F),@Promise.@reject(F)}finally{if(!D&&O)@readableStreamClose(O);C=B=q=z=O=@undefined}})\n";
// readableStreamToTextDirect
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamToTextDirectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1852,7 +1852,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamToTextDirectCo
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamToTextDirectCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamToTextDirectCodeLength = 278;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamToTextDirectCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsReadableStreamToTextDirectCode = "(async function (f,h){\"use strict\";const j=@initializeTextStream.@call(f,h,@undefined);var k=f.getReader();while(@getByIdDirectPrivate(f,\"state\")===@streamReadable){var p=await k.read();if(p.done)break}try{k.releaseLock()}catch(_){}return k=@undefined,f=@undefined,j.@promise})\n";
+const char* const s_readableStreamInternalsReadableStreamToTextDirectCode = "(async function (_,f){\"use strict\";const h=@initializeTextStream.@call(_,f,@undefined);var j=_.getReader();while(@getByIdDirectPrivate(_,\"state\")===@streamReadable){var k=await j.read();if(k.done)break}try{j.releaseLock()}catch(p){}return j=@undefined,_=@undefined,h.@promise})\n";
// readableStreamToArrayDirect
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamToArrayDirectCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1860,7 +1860,7 @@ const JSC::ConstructorKind s_readableStreamInternalsReadableStreamToArrayDirectC
const JSC::ImplementationVisibility s_readableStreamInternalsReadableStreamToArrayDirectCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamInternalsReadableStreamToArrayDirectCodeLength = 354;
static const JSC::Intrinsic s_readableStreamInternalsReadableStreamToArrayDirectCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamInternalsReadableStreamToArrayDirectCode = "(async function (f,j){\"use strict\";const k=@initializeArrayStream.@call(f,j,@undefined);j=@undefined;var _=f.getReader();try{while(@getByIdDirectPrivate(f,\"state\")===@streamReadable){var p=await _.read();if(p.done)break}try{_.releaseLock()}catch(q){}return _=@undefined,@Promise.@resolve(k.@promise)}catch(q){throw q}finally{f=@undefined,_=@undefined}})\n";
+const char* const s_readableStreamInternalsReadableStreamToArrayDirectCode = "(async function (f,_){\"use strict\";const j=@initializeArrayStream.@call(f,_,@undefined);_=@undefined;var k=f.getReader();try{while(@getByIdDirectPrivate(f,\"state\")===@streamReadable){var p=await k.read();if(p.done)break}try{k.releaseLock()}catch(q){}return k=@undefined,@Promise.@resolve(j.@promise)}catch(q){throw q}finally{f=@undefined,k=@undefined}})\n";
// readableStreamDefineLazyIterators
const JSC::ConstructAbility s_readableStreamInternalsReadableStreamDefineLazyIteratorsCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -1934,9 +1934,9 @@ WEBCORE_FOREACH_TRANSFORMSTREAMDEFAULTCONTROLLER_BUILTIN_CODE(DEFINE_BUILTIN_GEN
const JSC::ConstructAbility s_eventStreamGetEventStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_eventStreamGetEventStreamCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_eventStreamGetEventStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_eventStreamGetEventStreamCodeLength = 531;
+const int s_eventStreamGetEventStreamCodeLength = 574;
static const JSC::Intrinsic s_eventStreamGetEventStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_eventStreamGetEventStreamCode = "(function (){\"use strict\";return class m extends @ReadableStream{#m;constructor(w){super({type:\"direct\",pull:(i)=>{this.#m=i,w\?.start\?.(this)},cancel:()=>{console.log(\"Cancel!\"),w\?.cancel\?.(this)}})}send(w,i){var u=this.#m;if(!i)i=w,w=@undefined;else if(w===\"message\")w=@undefined;if(i===@undefined)@throwTypeError(\"EventStream.send() requires a data argument\");if(typeof i===\"string\")u.write(\"data: \"+i.replace(/\\n/g,\"\\ndata: \")+\"\\n\\n\");else{if(w)u.write(\"event: \"+w+\"\\n\");u.write(\"data: \"+JSON.stringify(i)+\"\\n\\n\")}u.flush()}}})\n";
+const char* const s_eventStreamGetEventStreamCode = "(function (){\"use strict\";return class h extends @ReadableStream{#h;constructor(i){super({type:\"direct\",pull:(m)=>{this.#h=m,i\?.start\?.(this)},cancel:()=>{i\?.cancel\?.(this),this.#h=@undefined}})}send(i,m){var _=this.#h;if(!_)throw new Error(\"EventStream has ended\");if(!m)m=i,i=@undefined;else if(i===\"message\")i=@undefined;if(m===@undefined)@throwTypeError(\"EventStream.send() requires a data argument\");if(typeof m===\"string\")_.write(\"data: \"+m.replace(/\\n/g,\"\\ndata: \")+\"\\n\\n\");else{if(i)_.write(\"event: \"+i+\"\\n\");_.write(\"data: \"+JSON.stringify(m)+\"\\n\\n\")}_.flush()}}})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
@@ -2004,7 +2004,7 @@ const JSC::ConstructorKind s_jsBufferConstructorFromCodeConstructorKind = JSC::C
const JSC::ImplementationVisibility s_jsBufferConstructorFromCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_jsBufferConstructorFromCodeLength = 1107;
static const JSC::Intrinsic s_jsBufferConstructorFromCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_jsBufferConstructorFromCode = "(function (n){\"use strict\";if(@isUndefinedOrNull(n))@throwTypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.\");if(typeof n===\"string\"||typeof n===\"object\"&&(@isTypedArrayView(n)||n instanceof @ArrayBuffer||n instanceof SharedArrayBuffer||n instanceof String))switch(@argumentCount()){case 1:return new @Buffer(n);case 2:return new @Buffer(n,@argument(1));default:return new @Buffer(n,@argument(1),@argument(2))}var d=@toObject(n,\"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.\");if(!@isJSArray(d)){const u=@tryGetByIdWithWellKnownSymbol(n,\"toPrimitive\");if(u){const f=u.@call(n,\"string\");if(typeof f===\"string\")switch(@argumentCount()){case 1:return new @Buffer(f);case 2:return new @Buffer(f,@argument(1));default:return new @Buffer(f,@argument(1),@argument(2))}}if(!(\"length\"in d)||@isCallable(d))@throwTypeError(\"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.\")}return new @Buffer(@Uint8Array.from(d).buffer)})\n";
+const char* const s_jsBufferConstructorFromCode = "(function (n){\"use strict\";if(@isUndefinedOrNull(n))@throwTypeError(\"The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object.\");if(typeof n===\"string\"||typeof n===\"object\"&&(@isTypedArrayView(n)||n instanceof @ArrayBuffer||n instanceof SharedArrayBuffer||n instanceof String))switch(@argumentCount()){case 1:return new @Buffer(n);case 2:return new @Buffer(n,@argument(1));default:return new @Buffer(n,@argument(1),@argument(2))}var d=@toObject(n,\"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.\");if(!@isJSArray(d)){const f=@tryGetByIdWithWellKnownSymbol(n,\"toPrimitive\");if(f){const u=f.@call(n,\"string\");if(typeof u===\"string\")switch(@argumentCount()){case 1:return new @Buffer(u);case 2:return new @Buffer(u,@argument(1));default:return new @Buffer(u,@argument(1),@argument(2))}}if(!(\"length\"in d)||@isCallable(d))@throwTypeError(\"The first argument must be of type string or an instance of Buffer, ArrayBuffer, or Array or an Array-like Object.\")}return new @Buffer(@Uint8Array.from(d).buffer)})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
@@ -2038,7 +2038,7 @@ const JSC::ConstructorKind s_readableStreamDefaultReaderReadManyCodeConstructorK
const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadManyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableStreamDefaultReaderReadManyCodeLength = 2598;
static const JSC::Intrinsic s_readableStreamDefaultReaderReadManyCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamDefaultReaderReadManyCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))@throwTypeError(\"ReadableStreamDefaultReader.readMany() should not be called directly\");const O=@getByIdDirectPrivate(this,\"ownerReadableStream\");if(!O)@throwTypeError(\"readMany() called on a reader owned by no readable stream\");const A=@getByIdDirectPrivate(O,\"state\");if(@putByIdDirectPrivate(O,\"disturbed\",!0),A===@streamClosed)return{value:[],size:0,done:!0};else if(A===@streamErrored)throw @getByIdDirectPrivate(O,\"storedError\");var G=@getByIdDirectPrivate(O,\"readableStreamController\"),C=@getByIdDirectPrivate(G,\"queue\");if(!C)return G.@pull(G).@then(function({done:j,value:H}){return j\?{done:!0,value:[],size:0}:{value:[H],size:1,done:!1}});const D=C.content;var w=C.size,I=D.toArray(!1),Q=I.length;if(Q>0){var N=@newArrayWithSize(Q);if(@isReadableByteStreamController(G)){{const j=I[0];if(!(@ArrayBuffer.@isView(j)||j instanceof @ArrayBuffer))@putByValDirect(N,0,new @Uint8Array(j.buffer,j.byteOffset,j.byteLength));else @putByValDirect(N,0,j)}for(var _=1;_<Q;_++){const j=I[_];if(!(@ArrayBuffer.@isView(j)||j instanceof @ArrayBuffer))@putByValDirect(N,_,new @Uint8Array(j.buffer,j.byteOffset,j.byteLength));else @putByValDirect(N,_,j)}}else{@putByValDirect(N,0,I[0].value);for(var _=1;_<Q;_++)@putByValDirect(N,_,I[_].value)}if(@resetQueue(@getByIdDirectPrivate(G,\"queue\")),@getByIdDirectPrivate(G,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(G,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(G))@readableStreamDefaultControllerCallPullIfNeeded(G);else if(@isReadableByteStreamController(G))@readableByteStreamControllerCallPullIfNeeded(G);return{value:N,size:w,done:!1}}var E=(j)=>{if(j.done)return{value:[],size:0,done:!0};var H=@getByIdDirectPrivate(O,\"readableStreamController\"),J=@getByIdDirectPrivate(H,\"queue\"),K=[j.value].concat(J.content.toArray(!1)),S=K.length;if(@isReadableByteStreamController(H))for(var d=0;d<S;d++){const T=K[d];if(!(@ArrayBuffer.@isView(T)||T instanceof @ArrayBuffer)){const{buffer:U,byteOffset:B,byteLength:x}=T;@putByValDirect(K,d,new @Uint8Array(U,B,x))}}else for(var d=1;d<S;d++)@putByValDirect(K,d,K[d].value);var k=J.size;if(@resetQueue(J),@getByIdDirectPrivate(H,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(H,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(H))@readableStreamDefaultControllerCallPullIfNeeded(H);else if(@isReadableByteStreamController(H))@readableByteStreamControllerCallPullIfNeeded(H);return{value:K,size:k,done:!1}},F=G.@pull(G);if(F&&@isPromise(F))return F.@then(E);return E(F)})\n";
+const char* const s_readableStreamDefaultReaderReadManyCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))@throwTypeError(\"ReadableStreamDefaultReader.readMany() should not be called directly\");const N=@getByIdDirectPrivate(this,\"ownerReadableStream\");if(!N)@throwTypeError(\"readMany() called on a reader owned by no readable stream\");const x=@getByIdDirectPrivate(N,\"state\");if(@putByIdDirectPrivate(N,\"disturbed\",!0),x===@streamClosed)return{value:[],size:0,done:!0};else if(x===@streamErrored)throw @getByIdDirectPrivate(N,\"storedError\");var A=@getByIdDirectPrivate(N,\"readableStreamController\"),C=@getByIdDirectPrivate(A,\"queue\");if(!C)return A.@pull(A).@then(function({done:Q,value:S}){return Q\?{done:!0,value:[],size:0}:{value:[S],size:1,done:!1}});const D=C.content;var _=C.size,B=D.toArray(!1),E=B.length;if(E>0){var j=@newArrayWithSize(E);if(@isReadableByteStreamController(A)){{const Q=B[0];if(!(@ArrayBuffer.@isView(Q)||Q instanceof @ArrayBuffer))@putByValDirect(j,0,new @Uint8Array(Q.buffer,Q.byteOffset,Q.byteLength));else @putByValDirect(j,0,Q)}for(var F=1;F<E;F++){const Q=B[F];if(!(@ArrayBuffer.@isView(Q)||Q instanceof @ArrayBuffer))@putByValDirect(j,F,new @Uint8Array(Q.buffer,Q.byteOffset,Q.byteLength));else @putByValDirect(j,F,Q)}}else{@putByValDirect(j,0,B[0].value);for(var F=1;F<E;F++)@putByValDirect(j,F,B[F].value)}if(@resetQueue(@getByIdDirectPrivate(A,\"queue\")),@getByIdDirectPrivate(A,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(A,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(A))@readableStreamDefaultControllerCallPullIfNeeded(A);else if(@isReadableByteStreamController(A))@readableByteStreamControllerCallPullIfNeeded(A);return{value:j,size:_,done:!1}}var J=(Q)=>{if(Q.done)return{value:[],size:0,done:!0};var S=@getByIdDirectPrivate(N,\"readableStreamController\"),T=@getByIdDirectPrivate(S,\"queue\"),U=[Q.value].concat(T.content.toArray(!1)),k=U.length;if(@isReadableByteStreamController(S))for(var G=0;G<k;G++){const w=U[G];if(!(@ArrayBuffer.@isView(w)||w instanceof @ArrayBuffer)){const{buffer:K,byteOffset:d,byteLength:H}=w;@putByValDirect(U,G,new @Uint8Array(K,d,H))}}else for(var G=1;G<k;G++)@putByValDirect(U,G,U[G].value);var I=T.size;if(@resetQueue(T),@getByIdDirectPrivate(S,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(S,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(S))@readableStreamDefaultControllerCallPullIfNeeded(S);else if(@isReadableByteStreamController(S))@readableByteStreamControllerCallPullIfNeeded(S);return{value:U,size:I,done:!1}},O=A.@pull(A);if(O&&@isPromise(O))return O.@then(J);return J(O)})\n";
// read
const JSC::ConstructAbility s_readableStreamDefaultReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2112,7 +2112,7 @@ const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrNoopMethodCodeConstru
const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrNoopMethodCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsPromiseInvokeOrNoopMethodCodeLength = 122;
static const JSC::Intrinsic s_streamInternalsPromiseInvokeOrNoopMethodCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_streamInternalsPromiseInvokeOrNoopMethodCode = "(function (l,f,i){\"use strict\";try{return @promiseInvokeOrNoopMethodNoCatch(l,f,i)}catch(d){return @Promise.@reject(d)}})\n";
+const char* const s_streamInternalsPromiseInvokeOrNoopMethodCode = "(function (l,d,f){\"use strict\";try{return @promiseInvokeOrNoopMethodNoCatch(l,d,f)}catch(i){return @Promise.@reject(i)}})\n";
// promiseInvokeOrNoop
const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrNoopCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2120,7 +2120,7 @@ const JSC::ConstructorKind s_streamInternalsPromiseInvokeOrNoopCodeConstructorKi
const JSC::ImplementationVisibility s_streamInternalsPromiseInvokeOrNoopCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_streamInternalsPromiseInvokeOrNoopCodeLength = 116;
static const JSC::Intrinsic s_streamInternalsPromiseInvokeOrNoopCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_streamInternalsPromiseInvokeOrNoopCode = "(function (n,d,l){\"use strict\";try{return @promiseInvokeOrNoopNoCatch(n,d,l)}catch(m){return @Promise.@reject(m)}})\n";
+const char* const s_streamInternalsPromiseInvokeOrNoopCode = "(function (d,n,l){\"use strict\";try{return @promiseInvokeOrNoopNoCatch(d,n,l)}catch(m){return @Promise.@reject(m)}})\n";
// promiseInvokeOrFallbackOrNoop
const JSC::ConstructAbility s_streamInternalsPromiseInvokeOrFallbackOrNoopCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2144,7 +2144,7 @@ const JSC::ConstructorKind s_streamInternalsCreateFIFOCodeConstructorKind = JSC:
const JSC::ImplementationVisibility s_streamInternalsCreateFIFOCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_streamInternalsCreateFIFOCodeLength = 1472;
static const JSC::Intrinsic s_streamInternalsCreateFIFOCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_streamInternalsCreateFIFOCode = "(function (){\"use strict\";var b=@Array.prototype.slice;class v{constructor(){this._head=0,this._tail=0,this._capacityMask=3,this._list=@newArrayWithSize(4)}_head;_tail;_capacityMask;_list;size(){if(this._head===this._tail)return 0;if(this._head<this._tail)return this._tail-this._head;else return this._capacityMask+1-(this._head-this._tail)}isEmpty(){return this.size()==0}isNotEmpty(){return this.size()>0}shift(){var{_head:x,_tail:g,_list:k,_capacityMask:w}=this;if(x===g)return @undefined;var z=k[x];if(@putByValDirect(k,x,@undefined),x=this._head=x+1&w,x<2&&g>1e4&&g<=k.length>>>2)this._shrinkArray();return z}peek(){if(this._head===this._tail)return @undefined;return this._list[this._head]}push(x){var g=this._tail;if(@putByValDirect(this._list,g,x),this._tail=g+1&this._capacityMask,this._tail===this._head)this._growArray()}toArray(x){var g=this._list,k=@toLength(g.length);if(x||this._head>this._tail){var w=@toLength(this._head),z=@toLength(this._tail),A=@toLength(k-w+z),B=@newArrayWithSize(A),E=0;for(var F=w;F<k;F++)@putByValDirect(B,E++,g[F]);for(var F=0;F<z;F++)@putByValDirect(B,E++,g[F]);return B}else return b.@call(g,this._head,this._tail)}clear(){this._head=0,this._tail=0,this._list.fill(@undefined)}_growArray(){if(this._head)this._list=this.toArray(!0),this._head=0;this._tail=@toLength(this._list.length),this._list.length<<=1,this._capacityMask=this._capacityMask<<1|1}shrinkArray(){this._list.length>>>=1,this._capacityMask>>>=1}}return new v})\n";
+const char* const s_streamInternalsCreateFIFOCode = "(function (){\"use strict\";var b=@Array.prototype.slice;class k{constructor(){this._head=0,this._tail=0,this._capacityMask=3,this._list=@newArrayWithSize(4)}_head;_tail;_capacityMask;_list;size(){if(this._head===this._tail)return 0;if(this._head<this._tail)return this._tail-this._head;else return this._capacityMask+1-(this._head-this._tail)}isEmpty(){return this.size()==0}isNotEmpty(){return this.size()>0}shift(){var{_head:v,_tail:x,_list:z,_capacityMask:g}=this;if(v===x)return @undefined;var w=z[v];if(@putByValDirect(z,v,@undefined),v=this._head=v+1&g,v<2&&x>1e4&&x<=z.length>>>2)this._shrinkArray();return w}peek(){if(this._head===this._tail)return @undefined;return this._list[this._head]}push(v){var x=this._tail;if(@putByValDirect(this._list,x,v),this._tail=x+1&this._capacityMask,this._tail===this._head)this._growArray()}toArray(v){var x=this._list,z=@toLength(x.length);if(v||this._head>this._tail){var g=@toLength(this._head),w=@toLength(this._tail),A=@toLength(z-g+w),B=@newArrayWithSize(A),E=0;for(var F=g;F<z;F++)@putByValDirect(B,E++,x[F]);for(var F=0;F<w;F++)@putByValDirect(B,E++,x[F]);return B}else return b.@call(x,this._head,this._tail)}clear(){this._head=0,this._tail=0,this._list.fill(@undefined)}_growArray(){if(this._head)this._list=this.toArray(!0),this._head=0;this._tail=@toLength(this._list.length),this._list.length<<=1,this._capacityMask=this._capacityMask<<1|1}shrinkArray(){this._list.length>>>=1,this._capacityMask>>>=1}}return new k})\n";
// newQueue
const JSC::ConstructAbility s_streamInternalsNewQueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2242,7 +2242,7 @@ const JSC::ConstructorKind s_importMetaObjectLoadCJS2ESMCodeConstructorKind = JS
const JSC::ImplementationVisibility s_importMetaObjectLoadCJS2ESMCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_importMetaObjectLoadCJS2ESMCodeLength = 1387;
static const JSC::Intrinsic s_importMetaObjectLoadCJS2ESMCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_importMetaObjectLoadCJS2ESMCode = "(function (_){\"use strict\";var L=@Loader,w=@createFIFO(),U=_;while(U){var D=L.registry.@get(U);if((D\?.state\?\?0)<=@ModuleFetch)@fulfillModuleSync(U),D=L.registry.@get(U);var V=@getPromiseInternalField(D.fetch,@promiseFieldReactionsOrResult),J=L.parseModule(U,V),W=D.module;if(J&&@isPromise(J)){var x=@getPromiseInternalField(J,@promiseFieldReactionsOrResult),z=@getPromiseInternalField(J,@promiseFieldFlags),B=z&@promiseStateMask;if(B===@promiseStatePending||x&&@isPromise(x))@throwTypeError(`require() async module \"${U}\" is unsupported. use \"await import()\" instead.`);else if(B===@promiseStateRejected){if(!x\?.message)@throwTypeError(`${x+\"\"\?x:\"An error occurred\"} occurred while parsing module \\\"${U}\\\"`);throw x}D.module=W=x}else if(J&&!W)D.module=W=J;@setStateToMax(D,@ModuleLink);var X=W.dependenciesMap,F=L.requestedModules(W),Y=@newArrayWithSize(F.length);for(var G=0,Z=F.length;G<Z;++G){var H=F[G],Q=H[0]===\"/\"\?H:L.resolve(H,U),I=L.ensureRegistered(Q);if(I.state<@ModuleLink)w.push(Q);@putByValDirect(Y,G,I),X.@set(H,I)}D.dependencies=Y,D.instantiate=@Promise.resolve(D),D.satisfy=@Promise.resolve(D),U=w.shift();while(U&&(L.registry.@get(U)\?.state\?\?@ModuleFetch)>=@ModuleLink)U=w.shift()}var T=L.linkAndEvaluateModule(_,@undefined);if(T&&@isPromise(T))@throwTypeError(`require() async module \\\"${_}\\\" is unsupported. use \"await import()\" instead.`);return L.registry.@get(_)})\n";
+const char* const s_importMetaObjectLoadCJS2ESMCode = "(function (D){\"use strict\";var H=@Loader,_=@createFIFO(),I=D;while(I){var w=H.registry.@get(I);if((w\?.state\?\?0)<=@ModuleFetch)@fulfillModuleSync(I),w=H.registry.@get(I);var L=@getPromiseInternalField(w.fetch,@promiseFieldReactionsOrResult),J=H.parseModule(I,L),Q=w.module;if(J&&@isPromise(J)){var T=@getPromiseInternalField(J,@promiseFieldReactionsOrResult),x=@getPromiseInternalField(J,@promiseFieldFlags),U=x&@promiseStateMask;if(U===@promiseStatePending||T&&@isPromise(T))@throwTypeError(`require() async module \"${I}\" is unsupported. use \"await import()\" instead.`);else if(U===@promiseStateRejected){if(!T\?.message)@throwTypeError(`${T+\"\"\?T:\"An error occurred\"} occurred while parsing module \\\"${I}\\\"`);throw T}w.module=Q=T}else if(J&&!Q)w.module=Q=J;@setStateToMax(w,@ModuleLink);var V=Q.dependenciesMap,W=H.requestedModules(Q),X=@newArrayWithSize(W.length);for(var Y=0,Z=W.length;Y<Z;++Y){var z=W[Y],B=z[0]===\"/\"\?z:H.resolve(z,I),F=H.ensureRegistered(B);if(F.state<@ModuleLink)_.push(B);@putByValDirect(X,Y,F),V.@set(z,F)}w.dependencies=X,w.instantiate=@Promise.resolve(w),w.satisfy=@Promise.resolve(w),I=_.shift();while(I&&(H.registry.@get(I)\?.state\?\?@ModuleFetch)>=@ModuleLink)I=_.shift()}var G=H.linkAndEvaluateModule(D,@undefined);if(G&&@isPromise(G))@throwTypeError(`require() async module \\\"${D}\\\" is unsupported. use \"await import()\" instead.`);return H.registry.@get(D)})\n";
// requireESM
const JSC::ConstructAbility s_importMetaObjectRequireESMCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2266,7 +2266,7 @@ const JSC::ConstructorKind s_importMetaObjectCreateRequireCacheCodeConstructorKi
const JSC::ImplementationVisibility s_importMetaObjectCreateRequireCacheCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_importMetaObjectCreateRequireCacheCodeLength = 854;
static const JSC::Intrinsic s_importMetaObjectCreateRequireCacheCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_importMetaObjectCreateRequireCacheCode = "(function (){\"use strict\";var _=new Map,t={};return new Proxy(t,{get(L,f){const h=@requireMap.@get(f);if(h)return h;const u=@Loader.registry.@get(f);if(u\?.evaluated){const b=@Loader.getModuleNamespaceObject(u.module),c=b[@commonJSSymbol]===0||b.default\?.[@commonJSSymbol]\?b.default:b,g=@createCommonJSModule(f,c,!0);return @requireMap.@set(f,g),g}return t[f]},set(L,f,h){return @requireMap.@set(f,h),!0},has(L,f){return @requireMap.@has(f)||@Loader.registry.@has(f)},deleteProperty(L,f){return _.@delete(f),@requireMap.@delete(f),@Loader.registry.@delete(f),!0},ownKeys(L){var f=[...@requireMap.@keys()];const h=[...@Loader.registry.@keys()];for(let u of h)if(!f.includes(u))@arrayPush(f,u);return f},getPrototypeOf(L){return null},getOwnPropertyDescriptor(L,f){if(@requireMap.@has(f)||@Loader.registry.@has(f))return{configurable:!0,enumerable:!0}}})})\n";
+const char* const s_importMetaObjectCreateRequireCacheCode = "(function (){\"use strict\";var _=new Map,L={};return new Proxy(L,{get(f,h){const t=@requireMap.@get(h);if(t)return t;const u=@Loader.registry.@get(h);if(u\?.evaluated){const b=@Loader.getModuleNamespaceObject(u.module),c=b[@commonJSSymbol]===0||b.default\?.[@commonJSSymbol]\?b.default:b,g=@createCommonJSModule(h,c,!0);return @requireMap.@set(h,g),g}return L[h]},set(f,h,t){return @requireMap.@set(h,t),!0},has(f,h){return @requireMap.@has(h)||@Loader.registry.@has(h)},deleteProperty(f,h){return _.@delete(h),@requireMap.@delete(h),@Loader.registry.@delete(h),!0},ownKeys(f){var h=[...@requireMap.@keys()];const t=[...@Loader.registry.@keys()];for(let u of t)if(!h.includes(u))@arrayPush(h,u);return h},getPrototypeOf(f){return null},getOwnPropertyDescriptor(f,h){if(@requireMap.@has(h)||@Loader.registry.@has(h))return{configurable:!0,enumerable:!0}}})})\n";
// require
const JSC::ConstructAbility s_importMetaObjectRequireCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2458,7 +2458,7 @@ const JSC::ConstructorKind s_readableStreamReadableStreamToArrayCodeConstructorK
const JSC::ImplementationVisibility s_readableStreamReadableStreamToArrayCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamReadableStreamToArrayCodeLength = 173;
static const JSC::Intrinsic s_readableStreamReadableStreamToArrayCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamReadableStreamToArrayCode = "(function (_){\"use strict\";var b=@getByIdDirectPrivate(_,\"underlyingSource\");if(b!==@undefined)return @readableStreamToArrayDirect(_,b);return @readableStreamIntoArray(_)})\n";
+const char* const s_readableStreamReadableStreamToArrayCode = "(function (b){\"use strict\";var _=@getByIdDirectPrivate(b,\"underlyingSource\");if(_!==@undefined)return @readableStreamToArrayDirect(b,_);return @readableStreamIntoArray(b)})\n";
// readableStreamToText
const JSC::ConstructAbility s_readableStreamReadableStreamToTextCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2498,7 +2498,7 @@ const JSC::ConstructorKind s_readableStreamConsumeReadableStreamCodeConstructorK
const JSC::ImplementationVisibility s_readableStreamConsumeReadableStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Private;
const int s_readableStreamConsumeReadableStreamCodeLength = 1603;
static const JSC::Intrinsic s_readableStreamConsumeReadableStreamCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamConsumeReadableStreamCode = "(function (j,k,w){\"use strict\";const A=globalThis.Symbol.for(\"Bun.consumeReadableStreamPrototype\");var B=globalThis[A];if(!B)B=globalThis[A]=[];var D=B[k];if(D===@undefined){var[G,H,I,J,_,F]=globalThis[globalThis.Symbol.for(\"Bun.lazy\")](k);D=class x{handleError;handleClosed;processResult;constructor(K,L){this.#_=L,this.#F=K,this.#$=!1,this.handleError=this._handleError.bind(this),this.handleClosed=this._handleClosed.bind(this),this.processResult=this._processResult.bind(this),K.closed.then(this.handleClosed,this.handleError)}_handleClosed(){if(this.#$)return;this.#$=!0;var K=this.#_;this.#_=0,J(K),F(K)}_handleError(K){if(this.#$)return;this.#$=!0;var L=this.#_;this.#_=0,H(L,K),F(L)}#_;#$=!1;#F;_handleReadMany({value:K,done:L,size:N}){if(L){this.handleClosed();return}if(this.#$)return;I(this.#_,K,L,N)}read(){if(!this.#_)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#F.read())}_processResult(K){if(K&&@isPromise(K)){if(@getPromiseInternalField(K,@promiseFieldFlags)&@promiseStateFulfilled){const N=@getPromiseInternalField(K,@promiseFieldReactionsOrResult);if(N)K=N}}if(K&&@isPromise(K))return K.then(this.processResult,this.handleError),null;if(K.done)return this.handleClosed(),0;else if(K.value)return K.value;else return-1}readMany(){if(!this.#_)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#F.readMany())}};const q=k+1;if(B.length<q)B.length=q;@putByValDirect(B,k,D)}if(@isReadableStreamLocked(w))@throwTypeError(\"Cannot start reading from a locked stream\");return new D(w.getReader(),j)})\n";
+const char* const s_readableStreamConsumeReadableStreamCode = "(function (q,x,A){\"use strict\";const B=globalThis.Symbol.for(\"Bun.consumeReadableStreamPrototype\");var F=globalThis[B];if(!F)F=globalThis[B]=[];var J=F[x];if(J===@undefined){var[j,K,L,w,H,_]=globalThis[globalThis.Symbol.for(\"Bun.lazy\")](x);J=class I{handleError;handleClosed;processResult;constructor(G,N){this.#_=N,this.#F=G,this.#$=!1,this.handleError=this._handleError.bind(this),this.handleClosed=this._handleClosed.bind(this),this.processResult=this._processResult.bind(this),G.closed.then(this.handleClosed,this.handleError)}_handleClosed(){if(this.#$)return;this.#$=!0;var G=this.#_;this.#_=0,w(G),_(G)}_handleError(G){if(this.#$)return;this.#$=!0;var N=this.#_;this.#_=0,K(N,G),_(N)}#_;#$=!1;#F;_handleReadMany({value:G,done:N,size:k}){if(N){this.handleClosed();return}if(this.#$)return;L(this.#_,G,N,k)}read(){if(!this.#_)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#F.read())}_processResult(G){if(G&&@isPromise(G)){if(@getPromiseInternalField(G,@promiseFieldFlags)&@promiseStateFulfilled){const k=@getPromiseInternalField(G,@promiseFieldReactionsOrResult);if(k)G=k}}if(G&&@isPromise(G))return G.then(this.processResult,this.handleError),null;if(G.done)return this.handleClosed(),0;else if(G.value)return G.value;else return-1}readMany(){if(!this.#_)return @throwTypeError(\"ReadableStreamSink is already closed\");return this.processResult(this.#F.readMany())}};const D=x+1;if(F.length<D)F.length=D;@putByValDirect(F,x,J)}if(@isReadableStreamLocked(A))@throwTypeError(\"Cannot start reading from a locked stream\");return new J(A.getReader(),q)})\n";
// createEmptyReadableStream
const JSC::ConstructAbility s_readableStreamCreateEmptyReadableStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2536,9 +2536,9 @@ const char* const s_readableStreamGetReaderCode = "(function (e){\"use strict\";
const JSC::ConstructAbility s_readableStreamPipeThroughCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamPipeThroughCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamPipeThroughCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamPipeThroughCodeLength = 867;
+const int s_readableStreamPipeThroughCodeLength = 847;
static const JSC::Intrinsic s_readableStreamPipeThroughCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableStreamPipeThroughCode = "(function (_,u){\"use strict\";const w=_,O=w[\"readable\"];if(!@isReadableStream(O))@throwTypeError(\"readable should be ReadableStream\");const S=w[\"writable\"],h=@getInternalWritableStream(S);if(!@isWritableStream(h))@throwTypeError(\"writable should be WritableStream\");let j=!1,k=!1,q=!1,x;if(!@isUndefinedOrNull(u)){if(!@isObject(u))throw @makeTypeError(\"options must be an object\");if(k=!!u[\"preventAbort\"],q=!!u[\"preventCancel\"],j=!!u[\"preventClose\"],x=u[\"signal\"],x!==@undefined&&!@isAbortSignal(x))throw @makeTypeError(\"options.signal must be AbortSignal\")}if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"pipeThrough\");if(@isReadableStreamLocked(this))throw @makeTypeError(\"ReadableStream is locked\");if(@isWritableStreamLocked(h))throw @makeTypeError(\"WritableStream is locked\");return @readableStreamPipeToWritableStream(this,h,j,k,q,x),O})\n";
+const char* const s_readableStreamPipeThroughCode = "(function (_,u){\"use strict\";const y=_,O=y[\"readable\"];if(!@isReadableStream(O))@throwTypeError(\"readable should be ReadableStream\");const S=y[\"writable\"],c=@getInternalWritableStream(S);if(!@isWritableStream(c))@throwTypeError(\"writable should be WritableStream\");let d=!1,h=!1,j=!1,k;if(!@isUndefinedOrNull(u)){if(!@isObject(u))@throwTypeError(\"options must be an object\");if(h=!!u[\"preventAbort\"],j=!!u[\"preventCancel\"],d=!!u[\"preventClose\"],k=u[\"signal\"],k!==@undefined&&!@isAbortSignal(k))@throwTypeError(\"options.signal must be AbortSignal\")}if(!@isReadableStream(this))throw @makeThisTypeError(\"ReadableStream\",\"pipeThrough\");if(@isReadableStreamLocked(this))@throwTypeError(\"ReadableStream is locked\");if(@isWritableStreamLocked(c))@throwTypeError(\"WritableStream is locked\");return @readableStreamPipeToWritableStream(this,c,d,h,j,k),O})\n";
// pipeTo
const JSC::ConstructAbility s_readableStreamPipeToCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2646,7 +2646,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsPrivateInitializeReadabl
const JSC::ImplementationVisibility s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeLength = 1654;
static const JSC::Intrinsic s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCode = "(function (_,b,f){\"use strict\";if(!@isReadableStream(_))@throwTypeError(\"ReadableByteStreamController needs a ReadableStream\");if(@getByIdDirectPrivate(_,\"readableStreamController\")!==null)@throwTypeError(\"ReadableStream already has a controller\");@putByIdDirectPrivate(this,\"controlledReadableStream\",_),@putByIdDirectPrivate(this,\"underlyingByteSource\",b),@putByIdDirectPrivate(this,\"pullAgain\",!1),@putByIdDirectPrivate(this,\"pulling\",!1),@readableByteStreamControllerClearPendingPullIntos(this),@putByIdDirectPrivate(this,\"queue\",@newQueue()),@putByIdDirectPrivate(this,\"started\",0),@putByIdDirectPrivate(this,\"closeRequested\",!1);let p=@toNumber(f);if(@isNaN(p)||p<0)@throwRangeError(\"highWaterMark value is negative or not a number\");@putByIdDirectPrivate(this,\"strategyHWM\",p);let R=b.autoAllocateChunkSize;if(R!==@undefined){if(R=@toNumber(R),R<=0||R===@Infinity||R===-@Infinity)@throwRangeError(\"autoAllocateChunkSize value is negative or equal to positive or negative infinity\")}@putByIdDirectPrivate(this,\"autoAllocateChunkSize\",R),@putByIdDirectPrivate(this,\"pendingPullIntos\",@createFIFO());const d=this;return @promiseInvokeOrNoopNoCatch(@getByIdDirectPrivate(d,\"underlyingByteSource\"),\"start\",[d]).@then(()=>{@putByIdDirectPrivate(d,\"started\",1),@assert(!@getByIdDirectPrivate(d,\"pulling\")),@assert(!@getByIdDirectPrivate(d,\"pullAgain\")),@readableByteStreamControllerCallPullIfNeeded(d)},(v)=>{if(@getByIdDirectPrivate(_,\"state\")===@streamReadable)@readableByteStreamControllerError(d,v)}),@putByIdDirectPrivate(this,\"cancel\",@readableByteStreamControllerCancel),@putByIdDirectPrivate(this,\"pull\",@readableByteStreamControllerPull),this})\n";
+const char* const s_readableByteStreamInternalsPrivateInitializeReadableByteStreamControllerCode = "(function (v,b,f){\"use strict\";if(!@isReadableStream(v))@throwTypeError(\"ReadableByteStreamController needs a ReadableStream\");if(@getByIdDirectPrivate(v,\"readableStreamController\")!==null)@throwTypeError(\"ReadableStream already has a controller\");@putByIdDirectPrivate(this,\"controlledReadableStream\",v),@putByIdDirectPrivate(this,\"underlyingByteSource\",b),@putByIdDirectPrivate(this,\"pullAgain\",!1),@putByIdDirectPrivate(this,\"pulling\",!1),@readableByteStreamControllerClearPendingPullIntos(this),@putByIdDirectPrivate(this,\"queue\",@newQueue()),@putByIdDirectPrivate(this,\"started\",0),@putByIdDirectPrivate(this,\"closeRequested\",!1);let p=@toNumber(f);if(@isNaN(p)||p<0)@throwRangeError(\"highWaterMark value is negative or not a number\");@putByIdDirectPrivate(this,\"strategyHWM\",p);let d=b.autoAllocateChunkSize;if(d!==@undefined){if(d=@toNumber(d),d<=0||d===@Infinity||d===-@Infinity)@throwRangeError(\"autoAllocateChunkSize value is negative or equal to positive or negative infinity\")}@putByIdDirectPrivate(this,\"autoAllocateChunkSize\",d),@putByIdDirectPrivate(this,\"pendingPullIntos\",@createFIFO());const _=this;return @promiseInvokeOrNoopNoCatch(@getByIdDirectPrivate(_,\"underlyingByteSource\"),\"start\",[_]).@then(()=>{@putByIdDirectPrivate(_,\"started\",1),@assert(!@getByIdDirectPrivate(_,\"pulling\")),@assert(!@getByIdDirectPrivate(_,\"pullAgain\")),@readableByteStreamControllerCallPullIfNeeded(_)},(R)=>{if(@getByIdDirectPrivate(v,\"state\")===@streamReadable)@readableByteStreamControllerError(_,R)}),@putByIdDirectPrivate(this,\"cancel\",@readableByteStreamControllerCancel),@putByIdDirectPrivate(this,\"pull\",@readableByteStreamControllerPull),this})\n";
// readableStreamByteStreamControllerStart
const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamByteStreamControllerStartCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2694,7 +2694,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeLength = 248;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerCancelCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerCancelCode = "(function (a,p){\"use strict\";var _=@getByIdDirectPrivate(a,\"pendingPullIntos\"),u=_.peek();if(u)u.bytesFilled=0;return @putByIdDirectPrivate(a,\"queue\",@newQueue()),@promiseInvokeOrNoop(@getByIdDirectPrivate(a,\"underlyingByteSource\"),\"cancel\",[p])})\n";
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerCancelCode = "(function (a,p){\"use strict\";var u=@getByIdDirectPrivate(a,\"pendingPullIntos\"),_=u.peek();if(_)_.bytesFilled=0;return @putByIdDirectPrivate(a,\"queue\",@newQueue()),@promiseInvokeOrNoop(@getByIdDirectPrivate(a,\"underlyingByteSource\"),\"cancel\",[p])})\n";
// readableByteStreamControllerError
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerErrorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2830,7 +2830,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeLength = 464;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCode = "(function (d,u){\"use strict\";let k=@getByIdDirectPrivate(d,\"pendingPullIntos\").peek(),_=@getByIdDirectPrivate(d,\"controlledReadableStream\");if(@getByIdDirectPrivate(_,\"state\")===@streamClosed){if(u!==0)@throwTypeError(\"bytesWritten is different from 0 even though stream is closed\");@readableByteStreamControllerRespondInClosedState(d,k)}else @assert(@getByIdDirectPrivate(_,\"state\")===@streamReadable),@readableByteStreamControllerRespondInReadableState(d,u,k)})\n";
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerRespondInternalCode = "(function (d,u){\"use strict\";let _=@getByIdDirectPrivate(d,\"pendingPullIntos\").peek(),k=@getByIdDirectPrivate(d,\"controlledReadableStream\");if(@getByIdDirectPrivate(k,\"state\")===@streamClosed){if(u!==0)@throwTypeError(\"bytesWritten is different from 0 even though stream is closed\");@readableByteStreamControllerRespondInClosedState(d,_)}else @assert(@getByIdDirectPrivate(k,\"state\")===@streamReadable),@readableByteStreamControllerRespondInReadableState(d,u,_)})\n";
// readableByteStreamControllerRespondInReadableState
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerRespondInReadableStateCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2862,7 +2862,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeLength = 970;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCode = "(function (j,v){\"use strict\";const w=v.bytesFilled-v.bytesFilled%v.elementSize,z=@getByIdDirectPrivate(j,\"queue\").size<v.byteLength-v.bytesFilled\?@getByIdDirectPrivate(j,\"queue\").size:v.byteLength-v.bytesFilled,_=v.bytesFilled+z,G=_-_%v.elementSize;let q=z,H=!1;if(G>w)q=G-v.bytesFilled,H=!0;while(q>0){let J=@getByIdDirectPrivate(j,\"queue\").content.peek();const k=q<J.byteLength\?q:J.byteLength,E=v.byteOffset+v.bytesFilled;if(new @Uint8Array(v.buffer).set(new @Uint8Array(J.buffer,J.byteOffset,k),E),J.byteLength===k)@getByIdDirectPrivate(j,\"queue\").content.shift();else J.byteOffset+=k,J.byteLength-=k;@getByIdDirectPrivate(j,\"queue\").size-=k,@assert(@getByIdDirectPrivate(j,\"pendingPullIntos\").isEmpty()||@getByIdDirectPrivate(j,\"pendingPullIntos\").peek()===v),@readableByteStreamControllerInvalidateBYOBRequest(j),v.bytesFilled+=k,q-=k}if(!H)@assert(@getByIdDirectPrivate(j,\"queue\").size===0),@assert(v.bytesFilled>0),@assert(v.bytesFilled<v.elementSize);return H})\n";
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerFillDescriptorFromQueueCode = "(function (J,E){\"use strict\";const q=E.bytesFilled-E.bytesFilled%E.elementSize,w=@getByIdDirectPrivate(J,\"queue\").size<E.byteLength-E.bytesFilled\?@getByIdDirectPrivate(J,\"queue\").size:E.byteLength-E.bytesFilled,G=E.bytesFilled+w,k=G-G%E.elementSize;let H=w,j=!1;if(k>q)H=k-E.bytesFilled,j=!0;while(H>0){let _=@getByIdDirectPrivate(J,\"queue\").content.peek();const v=H<_.byteLength\?H:_.byteLength,z=E.byteOffset+E.bytesFilled;if(new @Uint8Array(E.buffer).set(new @Uint8Array(_.buffer,_.byteOffset,v),z),_.byteLength===v)@getByIdDirectPrivate(J,\"queue\").content.shift();else _.byteOffset+=v,_.byteLength-=v;@getByIdDirectPrivate(J,\"queue\").size-=v,@assert(@getByIdDirectPrivate(J,\"pendingPullIntos\").isEmpty()||@getByIdDirectPrivate(J,\"pendingPullIntos\").peek()===E),@readableByteStreamControllerInvalidateBYOBRequest(J),E.bytesFilled+=v,H-=v}if(!j)@assert(@getByIdDirectPrivate(J,\"queue\").size===0),@assert(E.bytesFilled>0),@assert(E.bytesFilled<E.elementSize);return j})\n";
// readableByteStreamControllerShiftPendingDescriptor
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2870,7 +2870,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeLength = 150;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCode = "(function (u){\"use strict\";let _=@getByIdDirectPrivate(u,\"pendingPullIntos\").shift();return @readableByteStreamControllerInvalidateBYOBRequest(u),_})\n";
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerShiftPendingDescriptorCode = "(function (_){\"use strict\";let u=@getByIdDirectPrivate(_,\"pendingPullIntos\").shift();return @readableByteStreamControllerInvalidateBYOBRequest(_),u})\n";
// readableByteStreamControllerInvalidateBYOBRequest
const JSC::ConstructAbility s_readableByteStreamInternalsReadableByteStreamControllerInvalidateBYOBRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2902,7 +2902,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamFulfillRea
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeLength = 161;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCode = "(function (l,i,_){\"use strict\";const p=@getByIdDirectPrivate(@getByIdDirectPrivate(l,\"reader\"),\"readIntoRequests\").shift();@fulfillPromise(p,{value:i,done:_})})\n";
+const char* const s_readableByteStreamInternalsReadableStreamFulfillReadIntoRequestCode = "(function (l,i,p){\"use strict\";const _=@getByIdDirectPrivate(@getByIdDirectPrivate(l,\"reader\"),\"readIntoRequests\").shift();@fulfillPromise(_,{value:i,done:p})})\n";
// readableStreamBYOBReaderRead
const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamBYOBReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2918,7 +2918,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableByteStreamContro
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeLength = 1255;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCode = "(function (_,d){\"use strict\";const k=@getByIdDirectPrivate(_,\"controlledReadableStream\");let A=1;if(d.BYTES_PER_ELEMENT!==@undefined)A=d.BYTES_PER_ELEMENT;const E=d.constructor,L={buffer:d.buffer,byteOffset:d.byteOffset,byteLength:d.byteLength,bytesFilled:0,elementSize:A,ctor:E,readerType:\"byob\"};var b=@getByIdDirectPrivate(_,\"pendingPullIntos\");if(b\?.isNotEmpty())return L.buffer=@transferBufferToCurrentRealm(L.buffer),b.push(L),@readableStreamAddReadIntoRequest(k);if(@getByIdDirectPrivate(k,\"state\")===@streamClosed){const R=new E(L.buffer,L.byteOffset,0);return @createFulfilledPromise({value:R,done:!0})}if(@getByIdDirectPrivate(_,\"queue\").size>0){if(@readableByteStreamControllerFillDescriptorFromQueue(_,L)){const R=@readableByteStreamControllerConvertDescriptor(L);return @readableByteStreamControllerHandleQueueDrain(_),@createFulfilledPromise({value:R,done:!1})}if(@getByIdDirectPrivate(_,\"closeRequested\")){const R=@makeTypeError(\"Closing stream has been requested\");return @readableByteStreamControllerError(_,R),@Promise.@reject(R)}}L.buffer=@transferBufferToCurrentRealm(L.buffer),@getByIdDirectPrivate(_,\"pendingPullIntos\").push(L);const N=@readableStreamAddReadIntoRequest(k);return @readableByteStreamControllerCallPullIfNeeded(_),N})\n";
+const char* const s_readableByteStreamInternalsReadableByteStreamControllerPullIntoCode = "(function (d,A){\"use strict\";const _=@getByIdDirectPrivate(d,\"controlledReadableStream\");let E=1;if(A.BYTES_PER_ELEMENT!==@undefined)E=A.BYTES_PER_ELEMENT;const b=A.constructor,L={buffer:A.buffer,byteOffset:A.byteOffset,byteLength:A.byteLength,bytesFilled:0,elementSize:E,ctor:b,readerType:\"byob\"};var k=@getByIdDirectPrivate(d,\"pendingPullIntos\");if(k\?.isNotEmpty())return L.buffer=@transferBufferToCurrentRealm(L.buffer),k.push(L),@readableStreamAddReadIntoRequest(_);if(@getByIdDirectPrivate(_,\"state\")===@streamClosed){const R=new b(L.buffer,L.byteOffset,0);return @createFulfilledPromise({value:R,done:!0})}if(@getByIdDirectPrivate(d,\"queue\").size>0){if(@readableByteStreamControllerFillDescriptorFromQueue(d,L)){const R=@readableByteStreamControllerConvertDescriptor(L);return @readableByteStreamControllerHandleQueueDrain(d),@createFulfilledPromise({value:R,done:!1})}if(@getByIdDirectPrivate(d,\"closeRequested\")){const R=@makeTypeError(\"Closing stream has been requested\");return @readableByteStreamControllerError(d,R),@Promise.@reject(R)}}L.buffer=@transferBufferToCurrentRealm(L.buffer),@getByIdDirectPrivate(d,\"pendingPullIntos\").push(L);const N=@readableStreamAddReadIntoRequest(_);return @readableByteStreamControllerCallPullIfNeeded(d),N})\n";
// readableStreamAddReadIntoRequest
const JSC::ConstructAbility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
@@ -2926,7 +2926,7 @@ const JSC::ConstructorKind s_readableByteStreamInternalsReadableStreamAddReadInt
const JSC::ImplementationVisibility s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeLength = 326;
static const JSC::Intrinsic s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCode = "(function (_){\"use strict\";@assert(@isReadableStreamBYOBReader(@getByIdDirectPrivate(_,\"reader\"))),@assert(@getByIdDirectPrivate(_,\"state\")===@streamReadable||@getByIdDirectPrivate(_,\"state\")===@streamClosed);const i=@newPromise();return @getByIdDirectPrivate(@getByIdDirectPrivate(_,\"reader\"),\"readIntoRequests\").push(i),i})\n";
+const char* const s_readableByteStreamInternalsReadableStreamAddReadIntoRequestCode = "(function (i){\"use strict\";@assert(@isReadableStreamBYOBReader(@getByIdDirectPrivate(i,\"reader\"))),@assert(@getByIdDirectPrivate(i,\"state\")===@streamReadable||@getByIdDirectPrivate(i,\"state\")===@streamClosed);const _=@newPromise();return @getByIdDirectPrivate(@getByIdDirectPrivate(i,\"reader\"),\"readIntoRequests\").push(_),_})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
@@ -2970,7 +2970,7 @@ const JSC::ConstructorKind s_eventSourceGetEventSourceCodeConstructorKind = JSC:
const JSC::ImplementationVisibility s_eventSourceGetEventSourceCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
const int s_eventSourceGetEventSourceCodeLength = 5477;
static const JSC::Intrinsic s_eventSourceGetEventSourceCodeIntrinsic = JSC::NoIntrinsic;
-const char* const s_eventSourceGetEventSourceCode = "(function (){\"use strict\";class j extends EventTarget{#L;#w;#F;#A;#B;#M=!1;#J=null;#O=\"\";#$=\"\";#G=\"\";#K=!0;#Q=0;#U=0;#V=0;#W=null;static#X(V){V.#H()}static#j(V,w){const A=V.data,O=A.#G\?`Last-Event-ID: ${A.#G}\\r\\n`:\"\",U=`GET ${w.pathname}${w.search} HTTP/1.1\\r\\nHost: bun\\r\\nContent-type: text/event-stream\\r\\nContent-length: 0\\r\\n${O}\\r\\n`,W=V.write(U);if(W!==U.length)A.#$=U.substring(W)}static#Y(V,w,A){for(;;){if(A>=w.length)return;let O=-1,U=w.indexOf(\"\\r\\n\",A);const W=U+2;if(U>0)if(V.#Q===0){const z=parseInt(w.substring(A,U),16);if(z===0){V.#w=2,V.#J\?.end();return}O=W+z}else O=w.length;else{if(V.#O.length===0){V.#O+=w.substring(A);return}O=w.length}let X=w.substring(W,O);A=O+2;let Y=0,B=X.indexOf(\"\\n\\n\");if(B==-1){V.#O+=w.substring(W);return}if(V.#O.length)V.#O+=X,X=V.#O,V.#O=\"\";let Z=!0;while(Z){const z=X.substring(Y,B);let F,L=\"\",M,G=0,J=-1;for(;;){let K=z.indexOf(\"\\n\",G);if(K===-1){if(G>=z.length)break;K=z.length}const Q=z.substring(G,K);if(Q.startsWith(\"data:\"))if(L.length)L+=`\\n${Q.substring(5).trim()}`;else L=Q.substring(5).trim();else if(Q.startsWith(\"event:\"))F=Q.substring(6).trim();else if(Q.startsWith(\"id:\"))M=Q.substring(3).trim();else if(Q.startsWith(\"retry:\")){if(J=parseInt(Q.substring(6).trim(),10),@isNaN(J))J=-1}G=K+1}if(V.#G=M||\"\",J>=0)V.#V=J;if(L||M||F)V.dispatchEvent(new MessageEvent(F||\"message\",{data:L||\"\",origin:V.#L.origin,source:V,lastEventId:M}));if(X.length===B+2){Z=!1;break}const H=X.indexOf(\"\\n\\n\",B+1);if(H===-1)break;Y=B,B=H}}}static#Z={open(V){const w=V.data;if(w.#J=V,!w.#M)j.#j(V,w.#L)},handshake(V,w,A){const O=V.data;if(w)j.#j(V,O.#L);else O.#w=2,O.dispatchEvent(new ErrorEvent(\"error\",{error:A})),V.end()},data(V,w){const A=V.data;switch(A.#w){case 0:{let O=w.toString();const U=O.indexOf(\"\\r\\n\\r\\n\");if(U===-1){A.#O+=O;return}if(A.#O.length)A.#O+=O,O=A.#O,A.#O=\"\";const W=O.substring(0,U),X=W.indexOf(\"\\r\\n\");if(X===-1){A.#w=2,A.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Invalid HTTP request\")})),V.end();return}const Y=W.substring(0,X);if(Y!==\"HTTP/1.1 200 OK\"){A.#w=2,A.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(Y)})),V.end();return}let B=X+1,Z=!1,z=-1;for(;;){let L=W.indexOf(\"\\r\\n\",B);if(L===-1){if(B>=W.length){if(!Z)A.#w=2,A.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has no MIME type and \"text/event-stream\" is required. Aborting the connection.`)})),V.end();return}L=W.length}const M=W.substring(B+1,L),G=M.indexOf(\":\"),J=M.substring(0,G),H=J.localeCompare(\"content-type\",@undefined,{sensitivity:\"accent\"})===0;if(B=L+1,H)if(M.endsWith(\" text/event-stream\"))Z=!0;else{A.#w=2,A.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has a MIME type that is not \"text/event-stream\". Aborting the connection.`)})),V.end();return}else if(J.localeCompare(\"content-length\",@undefined,{sensitivity:\"accent\"})===0){if(z=parseInt(M.substring(G+1).trim(),10),@isNaN(z)||z<=0){A.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's Content-Length is invalid. Aborting the connection.`)})),V.end();return}if(Z)break}else if(J.localeCompare(\"transfer-encoding\",@undefined,{sensitivity:\"accent\"})===0){if(M.substring(G+1).trim()!==\"chunked\"){A.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's Transfer-Encoding is invalid. Aborting the connection.`)})),V.end();return}if(z=0,Z)break}}A.#Q=z,A.#w=1,A.dispatchEvent(new Event(\"open\"));const F=O.substring(U+4);if(j.#Y(A,F,0),A.#Q>0){if(A.#U+=F.length,A.#U>=A.#Q)A.#w=2,V.end()}return}case 1:if(j.#Y(A,w.toString(),2),A.#Q>0){if(A.#U+=w.byteLength,A.#U>=A.#Q)A.#w=2,V.end()}return;default:break}},drain(V){const w=V.data;if(w.#w===0){const A=w.#O;if(A.length){const O=V.write(A);if(O!==A.length)V.data.#$=A.substring(O);else V.data.#$=\"\"}}},close:j.#z,end(V){j.#z(V).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Connection closed by server\")}))},timeout(V){j.#z(V).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Timeout\")}))},binaryType:\"buffer\"};static#z(V){const w=V.data;if(w.#J=null,w.#U=0,w.#w=2,w.#K){if(w.#W)clearTimeout(w.#W);w.#W=setTimeout(j.#X,w.#V,w)}return w}constructor(V,w=@undefined){super();const A=new URL(V);this.#M=A.protocol===\"https:\",this.#L=A,this.#w=2,process.nextTick(j.#X,this)}ref(){this.#W\?.ref(),this.#J\?.ref()}unref(){this.#W\?.unref(),this.#J\?.unref()}#H(){if(this.#w!==2)return;const V=this.#L,w=this.#M;this.#w=0,@Bun.connect({data:this,socket:j.#Z,hostname:V.hostname,port:parseInt(V.port||(w\?\"443\":\"80\"),10),tls:w\?{requestCert:!0,rejectUnauthorized:!1}:!1}).catch((A)=>{if(super.dispatchEvent(new ErrorEvent(\"error\",{error:A})),this.#K){if(this.#W)this.#W.unref\?.();this.#W=setTimeout(j.#X,1000,this)}})}get url(){return this.#L.href}get readyState(){return this.#w}close(){this.#K=!1,this.#w=2,this.#J\?.unref(),this.#J\?.end()}get onopen(){return this.#B}get onerror(){return this.#F}get onmessage(){return this.#A}set onopen(V){if(this.#B)super.removeEventListener(\"close\",this.#B);super.addEventListener(\"open\",V),this.#B=V}set onerror(V){if(this.#F)super.removeEventListener(\"error\",this.#F);super.addEventListener(\"error\",V),this.#F=V}set onmessage(V){if(this.#A)super.removeEventListener(\"message\",this.#A);super.addEventListener(\"message\",V),this.#A=V}}return Object.defineProperty(j.prototype,\"CONNECTING\",{enumerable:!0,value:0}),Object.defineProperty(j.prototype,\"OPEN\",{enumerable:!0,value:1}),Object.defineProperty(j.prototype,\"CLOSED\",{enumerable:!0,value:2}),j[Symbol.for(\"CommonJS\")]=0,j})\n";
+const char* const s_eventSourceGetEventSourceCode = "(function (){\"use strict\";class F extends EventTarget{#$;#j;#w;#A;#B;#F=!1;#G=null;#J=\"\";#K=\"\";#L=\"\";#M=!0;#O=0;#Q=0;#U=0;#V=null;static#W(V){V.#H()}static#X(V,j){const B=V.data,Q=B.#L\?`Last-Event-ID: ${B.#L}\\r\\n`:\"\",A=`GET ${j.pathname}${j.search} HTTP/1.1\\r\\nHost: bun\\r\\nContent-type: text/event-stream\\r\\nContent-length: 0\\r\\n${Q}\\r\\n`,w=V.write(A);if(w!==A.length)B.#K=A.substring(w)}static#Y(V,j,B){for(;;){if(B>=j.length)return;let Q=-1,A=j.indexOf(\"\\r\\n\",B);const w=A+2;if(A>0)if(V.#O===0){const O=parseInt(j.substring(B,A),16);if(O===0){V.#j=2,V.#G\?.end();return}Q=w+O}else Q=j.length;else{if(V.#J.length===0){V.#J+=j.substring(B);return}Q=j.length}let M=j.substring(w,Q);B=Q+2;let G=0,L=M.indexOf(\"\\n\\n\");if(L==-1){V.#J+=j.substring(w);return}if(V.#J.length)V.#J+=M,M=V.#J,V.#J=\"\";let U=!0;while(U){const O=M.substring(G,L);let J,W=\"\",X,Y=0,K=-1;for(;;){let z=O.indexOf(\"\\n\",Y);if(z===-1){if(Y>=O.length)break;z=O.length}const H=O.substring(Y,z);if(H.startsWith(\"data:\"))if(W.length)W+=`\\n${H.substring(5).trim()}`;else W=H.substring(5).trim();else if(H.startsWith(\"event:\"))J=H.substring(6).trim();else if(H.startsWith(\"id:\"))X=H.substring(3).trim();else if(H.startsWith(\"retry:\")){if(K=parseInt(H.substring(6).trim(),10),@isNaN(K))K=-1}Y=z+1}if(V.#L=X||\"\",K>=0)V.#U=K;if(W||X||J)V.dispatchEvent(new MessageEvent(J||\"message\",{data:W||\"\",origin:V.#$.origin,source:V,lastEventId:X}));if(M.length===L+2){U=!1;break}const Z=M.indexOf(\"\\n\\n\",L+1);if(Z===-1)break;G=L,L=Z}}}static#Z={open(V){const j=V.data;if(j.#G=V,!j.#F)F.#X(V,j.#$)},handshake(V,j,B){const Q=V.data;if(j)F.#X(V,Q.#$);else Q.#j=2,Q.dispatchEvent(new ErrorEvent(\"error\",{error:B})),V.end()},data(V,j){const B=V.data;switch(B.#j){case 0:{let Q=j.toString();const A=Q.indexOf(\"\\r\\n\\r\\n\");if(A===-1){B.#J+=Q;return}if(B.#J.length)B.#J+=Q,Q=B.#J,B.#J=\"\";const w=Q.substring(0,A),M=w.indexOf(\"\\r\\n\");if(M===-1){B.#j=2,B.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Invalid HTTP request\")})),V.end();return}const G=w.substring(0,M);if(G!==\"HTTP/1.1 200 OK\"){B.#j=2,B.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(G)})),V.end();return}let L=M+1,U=!1,O=-1;for(;;){let W=w.indexOf(\"\\r\\n\",L);if(W===-1){if(L>=w.length){if(!U)B.#j=2,B.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has no MIME type and \"text/event-stream\" is required. Aborting the connection.`)})),V.end();return}W=w.length}const X=w.substring(L+1,W),Y=X.indexOf(\":\"),K=X.substring(0,Y),Z=K.localeCompare(\"content-type\",@undefined,{sensitivity:\"accent\"})===0;if(L=W+1,Z)if(X.endsWith(\" text/event-stream\"))U=!0;else{B.#j=2,B.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's response has a MIME type that is not \"text/event-stream\". Aborting the connection.`)})),V.end();return}else if(K.localeCompare(\"content-length\",@undefined,{sensitivity:\"accent\"})===0){if(O=parseInt(X.substring(Y+1).trim(),10),@isNaN(O)||O<=0){B.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's Content-Length is invalid. Aborting the connection.`)})),V.end();return}if(U)break}else if(K.localeCompare(\"transfer-encoding\",@undefined,{sensitivity:\"accent\"})===0){if(X.substring(Y+1).trim()!==\"chunked\"){B.dispatchEvent(new ErrorEvent(\"error\",{error:new Error(`EventSource's Transfer-Encoding is invalid. Aborting the connection.`)})),V.end();return}if(O=0,U)break}}B.#O=O,B.#j=1,B.dispatchEvent(new Event(\"open\"));const J=Q.substring(A+4);if(F.#Y(B,J,0),B.#O>0){if(B.#Q+=J.length,B.#Q>=B.#O)B.#j=2,V.end()}return}case 1:if(F.#Y(B,j.toString(),2),B.#O>0){if(B.#Q+=j.byteLength,B.#Q>=B.#O)B.#j=2,V.end()}return;default:break}},drain(V){const j=V.data;if(j.#j===0){const B=j.#J;if(B.length){const Q=V.write(B);if(Q!==B.length)V.data.#K=B.substring(Q);else V.data.#K=\"\"}}},close:F.#z,end(V){F.#z(V).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Connection closed by server\")}))},timeout(V){F.#z(V).dispatchEvent(new ErrorEvent(\"error\",{error:new Error(\"Timeout\")}))},binaryType:\"buffer\"};static#z(V){const j=V.data;if(j.#G=null,j.#Q=0,j.#j=2,j.#M){if(j.#V)clearTimeout(j.#V);j.#V=setTimeout(F.#W,j.#U,j)}return j}constructor(V,j=@undefined){super();const B=new URL(V);this.#F=B.protocol===\"https:\",this.#$=B,this.#j=2,process.nextTick(F.#W,this)}ref(){this.#V\?.ref(),this.#G\?.ref()}unref(){this.#V\?.unref(),this.#G\?.unref()}#H(){if(this.#j!==2)return;const V=this.#$,j=this.#F;this.#j=0,@Bun.connect({data:this,socket:F.#Z,hostname:V.hostname,port:parseInt(V.port||(j\?\"443\":\"80\"),10),tls:j\?{requestCert:!0,rejectUnauthorized:!1}:!1}).catch((B)=>{if(super.dispatchEvent(new ErrorEvent(\"error\",{error:B})),this.#M){if(this.#V)this.#V.unref\?.();this.#V=setTimeout(F.#W,1000,this)}})}get url(){return this.#$.href}get readyState(){return this.#j}close(){this.#M=!1,this.#j=2,this.#G\?.unref(),this.#G\?.end()}get onopen(){return this.#B}get onerror(){return this.#w}get onmessage(){return this.#A}set onopen(V){if(this.#B)super.removeEventListener(\"close\",this.#B);super.addEventListener(\"open\",V),this.#B=V}set onerror(V){if(this.#w)super.removeEventListener(\"error\",this.#w);super.addEventListener(\"error\",V),this.#w=V}set onmessage(V){if(this.#A)super.removeEventListener(\"message\",this.#A);super.addEventListener(\"message\",V),this.#A=V}}return Object.defineProperty(F.prototype,\"CONNECTING\",{enumerable:!0,value:0}),Object.defineProperty(F.prototype,\"OPEN\",{enumerable:!0,value:1}),Object.defineProperty(F.prototype,\"CLOSED\",{enumerable:!0,value:2}),F[Symbol.for(\"CommonJS\")]=0,F})\n";
#define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \
JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \
diff --git a/src/js/out/WebCoreJSBuiltins.h b/src/js/out/WebCoreJSBuiltins.h
index 4778b2352..6494735f9 100644
--- a/src/js/out/WebCoreJSBuiltins.h
+++ b/src/js/out/WebCoreJSBuiltins.h
@@ -3021,7 +3021,7 @@ extern const JSC::ImplementationVisibility s_readableStreamInternalsReadableStre
macro(createTextStream, readableStreamInternalsCreateTextStream, 1) \
macro(initializeTextStream, readableStreamInternalsInitializeTextStream, 2) \
macro(initializeArrayStream, readableStreamInternalsInitializeArrayStream, 2) \
- macro(initializeArrayBufferStream, readableStreamInternalsInitializeArrayBufferStream, 2) \
+ macro(initializeArrayBufferStream, readableStreamInternalsInitializeArrayBufferStream, 3) \
macro(readableStreamError, readableStreamInternalsReadableStreamError, 2) \
macro(readableStreamDefaultControllerShouldCallPull, readableStreamInternalsReadableStreamDefaultControllerShouldCallPull, 1) \
macro(readableStreamDefaultControllerCallPullIfNeeded, readableStreamInternalsReadableStreamDefaultControllerCallPullIfNeeded, 1) \