From 646d77c75ce0034f5e7441326e6219c1c6fb5374 Mon Sep 17 00:00:00 2001 From: zufuliu Date: Sun, 22 Dec 2024 12:14:05 +0800 Subject: [PATCH] Scintilla 5.5.4. --- .../boost/regex/v5/win_regex_traits.hpp | 18 ++++++++++++++++++ scintilla/lexers/LexCSV.cxx | 1 + scintilla/lexers/LexTOML.cxx | 2 +- scintilla/lexers/LexYAML.cxx | 2 +- src/Version.h | 2 +- version.txt | 12 ++++++------ 6 files changed, 28 insertions(+), 9 deletions(-) diff --git a/scintilla/include/boost/regex/v5/win_regex_traits.hpp b/scintilla/include/boost/regex/v5/win_regex_traits.hpp index 0fef2432f4..51c0f3420c 100644 --- a/scintilla/include/boost/regex/v5/win_regex_traits.hpp +++ b/scintilla/include/boost/regex/v5/win_regex_traits.hpp @@ -6,6 +6,7 @@ #include #include #include +#include "VectorISA.h" namespace boost{ @@ -36,6 +37,23 @@ class w32_regex_traits for (int i = 0; i < characterCount; i++) { m_lower_map[i] = static_cast(i); } +#elif NP2_USE_SSE2 + { + __m128i *ptr = reinterpret_cast<__m128i *>(m_lower_map.get()); + __m128i value = _mm_setr_epi16(0, 1, 2, 3, 4, 5, 6, 7); + const __m128i acc = _mm_shuffle_epi32(_mm_cvtsi32_si128(0x0008'0008), 0); + constexpr int count = characterCount / (sizeof(__m128i) / sizeof(wchar_t)); +#if defined(__clang__) + #pragma clang loop unroll(disable) +#elif defined(__GNUC__) + #pragma GCC unroll 0 +#endif + for (int i = 0; i < count; i++) { + _mm_storeu_si128(ptr, value); + ptr++; + value = _mm_add_epi16(value, acc); + } + } #elif defined(_WIN64) { uint64_t *ptr = reinterpret_cast(m_lower_map.get()); diff --git a/scintilla/lexers/LexCSV.cxx b/scintilla/lexers/LexCSV.cxx index 984ec0df21..6552ec4c7f 100644 --- a/scintilla/lexers/LexCSV.cxx +++ b/scintilla/lexers/LexCSV.cxx @@ -26,6 +26,7 @@ namespace { // https://commons.apache.org/proper/commons-csv/apidocs/org/apache/commons/csv/CSVFormat.html enum { + // see Styles.cpp CsvOption_BackslashEscape = 1 << 15, CsvOption_MergeDelimiter = 1 << 16, CsvRowGroup = 100, diff --git a/scintilla/lexers/LexTOML.cxx b/scintilla/lexers/LexTOML.cxx index 965b7572e5..8b2b7ffbcf 100644 --- a/scintilla/lexers/LexTOML.cxx +++ b/scintilla/lexers/LexTOML.cxx @@ -73,7 +73,7 @@ constexpr bool IsTOMLUnquotedKey(int ch) noexcept { return IsIdentifierChar(ch) || ch == '-'; } -bool IsTOMLKey(StyleContext& sc, int braceCount, const WordList *kwList) { +bool IsTOMLKey(StyleContext &sc, int braceCount, const WordList *kwList) { if (braceCount) { const int chNext = sc.GetLineNextChar(); if (chNext == '=' || chNext == '.' || chNext == '-') { diff --git a/scintilla/lexers/LexYAML.cxx b/scintilla/lexers/LexYAML.cxx index aa2def4573..f9746f1470 100644 --- a/scintilla/lexers/LexYAML.cxx +++ b/scintilla/lexers/LexYAML.cxx @@ -59,7 +59,7 @@ constexpr bool IsYAMLAnchorChar(int ch) noexcept { return IsGraphic(ch) && !IsYAMLFlowIndicator(ch); } -bool IsYAMLText(StyleContext& sc, int braceCount, const WordList *kwList) { +bool IsYAMLText(StyleContext &sc, int braceCount, const WordList *kwList) { const int state = sc.state; const Sci_Position endPos = braceCount? sc.styler.Length() : sc.lineStartNext; const unsigned char chNext = LexGetNextChar(sc.styler, sc.currentPos, endPos); diff --git a/src/Version.h b/src/Version.h index 711f561e06..d273754c9a 100644 --- a/src/Version.h +++ b/src/Version.h @@ -37,7 +37,7 @@ #define HELP_LINK_FEATURE_REQUEST L"https://github.com/zufuliu/notepad4/issues" #define HELP_LINK_ONLINE_WIKI L"https://github.com/zufuliu/notepad4/wiki" -#define VERSION_BUILD_INFO_LIB L",\nScintilla 5.5.3." +#define VERSION_BUILD_INFO_LIB L",\nScintilla 5.5.4." #define VERSION_BUILD_INFO_FORMAT L"Compiled on " __DATE__ L" with %s %d.%d.%d" VERSION_BUILD_INFO_LIB #if defined(__INTEL_LLVM_COMPILER) #define VERSION_BUILD_TOOL_NAME L"Intel oneAPI" diff --git a/version.txt b/version.txt index 95f60dddc8..1f8084ed4c 100644 --- a/version.txt +++ b/version.txt @@ -4,18 +4,18 @@ git clone https://github.com/XhmikosR/notepad2-mod.git Scintilla (upstream) hg clone http://hg.code.sf.net/p/scintilla/code scintilla -5.5.3 -2024-12-06 9617:7f805fc34a65 +5.5.4 +2024-12-18 9624:7d3da0a013fb Lexilla (upstream) git clone https://github.com/ScintillaOrg/lexilla.git -5.4.1 -2024-11-30 cf1070c1cc921a7ca77d806b47c39ed0b57cdd94 +5.4.2 +2024-12-21 7b0a1d7609bd0c2d07da61e3da41dae9077ec8ee SciTE (upstream) hg clone http://hg.code.sf.net/p/scintilla/scite -5.5.3 -2024-11-26 6361:42e286d36ce6 +5.5.4 +2024-12-18 6365:e4c786064e6f Boost regex 7.0.1 1.86 https://github.com/boostorg/regex