diff --git a/deps/v8/src/compiler/turboshaft/string-escape-analysis-reducer.h b/deps/v8/src/compiler/turboshaft/string-escape-analysis-reducer.h index 95fb93d00f036e..5460312001d7fd 100644 --- a/deps/v8/src/compiler/turboshaft/string-escape-analysis-reducer.h +++ b/deps/v8/src/compiler/turboshaft/string-escape-analysis-reducer.h @@ -149,7 +149,7 @@ class StringEscapeAnalysisReducer : public Next { } private: - ElidedStringPart(Kind kind, V index) : data(index), kind(kind) {} + ElidedStringPart(Kind kind, V index) : data{index}, kind(kind) {} }; void Analyze() { diff --git a/deps/v8/src/heap/heap-visitor-inl.h b/deps/v8/src/heap/heap-visitor-inl.h index 8b1604d321fb6d..ed635fa6f36379 100644 --- a/deps/v8/src/heap/heap-visitor-inl.h +++ b/deps/v8/src/heap/heap-visitor-inl.h @@ -93,26 +93,23 @@ Tagged HeapVisitor::Cast(Tagged object, } template -size_t HeapVisitor::Visit(Tagged object) - requires(!ConcreteVisitor::UsePrecomputedObjectSize()) -{ +template +size_t HeapVisitor::Visit(Tagged object) { return Visit(object->map(cage_base()), object); } template +template size_t HeapVisitor::Visit(Tagged map, - Tagged object) - requires(!ConcreteVisitor::UsePrecomputedObjectSize()) -{ + Tagged object) { return Visit(map, object, MaybeObjectSize()); } template +template size_t HeapVisitor::Visit(Tagged map, Tagged object, - int object_size) - requires(ConcreteVisitor::UsePrecomputedObjectSize()) -{ + int object_size) { return Visit(map, object, MaybeObjectSize(object_size)); } diff --git a/deps/v8/src/heap/heap-visitor.h b/deps/v8/src/heap/heap-visitor.h index 2ee724764f6089..d324b3bb869b85 100644 --- a/deps/v8/src/heap/heap-visitor.h +++ b/deps/v8/src/heap/heap-visitor.h @@ -196,15 +196,18 @@ class HeapVisitor : public ObjectVisitorWithCageBases { inline explicit HeapVisitor(Isolate* isolate); inline explicit HeapVisitor(Heap* heap); - V8_INLINE size_t Visit(Tagged object) - requires(!ConcreteVisitor::UsePrecomputedObjectSize()); + template > + V8_INLINE size_t Visit(Tagged object); - V8_INLINE size_t Visit(Tagged map, Tagged object) - requires(!ConcreteVisitor::UsePrecomputedObjectSize()); + template > + V8_INLINE size_t Visit(Tagged map, Tagged object); + template > V8_INLINE size_t Visit(Tagged map, Tagged object, - int object_size) - requires(ConcreteVisitor::UsePrecomputedObjectSize()); + int object_size); protected: V8_INLINE size_t Visit(Tagged map, Tagged object, diff --git a/deps/v8/src/heap/mark-compact.cc b/deps/v8/src/heap/mark-compact.cc index e668710f7fe5f7..876c32e87a864e 100644 --- a/deps/v8/src/heap/mark-compact.cc +++ b/deps/v8/src/heap/mark-compact.cc @@ -3862,7 +3862,7 @@ void MarkCompactCollector::ClearWeakCollections() { template void MarkCompactCollector::ClearWeakReferences( - WeakObjects::WeakObjectWorklist::Local& worklist, + typename WeakObjects::WeakObjectWorklist::Local& worklist, Tagged cleared_weak_ref) { TObjectAndSlot slot; while (worklist.Pop(&slot)) { diff --git a/deps/v8/src/heap/mark-compact.h b/deps/v8/src/heap/mark-compact.h index 60e0895e6d7816..9495f8e98ac659 100644 --- a/deps/v8/src/heap/mark-compact.h +++ b/deps/v8/src/heap/mark-compact.h @@ -339,7 +339,7 @@ class MarkCompactCollector final { // Common implementation of the above two. template void ClearWeakReferences( - WeakObjects::WeakObjectWorklist::Local& worklist, + typename WeakObjects::WeakObjectWorklist::Local& worklist, Tagged cleared_weak_ref); // Goes through the list of encountered non-trivial weak references and diff --git a/deps/v8/src/json/json-stringifier.cc b/deps/v8/src/json/json-stringifier.cc index 383147abbc3473..af805df09e5372 100644 --- a/deps/v8/src/json/json-stringifier.cc +++ b/deps/v8/src/json/json-stringifier.cc @@ -2072,7 +2072,7 @@ template template FastJsonStringifierResult FastJsonStringifier::SerializeObjectKey( Tagged obj, bool comma, const DisallowGarbageCollection& no_gc) { - using StringChar = StringT::Char; + using StringChar = typename StringT::Char; if constexpr (is_one_byte && sizeof(StringChar) == 2) { return CHANGE_ENCODING; } else { @@ -2098,7 +2098,7 @@ template FastJsonStringifierResult FastJsonStringifier::SerializeString( Tagged obj, bool comma, Tagged key, const DisallowGarbageCollection& no_gc) { - using StringChar = StringT::Char; + using StringChar = typename StringT::Char; if constexpr (is_one_byte && sizeof(StringChar) == 2) { return CHANGE_ENCODING; } else { @@ -2277,36 +2277,39 @@ FastJsonStringifierResult FastJsonStringifier::SerializeJSObject( break; case UNDEFINED: break; - case UNCHANGED: - stack_.emplace_back(ContinuationRecord::kObject, obj, - i.as_uint32() + 1); + case UNCHANGED: { + ContinuationRecord rec1{ContinuationRecord::kObject, obj, i.as_uint32() + 1}; + stack_.emplace_back(std::move(rec1)); // property can be an object or array. We don't need to distinguish // as index is 0 anyways. - stack_.emplace_back(ContinuationRecord::kObject, property, 0); + ContinuationRecord rec2{ContinuationRecord::kObject, property, 0}; + stack_.emplace_back(std::move(rec2)); result = SerializeObjectKey(key_name, comma, no_gc); if constexpr (is_one_byte) { if (V8_UNLIKELY(result != SUCCESS)) { DCHECK_EQ(result, CHANGE_ENCODING); - stack_.emplace_back(ContinuationRecord::kObjectKey, key_name, - comma); + ContinuationRecord rec3{ContinuationRecord::kObjectKey, key_name, comma}; + stack_.emplace_back(std::move(rec3)); return result; } } return result; - case CHANGE_ENCODING: + } + case CHANGE_ENCODING: { DCHECK(is_one_byte); - stack_.emplace_back(ContinuationRecord::kObject, obj, - i.as_uint32() + 1); - stack_.emplace_back(ContinuationRecord::kResumeFromOther, property, - 0); + ContinuationRecord rec1{ContinuationRecord::kObject, obj, i.as_uint32() + 1}; + stack_.emplace_back(std::move(rec1)); + ContinuationRecord rec2{ContinuationRecord::kResumeFromOther, property, 0}; + stack_.emplace_back(std::move(rec2)); result = SerializeObjectKey(key_name, comma, no_gc); if (V8_UNLIKELY(result != SUCCESS)) { - stack_.emplace_back(ContinuationRecord::kObjectKey, key_name, - comma); + ContinuationRecord rec3{ContinuationRecord::kObjectKey, key_name, comma}; + stack_.emplace_back(std::move(rec3)); return result; } DCHECK(IsString(property)); return result; + } case SLOW_PATH: case EXCEPTION: return result; @@ -2449,15 +2452,21 @@ FastJsonStringifierResult FastJsonStringifier::SerializeFixedArrayElement( case UNDEFINED: AppendCStringLiteral("null"); return SUCCESS; - case CHANGE_ENCODING: + case CHANGE_ENCODING: { DCHECK(IsString(obj)); - stack_.emplace_back(ContinuationRecord::kArray, array, i + 1); - stack_.emplace_back(ContinuationRecord::kResumeFromOther, obj, 0); + ContinuationRecord rec1{ContinuationRecord::kArray, array, i + 1}; + stack_.emplace_back(std::move(rec1)); + ContinuationRecord rec2{ContinuationRecord::kResumeFromOther, obj, 0}; + stack_.emplace_back(std::move(rec2)); return result; - case UNCHANGED: - stack_.emplace_back(ContinuationRecord::kArray, array, i + 1); - stack_.emplace_back(ContinuationRecord::kResumeFromOther, obj, 0); + } + case UNCHANGED: { + ContinuationRecord rec1{ContinuationRecord::kArray, array, i + 1}; + stack_.emplace_back(std::move(rec1)); + ContinuationRecord rec2{ContinuationRecord::kResumeFromOther, obj, 0}; + stack_.emplace_back(std::move(rec2)); return result; + } default: return result; } @@ -2534,7 +2543,8 @@ FastJsonStringifierResult FastJsonStringifier::SerializeObject( if constexpr (is_one_byte) { if (result == CHANGE_ENCODING) { DCHECK(IsString(object)); - stack_.emplace_back(ContinuationRecord::kResumeFromOther, object, 0); + ContinuationRecord rec{ContinuationRecord::kResumeFromOther, object, 0}; + stack_.emplace_back(std::move(rec)); return result; } } else { diff --git a/deps/v8/src/maglev/maglev-ir.h b/deps/v8/src/maglev/maglev-ir.h index 3dcf8f7b7e3469..c404960b190efb 100644 --- a/deps/v8/src/maglev/maglev-ir.h +++ b/deps/v8/src/maglev/maglev-ir.h @@ -4025,7 +4025,7 @@ class CheckedNumberOrOddballToFloat64OrHoleyFloat64 private: using TaggedToFloat64ConversionTypeOffset = - Base::template NextBitField; + typename Base::template NextBitField; }; class CheckedNumberOrOddballToFloat64 diff --git a/deps/v8/src/objects/objects.h b/deps/v8/src/objects/objects.h index 711cd51e759dad..8ff9b13d287679 100644 --- a/deps/v8/src/objects/objects.h +++ b/deps/v8/src/objects/objects.h @@ -604,11 +604,11 @@ class Object : public AllStatic { ConvertToInteger(Isolate* isolate, HandleType input); template