aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-10-28 18:58:05 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-10-28 18:58:05 -0700
commit4c8a08d6ba10832ade89df3d82e0866f0ac8f119 (patch)
treef30ea2f9fe4aa62a4569619573428e2b6a480243 /src/bun.js
parent280c45c2693546dbc915a0812e855ddda1734739 (diff)
downloadbun-4c8a08d6ba10832ade89df3d82e0866f0ac8f119.tar.gz
bun-4c8a08d6ba10832ade89df3d82e0866f0ac8f119.tar.zst
bun-4c8a08d6ba10832ade89df3d82e0866f0ac8f119.zip
space
Diffstat (limited to 'src/bun.js')
-rw-r--r--src/bun.js/bindings/ZigGeneratedClasses.cpp206
-rw-r--r--src/bun.js/bindings/ZigGeneratedClasses.h51
-rw-r--r--src/bun.js/bindings/ZigGlobalObject.cpp6
3 files changed, 260 insertions, 3 deletions
diff --git a/src/bun.js/bindings/ZigGeneratedClasses.cpp b/src/bun.js/bindings/ZigGeneratedClasses.cpp
index fad332acc..72064b583 100644
--- a/src/bun.js/bindings/ZigGeneratedClasses.cpp
+++ b/src/bun.js/bindings/ZigGeneratedClasses.cpp
@@ -140,6 +140,8 @@ JSC_DEFINE_CUSTOM_GETTER(TCPSocketPrototype__dataGetterWrap, (JSGlobalObject * l
thisObject->m_data.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void TCPSocketPrototype__dataSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -147,6 +149,13 @@ extern "C" void TCPSocketPrototype__dataSetCachedValue(JSC::EncodedJSValue thisV
thisObject->m_data.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue TCPSocketPrototype__dataGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSTCPSocket*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_data.get());
+}
+
+
JSC_DEFINE_CUSTOM_SETTER(TCPSocketPrototype__dataSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName))
{
@@ -285,6 +294,8 @@ JSC_DEFINE_CUSTOM_GETTER(TCPSocketPrototype__remoteAddressGetterWrap, (JSGlobalO
thisObject->m_remoteAddress.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void TCPSocketPrototype__remoteAddressSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -292,6 +303,13 @@ extern "C" void TCPSocketPrototype__remoteAddressSetCachedValue(JSC::EncodedJSVa
thisObject->m_remoteAddress.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue TCPSocketPrototype__remoteAddressGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSTCPSocket*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_remoteAddress.get());
+}
+
+
JSC_DEFINE_HOST_FUNCTION(TCPSocketPrototype__shutdownCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
{
@@ -455,6 +473,7 @@ void JSTCPSocket::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSTCPSocket* JSTCPSocket::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSTCPSocket* ptr = new (NotNull, JSC::allocateCell<JSTCPSocket>(vm)) JSTCPSocket(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -630,6 +649,8 @@ JSC_DEFINE_CUSTOM_GETTER(TLSSocketPrototype__dataGetterWrap, (JSGlobalObject * l
thisObject->m_data.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void TLSSocketPrototype__dataSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -637,6 +658,13 @@ extern "C" void TLSSocketPrototype__dataSetCachedValue(JSC::EncodedJSValue thisV
thisObject->m_data.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue TLSSocketPrototype__dataGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSTLSSocket*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_data.get());
+}
+
+
JSC_DEFINE_CUSTOM_SETTER(TLSSocketPrototype__dataSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName))
{
@@ -775,6 +803,8 @@ JSC_DEFINE_CUSTOM_GETTER(TLSSocketPrototype__remoteAddressGetterWrap, (JSGlobalO
thisObject->m_remoteAddress.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void TLSSocketPrototype__remoteAddressSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -782,6 +812,13 @@ extern "C" void TLSSocketPrototype__remoteAddressSetCachedValue(JSC::EncodedJSVa
thisObject->m_remoteAddress.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue TLSSocketPrototype__remoteAddressGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSTLSSocket*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_remoteAddress.get());
+}
+
+
JSC_DEFINE_HOST_FUNCTION(TLSSocketPrototype__shutdownCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
{
@@ -945,6 +982,7 @@ void JSTLSSocket::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSTLSSocket* JSTLSSocket::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSTLSSocket* ptr = new (NotNull, JSC::allocateCell<JSTLSSocket>(vm)) JSTLSSocket(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -1120,6 +1158,8 @@ JSC_DEFINE_CUSTOM_GETTER(ListenerPrototype__hostnameGetterWrap, (JSGlobalObject
thisObject->m_hostname.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void ListenerPrototype__hostnameSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -1127,6 +1167,13 @@ extern "C" void ListenerPrototype__hostnameSetCachedValue(JSC::EncodedJSValue th
thisObject->m_hostname.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue ListenerPrototype__hostnameGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSListener*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_hostname.get());
+}
+
+
JSC_DEFINE_CUSTOM_GETTER(ListenerPrototype__portGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName attributeName))
{
@@ -1210,6 +1257,8 @@ JSC_DEFINE_CUSTOM_GETTER(ListenerPrototype__unixGetterWrap, (JSGlobalObject * le
thisObject->m_unix.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void ListenerPrototype__unixSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -1217,6 +1266,13 @@ extern "C" void ListenerPrototype__unixSetCachedValue(JSC::EncodedJSValue thisVa
thisObject->m_unix.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue ListenerPrototype__unixGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSListener*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_unix.get());
+}
+
+
JSC_DEFINE_HOST_FUNCTION(ListenerPrototype__unrefCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
{
@@ -1329,6 +1385,7 @@ void JSListener::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSListener* JSListener::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSListener* ptr = new (NotNull, JSC::allocateCell<JSListener>(vm)) JSListener(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -1564,6 +1621,8 @@ JSC_DEFINE_CUSTOM_GETTER(SubprocessPrototype__readableGetterWrap, (JSGlobalObjec
thisObject->m_stdout.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void SubprocessPrototype__readableSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -1571,6 +1630,13 @@ extern "C" void SubprocessPrototype__readableSetCachedValue(JSC::EncodedJSValue
thisObject->m_stdout.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue SubprocessPrototype__readableGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSSubprocess*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_stdout.get());
+}
+
+
JSC_DEFINE_HOST_FUNCTION(SubprocessPrototype__refCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
{
@@ -1607,6 +1673,8 @@ JSC_DEFINE_CUSTOM_GETTER(SubprocessPrototype__stderrGetterWrap, (JSGlobalObject
thisObject->m_stderr.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void SubprocessPrototype__stderrSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -1614,6 +1682,13 @@ extern "C" void SubprocessPrototype__stderrSetCachedValue(JSC::EncodedJSValue th
thisObject->m_stderr.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue SubprocessPrototype__stderrGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSSubprocess*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_stderr.get());
+}
+
+
JSC_DEFINE_CUSTOM_GETTER(SubprocessPrototype__stdinGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName attributeName))
{
@@ -1633,6 +1708,8 @@ JSC_DEFINE_CUSTOM_GETTER(SubprocessPrototype__stdinGetterWrap, (JSGlobalObject *
thisObject->m_stdin.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void SubprocessPrototype__stdinSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -1640,6 +1717,13 @@ extern "C" void SubprocessPrototype__stdinSetCachedValue(JSC::EncodedJSValue thi
thisObject->m_stdin.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue SubprocessPrototype__stdinGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSSubprocess*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_stdin.get());
+}
+
+
JSC_DEFINE_CUSTOM_GETTER(SubprocessPrototype__stdoutGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName attributeName))
{
@@ -1659,6 +1743,8 @@ JSC_DEFINE_CUSTOM_GETTER(SubprocessPrototype__stdoutGetterWrap, (JSGlobalObject
thisObject->m_stdout.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void SubprocessPrototype__stdoutSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -1666,6 +1752,13 @@ extern "C" void SubprocessPrototype__stdoutSetCachedValue(JSC::EncodedJSValue th
thisObject->m_stdout.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue SubprocessPrototype__stdoutGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSSubprocess*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_stdout.get());
+}
+
+
JSC_DEFINE_HOST_FUNCTION(SubprocessPrototype__unrefCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
{
@@ -1702,6 +1795,8 @@ JSC_DEFINE_CUSTOM_GETTER(SubprocessPrototype__writableGetterWrap, (JSGlobalObjec
thisObject->m_stdin.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void SubprocessPrototype__writableSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -1709,6 +1804,13 @@ extern "C" void SubprocessPrototype__writableSetCachedValue(JSC::EncodedJSValue
thisObject->m_stdin.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue SubprocessPrototype__writableGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSSubprocess*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_stdin.get());
+}
+
+
void JSSubprocessPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject)
{
@@ -1804,6 +1906,7 @@ void JSSubprocess::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSSubprocess* JSSubprocess::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSSubprocess* ptr = new (NotNull, JSC::allocateCell<JSSubprocess>(vm)) JSSubprocess(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -2058,6 +2161,7 @@ void JSSHA1::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSSHA1* JSSHA1::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSSHA1* ptr = new (NotNull, JSC::allocateCell<JSSHA1>(vm)) JSSHA1(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -2297,6 +2401,7 @@ void JSMD5::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSMD5* JSMD5::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSMD5* ptr = new (NotNull, JSC::allocateCell<JSMD5>(vm)) JSMD5(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -2536,6 +2641,7 @@ void JSMD4::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSMD4* JSMD4::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSMD4* ptr = new (NotNull, JSC::allocateCell<JSMD4>(vm)) JSMD4(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -2775,6 +2881,7 @@ void JSSHA224::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSSHA224* JSSHA224::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSSHA224* ptr = new (NotNull, JSC::allocateCell<JSSHA224>(vm)) JSSHA224(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -3014,6 +3121,7 @@ void JSSHA512::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSSHA512* JSSHA512::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSSHA512* ptr = new (NotNull, JSC::allocateCell<JSSHA512>(vm)) JSSHA512(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -3253,6 +3361,7 @@ void JSSHA384::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSSHA384* JSSHA384::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSSHA384* ptr = new (NotNull, JSC::allocateCell<JSSHA384>(vm)) JSSHA384(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -3492,6 +3601,7 @@ void JSSHA256::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSSHA256* JSSHA256::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSSHA256* ptr = new (NotNull, JSC::allocateCell<JSSHA256>(vm)) JSSHA256(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -3731,6 +3841,7 @@ void JSSHA512_256::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSSHA512_256* JSSHA512_256::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSSHA512_256* ptr = new (NotNull, JSC::allocateCell<JSSHA512_256>(vm)) JSSHA512_256(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -4042,6 +4153,8 @@ JSC_DEFINE_CUSTOM_GETTER(ServerWebSocketPrototype__dataGetterWrap, (JSGlobalObje
thisObject->m_data.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void ServerWebSocketPrototype__dataSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -4049,6 +4162,13 @@ extern "C" void ServerWebSocketPrototype__dataSetCachedValue(JSC::EncodedJSValue
thisObject->m_data.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue ServerWebSocketPrototype__dataGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSServerWebSocket*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_data.get());
+}
+
+
JSC_DEFINE_CUSTOM_SETTER(ServerWebSocketPrototype__dataSetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, EncodedJSValue encodedValue, PropertyName attributeName))
{
@@ -4178,6 +4298,8 @@ JSC_DEFINE_CUSTOM_GETTER(ServerWebSocketPrototype__remoteAddressGetterWrap, (JSG
thisObject->m_remoteAddress.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void ServerWebSocketPrototype__remoteAddressSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -4185,6 +4307,13 @@ extern "C" void ServerWebSocketPrototype__remoteAddressSetCachedValue(JSC::Encod
thisObject->m_remoteAddress.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue ServerWebSocketPrototype__remoteAddressGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSServerWebSocket*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_remoteAddress.get());
+}
+
+
JSC_DEFINE_HOST_FUNCTION(ServerWebSocketPrototype__sendCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
{
@@ -4365,6 +4494,7 @@ void JSServerWebSocket::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSServerWebSocket* JSServerWebSocket::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSServerWebSocket* ptr = new (NotNull, JSC::allocateCell<JSServerWebSocket>(vm)) JSServerWebSocket(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -4503,6 +4633,8 @@ JSC_DEFINE_CUSTOM_GETTER(TextDecoderPrototype__encodingGetterWrap, (JSGlobalObje
thisObject->m_encoding.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void TextDecoderPrototype__encodingSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -4510,6 +4642,13 @@ extern "C" void TextDecoderPrototype__encodingSetCachedValue(JSC::EncodedJSValue
thisObject->m_encoding.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue TextDecoderPrototype__encodingGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSTextDecoder*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_encoding.get());
+}
+
+
JSC_DEFINE_CUSTOM_GETTER(TextDecoderPrototype__fatalGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName attributeName))
{
@@ -4618,6 +4757,7 @@ void JSTextDecoder::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSTextDecoder* JSTextDecoder::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSTextDecoder* ptr = new (NotNull, JSC::allocateCell<JSTextDecoder>(vm)) JSTextDecoder(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -4847,6 +4987,8 @@ JSC_DEFINE_CUSTOM_GETTER(RequestPrototype__bodyGetterWrap, (JSGlobalObject * lex
thisObject->m_body.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void RequestPrototype__bodySetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -4854,6 +4996,13 @@ extern "C" void RequestPrototype__bodySetCachedValue(JSC::EncodedJSValue thisVal
thisObject->m_body.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue RequestPrototype__bodyGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSRequest*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_body.get());
+}
+
+
JSC_DEFINE_CUSTOM_GETTER(RequestPrototype__bodyUsedGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName attributeName))
{
@@ -4942,6 +5091,8 @@ JSC_DEFINE_CUSTOM_GETTER(RequestPrototype__headersGetterWrap, (JSGlobalObject *
thisObject->m_headers.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void RequestPrototype__headersSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -4949,6 +5100,13 @@ extern "C" void RequestPrototype__headersSetCachedValue(JSC::EncodedJSValue this
thisObject->m_headers.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue RequestPrototype__headersGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSRequest*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_headers.get());
+}
+
+
JSC_DEFINE_CUSTOM_GETTER(RequestPrototype__integrityGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName attributeName))
{
@@ -5080,6 +5238,8 @@ JSC_DEFINE_CUSTOM_GETTER(RequestPrototype__urlGetterWrap, (JSGlobalObject * lexi
thisObject->m_url.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void RequestPrototype__urlSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -5087,6 +5247,13 @@ extern "C" void RequestPrototype__urlSetCachedValue(JSC::EncodedJSValue thisValu
thisObject->m_url.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue RequestPrototype__urlGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSRequest*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_url.get());
+}
+
+
void JSRequestPrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject)
{
@@ -5186,6 +5353,7 @@ void JSRequest::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSRequest* JSRequest::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSRequest* ptr = new (NotNull, JSC::allocateCell<JSRequest>(vm)) JSRequest(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -5399,6 +5567,8 @@ JSC_DEFINE_CUSTOM_GETTER(ResponsePrototype__bodyGetterWrap, (JSGlobalObject * le
thisObject->m_body.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void ResponsePrototype__bodySetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -5406,6 +5576,13 @@ extern "C" void ResponsePrototype__bodySetCachedValue(JSC::EncodedJSValue thisVa
thisObject->m_body.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue ResponsePrototype__bodyGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSResponse*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_body.get());
+}
+
+
JSC_DEFINE_CUSTOM_GETTER(ResponsePrototype__bodyUsedGetterWrap, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName attributeName))
{
@@ -5455,6 +5632,8 @@ JSC_DEFINE_CUSTOM_GETTER(ResponsePrototype__headersGetterWrap, (JSGlobalObject *
thisObject->m_headers.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void ResponsePrototype__headersSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -5462,6 +5641,13 @@ extern "C" void ResponsePrototype__headersSetCachedValue(JSC::EncodedJSValue thi
thisObject->m_headers.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue ResponsePrototype__headersGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSResponse*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_headers.get());
+}
+
+
JSC_DEFINE_HOST_FUNCTION(ResponsePrototype__jsonCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
{
@@ -5537,6 +5723,8 @@ JSC_DEFINE_CUSTOM_GETTER(ResponsePrototype__statusTextGetterWrap, (JSGlobalObjec
thisObject->m_statusText.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void ResponsePrototype__statusTextSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -5544,6 +5732,13 @@ extern "C" void ResponsePrototype__statusTextSetCachedValue(JSC::EncodedJSValue
thisObject->m_statusText.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue ResponsePrototype__statusTextGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSResponse*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_statusText.get());
+}
+
+
JSC_DEFINE_HOST_FUNCTION(ResponsePrototype__textCallback, (JSGlobalObject * lexicalGlobalObject, CallFrame* callFrame))
{
@@ -5593,6 +5788,8 @@ JSC_DEFINE_CUSTOM_GETTER(ResponsePrototype__urlGetterWrap, (JSGlobalObject * lex
thisObject->m_url.set(vm, thisObject, result);
RELEASE_AND_RETURN(throwScope, JSValue::encode(result));
}
+
+
extern "C" void ResponsePrototype__urlSetCachedValue(JSC::EncodedJSValue thisValue, JSC::JSGlobalObject *globalObject, JSC::EncodedJSValue value)
{
auto& vm = globalObject->vm();
@@ -5600,6 +5797,13 @@ extern "C" void ResponsePrototype__urlSetCachedValue(JSC::EncodedJSValue thisVal
thisObject->m_url.set(vm, thisObject, JSValue::decode(value));
}
+extern "C" EncodedJSValue ResponsePrototype__urlGetCachedValue(JSC::EncodedJSValue thisValue)
+{
+ auto* thisObject = jsCast<JSResponse*>(JSValue::decode(thisValue));
+ return JSValue::encode(thisObject->m_url.get());
+}
+
+
void JSResponsePrototype::finishCreation(JSC::VM& vm, JSC::JSGlobalObject* globalObject)
{
@@ -5707,6 +5911,7 @@ void JSResponse::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSResponse* JSResponse::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSResponse* ptr = new (NotNull, JSC::allocateCell<JSResponse>(vm)) JSResponse(vm, structure, ctx);
ptr->finishCreation(vm);
@@ -6077,6 +6282,7 @@ void JSBlob::finishCreation(VM& vm)
ASSERT(inherits(info()));
}
+
JSBlob* JSBlob::create(JSC::VM& vm, JSC::JSGlobalObject* globalObject, JSC::Structure* structure, void* ctx) {
JSBlob* ptr = new (NotNull, JSC::allocateCell<JSBlob>(vm)) JSBlob(vm, structure, ctx);
ptr->finishCreation(vm);
diff --git a/src/bun.js/bindings/ZigGeneratedClasses.h b/src/bun.js/bindings/ZigGeneratedClasses.h
index c344437cc..1db660689 100644
--- a/src/bun.js/bindings/ZigGeneratedClasses.h
+++ b/src/bun.js/bindings/ZigGeneratedClasses.h
@@ -60,10 +60,13 @@ class JSTCPSocket final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
+
+
DECLARE_VISIT_CHILDREN;
mutable JSC::WriteBarrier<JSC::Unknown> m_data;
@@ -185,10 +188,13 @@ class JSTLSSocket final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
+
+
DECLARE_VISIT_CHILDREN;
mutable JSC::WriteBarrier<JSC::Unknown> m_data;
@@ -310,10 +316,13 @@ class JSListener final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
+
+
DECLARE_VISIT_CHILDREN;
mutable JSC::WriteBarrier<JSC::Unknown> m_hostname;
@@ -435,10 +444,13 @@ class JSSubprocess final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
+
+
DECLARE_VISIT_CHILDREN;
mutable JSC::WriteBarrier<JSC::Unknown> m_stderr;
@@ -561,6 +573,7 @@ class JSSHA1 final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
@@ -568,6 +581,8 @@ class JSSHA1 final : public JSC::JSDestructibleObject {
+
+
};
class JSSHA1Prototype final : public JSC::JSNonFinalObject {
public:
@@ -685,6 +700,7 @@ class JSMD5 final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
@@ -692,6 +708,8 @@ class JSMD5 final : public JSC::JSDestructibleObject {
+
+
};
class JSMD5Prototype final : public JSC::JSNonFinalObject {
public:
@@ -809,6 +827,7 @@ class JSMD4 final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
@@ -816,6 +835,8 @@ class JSMD4 final : public JSC::JSDestructibleObject {
+
+
};
class JSMD4Prototype final : public JSC::JSNonFinalObject {
public:
@@ -933,6 +954,7 @@ class JSSHA224 final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
@@ -940,6 +962,8 @@ class JSSHA224 final : public JSC::JSDestructibleObject {
+
+
};
class JSSHA224Prototype final : public JSC::JSNonFinalObject {
public:
@@ -1057,6 +1081,7 @@ class JSSHA512 final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
@@ -1064,6 +1089,8 @@ class JSSHA512 final : public JSC::JSDestructibleObject {
+
+
};
class JSSHA512Prototype final : public JSC::JSNonFinalObject {
public:
@@ -1181,6 +1208,7 @@ class JSSHA384 final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
@@ -1188,6 +1216,8 @@ class JSSHA384 final : public JSC::JSDestructibleObject {
+
+
};
class JSSHA384Prototype final : public JSC::JSNonFinalObject {
public:
@@ -1305,6 +1335,7 @@ class JSSHA256 final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
@@ -1312,6 +1343,8 @@ class JSSHA256 final : public JSC::JSDestructibleObject {
+
+
};
class JSSHA256Prototype final : public JSC::JSNonFinalObject {
public:
@@ -1429,6 +1462,7 @@ class JSSHA512_256 final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
@@ -1436,6 +1470,8 @@ class JSSHA512_256 final : public JSC::JSDestructibleObject {
+
+
};
class JSSHA512_256Prototype final : public JSC::JSNonFinalObject {
public:
@@ -1553,10 +1589,13 @@ class JSServerWebSocket final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
+
+
DECLARE_VISIT_CHILDREN;
mutable JSC::WriteBarrier<JSC::Unknown> m_data;
@@ -1678,10 +1717,13 @@ class JSTextDecoder final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
+
+
DECLARE_VISIT_CHILDREN;
mutable JSC::WriteBarrier<JSC::Unknown> m_encoding;
@@ -1802,10 +1844,13 @@ class JSRequest final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
+
+
DECLARE_VISIT_CHILDREN;
mutable JSC::WriteBarrier<JSC::Unknown> m_body;
@@ -1928,10 +1973,13 @@ class JSResponse final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
+
+
DECLARE_VISIT_CHILDREN;
mutable JSC::WriteBarrier<JSC::Unknown> m_body;
@@ -2055,6 +2103,7 @@ class JSBlob final : public JSC::JSDestructibleObject {
: Base(vm, structure)
{
m_ctx = sinkPtr;
+
}
void finishCreation(JSC::VM&);
@@ -2062,6 +2111,8 @@ class JSBlob final : public JSC::JSDestructibleObject {
+
+
};
class JSBlobPrototype final : public JSC::JSNonFinalObject {
public:
diff --git a/src/bun.js/bindings/ZigGlobalObject.cpp b/src/bun.js/bindings/ZigGlobalObject.cpp
index 42e412f9c..4ef773995 100644
--- a/src/bun.js/bindings/ZigGlobalObject.cpp
+++ b/src/bun.js/bindings/ZigGlobalObject.cpp
@@ -1280,7 +1280,7 @@ JSC_DEFINE_CUSTOM_GETTER(getterSubtleCryptoConstructor, (JSGlobalObject * lexica
JSC_DEFINE_CUSTOM_GETTER(getterCryptoKeyConstructor, (JSGlobalObject * lexicalGlobalObject, EncodedJSValue thisValue, PropertyName attributeName))
{
Zig::GlobalObject* thisObject = JSC::jsCast<Zig::GlobalObject*>(lexicalGlobalObject);
- return JSValue::encode(
+ return JSValue::encode(
JSCryptoKey::getConstructor(thisObject->vm(), thisObject));
}
@@ -2168,7 +2168,7 @@ void GlobalObject::finishCreation(VM& vm)
addBuiltinGlobals(vm);
#if ENABLE(REMOTE_INSPECTOR)
- setRemoteDebuggingEnabled(false);
+ setInspectable(false);
#endif
RELEASE_ASSERT(classInfo());
@@ -2787,7 +2787,7 @@ extern "C" bool JSC__JSGlobalObject__startRemoteInspector(JSC__JSGlobalObject* g
#if !ENABLE(REMOTE_INSPECTOR)
return false;
#else
- globalObject->setRemoteDebuggingEnabled(true);
+ globalObject->setInspectable(true);
auto& server = Inspector::RemoteInspectorServer::singleton();
return server.start(reinterpret_cast<const char*>(host), arg1);
#endif