Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Commit 23cb478

Browse filesBrowse files
deps: update ada to 2.6.10
PR-URL: #49984 Reviewed-By: Yagiz Nizipli <yagiz@nizipli.com> Reviewed-By: Debadree Chatterjee <debadree333@gmail.com> Reviewed-By: Tobias Nießen <tniessen@tnie.de>
1 parent 952cf0d commit 23cb478
Copy full SHA for 23cb478

File tree

Expand file treeCollapse file tree

3 files changed

+33
-13
lines changed
Open diff view settings
Filter options
Expand file treeCollapse file tree

3 files changed

+33
-13
lines changed
Open diff view settings
Collapse file

‎deps/ada/ada.cpp‎

Copy file name to clipboardExpand all lines: deps/ada/ada.cpp
+27-7Lines changed: 27 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2023-09-29 13:28:16 -0400. Do not edit! */
1+
/* auto-generated on 2023-09-30 20:34:30 -0400. Do not edit! */
22
/* begin file src/ada.cpp */
33
#include "ada.h"
44
/* begin file src/checkers.cpp */
@@ -9810,6 +9810,17 @@ constexpr bool to_lower_ascii(char* input, size_t length) noexcept {
98109810
#if ADA_NEON
98119811
ada_really_inline bool has_tabs_or_newline(
98129812
std::string_view user_input) noexcept {
9813+
// first check for short strings in which case we do it naively.
9814+
if (user_input.size() < 16) { // slow path
9815+
for (size_t i = 0; i < user_input.size(); i++) {
9816+
if (user_input[i] == '\r' || user_input[i] == '\n' ||
9817+
user_input[i] == '\t') {
9818+
return true;
9819+
}
9820+
}
9821+
return false;
9822+
}
9823+
// fast path for long strings (expected to be common)
98139824
size_t i = 0;
98149825
const uint8x16_t mask1 = vmovq_n_u8('\r');
98159826
const uint8x16_t mask2 = vmovq_n_u8('\n');
@@ -9822,9 +9833,8 @@ ada_really_inline bool has_tabs_or_newline(
98229833
vceqq_u8(word, mask3));
98239834
}
98249835
if (i < user_input.size()) {
9825-
uint8_t buffer[16]{};
9826-
memcpy(buffer, user_input.data() + i, user_input.size() - i);
9827-
uint8x16_t word = vld1q_u8((const uint8_t*)user_input.data() + i);
9836+
uint8x16_t word =
9837+
vld1q_u8((const uint8_t*)user_input.data() + user_input.length() - 16);
98289838
running = vorrq_u8(vorrq_u8(running, vorrq_u8(vceqq_u8(word, mask1),
98299839
vceqq_u8(word, mask2))),
98309840
vceqq_u8(word, mask3));
@@ -9834,6 +9844,17 @@ ada_really_inline bool has_tabs_or_newline(
98349844
#elif ADA_SSE2
98359845
ada_really_inline bool has_tabs_or_newline(
98369846
std::string_view user_input) noexcept {
9847+
// first check for short strings in which case we do it naively.
9848+
if (user_input.size() < 16) { // slow path
9849+
for (size_t i = 0; i < user_input.size(); i++) {
9850+
if (user_input[i] == '\r' || user_input[i] == '\n' ||
9851+
user_input[i] == '\t') {
9852+
return true;
9853+
}
9854+
}
9855+
return false;
9856+
}
9857+
// fast path for long strings (expected to be common)
98379858
size_t i = 0;
98389859
const __m128i mask1 = _mm_set1_epi8('\r');
98399860
const __m128i mask2 = _mm_set1_epi8('\n');
@@ -9847,9 +9868,8 @@ ada_really_inline bool has_tabs_or_newline(
98479868
_mm_cmpeq_epi8(word, mask3));
98489869
}
98499870
if (i < user_input.size()) {
9850-
alignas(16) uint8_t buffer[16]{};
9851-
memcpy(buffer, user_input.data() + i, user_input.size() - i);
9852-
__m128i word = _mm_load_si128((const __m128i*)buffer);
9871+
__m128i word = _mm_loadu_si128(
9872+
(const __m128i*)(user_input.data() + user_input.length() - 16));
98539873
running = _mm_or_si128(
98549874
_mm_or_si128(running, _mm_or_si128(_mm_cmpeq_epi8(word, mask1),
98559875
_mm_cmpeq_epi8(word, mask2))),
Collapse file

‎deps/ada/ada.h‎

Copy file name to clipboardExpand all lines: deps/ada/ada.h
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
/* auto-generated on 2023-09-29 13:28:16 -0400. Do not edit! */
1+
/* auto-generated on 2023-09-30 20:34:30 -0400. Do not edit! */
22
/* begin file include/ada.h */
33
/**
44
* @file ada.h
@@ -6928,14 +6928,14 @@ inline void url_search_params::sort() {
69286928
#ifndef ADA_ADA_VERSION_H
69296929
#define ADA_ADA_VERSION_H
69306930

6931-
#define ADA_VERSION "2.6.9"
6931+
#define ADA_VERSION "2.6.10"
69326932

69336933
namespace ada {
69346934

69356935
enum {
69366936
ADA_VERSION_MAJOR = 2,
69376937
ADA_VERSION_MINOR = 6,
6938-
ADA_VERSION_REVISION = 9,
6938+
ADA_VERSION_REVISION = 10,
69396939
};
69406940

69416941
} // namespace ada
Collapse file

‎doc/contributing/maintaining/maintaining-dependencies.md‎

Copy file name to clipboardExpand all lines: doc/contributing/maintaining/maintaining-dependencies.md
+3-3Lines changed: 3 additions & 3 deletions
  • Display the source diff
  • Display the rich diff
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ All dependencies are located within the `deps` directory.
99
This a list of all the dependencies:
1010

1111
* [acorn 8.10.0][]
12-
* [ada 2.6.9][]
12+
* [ada 2.6.10][]
1313
* [base64 0.5.0][]
1414
* [brotli 1.0.9][]
1515
* [c-ares 1.19.0][]
@@ -150,7 +150,7 @@ The [acorn](https://github.com/acornjs/acorn) dependency is a JavaScript parser.
150150
[acorn-walk](https://github.com/acornjs/acorn/tree/master/acorn-walk) is
151151
an abstract syntax tree walker for the ESTree format.
152152

153-
### ada 2.6.9
153+
### ada 2.6.10
154154

155155
The [ada](https://github.com/ada-url/ada) dependency is a
156156
fast and spec-compliant URL parser written in C++.
@@ -319,7 +319,7 @@ it comes from the Chromium team's zlib fork which incorporated
319319
performance improvements not currently available in standard zlib.
320320

321321
[acorn 8.10.0]: #acorn-8100
322-
[ada 2.6.9]: #ada-269
322+
[ada 2.6.10]: #ada-2610
323323
[base64 0.5.0]: #base64-050
324324
[brotli 1.0.9]: #brotli-109
325325
[c-ares 1.19.0]: #c-ares-1190

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.