diff options
author | Michaël Zasso <targos@protonmail.com> | 2020-11-13 12:51:53 +0100 |
---|---|---|
committer | Michaël Zasso <targos@protonmail.com> | 2020-11-15 16:46:54 +0100 |
commit | 48db20f6f53060e38b2272566b014741eb4f519f (patch) | |
tree | e2f9b4c7f69d2e4597b73b4c3c09f4371d5cc963 /deps/v8/src/builtins/builtins-regexp-gen.cc | |
parent | 79916428a48df937aa5b2b69c061d2d42181a76b (diff) | |
download | node-new-48db20f6f53060e38b2272566b014741eb4f519f.tar.gz |
deps: update V8 to 8.7.220
PR-URL: https://github.com/nodejs/node/pull/35700
Reviewed-By: Rich Trott <rtrott@gmail.com>
Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Reviewed-By: Joyee Cheung <joyeec9h3@gmail.com>
Reviewed-By: Matteo Collina <matteo.collina@gmail.com>
Reviewed-By: Jiawen Geng <technicalcute@gmail.com>
Reviewed-By: Shelley Vohr <codebytere@gmail.com>
Diffstat (limited to 'deps/v8/src/builtins/builtins-regexp-gen.cc')
-rw-r--r-- | deps/v8/src/builtins/builtins-regexp-gen.cc | 38 |
1 files changed, 19 insertions, 19 deletions
diff --git a/deps/v8/src/builtins/builtins-regexp-gen.cc b/deps/v8/src/builtins/builtins-regexp-gen.cc index dace357d56..8be87180eb 100644 --- a/deps/v8/src/builtins/builtins-regexp-gen.cc +++ b/deps/v8/src/builtins/builtins-regexp-gen.cc @@ -257,11 +257,15 @@ TNode<JSRegExpResult> RegExpBuiltinsAssembler::ConstructNewResultFromMatchInfo( TNode<FixedArray> data = CAST(LoadObjectField(regexp, JSRegExp::kDataOffset)); - // We reach this point only if captures exist, implying that this is an - // IRREGEXP JSRegExp. - CSA_ASSERT(this, - SmiEqual(CAST(LoadFixedArrayElement(data, JSRegExp::kTagIndex)), - SmiConstant(JSRegExp::IRREGEXP))); + // We reach this point only if captures exist, implying that the assigned + // regexp engine must be able to handle captures. + CSA_ASSERT( + this, + Word32Or( + SmiEqual(CAST(LoadFixedArrayElement(data, JSRegExp::kTagIndex)), + SmiConstant(JSRegExp::IRREGEXP)), + SmiEqual(CAST(LoadFixedArrayElement(data, JSRegExp::kTagIndex)), + SmiConstant(JSRegExp::EXPERIMENTAL)))); // The names fixed array associates names at even indices with a capture // index at odd indices. @@ -284,8 +288,7 @@ TNode<JSRegExpResult> RegExpBuiltinsAssembler::ConstructNewResultFromMatchInfo( TNode<IntPtrT> num_properties = WordSar(names_length, 1); TNode<NativeContext> native_context = LoadNativeContext(context); - TNode<Map> map = CAST(LoadContextElement( - native_context, Context::SLOW_OBJECT_WITH_NULL_PROTOTYPE_MAP)); + TNode<Map> map = LoadSlowObjectWithNullPrototypeMap(native_context); TNode<NameDictionary> properties = AllocateNameDictionary(num_properties, kAllowLargeObjectAllocation); @@ -614,9 +617,8 @@ TNode<HeapObject> RegExpBuiltinsAssembler::RegExpExecInternal( GotoIf(SmiGreaterThan(register_count, available_slots), &runtime); // Fill match_info. - UnsafeStoreFixedArrayElement(match_info, - RegExpMatchInfo::kNumberOfCapturesIndex, - register_count, SKIP_WRITE_BARRIER); + UnsafeStoreFixedArrayElement( + match_info, RegExpMatchInfo::kNumberOfCapturesIndex, register_count); UnsafeStoreFixedArrayElement(match_info, RegExpMatchInfo::kLastSubjectIndex, string); UnsafeStoreFixedArrayElement(match_info, RegExpMatchInfo::kLastInputIndex, @@ -852,19 +854,17 @@ TF_BUILTIN(RegExpExecAtom, RegExpBuiltinsAssembler) { const TNode<Smi> match_to = SmiAdd(match_from, LoadStringLengthAsSmi(needle_string)); - UnsafeStoreFixedArrayElement( - match_info, RegExpMatchInfo::kNumberOfCapturesIndex, - SmiConstant(kNumRegisters), SKIP_WRITE_BARRIER); + UnsafeStoreFixedArrayElement(match_info, + RegExpMatchInfo::kNumberOfCapturesIndex, + SmiConstant(kNumRegisters)); UnsafeStoreFixedArrayElement(match_info, RegExpMatchInfo::kLastSubjectIndex, subject_string); UnsafeStoreFixedArrayElement(match_info, RegExpMatchInfo::kLastInputIndex, subject_string); - UnsafeStoreFixedArrayElement(match_info, - RegExpMatchInfo::kFirstCaptureIndex, - match_from, SKIP_WRITE_BARRIER); - UnsafeStoreFixedArrayElement(match_info, - RegExpMatchInfo::kFirstCaptureIndex + 1, - match_to, SKIP_WRITE_BARRIER); + UnsafeStoreFixedArrayElement( + match_info, RegExpMatchInfo::kFirstCaptureIndex, match_from); + UnsafeStoreFixedArrayElement( + match_info, RegExpMatchInfo::kFirstCaptureIndex + 1, match_to); Return(match_info); } |