aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-11-07 00:53:24 -0800
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-11-07 00:53:24 -0800
commit71d0e14210fb0fa1cd19c650dfd45e25dcafab98 (patch)
tree75e935f6e9859d058005672c2529bc9777245af8 /src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h
parentd925367cae1f22ad85a29ae02456286d9ccc859a (diff)
downloadbun-71d0e14210fb0fa1cd19c650dfd45e25dcafab98.tar.gz
bun-71d0e14210fb0fa1cd19c650dfd45e25dcafab98.tar.zst
bun-71d0e14210fb0fa1cd19c650dfd45e25dcafab98.zip
[bun:test] Implement `expect` in faster Zig bindings
Diffstat (limited to 'src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h')
-rw-r--r--src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h41
1 files changed, 24 insertions, 17 deletions
diff --git a/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h b/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h
index b1144a1e8..b04e10089 100644
--- a/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h
+++ b/src/bun.js/bindings/ZigGeneratedClasses+lazyStructureImpl.h
@@ -3,103 +3,109 @@ void GlobalObject::initGeneratedLazyClasses() {
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSTCPSocket::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSTCPSocket::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSTCPSocketConstructor::create(init.vm, init.global, WebCore::JSTCPSocketConstructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSTCPSocketPrototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSTCPSocket::createConstructor(init.vm, init.global, init.prototype));
});
m_JSTLSSocket.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSTLSSocket::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSTLSSocket::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSTLSSocketConstructor::create(init.vm, init.global, WebCore::JSTLSSocketConstructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSTLSSocketPrototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSTLSSocket::createConstructor(init.vm, init.global, init.prototype));
});
m_JSListener.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSListener::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSListener::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSListenerConstructor::create(init.vm, init.global, WebCore::JSListenerConstructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSListenerPrototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSListener::createConstructor(init.vm, init.global, init.prototype));
});
m_JSSubprocess.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSSubprocess::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSSubprocess::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSSubprocessConstructor::create(init.vm, init.global, WebCore::JSSubprocessConstructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSSubprocessPrototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSSubprocess::createConstructor(init.vm, init.global, init.prototype));
});
m_JSSHA1.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSSHA1::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSSHA1::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSSHA1Constructor::create(init.vm, init.global, WebCore::JSSHA1Constructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSSHA1Prototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSSHA1::createConstructor(init.vm, init.global, init.prototype));
});
m_JSMD5.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSMD5::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSMD5::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSMD5Constructor::create(init.vm, init.global, WebCore::JSMD5Constructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSMD5Prototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSMD5::createConstructor(init.vm, init.global, init.prototype));
});
m_JSMD4.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSMD4::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSMD4::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSMD4Constructor::create(init.vm, init.global, WebCore::JSMD4Constructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSMD4Prototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSMD4::createConstructor(init.vm, init.global, init.prototype));
});
m_JSSHA224.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSSHA224::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSSHA224::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSSHA224Constructor::create(init.vm, init.global, WebCore::JSSHA224Constructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSSHA224Prototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSSHA224::createConstructor(init.vm, init.global, init.prototype));
});
m_JSSHA512.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSSHA512::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSSHA512::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSSHA512Constructor::create(init.vm, init.global, WebCore::JSSHA512Constructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSSHA512Prototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSSHA512::createConstructor(init.vm, init.global, init.prototype));
});
m_JSSHA384.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSSHA384::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSSHA384::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSSHA384Constructor::create(init.vm, init.global, WebCore::JSSHA384Constructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSSHA384Prototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSSHA384::createConstructor(init.vm, init.global, init.prototype));
});
m_JSSHA256.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSSHA256::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSSHA256::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSSHA256Constructor::create(init.vm, init.global, WebCore::JSSHA256Constructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSSHA256Prototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSSHA256::createConstructor(init.vm, init.global, init.prototype));
});
m_JSSHA512_256.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSSHA512_256::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSSHA512_256::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSSHA512_256Constructor::create(init.vm, init.global, WebCore::JSSHA512_256Constructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSSHA512_256Prototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSSHA512_256::createConstructor(init.vm, init.global, init.prototype));
});
m_JSServerWebSocket.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSServerWebSocket::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSServerWebSocket::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSServerWebSocketConstructor::create(init.vm, init.global, WebCore::JSServerWebSocketConstructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSServerWebSocketPrototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSServerWebSocket::createConstructor(init.vm, init.global, init.prototype));
+ });
+ m_JSExpect.initLater(
+ [](LazyClassStructure::Initializer& init) {
+ init.setPrototype(WebCore::JSExpect::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
+ init.setStructure(WebCore::JSExpect::createStructure(init.vm, init.global, init.prototype));
+ init.setConstructor(WebCore::JSExpect::createConstructor(init.vm, init.global, init.prototype));
});
m_JSTextDecoder.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSTextDecoder::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSTextDecoder::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSTextDecoderConstructor::create(init.vm, init.global, WebCore::JSTextDecoderConstructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSTextDecoderPrototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSTextDecoder::createConstructor(init.vm, init.global, init.prototype));
});
m_JSRequest.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSRequest::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSRequest::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSRequestConstructor::create(init.vm, init.global, WebCore::JSRequestConstructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSRequestPrototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSRequest::createConstructor(init.vm, init.global, init.prototype));
});
m_JSResponse.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSResponse::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSResponse::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSResponseConstructor::create(init.vm, init.global, WebCore::JSResponseConstructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSResponsePrototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSResponse::createConstructor(init.vm, init.global, init.prototype));
});
m_JSBlob.initLater(
[](LazyClassStructure::Initializer& init) {
init.setPrototype(WebCore::JSBlob::createPrototype(init.vm, reinterpret_cast<Zig::GlobalObject*>(init.global)));
init.setStructure(WebCore::JSBlob::createStructure(init.vm, init.global, init.prototype));
- init.setConstructor(WebCore::JSBlobConstructor::create(init.vm, init.global, WebCore::JSBlobConstructor::createStructure(init.vm, init.global, init.global->functionPrototype()), jsCast<WebCore::JSBlobPrototype*>(init.prototype)));
+ init.setConstructor(WebCore::JSBlob::createConstructor(init.vm, init.global, init.prototype));
});
}
template<typename Visitor>
@@ -118,6 +124,7 @@ void GlobalObject::visitGeneratedLazyClasses(GlobalObject *thisObject, Visitor&
thisObject->m_JSSHA256.visit(visitor); visitor.append(thisObject->m_JSSHA256SetterValue);
thisObject->m_JSSHA512_256.visit(visitor); visitor.append(thisObject->m_JSSHA512_256SetterValue);
thisObject->m_JSServerWebSocket.visit(visitor); visitor.append(thisObject->m_JSServerWebSocketSetterValue);
+ thisObject->m_JSExpect.visit(visitor); visitor.append(thisObject->m_JSExpectSetterValue);
thisObject->m_JSTextDecoder.visit(visitor); visitor.append(thisObject->m_JSTextDecoderSetterValue);
thisObject->m_JSRequest.visit(visitor); visitor.append(thisObject->m_JSRequestSetterValue);
thisObject->m_JSResponse.visit(visitor); visitor.append(thisObject->m_JSResponseSetterValue);