Open
Conversation
95d216c to
3e38a8a
Compare
5b83862 to
2217549
Compare
added 22 commits
March 13, 2026 16:44
…from prepare_search_query builtin
1b8a952 to
d221bd8
Compare
apolyakov
requested changes
Mar 13, 2026
| #include "runtime-light/stdlib/diagnostics/logs.h" | ||
|
|
||
| inline string f$prepare_search_query(const string& query) noexcept { | ||
| // TODO no problem if std::function allocate? |
Contributor
There was a problem hiding this comment.
I don't see std::function here
Contributor
Author
There was a problem hiding this comment.
removed comment
| #include "runtime-common/stdlib/string/string-context.h" | ||
| #include "runtime-common/stdlib/string/string-functions.h" | ||
| #include "runtime-light/k2-platform/k2-api.h" | ||
| #include "runtime-light/stdlib/diagnostics/logs.h" |
Contributor
There was a problem hiding this comment.
Please, remove unused includes
|
|
||
| inline string f$prepare_search_query(const string& query) noexcept { | ||
| // TODO no problem if std::function allocate? | ||
| return prepare_search_query_impl_::prepare_search_query(query, [](bool condition) { kphp::log::assertion(condition); }); |
Contributor
There was a problem hiding this comment.
missing noexcept for lambda
common/unicode/unicode-utils.h
Outdated
|
|
||
| #include <cstddef> | ||
| #include <cstdint> | ||
| #include <functional> |
Contributor
There was a problem hiding this comment.
Please, remove unused include
common/unicode/unicode-utils.cpp
Outdated
| #include <algorithm> | ||
| #include <assert.h> | ||
| #include <cstddef> | ||
| #include <functional> |
Contributor
There was a problem hiding this comment.
Please, remove unused include
common/unicode/unicode-utils.cpp
Outdated
| return to_upper_table[code]; | ||
| } else { | ||
| return binary_search_ranges(to_upper_table_ranges, to_upper_table_ranges_size, code); | ||
| return binary_search_ranges(to_upper_table_ranges, to_upper_table_ranges_size, code, [](bool condition) { assert(condition); }); |
Contributor
There was a problem hiding this comment.
It looks like it's still possible to call assert from runtime-light. Let's fix this as well
common/unicode/utf8-utils.cpp
Outdated
| const int _v_78__[] = {121, 117, 0}; | ||
| const int _s_79__[] = {1103, 0}; | ||
| const int _v_79__[] = {121, 97, 0}; | ||
| // TODO does constexpr std::array enough for safe use in runtime-light ? |
| if (!s[k]) { \ | ||
| match_v = v; \ | ||
| match_s = s; \ | ||
| match_v = v.data(); \ |
Contributor
There was a problem hiding this comment.
Why is data() called here?
Contributor
Author
There was a problem hiding this comment.
because s and v now have type std::array
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
implemented f$prepare_search_query