WebKit Bugzilla
Attachment 362703 Details for
Bug 194936
: Remove unnecessary WTF:: prefixes in CachedTypes
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
Patch
bug-194936-20190222093926.patch (text/plain), 4.76 KB, created by
Tadeu Zagallo
on 2019-02-22 00:40:10 PST
(
hide
)
Description:
Patch
Filename:
MIME Type:
Creator:
Tadeu Zagallo
Created:
2019-02-22 00:40:10 PST
Size:
4.76 KB
patch
obsolete
>Subversion Revision: 241937 >diff --git a/Source/JavaScriptCore/ChangeLog b/Source/JavaScriptCore/ChangeLog >index 716beccc4c15d333cad04d69aa3a2bd92e341530..2c212dd8852421f0dadb6c8b8b6e9de5a2a0fdd4 100644 >--- a/Source/JavaScriptCore/ChangeLog >+++ b/Source/JavaScriptCore/ChangeLog >@@ -1,3 +1,22 @@ >+2019-02-22 Tadeu Zagallo <tzagallo@apple.com> >+ >+ Remove unnecessary WTF:: prefixes in CachedTypes >+ https://bugs.webkit.org/show_bug.cgi?id=194936 >+ >+ Reviewed by NOBODY (OOPS!). >+ >+ Cleanup unnecessary prefixes from Optional, roundUpToMultipleOf and >+ pageSize. >+ >+ * runtime/CachedTypes.cpp: >+ (JSC::Encoder::cachedOffsetForPtr): >+ (JSC::Encoder::Page::malloc): >+ (JSC::Encoder::allocateNewPage): >+ (JSC::CachedPtr::encode): >+ (JSC::CachedPtr::decode const): >+ (JSC::CachedOptional::encode): >+ (JSC::CachedOptional::decode const): >+ > 2019-02-19 Tadeu Zagallo <tzagallo@apple.com> > > Cache CompactVariableMap::Handle instead of VariableEnvironment for UnlinkedFunctionExecutable >diff --git a/Source/JavaScriptCore/runtime/CachedTypes.cpp b/Source/JavaScriptCore/runtime/CachedTypes.cpp >index 063efa9d0eabef2d62804100d8091c64f55a14dd..a87adc7ccb7ec4607061c763f3b433220fd04431 100644 >--- a/Source/JavaScriptCore/runtime/CachedTypes.cpp >+++ b/Source/JavaScriptCore/runtime/CachedTypes.cpp >@@ -127,7 +127,7 @@ public: > m_ptrToOffsetMap.add(ptr, offset); > } > >- WTF::Optional<ptrdiff_t> cachedOffsetForPtr(const void* ptr) >+ Optional<ptrdiff_t> cachedOffsetForPtr(const void* ptr) > { > auto it = m_ptrToOffsetMap.find(ptr); > if (it == m_ptrToOffsetMap.end()) >@@ -161,8 +161,8 @@ private: > bool malloc(size_t size, ptrdiff_t& result) > { > size_t alignment = std::min(alignof(std::max_align_t), static_cast<size_t>(WTF::roundUpToPowerOfTwo(size))); >- ptrdiff_t offset = WTF::roundUpToMultipleOf(alignment, m_offset); >- size = WTF::roundUpToMultipleOf(alignment, size); >+ ptrdiff_t offset = roundUpToMultipleOf(alignment, m_offset); >+ size = roundUpToMultipleOf(alignment, size); > if (static_cast<size_t>(offset + size) > m_capacity) > return false; > >@@ -192,13 +192,13 @@ private: > > void allocateNewPage(size_t size = 0) > { >- static size_t minPageSize = WTF::pageSize(); >+ static size_t minPageSize = pageSize(); > if (m_currentPage) > m_baseOffset += m_currentPage->size(); > if (size < minPageSize) > size = minPageSize; > else >- size = WTF::roundUpToMultipleOf(minPageSize, size); >+ size = roundUpToMultipleOf(minPageSize, size); > m_pages.append(Page { size }); > m_currentPage = &m_pages.last(); > } >@@ -245,7 +245,7 @@ public: > m_offsetToPtrMap.add(offset, ptr); > } > >- WTF::Optional<void*> cachedPtrForOffset(ptrdiff_t offset) >+ Optional<void*> cachedPtrForOffset(ptrdiff_t offset) > { > auto it = m_offsetToPtrMap.find(offset); > if (it == m_offsetToPtrMap.end()) >@@ -377,7 +377,7 @@ public: > if (m_isEmpty) > return; > >- if (WTF::Optional<ptrdiff_t> offset = encoder.cachedOffsetForPtr(src)) { >+ if (Optional<ptrdiff_t> offset = encoder.cachedOffsetForPtr(src)) { > this->m_offset = *offset - encoder.offsetOf(&this->m_offset); > return; > } >@@ -396,7 +396,7 @@ public: > } > > ptrdiff_t bufferOffset = decoder.offsetOf(this->buffer()); >- if (WTF::Optional<void*> ptr = decoder.cachedPtrForOffset(bufferOffset)) { >+ if (Optional<void*> ptr = decoder.cachedPtrForOffset(bufferOffset)) { > isNewAllocation = false; > return reinterpret_cast<Source*>(*ptr); > } >@@ -689,9 +689,9 @@ private: > }; > > template<typename T> >-class CachedOptional : public VariableLengthObject<WTF::Optional<SourceType<T>>> { >+class CachedOptional : public VariableLengthObject<Optional<SourceType<T>>> { > public: >- void encode(Encoder& encoder, const WTF::Optional<SourceType<T>>& source) >+ void encode(Encoder& encoder, const Optional<SourceType<T>>& source) > { > m_isEmpty = !source; > >@@ -701,7 +701,7 @@ public: > this->template allocate<T>(encoder)->encode(encoder, *source); > } > >- WTF::Optional<SourceType<T>> decode(Decoder& decoder) const >+ Optional<SourceType<T>> decode(Decoder& decoder) const > { > if (m_isEmpty) > return WTF::nullopt; >@@ -709,7 +709,7 @@ public: > return { this->template buffer<T>()->decode(decoder) }; > } > >- void decode(Decoder& decoder, WTF::Optional<SourceType<T>>& dst) const >+ void decode(Decoder& decoder, Optional<SourceType<T>>& dst) const > { > dst = decode(decoder); > }
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Formatted Diff
|
Diff
Attachments on
bug 194936
:
362703
|
362906