diff options
author | 2022-11-25 00:08:36 -0800 | |
---|---|---|
committer | 2022-11-25 00:08:36 -0800 | |
commit | d1a4f4fd6981a06920adb632dde2562b76ddc4d0 (patch) | |
tree | 6a26cd3ebd8afdbad653a800d54967c4e84b55c2 /src/bun.js/bindings/JSSinkLookupTable.h | |
parent | 0b915fed034c38ae9a2e15caee94530910dc864b (diff) | |
download | bun-d1a4f4fd6981a06920adb632dde2562b76ddc4d0.tar.gz bun-d1a4f4fd6981a06920adb632dde2562b76ddc4d0.tar.zst bun-d1a4f4fd6981a06920adb632dde2562b76ddc4d0.zip |
Introduce `FileSink.ref()` and `FileSink.unref()`
Diffstat (limited to 'src/bun.js/bindings/JSSinkLookupTable.h')
-rw-r--r-- | src/bun.js/bindings/JSSinkLookupTable.h | 40 |
1 files changed, 24 insertions, 16 deletions
diff --git a/src/bun.js/bindings/JSSinkLookupTable.h b/src/bun.js/bindings/JSSinkLookupTable.h index 14d547708..a4ace6dc3 100644 --- a/src/bun.js/bindings/JSSinkLookupTable.h +++ b/src/bun.js/bindings/JSSinkLookupTable.h @@ -10,7 +10,7 @@ static const struct CompactHashIndex JSArrayBufferSinkPrototypeTableIndex[19] = { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, + { 6, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, @@ -19,23 +19,25 @@ static const struct CompactHashIndex JSArrayBufferSinkPrototypeTableIndex[19] = { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, + { 5, -1 }, { 4, -1 }, { 1, 17 }, { 2, 18 }, { 3, -1 }, }; -static const struct HashTableValue JSArrayBufferSinkPrototypeTableValues[5] = { +static const struct HashTableValue JSArrayBufferSinkPrototypeTableValues[7] = { { "close"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, ArrayBufferSink__doClose, 0 } }, { "flush"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, ArrayBufferSink__flush, 1 } }, { "end"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, ArrayBufferSink__end, 0 } }, { "start"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, ArrayBufferSink__start, 1 } }, { "write"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, ArrayBufferSink__write, 1 } }, + { "ref"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, ArrayBufferSink__ref, 0 } }, + { "unref"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, ArrayBufferSink__unref, 0 } }, }; static const struct HashTable JSArrayBufferSinkPrototypeTable = - { 5, 15, false, nullptr, JSArrayBufferSinkPrototypeTableValues, JSArrayBufferSinkPrototypeTableIndex }; + { 7, 15, false, nullptr, JSArrayBufferSinkPrototypeTableValues, JSArrayBufferSinkPrototypeTableIndex }; @@ -88,7 +90,7 @@ static const struct CompactHashIndex JSFileSinkPrototypeTableIndex[19] = { { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, + { 6, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, @@ -97,23 +99,25 @@ static const struct CompactHashIndex JSFileSinkPrototypeTableIndex[19] = { { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, + { 5, -1 }, { 4, -1 }, { 1, 17 }, { 2, 18 }, { 3, -1 }, }; -static const struct HashTableValue JSFileSinkPrototypeTableValues[5] = { +static const struct HashTableValue JSFileSinkPrototypeTableValues[7] = { { "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 } }, + { "ref"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, FileSink__ref, 0 } }, + { "unref"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, FileSink__unref, 0 } }, }; static const struct HashTable JSFileSinkPrototypeTable = - { 5, 15, false, nullptr, JSFileSinkPrototypeTableValues, JSFileSinkPrototypeTableIndex }; + { 7, 15, false, nullptr, JSFileSinkPrototypeTableValues, JSFileSinkPrototypeTableIndex }; @@ -166,7 +170,7 @@ static const struct CompactHashIndex JSHTTPResponseSinkPrototypeTableIndex[19] = { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, + { 6, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, @@ -175,23 +179,25 @@ static const struct CompactHashIndex JSHTTPResponseSinkPrototypeTableIndex[19] = { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, + { 5, -1 }, { 4, -1 }, { 1, 17 }, { 2, 18 }, { 3, -1 }, }; -static const struct HashTableValue JSHTTPResponseSinkPrototypeTableValues[5] = { +static const struct HashTableValue JSHTTPResponseSinkPrototypeTableValues[7] = { { "close"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPResponseSink__doClose, 0 } }, { "flush"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPResponseSink__flush, 1 } }, { "end"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPResponseSink__end, 0 } }, { "start"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPResponseSink__start, 1 } }, { "write"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPResponseSink__write, 1 } }, + { "ref"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPResponseSink__ref, 0 } }, + { "unref"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPResponseSink__unref, 0 } }, }; static const struct HashTable JSHTTPResponseSinkPrototypeTable = - { 5, 15, false, nullptr, JSHTTPResponseSinkPrototypeTableValues, JSHTTPResponseSinkPrototypeTableIndex }; + { 7, 15, false, nullptr, JSHTTPResponseSinkPrototypeTableValues, JSHTTPResponseSinkPrototypeTableIndex }; @@ -244,7 +250,7 @@ static const struct CompactHashIndex JSHTTPSResponseSinkPrototypeTableIndex[19] { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, + { 6, -1 }, { -1, -1 }, { -1, -1 }, { -1, -1 }, @@ -253,23 +259,25 @@ static const struct CompactHashIndex JSHTTPSResponseSinkPrototypeTableIndex[19] { -1, -1 }, { -1, -1 }, { -1, -1 }, - { -1, -1 }, + { 5, -1 }, { 4, -1 }, { 1, 17 }, { 2, 18 }, { 3, -1 }, }; -static const struct HashTableValue JSHTTPSResponseSinkPrototypeTableValues[5] = { +static const struct HashTableValue JSHTTPSResponseSinkPrototypeTableValues[7] = { { "close"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPSResponseSink__doClose, 0 } }, { "flush"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPSResponseSink__flush, 1 } }, { "end"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPSResponseSink__end, 0 } }, { "start"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPSResponseSink__start, 1 } }, { "write"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPSResponseSink__write, 1 } }, + { "ref"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPSResponseSink__ref, 0 } }, + { "unref"_s, static_cast<unsigned>(PropertyAttribute::ReadOnly|PropertyAttribute::DontDelete|PropertyAttribute::Function), NoIntrinsic, { HashTableValue::NativeFunctionType, HTTPSResponseSink__unref, 0 } }, }; static const struct HashTable JSHTTPSResponseSinkPrototypeTable = - { 5, 15, false, nullptr, JSHTTPSResponseSinkPrototypeTableValues, JSHTTPSResponseSinkPrototypeTableIndex }; + { 7, 15, false, nullptr, JSHTTPSResponseSinkPrototypeTableValues, JSHTTPSResponseSinkPrototypeTableIndex }; |