summaryrefslogtreecommitdiff
path: root/deps/v8/src/builtins/builtins-regexp-gen.cc
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2022-09-21 13:28:42 +0200
committerMichaël Zasso <targos@protonmail.com>2022-10-11 07:24:33 +0200
commit6bd756d7c6dfb7dc25daee329ad70df68c14223e (patch)
treeaf93818c545f5bd04cafd4a0c19817e19a475641 /deps/v8/src/builtins/builtins-regexp-gen.cc
parent624dadb00706a9fc08f919ac72941cdaba7e3ec9 (diff)
downloadnode-new-6bd756d7c6dfb7dc25daee329ad70df68c14223e.tar.gz
deps: update V8 to 10.7.193.13
PR-URL: https://github.com/nodejs/node/pull/44741 Fixes: https://github.com/nodejs/node/issues/44650 Fixes: https://github.com/nodejs/node/issues/37472 Reviewed-By: Ben Noordhuis <info@bnoordhuis.nl> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: James M Snell <jasnell@gmail.com>
Diffstat (limited to 'deps/v8/src/builtins/builtins-regexp-gen.cc')
-rw-r--r--deps/v8/src/builtins/builtins-regexp-gen.cc19
1 files changed, 12 insertions, 7 deletions
diff --git a/deps/v8/src/builtins/builtins-regexp-gen.cc b/deps/v8/src/builtins/builtins-regexp-gen.cc
index 38dc47a122..c40e21b1a1 100644
--- a/deps/v8/src/builtins/builtins-regexp-gen.cc
+++ b/deps/v8/src/builtins/builtins-regexp-gen.cc
@@ -478,7 +478,7 @@ TNode<HeapObject> RegExpBuiltinsAssembler::RegExpExecInternal(
};
Label* labels[] = {&next, &atom, &next};
- STATIC_ASSERT(arraysize(values) == arraysize(labels));
+ static_assert(arraysize(values) == arraysize(labels));
Switch(tag, &unreachable, values, labels, arraysize(values));
BIND(&unreachable);
@@ -493,7 +493,7 @@ TNode<HeapObject> RegExpBuiltinsAssembler::RegExpExecInternal(
data, JSRegExp::kIrregexpCaptureCountIndex));
const int kOffsetsSize = Isolate::kJSRegexpStaticOffsetsVectorSize;
- STATIC_ASSERT(kOffsetsSize >= 2);
+ static_assert(kOffsetsSize >= 2);
GotoIf(SmiAbove(capture_count, SmiConstant(kOffsetsSize / 2 - 1)),
&runtime);
}
@@ -603,7 +603,7 @@ TNode<HeapObject> RegExpBuiltinsAssembler::RegExpExecInternal(
data, JSRegExp::kIrregexpCaptureCountIndex));
// capture_count is the number of captures without the match itself.
// Required registers = (capture_count + 1) * 2.
- STATIC_ASSERT(Internals::IsValidSmi((JSRegExp::kMaxCaptures + 1) * 2));
+ static_assert(Internals::IsValidSmi((JSRegExp::kMaxCaptures + 1) * 2));
TNode<Smi> register_count =
SmiShl(SmiAdd(capture_count, SmiConstant(1)), 1);
@@ -672,7 +672,7 @@ TNode<HeapObject> RegExpBuiltinsAssembler::RegExpExecInternal(
// Check that the last match info has space for the capture registers and
// the additional information. Ensure no overflow in add.
- STATIC_ASSERT(FixedArray::kMaxLength < kMaxInt - FixedArray::kLengthOffset);
+ static_assert(FixedArray::kMaxLength < kMaxInt - FixedArray::kLengthOffset);
TNode<Smi> available_slots =
SmiSub(LoadFixedArrayBaseLength(match_info),
SmiConstant(RegExpMatchInfo::kLastMatchOverhead));
@@ -732,7 +732,8 @@ TNode<HeapObject> RegExpBuiltinsAssembler::RegExpExecInternal(
TNode<ExternalReference> pending_exception_address =
ExternalConstant(ExternalReference::Create(
IsolateAddressId::kPendingExceptionAddress, isolate()));
- CSA_DCHECK(this, IsTheHole(Load<Object>(pending_exception_address)));
+ TNode<Object> pending_exception = LoadFullTagged(pending_exception_address);
+ CSA_DCHECK(this, IsTheHole(pending_exception));
#endif // DEBUG
CallRuntime(Runtime::kThrowStackOverflow, context);
Unreachable();
@@ -974,7 +975,7 @@ TF_BUILTIN(RegExpExecAtom, RegExpBuiltinsAssembler) {
LoadStringLengthAsWord(subject_string)));
const int kNumRegisters = 2;
- STATIC_ASSERT(RegExpMatchInfo::kInitialCaptureIndices >= kNumRegisters);
+ static_assert(RegExpMatchInfo::kInitialCaptureIndices >= kNumRegisters);
const TNode<Smi> match_to =
SmiAdd(match_from, LoadStringLengthAsSmi(needle_string));
@@ -1099,6 +1100,10 @@ TNode<String> RegExpBuiltinsAssembler::FlagsGetter(TNode<Context> context,
"linear",
ExternalReference::address_of_enable_experimental_regexp_engine(),
JSRegExp::kLinear);
+ CASE_FOR_FLAG(
+ "unicodeSets",
+ ExternalReference::address_of_FLAG_harmony_regexp_unicode_sets(),
+ JSRegExp::kUnicodeSets);
#undef CASE_FOR_FLAG
}
@@ -1430,7 +1435,7 @@ TNode<Number> RegExpBuiltinsAssembler::AdvanceStringIndex(
if (is_fastpath) {
// Must be in Smi range on the fast path. We control the value of {index}
// on all call-sites and can never exceed the length of the string.
- STATIC_ASSERT(String::kMaxLength + 2 < Smi::kMaxValue);
+ static_assert(String::kMaxLength + 2 < Smi::kMaxValue);
CSA_DCHECK(this, TaggedIsPositiveSmi(index_plus_one));
}