Diff
Modified: branches/safari-613.1.8-branch/Source/_javascript_Core/ChangeLog (285552 => 285553)
--- branches/safari-613.1.8-branch/Source/_javascript_Core/ChangeLog 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Source/_javascript_Core/ChangeLog 2021-11-10 02:44:31 UTC (rev 285553)
@@ -1,3 +1,33 @@
+2021-11-09 Alan Coon <[email protected]>
+
+ Cherry-pick r285538. rdar://problem/85234466
+
+ Unreviewed, reverting r285246.
+ https://bugs.webkit.org/show_bug.cgi?id=232907
+
+ Broke FixedVector
+
+ Reverted changeset:
+
+ "[JSC] Clean up StructureStubInfo initialization"
+ https://bugs.webkit.org/show_bug.cgi?id=232652
+ https://commits.webkit.org/r285246
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-11-09 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r285246.
+ https://bugs.webkit.org/show_bug.cgi?id=232907
+
+ Broke FixedVector
+
+ Reverted changeset:
+
+ "[JSC] Clean up StructureStubInfo initialization"
+ https://bugs.webkit.org/show_bug.cgi?id=232652
+ https://commits.webkit.org/r285246
+
2021-11-05 Russell Epstein <[email protected]>
Cherry-pick r284635. rdar://problem/85039977
Modified: branches/safari-613.1.8-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp (285552 => 285553)
--- branches/safari-613.1.8-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Source/_javascript_Core/bytecode/CodeBlock.cpp 2021-11-10 02:44:31 UTC (rev 285553)
@@ -782,7 +782,7 @@
RELEASE_ASSERT(jitData.m_jitConstantPool.isEmpty());
jitData.m_jitConstantPool = FixedVector<void*>(jitCode->m_constantPool.size());
- jitData.m_stubInfos = FixedVector<StructureStubInfo>(jitCode->m_unlinkedStubInfos);
+ jitData.m_stubInfos = FixedVector<StructureStubInfo>(jitCode->m_unlinkedStubInfos.size());
jitData.m_callLinkInfos = FixedVector<CallLinkInfo>(jitCode->m_unlinkedCalls.size());
for (size_t i = 0; i < jitCode->m_constantPool.size(); ++i) {
auto entry = jitCode->m_constantPool.at(i);
@@ -800,7 +800,9 @@
}
case JITConstantPool::Type::StructureStubInfo: {
unsigned index = bitwise_cast<uintptr_t>(entry.pointer());
+ UnlinkedStructureStubInfo& unlinkedStubInfo = jitCode->m_unlinkedStubInfos[index];
StructureStubInfo& stubInfo = jitData.m_stubInfos[index];
+ stubInfo.initializeFromUnlinkedStructureStubInfo(this, unlinkedStubInfo);
jitData.m_jitConstantPool[i] = &stubInfo;
break;
}
Modified: branches/safari-613.1.8-branch/Source/_javascript_Core/bytecode/StructureStubInfo.cpp (285552 => 285553)
--- branches/safari-613.1.8-branch/Source/_javascript_Core/bytecode/StructureStubInfo.cpp 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Source/_javascript_Core/bytecode/StructureStubInfo.cpp 2021-11-10 02:44:31 UTC (rev 285553)
@@ -415,13 +415,14 @@
m_cacheType = newCacheType;
}
-StructureStubInfo::StructureStubInfo(const UnlinkedStructureStubInfo& unlinkedStubInfo)
- : StructureStubInfo(unlinkedStubInfo.accessType, CodeOrigin(unlinkedStubInfo.bytecodeIndex))
+void StructureStubInfo::initializeFromUnlinkedStructureStubInfo(CodeBlock*, UnlinkedStructureStubInfo& unlinkedStubInfo)
{
+ accessType = unlinkedStubInfo.accessType;
start = unlinkedStubInfo.start;
doneLocation = unlinkedStubInfo.doneLocation;
slowPathStartLocation = unlinkedStubInfo.slowPathStartLocation;
callSiteIndex = CallSiteIndex(BytecodeIndex(unlinkedStubInfo.bytecodeIndex.offset()));
+ codeOrigin = CodeOrigin(unlinkedStubInfo.bytecodeIndex);
m_codePtr = slowPathStartLocation;
propertyIsInt32 = unlinkedStubInfo.propertyIsInt32;
Modified: branches/safari-613.1.8-branch/Source/_javascript_Core/bytecode/StructureStubInfo.h (285552 => 285553)
--- branches/safari-613.1.8-branch/Source/_javascript_Core/bytecode/StructureStubInfo.h 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Source/_javascript_Core/bytecode/StructureStubInfo.h 2021-11-10 02:44:31 UTC (rev 285553)
@@ -103,7 +103,9 @@
regs.thisGPR = InvalidGPRReg;
}
- StructureStubInfo(const UnlinkedStructureStubInfo& unlinkedStubInfo);
+ StructureStubInfo()
+ : StructureStubInfo(AccessType::GetById, { })
+ { }
~StructureStubInfo();
@@ -120,6 +122,8 @@
void deref();
void aboutToDie();
+ void initializeFromUnlinkedStructureStubInfo(CodeBlock*, UnlinkedStructureStubInfo&);
+
DECLARE_VISIT_AGGREGATE;
// Check if the stub has weak references that are dead. If it does, then it resets itself,
Modified: branches/safari-613.1.8-branch/Source/_javascript_Core/jit/JIT.cpp (285552 => 285553)
--- branches/safari-613.1.8-branch/Source/_javascript_Core/jit/JIT.cpp 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Source/_javascript_Core/jit/JIT.cpp 2021-11-10 02:44:31 UTC (rev 285553)
@@ -1007,9 +1007,13 @@
MacroAssemblerCodePtr<JSEntryPtrTag> withArityCheck = patchBuffer.locationOf<JSEntryPtrTag>(m_arityCheck);
m_jitCode = adoptRef(*new BaselineJITCode(result, withArityCheck));
- m_jitCode->m_unlinkedCalls = WTFMove(m_unlinkedCalls);
+ m_jitCode->m_unlinkedCalls = FixedVector<UnlinkedCallLinkInfo>(m_unlinkedCalls.size());
+ if (m_jitCode->m_unlinkedCalls.size())
+ std::move(m_unlinkedCalls.begin(), m_unlinkedCalls.end(), m_jitCode->m_unlinkedCalls.begin());
m_jitCode->m_evalCallLinkInfos = WTFMove(m_evalCallLinkInfos);
- m_jitCode->m_unlinkedStubInfos = WTFMove(m_unlinkedStubInfos);
+ m_jitCode->m_unlinkedStubInfos = FixedVector<UnlinkedStructureStubInfo>(m_unlinkedStubInfos.size());
+ if (m_jitCode->m_unlinkedStubInfos.size())
+ std::move(m_unlinkedStubInfos.begin(), m_unlinkedStubInfos.end(), m_jitCode->m_unlinkedStubInfos.begin());
m_jitCode->m_switchJumpTables = WTFMove(m_switchJumpTables);
m_jitCode->m_stringSwitchJumpTables = WTFMove(m_stringSwitchJumpTables);
m_jitCode->m_jitCodeMap = jitCodeMapBuilder.finalize();
Modified: branches/safari-613.1.8-branch/Source/WTF/ChangeLog (285552 => 285553)
--- branches/safari-613.1.8-branch/Source/WTF/ChangeLog 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Source/WTF/ChangeLog 2021-11-10 02:44:31 UTC (rev 285553)
@@ -1,3 +1,33 @@
+2021-11-09 Alan Coon <[email protected]>
+
+ Cherry-pick r285538. rdar://problem/85234466
+
+ Unreviewed, reverting r285246.
+ https://bugs.webkit.org/show_bug.cgi?id=232907
+
+ Broke FixedVector
+
+ Reverted changeset:
+
+ "[JSC] Clean up StructureStubInfo initialization"
+ https://bugs.webkit.org/show_bug.cgi?id=232652
+ https://commits.webkit.org/r285246
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-11-09 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r285246.
+ https://bugs.webkit.org/show_bug.cgi?id=232907
+
+ Broke FixedVector
+
+ Reverted changeset:
+
+ "[JSC] Clean up StructureStubInfo initialization"
+ https://bugs.webkit.org/show_bug.cgi?id=232652
+ https://commits.webkit.org/r285246
+
2021-11-05 Alex Christensen <[email protected]>
Restructure WKContentRuleList Action storage during compilation and interpretation
Modified: branches/safari-613.1.8-branch/Source/WTF/wtf/FixedVector.h (285552 => 285553)
--- branches/safari-613.1.8-branch/Source/WTF/wtf/FixedVector.h 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Source/WTF/wtf/FixedVector.h 2021-11-10 02:44:31 UTC (rev 285553)
@@ -63,18 +63,30 @@
: m_storage(size)
{ }
- template<typename Container, std::enable_if_t<!std::is_integral_v<Container>, bool> = true>
- explicit FixedVector(Container&& other)
- : m_storage(std::forward<Container>(other))
+ template<size_t inlineCapacity, typename OverflowHandler>
+ explicit FixedVector(const Vector<T, inlineCapacity, OverflowHandler>& other)
+ : m_storage(other)
{ }
- template<typename Container, std::enable_if_t<!std::is_integral_v<Container>, bool> = true>
- FixedVector& operator=(Container&& other)
+ template<size_t inlineCapacity, typename OverflowHandler>
+ FixedVector& operator=(const Vector<T, inlineCapacity, OverflowHandler>& other)
{
- m_storage = std::forward<Container>(other);
+ m_storage = other;
return *this;
}
+ template<size_t inlineCapacity, typename OverflowHandler>
+ explicit FixedVector(Vector<T, inlineCapacity, OverflowHandler>&& other)
+ : m_storage(WTFMove(other))
+ { }
+
+ template<size_t inlineCapacity, typename OverflowHandler>
+ FixedVector& operator=(Vector<T, inlineCapacity, OverflowHandler>&& other)
+ {
+ m_storage = WTFMove(other);
+ return *this;
+ }
+
size_t size() const { return m_storage.size(); }
bool isEmpty() const { return m_storage.isEmpty(); }
size_t byteSize() const { return m_storage.byteSize(); }
Modified: branches/safari-613.1.8-branch/Source/WTF/wtf/RefCountedArray.h (285552 => 285553)
--- branches/safari-613.1.8-branch/Source/WTF/wtf/RefCountedArray.h 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Source/WTF/wtf/RefCountedArray.h 2021-11-10 02:44:31 UTC (rev 285553)
@@ -93,36 +93,32 @@
return result;
}
- template<typename Container, std::enable_if_t<!std::is_integral_v<Container>, bool> = true>
- explicit RefCountedArray(const Container& container)
+ template<size_t inlineCapacity, typename OverflowHandler>
+ explicit RefCountedArray(const Vector<T, inlineCapacity, OverflowHandler>& other)
{
- unsigned size = std::size(container);
- if (!size) {
+ if (other.isEmpty()) {
PtrTraits::exchange(m_data, nullptr);
return;
}
- T* data = ""
+ T* data = ""
m_data = data;
- VectorTypeOperations<T>::uninitializedCopy(std::begin(container), std::end(container), data);
+ VectorTypeOperations<T>::uninitializedCopy(other.begin(), other.end(), data);
}
- template<typename Container, std::enable_if_t<!std::is_integral_v<Container> && !std::is_lvalue_reference_v<Container>, bool> = true>
- explicit RefCountedArray(Container&& other)
+ template<size_t inlineCapacity, typename OverflowHandler>
+ explicit RefCountedArray(Vector<T, inlineCapacity, OverflowHandler>&& other)
{
- Container container(std::forward<Container>(other));
- unsigned size = std::size(container);
- if (!size) {
+ Vector<T, inlineCapacity, OverflowHandler> vector(WTFMove(other));
+ if (vector.isEmpty()) {
PtrTraits::exchange(m_data, nullptr);
return;
}
- T* data = ""
+ T* data = ""
m_data = data;
- auto iterator = std::begin(container);
- auto end = std::end(container);
- for (; iterator != end; ++iterator)
- new (data++) T(WTFMove(*iterator));
+ for (unsigned index = 0; index < vector.size(); ++index)
+ new (data + index) T(WTFMove(vector[index]));
}
template<typename OtherTraits = PtrTraits>
@@ -136,17 +132,16 @@
return assign<PtrTraits>(other);
}
- template<typename Container, typename = std::enable_if_t<!std::is_integral_v<Container>>>
- RefCountedArray& operator=(const Container& container)
+ template<size_t inlineCapacity, typename OverflowHandler>
+ RefCountedArray& operator=(const Vector<T, inlineCapacity, OverflowHandler>& other)
{
T* oldData = data();
- unsigned size = std::size(container);
- if (!size)
+ if (other.isEmpty())
PtrTraits::exchange(m_data, nullptr);
else {
- T* data = ""
+ T* data = ""
m_data = data;
- VectorTypeOperations<T>::uninitializedCopy(std::begin(container), std::end(container), data);
+ VectorTypeOperations<T>::uninitializedCopy(other.begin(), other.end(), data);
}
if (!oldData)
return *this;
@@ -161,21 +156,18 @@
return *this;
}
- template<typename Container, std::enable_if_t<!std::is_integral_v<Container> && !std::is_lvalue_reference_v<Container>, bool> = true>
- RefCountedArray& operator=(Container&& other)
+ template<size_t inlineCapacity, typename OverflowHandler>
+ RefCountedArray& operator=(Vector<T, inlineCapacity, OverflowHandler>&& other)
{
- Container container(std::forward<Container>(other));
+ Vector<T, inlineCapacity, OverflowHandler> vector(WTFMove(other));
T* oldData = data();
- unsigned size = std::size(container);
- if (!size)
+ if (vector.isEmpty())
PtrTraits::exchange(m_data, nullptr);
else {
- T* data = ""
+ T* data = ""
m_data = data;
- auto iterator = std::begin(container);
- auto end = std::end(container);
- for (; iterator != end; ++iterator)
- new (data++) T(WTFMove(*iterator));
+ for (unsigned index = 0; index < vector.size(); ++index)
+ new (data + index) T(WTFMove(vector[index]));
}
if (!oldData)
return *this;
Modified: branches/safari-613.1.8-branch/Source/WTF/wtf/SegmentedVector.h (285552 => 285553)
--- branches/safari-613.1.8-branch/Source/WTF/wtf/SegmentedVector.h 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Source/WTF/wtf/SegmentedVector.h 2021-11-10 02:44:31 UTC (rev 285553)
@@ -108,19 +108,7 @@
using iterator = Iterator;
SegmentedVector() = default;
- SegmentedVector(SegmentedVector&& other)
- : SegmentedVector()
- {
- swap(other);
- }
- SegmentedVector& operator=(SegmentedVector&& other)
- {
- SegmentedVector moved(WTFMove(other));
- swap(moved);
- return *this;
- }
-
~SegmentedVector()
{
deleteAllSegments();
@@ -233,12 +221,6 @@
m_segments.shrinkToFit();
}
- void swap(SegmentedVector& other)
- {
- std::swap(m_size, other.m_size);
- m_segments.swap(other.m_segments);
- }
-
private:
struct Segment {
#if COMPILER(MSVC)
Modified: branches/safari-613.1.8-branch/Source/WTF/wtf/Vector.h (285552 => 285553)
--- branches/safari-613.1.8-branch/Source/WTF/wtf/Vector.h 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Source/WTF/wtf/Vector.h 2021-11-10 02:44:31 UTC (rev 285553)
@@ -163,8 +163,8 @@
template<typename T>
struct VectorCopier<false, T>
{
- template<typename InputIterator, typename U>
- static void uninitializedCopy(InputIterator src, InputIterator srcEnd, U* dst)
+ template<typename U>
+ static void uninitializedCopy(const T* src, const T* srcEnd, U* dst)
{
while (src != srcEnd) {
new (NotNull, dst) U(*src);
@@ -181,8 +181,8 @@
{
memcpy(static_cast<void*>(dst), static_cast<void*>(const_cast<T*>(src)), reinterpret_cast<const char*>(srcEnd) - reinterpret_cast<const char*>(src));
}
- template<typename InputIterator, typename U>
- static void uninitializedCopy(InputIterator src, InputIterator srcEnd, U* dst)
+ template<typename U>
+ static void uninitializedCopy(const T* src, const T* srcEnd, U* dst)
{
VectorCopier<false, T>::uninitializedCopy(src, srcEnd, dst);
}
@@ -265,8 +265,7 @@
VectorMover<VectorTraits<T>::canMoveWithMemcpy, T>::moveOverlapping(src, srcEnd, dst);
}
- template<typename InputIterator>
- static void uninitializedCopy(InputIterator src, InputIterator srcEnd, T* dst)
+ static void uninitializedCopy(const T* src, const T* srcEnd, T* dst)
{
VectorCopier<VectorTraits<T>::canCopyWithMemcpy, T>::uninitializedCopy(src, srcEnd, dst);
}
Modified: branches/safari-613.1.8-branch/Source/WebCore/ChangeLog (285552 => 285553)
--- branches/safari-613.1.8-branch/Source/WebCore/ChangeLog 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Source/WebCore/ChangeLog 2021-11-10 02:44:31 UTC (rev 285553)
@@ -1,3 +1,33 @@
+2021-11-09 Alan Coon <[email protected]>
+
+ Cherry-pick r285538. rdar://problem/85234466
+
+ Unreviewed, reverting r285246.
+ https://bugs.webkit.org/show_bug.cgi?id=232907
+
+ Broke FixedVector
+
+ Reverted changeset:
+
+ "[JSC] Clean up StructureStubInfo initialization"
+ https://bugs.webkit.org/show_bug.cgi?id=232652
+ https://commits.webkit.org/r285246
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-11-09 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r285246.
+ https://bugs.webkit.org/show_bug.cgi?id=232907
+
+ Broke FixedVector
+
+ Reverted changeset:
+
+ "[JSC] Clean up StructureStubInfo initialization"
+ https://bugs.webkit.org/show_bug.cgi?id=232652
+ https://commits.webkit.org/r285246
+
2021-11-08 Russell Epstein <[email protected]>
Cherry-pick r285417. rdar://problem/85181578
Modified: branches/safari-613.1.8-branch/Source/WebCore/inspector/InspectorOverlay.cpp (285552 => 285553)
--- branches/safari-613.1.8-branch/Source/WebCore/inspector/InspectorOverlay.cpp 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Source/WebCore/inspector/InspectorOverlay.cpp 2021-11-10 02:44:31 UTC (rev 285553)
@@ -1207,7 +1207,7 @@
FontCascade InspectorOverlay::fontForLayoutLabel()
{
FontCascadeDescription fontDescription;
- fontDescription.setFamilies(Vector<AtomString> { "system-ui" });
+ fontDescription.setFamilies({ "system-ui" });
fontDescription.setWeight(FontSelectionValue(500));
fontDescription.setComputedSize(12);
Modified: branches/safari-613.1.8-branch/Tools/ChangeLog (285552 => 285553)
--- branches/safari-613.1.8-branch/Tools/ChangeLog 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Tools/ChangeLog 2021-11-10 02:44:31 UTC (rev 285553)
@@ -1,3 +1,33 @@
+2021-11-09 Alan Coon <[email protected]>
+
+ Cherry-pick r285538. rdar://problem/85234466
+
+ Unreviewed, reverting r285246.
+ https://bugs.webkit.org/show_bug.cgi?id=232907
+
+ Broke FixedVector
+
+ Reverted changeset:
+
+ "[JSC] Clean up StructureStubInfo initialization"
+ https://bugs.webkit.org/show_bug.cgi?id=232652
+ https://commits.webkit.org/r285246
+
+ git-svn-id: https://svn.webkit.org/repository/webkit/trunk@285538 268f45cc-cd09-0410-ab3c-d52691b4dbfc
+
+ 2021-11-09 Commit Queue <[email protected]>
+
+ Unreviewed, reverting r285246.
+ https://bugs.webkit.org/show_bug.cgi?id=232907
+
+ Broke FixedVector
+
+ Reverted changeset:
+
+ "[JSC] Clean up StructureStubInfo initialization"
+ https://bugs.webkit.org/show_bug.cgi?id=232652
+ https://commits.webkit.org/r285246
+
2021-11-05 Ryan Haddad <[email protected]>
[steps.py] Update macOS versions in build_to_name_mapping
Modified: branches/safari-613.1.8-branch/Tools/TestWebKitAPI/Tests/WTF/FixedVector.cpp (285552 => 285553)
--- branches/safari-613.1.8-branch/Tools/TestWebKitAPI/Tests/WTF/FixedVector.cpp 2021-11-10 01:57:55 UTC (rev 285552)
+++ branches/safari-613.1.8-branch/Tools/TestWebKitAPI/Tests/WTF/FixedVector.cpp 2021-11-10 02:44:31 UTC (rev 285553)
@@ -171,81 +171,6 @@
EXPECT_EQ(vec2[index].value(), index);
}
-template<typename T>
-class NoncopyableVector : public Vector<T> {
- WTF_MAKE_NONCOPYABLE(NoncopyableVector);
-public:
- NoncopyableVector() = default;
- NoncopyableVector(NoncopyableVector&&) = default;
- NoncopyableVector& operator=(NoncopyableVector&&) = default;
-};
-
-TEST(WTF_FixedVector, MoveContainer)
-{
- NoncopyableVector<MoveOnly> vec1;
- vec1.constructAndAppend(0);
- vec1.constructAndAppend(1);
- vec1.constructAndAppend(2);
- vec1.constructAndAppend(3);
- EXPECT_EQ(vec1.size(), 4U);
- FixedVector<MoveOnly> vec2(WTFMove(vec1));
- EXPECT_EQ(vec1.size(), 0U);
- EXPECT_EQ(vec2.size(), 4U);
- for (unsigned index = 0; index < vec2.size(); ++index)
- EXPECT_EQ(vec2[index].value(), index);
-}
-
-TEST(WTF_FixedVector, MoveAssignContainer)
-{
- FixedVector<MoveOnly> vec2;
- {
- NoncopyableVector<MoveOnly> vec1;
- vec1.constructAndAppend(0);
- vec1.constructAndAppend(1);
- vec1.constructAndAppend(2);
- vec1.constructAndAppend(3);
- EXPECT_EQ(vec1.size(), 4U);
- vec2 = WTFMove(vec1);
- EXPECT_EQ(vec1.size(), 0U);
- }
- EXPECT_EQ(vec2.size(), 4U);
- for (unsigned index = 0; index < vec2.size(); ++index)
- EXPECT_EQ(vec2[index].value(), index);
-}
-
-TEST(WTF_FixedVector, ReferenceContainer)
-{
- NoncopyableVector<unsigned> vec1;
- vec1.constructAndAppend(0);
- vec1.constructAndAppend(1);
- vec1.constructAndAppend(2);
- vec1.constructAndAppend(3);
- EXPECT_EQ(vec1.size(), 4U);
- FixedVector<unsigned> vec2(vec1);
- EXPECT_EQ(vec1.size(), 4U);
- EXPECT_EQ(vec2.size(), 4U);
- for (unsigned index = 0; index < vec2.size(); ++index)
- EXPECT_EQ(vec2[index], index);
-}
-
-TEST(WTF_FixedVector, ReferenceAssignContainer)
-{
- FixedVector<unsigned> vec2;
- {
- NoncopyableVector<unsigned> vec1;
- vec1.constructAndAppend(0);
- vec1.constructAndAppend(1);
- vec1.constructAndAppend(2);
- vec1.constructAndAppend(3);
- EXPECT_EQ(vec1.size(), 4U);
- vec2 = vec1;
- EXPECT_EQ(vec1.size(), 4U);
- }
- EXPECT_EQ(vec2.size(), 4U);
- for (unsigned index = 0; index < vec2.size(); ++index)
- EXPECT_EQ(vec2[index], index);
-}
-
TEST(WTF_FixedVector, Swap)
{
FixedVector<unsigned> vec1(3);