diff options
Diffstat (limited to 'src/js/out/WebCoreJSBuiltins.cpp')
-rw-r--r-- | src/js/out/WebCoreJSBuiltins.cpp | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/src/js/out/WebCoreJSBuiltins.cpp b/src/js/out/WebCoreJSBuiltins.cpp index 5ad79fa10..f20f626d4 100644 --- a/src/js/out/WebCoreJSBuiltins.cpp +++ b/src/js/out/WebCoreJSBuiltins.cpp @@ -372,7 +372,7 @@ const JSC::ConstructorKind s_writableStreamInternalsSetUpWritableStreamDefaultCo const JSC::ImplementationVisibility s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeImplementationVisibility = JSC::ImplementationVisibility::Public; const int s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeLength = 561; static const JSC::Intrinsic s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode = "(function (C,_,v,E,F){\"use strict\";const f=new @WritableStreamDefaultController;let p=()=>{},q=()=>{return @Promise.@resolve()},x=()=>{return @Promise.@resolve()},B=()=>{return @Promise.@resolve()};if(\"start\"in v){const P=v.start;p=()=>@promiseInvokeOrNoopMethodNoCatch(_,P,[f])}if(\"write\"in v){const P=v.write;q=(j)=>@promiseInvokeOrNoopMethod(_,P,[j,f])}if(\"close\"in v){const P=v.close;x=()=>@promiseInvokeOrNoopMethod(_,P,[])}if(\"abort\"in v){const P=v.abort;B=(j)=>@promiseInvokeOrNoopMethod(_,P,[j])}@setUpWritableStreamDefaultController(C,f,p,q,x,B,E,F)})\n"; +const char* const s_writableStreamInternalsSetUpWritableStreamDefaultControllerFromUnderlyingSinkCode = "(function (C,O,_,E,F){\"use strict\";const f=new @WritableStreamDefaultController;let q=()=>{},v=()=>{return @Promise.@resolve()},x=()=>{return @Promise.@resolve()},B=()=>{return @Promise.@resolve()};if(\"start\"in _){const p=_.start;q=()=>@promiseInvokeOrNoopMethodNoCatch(O,p,[f])}if(\"write\"in _){const p=_.write;v=(j)=>@promiseInvokeOrNoopMethod(O,p,[j,f])}if(\"close\"in _){const p=_.close;x=()=>@promiseInvokeOrNoopMethod(O,p,[])}if(\"abort\"in _){const p=_.abort;B=(j)=>@promiseInvokeOrNoopMethod(O,p,[j])}@setUpWritableStreamDefaultController(C,f,q,v,x,B,E,F)})\n"; // writableStreamDefaultControllerAdvanceQueueIfNeeded const JSC::ConstructAbility s_writableStreamInternalsWritableStreamDefaultControllerAdvanceQueueIfNeededCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -646,17 +646,17 @@ const char* const s_processObjectInternalsBindingCode = "(function (I){\"use str const JSC::ConstructAbility s_processObjectInternalsGetStdioWriteStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; const JSC::ConstructorKind s_processObjectInternalsGetStdioWriteStreamCodeConstructorKind = JSC::ConstructorKind::None; const JSC::ImplementationVisibility s_processObjectInternalsGetStdioWriteStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; -const int s_processObjectInternalsGetStdioWriteStreamCodeLength = 4250; +const int s_processObjectInternalsGetStdioWriteStreamCodeLength = 4311; static const JSC::Intrinsic s_processObjectInternalsGetStdioWriteStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (Z,Y){\"use strict\";var P={path:\"node:process\",require:Y},L=(M)=>P.require(M);function A(M){var{Duplex:B,eos:j,destroy:z}=L(\"node:stream\"),J=class O extends B{#j;#$;#M=!0;#N=!0;#J;#z;#B;#G;#H;#K;get isTTY(){return this.#K\?\?=L(\"node:tty\").isatty(M)}get fd(){return M}constructor(G){super({readable:!0,writable:!0});this.#J=`/dev/fd/${G}`}#L(G){const H=this.#z;if(this.#z=null,H)H(G);else if(G)this.destroy(G);else if(!this.#M&&!this.#N)this.destroy()}_destroy(G,H){if(!G&&this.#z!==null){var N=class X extends Error{code;name;constructor(Q=\"The operation was aborted\",K=void 0){if(K!==void 0&&typeof K!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(K,null,2)}`);super(Q,K);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};G=new N}if(this.#B=null,this.#G=null,this.#z===null)H(G);else{if(this.#z=H,this.#j)z(this.#j,G);if(this.#$)z(this.#$,G)}}_write(G,H,N){if(!this.#j){var{createWriteStream:X}=L(\"node:fs\"),Q=this.#j=X(this.#J);Q.on(\"finish\",()=>{if(this.#G){const K=this.#G;this.#G=null,K()}}),Q.on(\"drain\",()=>{if(this.#B){const K=this.#B;this.#B=null,K()}}),j(Q,(K)=>{if(this.#N=!1,K)z(Q,K);this.#L(K)})}if(Q.write(G,H))N();else this.#B=N}_final(G){this.#j&&this.#j.end(),this.#G=G}#O(){var{createReadStream:G}=L(\"node:fs\"),H=this.#$=G(this.#J);return H.on(\"readable\",()=>{if(this.#H){const N=this.#H;this.#H=null,N()}else this.read()}),H.on(\"end\",()=>{this.push(null)}),j(H,(N)=>{if(this.#M=!1,N)z(H,N);this.#L(N)}),H}_read(){var G=this.#$;if(!G)G=this.#O();while(!0){const H=G.read();if(H===null||!this.push(H))return}}};return new J(M)}var{EventEmitter:T}=L(\"node:events\");function V(M){if(!M)return!0;var B=M.toLowerCase();return B===\"utf8\"||B===\"utf-8\"||B===\"buffer\"||B===\"binary\"}var U,x=class M extends T{#j;#$;#M;#N;bytesWritten=0;setDefaultEncoding(B){if(this.#$||!V(B))return this.#B(),this.#$.setDefaultEncoding(B)}#J(){switch(this.#j){case 1:{var B=@Bun.stdout.writer({highWaterMark:0});return B.unref(),B}case 2:{var B=@Bun.stderr.writer({highWaterMark:0});return B.unref(),B}default:throw new Error(\"Unsupported writer\")}}#z(){return this.#M\?\?=this.#J()}constructor(B){super();this.#j=B}get fd(){return this.#j}get isTTY(){return this.#N\?\?=L(\"node:tty\").isatty(this.#j)}cursorTo(B,j,z){return(U\?\?=L(\"readline\")).cursorTo(this,B,j,z)}moveCursor(B,j,z){return(U\?\?=L(\"readline\")).moveCursor(this,B,j,z)}clearLine(B,j){return(U\?\?=L(\"readline\")).clearLine(this,B,j)}clearScreenDown(B){return(U\?\?=L(\"readline\")).clearScreenDown(this,B)}ref(){this.#z().ref()}unref(){this.#z().unref()}on(B,j){if(B===\"close\"||B===\"finish\")return this.#B(),this.#$.on(B,j);if(B===\"drain\")return super.on(\"drain\",j);if(B===\"error\")return super.on(\"error\",j);return super.on(B,j)}get _writableState(){return this.#B(),this.#$._writableState}get _readableState(){return this.#B(),this.#$._readableState}pipe(B){return this.#B(),this.#$.pipe(B)}unpipe(B){return this.#B(),this.#$.unpipe(B)}#B(){if(this.#$)return;this.#$=A(this.#j);const B=this.eventNames();for(let j of B)this.#$.on(j,(...z)=>{this.emit(j,...z)})}#G(B){var j=this.#z();const z=j.write(B);this.bytesWritten+=z;const J=j.flush(!1);return!!(z||J)}#H(B,j){if(!V(j))return this.#B(),this.#$.write(B,j);return this.#G(B)}#K(B,j){if(j)this.emit(\"error\",j);try{B(j\?j:null)}catch(z){this.emit(\"error\",z)}}#L(B,j,z){if(!V(j))return this.#B(),this.#$.write(B,j,z);var J=this.#z();const O=J.write(B),G=J.flush(!0);if(G\?.then)return G.then(()=>{this.#K(z),this.emit(\"drain\")},(H)=>this.#K(z,H)),!1;return queueMicrotask(()=>{this.#K(z)}),!!(O||G)}write(B,j,z){const J=this._write(B,j,z);if(J)this.emit(\"drain\");return J}get hasColors(){return @Bun.tty[this.#j].hasColors}_write(B,j,z){var J=this.#$;if(J)return J.write(B,j,z);switch(arguments.length){case 0:{var O=new Error(\"Invalid arguments\");throw O.code=\"ERR_INVALID_ARG_TYPE\",O}case 1:return this.#G(B);case 2:if(typeof j===\"function\")return this.#L(B,\"\",j);else if(typeof j===\"string\")return this.#H(B,j);default:{if(typeof j!==\"undefined\"&&typeof j!==\"string\"||typeof z!==\"undefined\"&&typeof z!==\"function\"){var O=new Error(\"Invalid arguments\");throw O.code=\"ERR_INVALID_ARG_TYPE\",O}if(typeof z===\"undefined\")return this.#H(B,j);return this.#L(B,j,z)}}}destroy(){return this}end(){return this}};return new x(Z)})\n"; +const char* const s_processObjectInternalsGetStdioWriteStreamCode = "(function (Z){\"use strict\";var L=(M)=>{var G=@requireMap.get(M);if(G)return G.exports;return @internalRequire(M)},D={path:\"node:process\",require:L};function Y(M){var{Duplex:G,eos:j,destroy:z}=L(\"node:stream\"),J=class O extends G{#j;#$;#M=!0;#N=!0;#J;#z;#G;#B;#H;#K;get isTTY(){return this.#K\?\?=L(\"node:tty\").isatty(M)}get fd(){return M}constructor(B){super({readable:!0,writable:!0});this.#J=`/dev/fd/${B}`}#L(B){const H=this.#z;if(this.#z=null,H)H(B);else if(B)this.destroy(B);else if(!this.#M&&!this.#N)this.destroy()}_destroy(B,H){if(!B&&this.#z!==null){var N=class X extends Error{code;name;constructor(Q=\"The operation was aborted\",K=void 0){if(K!==void 0&&typeof K!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(K,null,2)}`);super(Q,K);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};B=new N}if(this.#G=null,this.#B=null,this.#z===null)H(B);else{if(this.#z=H,this.#j)z(this.#j,B);if(this.#$)z(this.#$,B)}}_write(B,H,N){if(!this.#j){var{createWriteStream:X}=L(\"node:fs\"),Q=this.#j=X(this.#J);Q.on(\"finish\",()=>{if(this.#B){const K=this.#B;this.#B=null,K()}}),Q.on(\"drain\",()=>{if(this.#G){const K=this.#G;this.#G=null,K()}}),j(Q,(K)=>{if(this.#N=!1,K)z(Q,K);this.#L(K)})}if(Q.write(B,H))N();else this.#G=N}_final(B){this.#j&&this.#j.end(),this.#B=B}#O(){var{createReadStream:B}=L(\"node:fs\"),H=this.#$=B(this.#J);return H.on(\"readable\",()=>{if(this.#H){const N=this.#H;this.#H=null,N()}else this.read()}),H.on(\"end\",()=>{this.push(null)}),j(H,(N)=>{if(this.#M=!1,N)z(H,N);this.#L(N)}),H}_read(){var B=this.#$;if(!B)B=this.#O();while(!0){const H=B.read();if(H===null||!this.push(H))return}}};return new J(M)}var{EventEmitter:P}=L(\"node:events\");function V(M){if(!M)return!0;var G=M.toLowerCase();return G===\"utf8\"||G===\"utf-8\"||G===\"buffer\"||G===\"binary\"}var U,A=class M extends P{#j;#$;#M;#N;bytesWritten=0;setDefaultEncoding(G){if(this.#$||!V(G))return this.#G(),this.#$.setDefaultEncoding(G)}#J(){switch(this.#j){case 1:{var G=@Bun.stdout.writer({highWaterMark:0});return G.unref(),G}case 2:{var G=@Bun.stderr.writer({highWaterMark:0});return G.unref(),G}default:throw new Error(\"Unsupported writer\")}}#z(){return this.#M\?\?=this.#J()}constructor(G){super();this.#j=G}get fd(){return this.#j}get isTTY(){return this.#N\?\?=L(\"node:tty\").isatty(this.#j)}cursorTo(G,j,z){return(U\?\?=L(\"readline\")).cursorTo(this,G,j,z)}moveCursor(G,j,z){return(U\?\?=L(\"readline\")).moveCursor(this,G,j,z)}clearLine(G,j){return(U\?\?=L(\"readline\")).clearLine(this,G,j)}clearScreenDown(G){return(U\?\?=L(\"readline\")).clearScreenDown(this,G)}ref(){this.#z().ref()}unref(){this.#z().unref()}on(G,j){if(G===\"close\"||G===\"finish\")return this.#G(),this.#$.on(G,j);if(G===\"drain\")return super.on(\"drain\",j);if(G===\"error\")return super.on(\"error\",j);return super.on(G,j)}get _writableState(){return this.#G(),this.#$._writableState}get _readableState(){return this.#G(),this.#$._readableState}pipe(G){return this.#G(),this.#$.pipe(G)}unpipe(G){return this.#G(),this.#$.unpipe(G)}#G(){if(this.#$)return;this.#$=Y(this.#j);const G=this.eventNames();for(let j of G)this.#$.on(j,(...z)=>{this.emit(j,...z)})}#B(G){var j=this.#z();const z=j.write(G);this.bytesWritten+=z;const J=j.flush(!1);return!!(z||J)}#H(G,j){if(!V(j))return this.#G(),this.#$.write(G,j);return this.#B(G)}#K(G,j){if(j)this.emit(\"error\",j);try{G(j\?j:null)}catch(z){this.emit(\"error\",z)}}#L(G,j,z){if(!V(j))return this.#G(),this.#$.write(G,j,z);var J=this.#z();const O=J.write(G),B=J.flush(!0);if(B\?.then)return B.then(()=>{this.#K(z),this.emit(\"drain\")},(H)=>this.#K(z,H)),!1;return queueMicrotask(()=>{this.#K(z)}),!!(O||B)}write(G,j,z){const J=this._write(G,j,z);if(J)this.emit(\"drain\");return J}get hasColors(){return @Bun.tty[this.#j].hasColors}_write(G,j,z){var J=this.#$;if(J)return J.write(G,j,z);switch(arguments.length){case 0:{var O=new Error(\"Invalid arguments\");throw O.code=\"ERR_INVALID_ARG_TYPE\",O}case 1:return this.#B(G);case 2:if(typeof j===\"function\")return this.#L(G,\"\",j);else if(typeof j===\"string\")return this.#H(G,j);default:{if(typeof j!==\"undefined\"&&typeof j!==\"string\"||typeof z!==\"undefined\"&&typeof z!==\"function\"){var O=new Error(\"Invalid arguments\");throw O.code=\"ERR_INVALID_ARG_TYPE\",O}if(typeof z===\"undefined\")return this.#H(G,j);return this.#L(G,j,z)}}}destroy(){return this}end(){return this}};return new A(Z)})\n"; // getStdinStream const JSC::ConstructAbility s_processObjectInternalsGetStdinStreamCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; const JSC::ConstructorKind s_processObjectInternalsGetStdinStreamCodeConstructorKind = JSC::ConstructorKind::None; const JSC::ImplementationVisibility s_processObjectInternalsGetStdinStreamCodeImplementationVisibility = JSC::ImplementationVisibility::Public; -const int s_processObjectInternalsGetStdinStreamCodeLength = 1799; +const int s_processObjectInternalsGetStdinStreamCodeLength = 1861; static const JSC::Intrinsic s_processObjectInternalsGetStdinStreamCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_processObjectInternalsGetStdinStreamCode = "(function (L,N,P){\"use strict\";var Q={path:\"node:process\",require:N},J=(K)=>Q.require(K),{Duplex:T,eos:U,destroy:M}=J(\"node:stream\"),V=class K extends T{#K;#j;#Y;#H=!0;#I=!1;#L=!0;#z;#$;#G;get isTTY(){return J(\"tty\").isatty(L)}get fd(){return L}constructor(){super({readable:!0,writable:!0})}#J(Y){const j=this.#$;if(this.#$=null,j)j(Y);else if(Y)this.destroy(Y);else if(!this.#H&&!this.#L)this.destroy()}_destroy(Y,j){if(!Y&&this.#$!==null){var z=class G extends Error{constructor(H=\"The operation was aborted\",I=void 0){if(I!==void 0&&typeof I!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(I,null,2)}`);super(H,I);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};Y=new z}if(this.#$===null)j(Y);else if(this.#$=j,this.#Y)M(this.#Y,Y)}setRawMode(Y){}on(Y,j){if(Y===\"readable\")this.ref(),this.#I=!0;return super.on(Y,j)}pause(){return this.unref(),super.pause()}resume(){return this.ref(),super.resume()}ref(){this.#K\?\?=P.stdin.stream().getReader(),this.#j\?\?=setInterval(()=>{},1<<30)}unref(){if(this.#j)clearInterval(this.#j),this.#j=null}async#M(){try{var Y,j;const z=this.#K.readMany();if(!z\?.then)({done:Y,value:j}=z);else({done:Y,value:j}=await z);if(!Y){this.push(j[0]);const G=j.length;for(let H=1;H<G;H++)this.push(j[H])}else this.push(null),this.pause(),this.#H=!1,this.#J()}catch(z){this.#H=!1,this.#J(z)}}_read(Y){if(this.#I)this.unref(),this.#I=!1;this.#M()}#N(){var{createWriteStream:Y}=J(\"node:fs\"),j=this.#Y=Y(\"/dev/fd/0\");return j.on(\"finish\",()=>{if(this.#z){const z=this.#z;this.#z=null,z()}}),j.on(\"drain\",()=>{if(this.#G){const z=this.#G;this.#G=null,z()}}),U(j,(z)=>{if(this.#L=!1,z)M(j,z);this.#J(z)}),j}_write(Y,j,z){var G=this.#Y;if(!G)G=this.#N();if(G.write(Y,j))z();else this.#G=z}_final(Y){this.#Y.end(),this.#z=(...j)=>Y(...j)}};return new V})\n"; +const char* const s_processObjectInternalsGetStdinStreamCode = "(function (K){\"use strict\";var H=(I)=>{var N=@requireMap.get(I);if(N)return N.exports;return @internalRequire(I)},T={path:\"node:process\",require:H},{Duplex:M,eos:P,destroy:L}=H(\"node:stream\"),Q=class I extends M{#J;#j;#$;#G=!0;#H=!1;#K=!0;#z;#N;#B;get isTTY(){return H(\"tty\").isatty(K)}get fd(){return K}constructor(){super({readable:!0,writable:!0})}#I(N){const j=this.#N;if(this.#N=null,j)j(N);else if(N)this.destroy(N);else if(!this.#G&&!this.#K)this.destroy()}_destroy(N,j){if(!N&&this.#N!==null){var z=class B extends Error{constructor(G=\"The operation was aborted\",J=void 0){if(J!==void 0&&typeof J!==\"object\")throw new Error(`Invalid AbortError options:\\n\\n${JSON.stringify(J,null,2)}`);super(G,J);this.code=\"ABORT_ERR\",this.name=\"AbortError\"}};N=new z}if(this.#N===null)j(N);else if(this.#N=j,this.#$)L(this.#$,N)}setRawMode(N){}on(N,j){if(N===\"readable\")this.ref(),this.#H=!0;return super.on(N,j)}pause(){return this.unref(),super.pause()}resume(){return this.ref(),super.resume()}ref(){this.#J\?\?=@Bun.stdin.stream().getReader(),this.#j\?\?=setInterval(()=>{},1<<30)}unref(){if(this.#j)clearInterval(this.#j),this.#j=null}async#L(){try{var N,j;const z=this.#J.readMany();if(!z\?.then)({done:N,value:j}=z);else({done:N,value:j}=await z);if(!N){this.push(j[0]);const B=j.length;for(let G=1;G<B;G++)this.push(j[G])}else this.push(null),this.pause(),this.#G=!1,this.#I()}catch(z){this.#G=!1,this.#I(z)}}_read(N){if(this.#H)this.unref(),this.#H=!1;this.#L()}#M(){var{createWriteStream:N}=H(\"node:fs\"),j=this.#$=N(\"/dev/fd/0\");return j.on(\"finish\",()=>{if(this.#z){const z=this.#z;this.#z=null,z()}}),j.on(\"drain\",()=>{if(this.#B){const z=this.#B;this.#B=null,z()}}),P(j,(z)=>{if(this.#K=!1,z)L(j,z);this.#I(z)}),j}_write(N,j,z){var B=this.#$;if(!B)B=this.#M();if(B.write(N,j))z();else this.#B=z}_final(N){this.#$.end(),this.#z=(...j)=>N(...j)}};return new Q})\n"; #define DEFINE_BUILTIN_GENERATOR(codeName, functionName, overriddenName, argumentCount) \ JSC::FunctionExecutable* codeName##Generator(JSC::VM& vm) \ @@ -2028,7 +2028,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 k=@getByIdDirectPrivate(this,\"ownerReadableStream\");if(!k)@throwTypeError(\"readMany() called on a reader owned by no readable stream\");const H=@getByIdDirectPrivate(k,\"state\");if(@putByIdDirectPrivate(k,\"disturbed\",!0),H===@streamClosed)return{value:[],size:0,done:!0};else if(H===@streamErrored)throw @getByIdDirectPrivate(k,\"storedError\");var w=@getByIdDirectPrivate(k,\"readableStreamController\"),E=@getByIdDirectPrivate(w,\"queue\");if(!E)return w.@pull(w).@then(function({done:_,value:B}){return _\?{done:!0,value:[],size:0}:{value:[B],size:1,done:!1}});const N=E.content;var O=E.size,A=N.toArray(!1),C=A.length;if(C>0){var j=@newArrayWithSize(C);if(@isReadableByteStreamController(w)){{const _=A[0];if(!(@ArrayBuffer.@isView(_)||_ instanceof @ArrayBuffer))@putByValDirect(j,0,new @Uint8Array(_.buffer,_.byteOffset,_.byteLength));else @putByValDirect(j,0,_)}for(var d=1;d<C;d++){const _=A[d];if(!(@ArrayBuffer.@isView(_)||_ instanceof @ArrayBuffer))@putByValDirect(j,d,new @Uint8Array(_.buffer,_.byteOffset,_.byteLength));else @putByValDirect(j,d,_)}}else{@putByValDirect(j,0,A[0].value);for(var d=1;d<C;d++)@putByValDirect(j,d,A[d].value)}if(@resetQueue(@getByIdDirectPrivate(w,\"queue\")),@getByIdDirectPrivate(w,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(w,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(w))@readableStreamDefaultControllerCallPullIfNeeded(w);else if(@isReadableByteStreamController(w))@readableByteStreamControllerCallPullIfNeeded(w);return{value:j,size:O,done:!1}}var J=(_)=>{if(_.done)return{value:[],size:0,done:!0};var B=@getByIdDirectPrivate(k,\"readableStreamController\"),F=@getByIdDirectPrivate(B,\"queue\"),x=[_.value].concat(F.content.toArray(!1)),K=x.length;if(@isReadableByteStreamController(B))for(var I=0;I<K;I++){const G=x[I];if(!(@ArrayBuffer.@isView(G)||G instanceof @ArrayBuffer)){const{buffer:S,byteOffset:T,byteLength:U}=G;@putByValDirect(x,I,new @Uint8Array(S,T,U))}}else for(var I=1;I<K;I++)@putByValDirect(x,I,x[I].value);var Q=F.size;if(@resetQueue(F),@getByIdDirectPrivate(B,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(B,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(B))@readableStreamDefaultControllerCallPullIfNeeded(B);else if(@isReadableByteStreamController(B))@readableByteStreamControllerCallPullIfNeeded(B);return{value:x,size:Q,done:!1}},D=w.@pull(w);if(D&&@isPromise(D))return D.@then(J);return J(D)})\n"; +const char* const s_readableStreamDefaultReaderReadManyCode = "(function (){\"use strict\";if(!@isReadableStreamDefaultReader(this))@throwTypeError(\"ReadableStreamDefaultReader.readMany() should not be called directly\");const j=@getByIdDirectPrivate(this,\"ownerReadableStream\");if(!j)@throwTypeError(\"readMany() called on a reader owned by no readable stream\");const I=@getByIdDirectPrivate(j,\"state\");if(@putByIdDirectPrivate(j,\"disturbed\",!0),I===@streamClosed)return{value:[],size:0,done:!0};else if(I===@streamErrored)throw @getByIdDirectPrivate(j,\"storedError\");var B=@getByIdDirectPrivate(j,\"readableStreamController\"),F=@getByIdDirectPrivate(B,\"queue\");if(!F)return B.@pull(B).@then(function({done:_,value:w}){return _\?{done:!0,value:[],size:0}:{value:[w],size:1,done:!1}});const N=F.content;var Q=F.size,x=N.toArray(!1),C=x.length;if(C>0){var D=@newArrayWithSize(C);if(@isReadableByteStreamController(B)){{const _=x[0];if(!(@ArrayBuffer.@isView(_)||_ instanceof @ArrayBuffer))@putByValDirect(D,0,new @Uint8Array(_.buffer,_.byteOffset,_.byteLength));else @putByValDirect(D,0,_)}for(var d=1;d<C;d++){const _=x[d];if(!(@ArrayBuffer.@isView(_)||_ instanceof @ArrayBuffer))@putByValDirect(D,d,new @Uint8Array(_.buffer,_.byteOffset,_.byteLength));else @putByValDirect(D,d,_)}}else{@putByValDirect(D,0,x[0].value);for(var d=1;d<C;d++)@putByValDirect(D,d,x[d].value)}if(@resetQueue(@getByIdDirectPrivate(B,\"queue\")),@getByIdDirectPrivate(B,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(B,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(B))@readableStreamDefaultControllerCallPullIfNeeded(B);else if(@isReadableByteStreamController(B))@readableByteStreamControllerCallPullIfNeeded(B);return{value:D,size:Q,done:!1}}var J=(_)=>{if(_.done)return{value:[],size:0,done:!0};var w=@getByIdDirectPrivate(j,\"readableStreamController\"),G=@getByIdDirectPrivate(w,\"queue\"),k=[_.value].concat(G.content.toArray(!1)),K=k.length;if(@isReadableByteStreamController(w))for(var A=0;A<K;A++){const H=k[A];if(!(@ArrayBuffer.@isView(H)||H instanceof @ArrayBuffer)){const{buffer:T,byteOffset:U,byteLength:W}=H;@putByValDirect(k,A,new @Uint8Array(T,U,W))}}else for(var A=1;A<K;A++)@putByValDirect(k,A,k[A].value);var S=G.size;if(@resetQueue(G),@getByIdDirectPrivate(w,\"closeRequested\"))@readableStreamClose(@getByIdDirectPrivate(w,\"controlledReadableStream\"));else if(@isReadableStreamDefaultController(w))@readableStreamDefaultControllerCallPullIfNeeded(w);else if(@isReadableByteStreamController(w))@readableByteStreamControllerCallPullIfNeeded(w);return{value:k,size:S,done:!1}},E=B.@pull(B);if(E&&@isPromise(E))return E.@then(J);return J(E)})\n"; // read const JSC::ConstructAbility s_readableStreamDefaultReaderReadCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; @@ -2132,9 +2132,9 @@ const char* const s_streamInternalsValidateAndNormalizeQueuingStrategyCode = "(f const JSC::ConstructAbility s_streamInternalsCreateFIFOCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; const JSC::ConstructorKind s_streamInternalsCreateFIFOCodeConstructorKind = JSC::ConstructorKind::None; const JSC::ImplementationVisibility s_streamInternalsCreateFIFOCodeImplementationVisibility = JSC::ImplementationVisibility::Private; -const int s_streamInternalsCreateFIFOCodeLength = 1472; +const int s_streamInternalsCreateFIFOCodeLength = 1473; static const JSC::Intrinsic s_streamInternalsCreateFIFOCodeIntrinsic = JSC::NoIntrinsic; -const char* const s_streamInternalsCreateFIFOCode = "(function (){\"use strict\";var E=@Array.prototype.slice;class A{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:b,_list:g,_capacityMask:k}=this;if(v===b)return @undefined;var w=g[v];if(@putByValDirect(g,v,@undefined),v=this._head=v+1&k,v<2&&b>1e4&&b<=g.length>>>2)this._shrinkArray();return w}peek(){if(this._head===this._tail)return @undefined;return this._list[this._head]}push(v){var b=this._tail;if(@putByValDirect(this._list,b,v),this._tail=b+1&this._capacityMask,this._tail===this._head)this._growArray()}toArray(v){var b=this._list,g=@toLength(b.length);if(v||this._head>this._tail){var k=@toLength(this._head),w=@toLength(this._tail),F=@toLength(g-k+w),z=@newArrayWithSize(F),B=0;for(var x=k;x<g;x++)@putByValDirect(z,B++,b[x]);for(var x=0;x<w;x++)@putByValDirect(z,B++,b[x]);return z}else return E.@call(b,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 A})\n"; +const char* const s_streamInternalsCreateFIFOCode = "(function (){\"use strict\";var E=@Array.prototype.slice;class A{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:g,_tail:b,_list:x,_capacityMask:M}=this;if(g===b)return @undefined;var w=x[g];if(@putByValDirect(x,g,@undefined),g=this._head=g+1&M,g<2&&b>1e4&&b<=x.length>>>2)this._shrinkArray();return w}peek(){if(this._head===this._tail)return @undefined;return this._list[this._head]}push(g){var b=this._tail;if(@putByValDirect(this._list,b,g),this._tail=b+1&this._capacityMask,this._tail===this._head)this._growArray()}toArray(g){var b=this._list,x=@toLength(b.length);if(g||this._head>this._tail){var M=@toLength(this._head),w=@toLength(this._tail),F=@toLength(x-M+w),z=@newArrayWithSize(F),B=0;for(var v=M;v<x;v++)@putByValDirect(z,B++,b[v]);for(var v=0;v<w;v++)@putByValDirect(z,B++,b[v]);return z}else return E.@call(b,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 A})\n"; // newQueue const JSC::ConstructAbility s_streamInternalsNewQueueCodeConstructAbility = JSC::ConstructAbility::CannotConstruct; |