aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/bindings/JSSinkLookupTable.h
diff options
context:
space:
mode:
authorGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-06-29 07:09:25 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-06-29 07:09:25 -0700
commit647110d5134d52ff59e6afe4503c9c1a7a19a45e (patch)
tree87784ad044d7de486ed98b1a7212046c19006931 /src/bun.js/bindings/JSSinkLookupTable.h
parent425846f86867d75ac9bfcf4fb0a7d6ae32f6bef8 (diff)
downloadbun-647110d5134d52ff59e6afe4503c9c1a7a19a45e.tar.gz
bun-647110d5134d52ff59e6afe4503c9c1a7a19a45e.tar.zst
bun-647110d5134d52ff59e6afe4503c9c1a7a19a45e.zip
[React SSR] Avoid `getById` slow path
thanks @Constellation
Diffstat (limited to 'src/bun.js/bindings/JSSinkLookupTable.h')
-rw-r--r--src/bun.js/bindings/JSSinkLookupTable.h187
1 files changed, 187 insertions, 0 deletions
diff --git a/src/bun.js/bindings/JSSinkLookupTable.h b/src/bun.js/bindings/JSSinkLookupTable.h
new file mode 100644
index 000000000..f79fdb9b7
--- /dev/null
+++ b/src/bun.js/bindings/JSSinkLookupTable.h
@@ -0,0 +1,187 @@
+// Automatically generated from src/bun.js/bindings/JSSink.cpp using /Users/jarred/Code/bun/src/bun.js/WebKit/Source/JavaScriptCore/create_hash_table. DO NOT EDIT!
+
+static const struct CompactHashIndex JSArrayBufferSinkPrototypeTableIndex[18] = {
+ { 1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { 0, 16 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { 4, -1 },
+ { 2, 17 },
+ { 3, -1 },
+};
+
+static const struct HashTableValue JSArrayBufferSinkPrototypeTableValues[5] = {
+ { "close"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__doClose), (intptr_t)(0) } },
+ { "drain"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__drain), (intptr_t)(1) } },
+ { "end"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__end), (intptr_t)(0) } },
+ { "start"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__start), (intptr_t)(1) } },
+ { "write"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__write), (intptr_t)(1) } },
+};
+
+static const struct HashTable JSArrayBufferSinkPrototypeTable = { 5, 15, false, nullptr, JSArrayBufferSinkPrototypeTableValues, JSArrayBufferSinkPrototypeTableIndex };
+
+static const struct CompactHashIndex JSReadableArrayBufferSinkControllerPrototypeTableIndex[18] = {
+ { 1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { 0, 16 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { 4, -1 },
+ { 2, 17 },
+ { 3, -1 },
+};
+
+static const struct HashTableValue JSReadableArrayBufferSinkControllerPrototypeTableValues[5] = {
+ { "close"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(JSReadableArrayBufferSinkController__close), (intptr_t)(0) } },
+ { "drain"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__drain), (intptr_t)(1) } },
+ { "end"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(JSReadableArrayBufferSinkController__end), (intptr_t)(0) } },
+ { "start"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__start), (intptr_t)(1) } },
+ { "write"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(ArrayBufferSink__write), (intptr_t)(1) } },
+};
+
+static const struct HashTable JSReadableArrayBufferSinkControllerPrototypeTable = { 5, 15, false, nullptr, JSReadableArrayBufferSinkControllerPrototypeTableValues, JSReadableArrayBufferSinkControllerPrototypeTableIndex };
+
+static const struct CompactHashIndex JSHTTPResponseSinkPrototypeTableIndex[18] = {
+ { 1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { 0, 16 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { 4, -1 },
+ { 2, 17 },
+ { 3, -1 },
+};
+
+static const struct HashTableValue JSHTTPResponseSinkPrototypeTableValues[5] = {
+ { "close"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__doClose), (intptr_t)(0) } },
+ { "drain"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__drain), (intptr_t)(1) } },
+ { "end"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__end), (intptr_t)(0) } },
+ { "start"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__start), (intptr_t)(1) } },
+ { "write"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__write), (intptr_t)(1) } },
+};
+
+static const struct HashTable JSHTTPResponseSinkPrototypeTable = { 5, 15, false, nullptr, JSHTTPResponseSinkPrototypeTableValues, JSHTTPResponseSinkPrototypeTableIndex };
+
+static const struct CompactHashIndex JSReadableHTTPResponseSinkControllerPrototypeTableIndex[18] = {
+ { 1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { 0, 16 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { 4, -1 },
+ { 2, 17 },
+ { 3, -1 },
+};
+
+static const struct HashTableValue JSReadableHTTPResponseSinkControllerPrototypeTableValues[5] = {
+ { "close"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(JSReadableHTTPResponseSinkController__close), (intptr_t)(0) } },
+ { "drain"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__drain), (intptr_t)(1) } },
+ { "end"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(JSReadableHTTPResponseSinkController__end), (intptr_t)(0) } },
+ { "start"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__start), (intptr_t)(1) } },
+ { "write"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPResponseSink__write), (intptr_t)(1) } },
+};
+
+static const struct HashTable JSReadableHTTPResponseSinkControllerPrototypeTable = { 5, 15, false, nullptr, JSReadableHTTPResponseSinkControllerPrototypeTableValues, JSReadableHTTPResponseSinkControllerPrototypeTableIndex };
+
+static const struct CompactHashIndex JSHTTPSResponseSinkPrototypeTableIndex[18] = {
+ { 1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { 0, 16 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { 4, -1 },
+ { 2, 17 },
+ { 3, -1 },
+};
+
+static const struct HashTableValue JSHTTPSResponseSinkPrototypeTableValues[5] = {
+ { "close"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__doClose), (intptr_t)(0) } },
+ { "drain"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__drain), (intptr_t)(1) } },
+ { "end"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__end), (intptr_t)(0) } },
+ { "start"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__start), (intptr_t)(1) } },
+ { "write"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__write), (intptr_t)(1) } },
+};
+
+static const struct HashTable JSHTTPSResponseSinkPrototypeTable = { 5, 15, false, nullptr, JSHTTPSResponseSinkPrototypeTableValues, JSHTTPSResponseSinkPrototypeTableIndex };
+
+static const struct CompactHashIndex JSReadableHTTPSResponseSinkControllerPrototypeTableIndex[18] = {
+ { 1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { 0, 16 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { -1, -1 },
+ { 4, -1 },
+ { 2, 17 },
+ { 3, -1 },
+};
+
+static const struct HashTableValue JSReadableHTTPSResponseSinkControllerPrototypeTableValues[5] = {
+ { "close"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(JSReadableHTTPSResponseSinkController__close), (intptr_t)(0) } },
+ { "drain"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__drain), (intptr_t)(1) } },
+ { "end"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(JSReadableHTTPSResponseSinkController__end), (intptr_t)(0) } },
+ { "start"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__start), (intptr_t)(1) } },
+ { "write"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly | PropertyAttribute::DontDelete | PropertyAttribute::Function), NoIntrinsic, { (intptr_t) static_cast<RawNativeFunction>(HTTPSResponseSink__write), (intptr_t)(1) } },
+};
+
+static const struct HashTable JSReadableHTTPSResponseSinkControllerPrototypeTable = { 5, 15, false, nullptr, JSReadableHTTPSResponseSinkControllerPrototypeTableValues, JSReadableHTTPSResponseSinkControllerPrototypeTableIndex };