Spracherkennung für: .patch vermutete Sprache: Unknown {[0] [0] [0]} [Methode: Schwerpunktbildung, einfache Gewichte, sechs Dimensionen]
diff --git a/js/src/irregexp/imported/regexp-bytecodes-inl.h b/js/src/irregexp/imported/regexp-bytecodes-inl.h
index 78f63ca35f..f6cd7fb82f 100644
--- a/imported/regexp-bytecodes-inl.h
+++ b/imported/regexp-bytecodes-inl.h
@@ -75,7 +75,7 @@
}
template <size_t N>
-consteval std::array<std::string_view, N> SplitNames(const char* raw_names) {
+constexpr std::array<std::string_view, N> SplitNames(const char* raw_names) {
std::array<std::string_view, N> result;
std::string_view names(raw_names);
@@ -104,7 +104,7 @@
// Calculates packed offsets for each Bytecode operand.
// All operands are aligned to their own size.
template <BytecodeOperandType... operand_types>
-consteval auto CalculateAlignedOffsets() {
+constexpr auto CalculateAlignedOffsets() {
constexpr int N = sizeof...(operand_types);
constexpr std::array<uint8_t, N> kOperandSizes = {
OperandTypeTraits<operand_types>::kSize...};
@@ -174,14 +174,14 @@
using Traits = BytecodeOperandsTraits<OpTypes...>;
static constexpr int kCount = Traits::kOperandCount;
static constexpr int kTotalSize = Traits::kSize;
- static consteval int Index(Operand op) { return static_cast<uint8_t>(op); }
- static consteval int Size(Operand op) {
+ static constexpr int Index(Operand op) { return static_cast<uint8_t>(op); }
+ static constexpr int Size(Operand op) {
return Traits::kOperandSizes[Index(op)];
}
- static consteval int Offset(Operand op) {
+ static constexpr int Offset(Operand op) {
return Traits::kOperandOffsets[Index(op)];
}
- static consteval BytecodeOperandType Type(Operand op) {
+ static constexpr BytecodeOperandType Type(Operand op) {
return Traits::kOperandTypes[Index(op)];
}
@@ -190,7 +190,7 @@
}
// Returns a tuple of all operands.
- static consteval auto GetOperandsTuple() {
+ static constexpr auto GetOperandsTuple() {
return []<size_t... Is>(std::index_sequence<Is...>) {
return std::tuple_cat([]<size_t I>() {
constexpr auto id = static_cast<Operand>(I);
diff --git a/js/src/irregexp/imported/regexp-bytecode-peephole.cc b/js/src/irregexp/imported/regexp-bytecode-peephole.cc
--- a/imported/regexp-bytecode-peephole.cc
+++ b/imported/regexp-bytecode-peephole.cc
@@ -1090,6 +1090,7 @@
isolate->factory()->NewTrustedByteArray(optimized_length);
MemCopy(array->begin(), optimized_bytecode, optimized_length);
+#ifndef COMPILING_IRREGEXP_FOR_EXTERNAL_EMBEDDER
if (did_optimize && v8_flags.trace_regexp_peephole_optimization) {
std::unique_ptr<char[]> pattern_cstring =
re_data->escaped_source()->ToCString();
@@ -1101,6 +1102,7 @@
RegExpBytecodeDisassemble(array->begin(), optimized_length,
pattern_cstring.get());
}
+#endif // !COMPILING_IRREGEXP_FOR_EXTERNAL_EMBEDDER
return array;
}
diff --git a/js/src/irregexp/imported/regexp-code-generator.cc b/js/src/irregexp/imported/regexp-code-generator.cc
--- a/imported/regexp-code-generator.cc
+++ b/imported/regexp-code-generator.cc
@@ -37,6 +37,7 @@
USE(isolate_);
USE(masm_);
+#ifndef COMPILING_IRREGEXP_FOR_EXTERNAL_EMBEDDER
// Bytecode analysis is currently unused. In future work it could form the
// basis for compiler optimizations.
if (V8_UNLIKELY(v8_flags.regexp_bytecode_analysis)) {
@@ -50,6 +51,7 @@
pattern_cstring.get(), &analysis);
}
}
+#endif // !COMPILING_IRREGEXP_FOR_EXTERNAL_EMBEDDER
PreVisitBytecodes();
iter_.reset();
[Dauer der Verarbeitung: 0.19 Sekunden, vorverarbeitet 2026-09-30]