summaryrefslogtreecommitdiff
path: root/deps/v8/src/objects/string-inl.h
diff options
context:
space:
mode:
authorMichaël Zasso <targos@protonmail.com>2020-05-05 09:19:02 +0200
committerMichaël Zasso <targos@protonmail.com>2020-05-12 16:12:13 +0200
commit1d6adf7432defeb39b751a19c68335e8afb0d8ee (patch)
tree7ab67931110b8d9db770d774c7a6d0d14c976c15 /deps/v8/src/objects/string-inl.h
parentaee36a04475a20c13663d1037aa6f175ff368bc7 (diff)
downloadnode-new-1d6adf7432defeb39b751a19c68335e8afb0d8ee.tar.gz
deps: update V8 to 8.3.110.9
PR-URL: https://github.com/nodejs/node/pull/32831 Reviewed-By: Anna Henningsen <anna@addaleax.net> Reviewed-By: Michaël Zasso <targos@protonmail.com> Reviewed-By: Jiawen Geng <technicalcute@gmail.com> Reviewed-By: Colin Ihrig <cjihrig@gmail.com>
Diffstat (limited to 'deps/v8/src/objects/string-inl.h')
-rw-r--r--deps/v8/src/objects/string-inl.h23
1 files changed, 10 insertions, 13 deletions
diff --git a/deps/v8/src/objects/string-inl.h b/deps/v8/src/objects/string-inl.h
index 93453eee21..5dd460a959 100644
--- a/deps/v8/src/objects/string-inl.h
+++ b/deps/v8/src/objects/string-inl.h
@@ -397,6 +397,13 @@ Handle<String> String::Flatten(Isolate* isolate, Handle<String> string,
return string;
}
+Handle<String> String::Flatten(OffThreadIsolate* isolate, Handle<String> string,
+ AllocationType allocation) {
+ // We should never pass non-flat strings to String::Flatten when off-thread.
+ DCHECK(string->IsFlat());
+ return string;
+}
+
uint16_t String::Get(int index) {
DCHECK(index >= 0 && index < length());
@@ -575,8 +582,6 @@ void SlicedString::set_parent(String parent, WriteBarrierMode mode) {
TorqueGeneratedSlicedString<SlicedString, Super>::set_parent(parent, mode);
}
-TQ_SMI_ACCESSORS(SlicedString, offset)
-
Object ConsString::unchecked_first() {
return TaggedField<Object, kFirstOffset>::load(*this);
}
@@ -773,15 +778,11 @@ void StringCharacterStream::VisitTwoByteString(const uint16_t* chars,
bool String::AsArrayIndex(uint32_t* index) {
DisallowHeapAllocation no_gc;
uint32_t field = hash_field();
- // The {IsHashFieldComputed} check is not functionally necessary as the
- // subsequent mask includes it; it's here to make the logic more obvious,
- // and the compile will fold it away so it doesn't hurt performance.
- if (IsHashFieldComputed(field) &&
- (field & kDoesNotContainCachedArrayIndexMask) == 0) {
+ if (ContainsCachedArrayIndex(field)) {
*index = ArrayIndexValueBits::decode(field);
return true;
}
- if (IsHashFieldComputed(field) && (field & kIsNotArrayIndexMask)) {
+ if (IsHashFieldComputed(field) && (field & kIsNotIntegerIndexMask)) {
return false;
}
return SlowAsArrayIndex(index);
@@ -789,11 +790,7 @@ bool String::AsArrayIndex(uint32_t* index) {
bool String::AsIntegerIndex(size_t* index) {
uint32_t field = hash_field();
- // The {IsHashFieldComputed} check is not functionally necessary as the
- // subsequent mask includes it; it's here to make the logic more obvious,
- // and the compile will fold it away so it doesn't hurt performance.
- if (IsHashFieldComputed(field) &&
- (field & kDoesNotContainCachedArrayIndexMask) == 0) {
+ if (ContainsCachedArrayIndex(field)) {
*index = ArrayIndexValueBits::decode(field);
return true;
}