aboutsummaryrefslogtreecommitdiff
path: root/src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp
diff options
context:
space:
mode:
authorGravatar Dylan Conway <35280289+dylan-conway@users.noreply.github.com> 2022-10-17 22:37:18 -0700
committerGravatar GitHub <noreply@github.com> 2022-10-17 22:37:18 -0700
commit8e1b2ba32e1eecb26ec8f21628207890fab34c14 (patch)
tree1c1c1929c6f034ef9ec203aa65b4ec4fc0b7bb62 /src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp
parentc7fc8fdf96f8a03d95b7adfdb56b639f2ac42582 (diff)
downloadbun-8e1b2ba32e1eecb26ec8f21628207890fab34c14.tar.gz
bun-8e1b2ba32e1eecb26ec8f21628207890fab34c14.tar.zst
bun-8e1b2ba32e1eecb26ec8f21628207890fab34c14.zip
add oniguruma for regex with variable length lookbehinds (#1329)
* added pcre2 submodule * pcre2 regex boilerplate * tests for pcre2 regex * flag validation, getters, construct and compile mostly working * string escaping for source and toString(), exec, more tests * flag sorting, match, matchAll, search, split, replace * remove lib link * add destructor to PCRE2RegExp * header include * removed ternary * switched to oniguruma for regex library * revert sql changes * fix indices flag, add tests * revert settings * working error messages * more tests for lastIndex, fix logic for compile and lastIndex * move oniguruma lib to deps out dir
Diffstat (limited to 'src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp')
-rw-r--r--src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp11
1 files changed, 9 insertions, 2 deletions
diff --git a/src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp b/src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp
index b1914d83d..df58f2ab0 100644
--- a/src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp
+++ b/src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp
@@ -4,6 +4,7 @@
* Copyright (c) 2015 Igalia.
* Copyright (c) 2015, 2016 Canon Inc. All rights reserved.
* Copyright (c) 2015, 2016, 2017 Canon Inc.
+ * Copyright (c) 2016, 2018 -2018 Apple Inc. All rights reserved.
* Copyright (c) 2016, 2020 Apple Inc. All rights reserved.
* Copyright (c) 2022 Codeblog Corp. All rights reserved.
*
@@ -93,7 +94,7 @@ const char* const s_readableStreamDefaultReaderCancelCode =
const JSC::ConstructAbility s_readableStreamDefaultReaderReadManyCodeConstructAbility = JSC::ConstructAbility::CannotConstruct;
const JSC::ConstructorKind s_readableStreamDefaultReaderReadManyCodeConstructorKind = JSC::ConstructorKind::None;
const JSC::ImplementationVisibility s_readableStreamDefaultReaderReadManyCodeImplementationVisibility = JSC::ImplementationVisibility::Public;
-const int s_readableStreamDefaultReaderReadManyCodeLength = 4130;
+const int s_readableStreamDefaultReaderReadManyCodeLength = 4212;
static const JSC::Intrinsic s_readableStreamDefaultReaderReadManyCodeIntrinsic = JSC::NoIntrinsic;
const char* const s_readableStreamDefaultReaderReadManyCode =
"(function ()\n" \
@@ -120,10 +121,16 @@ const char* const s_readableStreamDefaultReaderReadManyCode =
" var queue = @getByIdDirectPrivate(controller, \"queue\");\n" \
" \n" \
" if (!queue) {\n" \
+ " //\n" \
+ " //\n" \
" return controller.@pull(\n" \
" controller\n" \
" ).@then(\n" \
- " ({done, value}) => (done ? { done: true, value: [], size: 0 } : { value: [value], size: 1, done: false }));\n" \
+ " ({done, value}) => (\n" \
+ " done ? \n" \
+ " { done: true, value: [], size: 0 } : \n" \
+ " { value: [value], size: 1, done: false }\n" \
+ " ));\n" \
" }\n" \
"\n" \
" const content = queue.content;\n" \