From 8e1b2ba32e1eecb26ec8f21628207890fab34c14 Mon Sep 17 00:00:00 2001 From: Dylan Conway <35280289+dylan-conway@users.noreply.github.com> Date: Mon, 17 Oct 2022 22:37:18 -0700 Subject: 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 --- .../builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'src/bun.js/builtins/cpp/ReadableStreamDefaultReaderBuiltins.cpp') 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" \ -- cgit v1.2.3