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-09-22 23:44:53 -0700
committerGravatar Jarred Sumner <709451+Jarred-Sumner@users.noreply.github.com> 2022-09-22 23:45:02 -0700
commit2c1926993bc4d94f9e7bc4d171217a707efd385c (patch)
tree827148c57920e40ad48c4c6d73ceec68a9b21c96 /src/bun.js/bindings/JSSinkLookupTable.h
parente14a3af491ece8d1b0309e76ae3022b4fad91f16 (diff)
downloadbun-2c1926993bc4d94f9e7bc4d171217a707efd385c.tar.gz
bun-2c1926993bc4d94f9e7bc4d171217a707efd385c.tar.zst
bun-2c1926993bc4d94f9e7bc4d171217a707efd385c.zip
Faster `Blob` + begin to implement `FileSink`
Diffstat (limited to 'src/bun.js/bindings/JSSinkLookupTable.h')
-rw-r--r--src/bun.js/bindings/JSSinkLookupTable.h78
1 files changed, 78 insertions, 0 deletions
diff --git a/src/bun.js/bindings/JSSinkLookupTable.h b/src/bun.js/bindings/JSSinkLookupTable.h
index 8d0f8cde5..14d547708 100644
--- a/src/bun.js/bindings/JSSinkLookupTable.h
+++ b/src/bun.js/bindings/JSSinkLookupTable.h
@@ -82,6 +82,84 @@ static const struct HashTable JSReadableArrayBufferSinkControllerPrototypeTable
+static const struct CompactHashIndex JSFileSinkPrototypeTableIndex[19] = {
+ { -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 },
+ { 1, 17 },
+ { 2, 18 },
+ { 3, -1 },
+};
+
+static const struct HashTableValue JSFileSinkPrototypeTableValues[5] = {
+ { "close"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, FileSink__doClose, 0 } },
+ { "flush"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, FileSink__flush, 1 } },
+ { "end"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, FileSink__end, 0 } },
+ { "start"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, FileSink__start, 1 } },
+ { "write"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, FileSink__write, 1 } },
+};
+
+static const struct HashTable JSFileSinkPrototypeTable =
+ { 5, 15, false, nullptr, JSFileSinkPrototypeTableValues, JSFileSinkPrototypeTableIndex };
+
+
+
+
+
+
+
+static const struct CompactHashIndex JSReadableFileSinkControllerPrototypeTableIndex[19] = {
+ { -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 },
+ { 1, 17 },
+ { 2, 18 },
+ { 3, -1 },
+};
+
+static const struct HashTableValue JSReadableFileSinkControllerPrototypeTableValues[5] = {
+ { "close"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, JSReadableFileSinkController__close, 0 } },
+ { "flush"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, FileSink__flush, 1 } },
+ { "end"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, JSReadableFileSinkController__end, 0 } },
+ { "start"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, FileSink__start, 1 } },
+ { "write"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, FileSink__write, 1 } },
+};
+
+static const struct HashTable JSReadableFileSinkControllerPrototypeTable =
+ { 5, 15, false, nullptr, JSReadableFileSinkControllerPrototypeTableValues, JSReadableFileSinkControllerPrototypeTableIndex };
+
+
+
+
+
+
+
static const struct CompactHashIndex JSHTTPResponseSinkPrototypeTableIndex[19] = {
{ -1, -1 },
{ -1, -1 },