docstring_tokens
stringlengths 18
16.9k
| code_tokens
stringlengths 75
1.81M
| html_url
stringlengths 74
116
| file_name
stringlengths 3
311
|
---|---|---|---|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask>
<mask> // next valid node as in the linked list
<mask> SkipListNode* next() {
<mask> SkipListNode* node;
<mask> for (node = skip(0);
<mask> (node != nullptr && node->markedForRemoval());
<mask> node = node->skip(0)) {}
<mask> return node;
<mask> }
<mask>
<mask> void setSkip(uint8_t h, SkipListNode* next) {
<mask> DCHECK_LT(h, height_);
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeType* lower_bound(const value_type &data) const {
</s> add NodeType* lower_bound(const value_type& data) const { </s> remove if (node) pred = node;
</s> add if (node) {
pred = node;
} </s> remove return pred == head_.load(std::memory_order_relaxed)
? nullptr : &pred->data();
</s> add return pred == head_.load(std::memory_order_relaxed) ? nullptr
: &pred->data(); </s> remove for (int i = 0; i < node->height_; ++i) {
</s> add for (uint8_t i = 0; i < node->height_; ++i) { </s> remove new (node) SkipListNode(height, std::forward<U>(data), isHead);
return node;
</s> add return new (storage)
SkipListNode(uint8_t(height), std::forward<U>(data), isHead); </s> remove template<typename NodeAlloc>
static constexpr bool destroyIsNoOp() {
return IsArenaAllocator<NodeAlloc>::value &&
boost::has_trivial_destructor<SkipListNode>::value;
}
</s> add template <typename NodeAlloc>
struct DestroyIsNoOp : StrictConjunction<
AllocatorHasTrivialDeallocate<NodeAlloc>,
boost::has_trivial_destructor<SkipListNode>> {};
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask> DCHECK_LT(h, height_);
<mask> skip_[h].store(next, std::memory_order_release);
<mask> }
<mask>
<mask> value_type& data() { return data_; }
<mask> const value_type& data() const { return data_; }
<mask> int maxLayer() const { return height_ - 1; }
<mask> int height() const { return height_; }
<mask>
<mask> std::unique_lock<MicroSpinLock> acquireGuard() {
<mask> return std::unique_lock<MicroSpinLock>(spinLock_);
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove int maxLayer() const { return height() - 1; }
</s> add int maxLayer() const {
return height() - 1;
} </s> remove bool fullyLinked() const { return getFlags() & FULLY_LINKED; }
bool markedForRemoval() const { return getFlags() & MARKED_FOR_REMOVAL; }
bool isHeadNode() const { return getFlags() & IS_HEAD_NODE; }
</s> add bool fullyLinked() const {
return getFlags() & FULLY_LINKED;
}
bool markedForRemoval() const {
return getFlags() & MARKED_FOR_REMOVAL;
}
bool isHeadNode() const {
return getFlags() & IS_HEAD_NODE;
} </s> remove int maxLayer() const { return headHeight_ - 1; }
</s> add int maxLayer() const {
return headHeight_ - 1;
} </s> remove bool good() const { return succs_[0] != nullptr; }
</s> add bool good() const {
return succs_[0] != nullptr;
} </s> remove iterator begin() { return data(); }
iterator end() { return data() + size(); }
const_iterator begin() const { return data(); }
const_iterator end() const { return data() + size(); }
const_iterator cbegin() const { return begin(); }
const_iterator cend() const { return end(); }
</s> add iterator begin() {
return data();
}
iterator end() {
return data() + size();
}
const_iterator begin() const {
return data();
}
const_iterator end() const {
return data() + size();
}
const_iterator cbegin() const {
return begin();
}
const_iterator cend() const {
return end();
} </s> remove const Char * data() const {
</s> add const Char* data() const {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep keep replace replace replace keep keep replace keep
|
<mask> return std::unique_lock<MicroSpinLock>(spinLock_);
<mask> }
<mask>
<mask> bool fullyLinked() const { return getFlags() & FULLY_LINKED; }
<mask> bool markedForRemoval() const { return getFlags() & MARKED_FOR_REMOVAL; }
<mask> bool isHeadNode() const { return getFlags() & IS_HEAD_NODE; }
<mask>
<mask> void setIsHeadNode() {
<mask> setFlags(getFlags() | IS_HEAD_NODE);
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove setFlags(getFlags() | FULLY_LINKED);
</s> add setFlags(uint16_t(getFlags() | FULLY_LINKED)); </s> remove template <class T>
T* pointerFlagSet(T* p) {
return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p) | 1);
}
template <class T>
bool pointerFlagGet(T* p) {
return reinterpret_cast<uintptr_t>(p) & 1;
}
template <class T>
T* pointerFlagClear(T* p) {
return reinterpret_cast<T*>(
reinterpret_cast<uintptr_t>(p) & ~uintptr_t(1));
}
inline void* shiftPointer(void* p, size_t sizeBytes) {
return static_cast<char*>(p) + sizeBytes;
}
</s> add template <class T>
T* pointerFlagSet(T* p) {
return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p) | 1);
}
template <class T>
bool pointerFlagGet(T* p) {
return reinterpret_cast<uintptr_t>(p) & 1;
}
template <class T>
T* pointerFlagClear(T* p) {
return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p) & ~uintptr_t(1));
}
inline void* shiftPointer(void* p, size_t sizeBytes) {
return static_cast<char*>(p) + sizeBytes; </s> remove private:
</s> add private: </s> remove template<class SizeType, bool ShouldUseHeap>
struct IntegralSizePolicy {
typedef SizeType InternalSizeType;
IntegralSizePolicy() : size_(0) {}
protected:
static constexpr std::size_t policyMaxSize() {
return SizeType(~kExternMask);
}
std::size_t doSize() const {
return size_ & ~kExternMask;
}
std::size_t isExtern() const {
return kExternMask & size_;
}
void setExtern(bool b) {
if (b) {
size_ |= kExternMask;
} else {
size_ &= ~kExternMask;
}
}
void setSize(std::size_t sz) {
assert(sz <= policyMaxSize());
size_ = (kExternMask & size_) | SizeType(sz);
}
void swapSizePolicy(IntegralSizePolicy& o) {
std::swap(size_, o.size_);
}
protected:
static bool const kShouldUseHeap = ShouldUseHeap;
private:
static SizeType const kExternMask =
kShouldUseHeap ? SizeType(1) << (sizeof(SizeType) * 8 - 1)
: 0;
</s> add template <class SizeType>
struct IntegralSizePolicy<SizeType, false>
: public IntegralSizePolicyBase<SizeType, false> {
public:
template <class T>
void moveToUninitialized(T* /*first*/, T* /*last*/, T* /*out*/) {
assume_unreachable();
}
template <class T, class EmplaceFunc>
void moveToUninitializedEmplace(
T* /* begin */,
T* /* end */,
T* /* out */,
SizeType /* pos */,
EmplaceFunc&& /* emplaceFunc */) {
assume_unreachable();
}
}; </s> remove const Char * data() const {
</s> add const Char* data() const {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep keep keep replace keep keep replace keep keep
|
<mask> void setIsHeadNode() {
<mask> setFlags(getFlags() | IS_HEAD_NODE);
<mask> }
<mask> void setFullyLinked() {
<mask> setFlags(getFlags() | FULLY_LINKED);
<mask> }
<mask> void setMarkedForRemoval() {
<mask> setFlags(getFlags() | MARKED_FOR_REMOVAL);
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove setFlags(getFlags() | IS_HEAD_NODE);
</s> add setFlags(uint16_t(getFlags() | IS_HEAD_NODE)); </s> remove bool fullyLinked() const { return getFlags() & FULLY_LINKED; }
bool markedForRemoval() const { return getFlags() & MARKED_FOR_REMOVAL; }
bool isHeadNode() const { return getFlags() & IS_HEAD_NODE; }
</s> add bool fullyLinked() const {
return getFlags() & FULLY_LINKED;
}
bool markedForRemoval() const {
return getFlags() & MARKED_FOR_REMOVAL;
}
bool isHeadNode() const {
return getFlags() & IS_HEAD_NODE;
} </s> remove template <class T>
T* pointerFlagSet(T* p) {
return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p) | 1);
}
template <class T>
bool pointerFlagGet(T* p) {
return reinterpret_cast<uintptr_t>(p) & 1;
}
template <class T>
T* pointerFlagClear(T* p) {
return reinterpret_cast<T*>(
reinterpret_cast<uintptr_t>(p) & ~uintptr_t(1));
}
inline void* shiftPointer(void* p, size_t sizeBytes) {
return static_cast<char*>(p) + sizeBytes;
}
</s> add template <class T>
T* pointerFlagSet(T* p) {
return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p) | 1);
}
template <class T>
bool pointerFlagGet(T* p) {
return reinterpret_cast<uintptr_t>(p) & 1;
}
template <class T>
T* pointerFlagClear(T* p) {
return reinterpret_cast<T*>(reinterpret_cast<uintptr_t>(p) & ~uintptr_t(1));
}
inline void* shiftPointer(void* p, size_t sizeBytes) {
return static_cast<char*>(p) + sizeBytes; </s> remove return kIsLittleEndian
? capacity_ & capacityExtractMask
: capacity_ >> 2;
</s> add return kIsLittleEndian ? capacity_ & capacityExtractMask : capacity_ >> 2; </s> remove template<class SizeType, bool ShouldUseHeap>
struct IntegralSizePolicy {
typedef SizeType InternalSizeType;
IntegralSizePolicy() : size_(0) {}
protected:
static constexpr std::size_t policyMaxSize() {
return SizeType(~kExternMask);
}
std::size_t doSize() const {
return size_ & ~kExternMask;
}
std::size_t isExtern() const {
return kExternMask & size_;
}
void setExtern(bool b) {
if (b) {
size_ |= kExternMask;
} else {
size_ &= ~kExternMask;
}
}
void setSize(std::size_t sz) {
assert(sz <= policyMaxSize());
size_ = (kExternMask & size_) | SizeType(sz);
}
void swapSizePolicy(IntegralSizePolicy& o) {
std::swap(size_, o.size_);
}
protected:
static bool const kShouldUseHeap = ShouldUseHeap;
private:
static SizeType const kExternMask =
kShouldUseHeap ? SizeType(1) << (sizeof(SizeType) * 8 - 1)
: 0;
</s> add template <class SizeType>
struct IntegralSizePolicy<SizeType, false>
: public IntegralSizePolicyBase<SizeType, false> {
public:
template <class T>
void moveToUninitialized(T* /*first*/, T* /*last*/, T* /*out*/) {
assume_unreachable();
}
template <class T, class EmplaceFunc>
void moveToUninitializedEmplace(
T* /* begin */,
T* /* end */,
T* /* out */,
SizeType /* pos */,
EmplaceFunc&& /* emplaceFunc */) {
assume_unreachable();
}
};
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep replace replace replace keep keep replace keep keep keep
|
<mask> // Note! this can only be called from create() as a placement new.
<mask> template<typename U>
<mask> SkipListNode(uint8_t height, U&& data, bool isHead) :
<mask> height_(height), data_(std::forward<U>(data)) {
<mask> spinLock_.init();
<mask> setFlags(0);
<mask> if (isHead) setIsHeadNode();
<mask> // need to explicitly init the dynamic atomic pointer array
<mask> for (uint8_t i = 0; i < height_; ++i) {
<mask> new (&skip_[i]) std::atomic<SkipListNode*>(nullptr);
</s> [sdk33] Update iOS with RN 0.59 </s> remove setFlags(getFlags() | MARKED_FOR_REMOVAL);
</s> add setFlags(uint16_t(getFlags() | MARKED_FOR_REMOVAL)); </s> remove for (int i = 0; i < node->height_; ++i) {
</s> add for (uint8_t i = 0; i < node->height_; ++i) { </s> remove for (std::size_t i = 0; i < idx; ++i) {
mem[i].~T();
</s> add for (SizeType i = 0; i <= pos; ++i) {
out[i].~T(); </s> remove for (size_t i = 0; i < n; ++i) {
op(&mem[idx]);
++idx;
</s> add if (begin + pos < end) {
this->moveToUninitialized(begin + pos, end, out + pos + 1); </s> remove hints_[i] = i + 1;
</s> add hints_[i] = uint8_t(i + 1);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> class SkipListRandomHeight {
<mask> enum { kMaxHeight = 64 };
<mask> public:
<mask> // make it a singleton.
<mask> static SkipListRandomHeight *instance() {
<mask> static SkipListRandomHeight instance_;
<mask> return &instance_;
<mask> }
<mask>
<mask> int getHeight(int maxHeight) const {
</s> [sdk33] Update iOS with RN 0.59 </s> remove static T& get() { return instance(); }
</s> add static T& get() {
return instance();
}
static void make_mock(std::nullptr_t /* c */ = nullptr) {
make_mock([]() { return new T; });
}
static void make_mock(CreateFunc createFunc) {
if (createFunc == nullptr) {
detail::singletonThrowNullCreator(typeid(T));
}
auto& entry = entryInstance();
if (entry.ptr) {
// Make sure existing pointer doesn't get reported as a leak by LSAN.
entry.leakedPtrs.push_back(std::exchange(entry.ptr, nullptr));
}
entry.createFunc = createFunc;
entry.state = State::Dead;
} </s> remove ~SubprocessSpawnError() throw() = default;
const char* what() const throw() override { return what_.c_str(); }
int errnoValue() const { return errnoValue_; }
</s> add ~SubprocessSpawnError() throw() override = default;
int errnoValue() const {
return errnoValue_;
} </s> remove static std::shared_ptr<SkipListType> createInstance(int height,
const NodeAlloc& alloc) {
</s> add static std::shared_ptr<SkipListType> createInstance(
int height,
const NodeAlloc& alloc) { </s> remove }
</s> add } // namespace detail </s> remove /*
* g++ doesn't allow you to bind a non-const reference to a member
* of a packed structure, presumably because it would make it too
* easy to accidentally make an unaligned memory access?
*/
template<class T> static T& unpackHack(T* p) {
return *p;
}
</s> add </s> remove static bool less(const value_type &data, const NodeType *node) {
</s> add static bool less(const value_type& data, const NodeType* node) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> return sizeLimitTable_[height];
<mask> }
<mask>
<mask> private:
<mask> SkipListRandomHeight() { initLookupTable(); }
<mask>
<mask> void initLookupTable() {
<mask> // set skip prob = 1/E
<mask> static const double kProbInv = exp(1);
<mask> static const double kProb = 1.0 / kProbInv;
</s> [sdk33] Update iOS with RN 0.59 </s> remove /**
* Returns the current time in seconds since Epoch.
*/
static double defaultClockNow() noexcept(noexcept(Impl::defaultClockNow())) {
return Impl::defaultClockNow();
}
</s> add </s> remove /**
* Returns the current time in seconds since Epoch.
*/
static double defaultClockNow() noexcept(noexcept(ClockT::timeSinceEpoch())) {
return std::chrono::duration_cast<std::chrono::duration<double>>(
ClockT::timeSinceEpoch())
.count();
}
</s> add </s> remove double availTokens = available(nowInSeconds);
</s> add const double availTokens = available(nowInSeconds); </s> remove static void incrementRefs(Char * p) {
</s> add static void incrementRefs(Char* p) { </s> remove static bool greater(const value_type &data, const NodeType *node) {
</s> add static bool greater(const value_type& data, const NodeType* node) { </s> remove private:
</s> add private:
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> for (int i = 1; i < kMaxHeight - 1; ++i) {
<mask> p *= kProb;
<mask> sizeLimit *= kProbInv;
<mask> lookupTable_[i] = lookupTable_[i - 1] + p;
<mask> sizeLimitTable_[i] = sizeLimit > kMaxSizeLimit ?
<mask> kMaxSizeLimit :
<mask> static_cast<size_t>(sizeLimit);
<mask> }
<mask> lookupTable_[kMaxHeight - 1] = 1;
<mask> sizeLimitTable_[kMaxHeight - 1] = kMaxSizeLimit;
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove hints_[i] = i + 1;
</s> add hints_[i] = uint8_t(i + 1); </s> remove Skipper& operator ++() {
</s> add Skipper& operator++() { </s> remove auto unhex = [](char c) -> int {
return c >= '0' && c <= '9' ? c - '0' :
c >= 'A' && c <= 'F' ? c - 'A' + 10 :
c >= 'a' && c <= 'f' ? c - 'a' + 10 :
-1;
};
</s> add </s> remove int maxLayer() const { return height() - 1; }
</s> add int maxLayer() const {
return height() - 1;
} </s> remove for (int i = 0; i < node->height_; ++i) {
</s> add for (uint8_t i = 0; i < node->height_; ++i) { </s> remove for (; in != end && out >= lastConstructed; --in, --out) {
new (out) T(std::move(*in));
}
for (; in != end; --in, --out) {
*out = std::move(*in);
}
for (; out >= lastConstructed; --out) {
new (out) T();
}
</s> add this->moveToUninitialized(begin, begin + pos, out);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> double lookupTable_[kMaxHeight];
<mask> size_t sizeLimitTable_[kMaxHeight];
<mask> };
<mask>
<mask> template<typename NodeType, typename NodeAlloc, typename = void>
<mask> class NodeRecycler;
<mask>
<mask> template<typename NodeType, typename NodeAlloc>
<mask> class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
<mask> !NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<typename NodeType, typename NodeAlloc>
class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
!NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
</s> add template <typename NodeType, typename NodeAlloc>
class NodeRecycler<
NodeType,
NodeAlloc,
typename std::enable_if<
!NodeType::template DestroyIsNoOp<NodeAlloc>::value>::type> { </s> remove template<typename NodeType, typename NodeAlloc>
class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
</s> add template <typename NodeType, typename NodeAlloc>
class NodeRecycler<
NodeType,
NodeAlloc,
typename std::enable_if<
NodeType::template DestroyIsNoOp<NodeAlloc>::value>::type> { </s> remove explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) { }
</s> add explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) {} </s> remove : refs_(0), dirty_(false), alloc_(alloc) { lock_.init(); }
</s> add : refs_(0), dirty_(false), alloc_(alloc) {
lock_.init();
} </s> remove template<typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT>
</s> add template <typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT> </s> remove template<typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT>
</s> add template <typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT>
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep replace replace replace keep keep replace
|
<mask> class NodeRecycler;
<mask>
<mask> template<typename NodeType, typename NodeAlloc>
<mask> class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
<mask> !NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
<mask> public:
<mask> explicit NodeRecycler(const NodeAlloc& alloc)
<mask> : refs_(0), dirty_(false), alloc_(alloc) { lock_.init(); }
</s> [sdk33] Update iOS with RN 0.59 </s> remove explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) { }
</s> add explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) {} </s> remove template<typename NodeType, typename NodeAlloc>
class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
</s> add template <typename NodeType, typename NodeAlloc>
class NodeRecycler<
NodeType,
NodeAlloc,
typename std::enable_if<
NodeType::template DestroyIsNoOp<NodeAlloc>::value>::type> { </s> remove template<typename NodeType, typename NodeAlloc, typename = void>
</s> add template <typename NodeType, typename NodeAlloc, typename = void> </s> remove explicit NodeRecycler() : refs_(0), dirty_(false) { lock_.init(); }
</s> add explicit NodeRecycler() : refs_(0), dirty_(false) {
lock_.init();
} </s> remove void addRef() { }
void releaseRef() { }
</s> add void addRef() {}
void releaseRef() {}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> public:
<mask> explicit NodeRecycler(const NodeAlloc& alloc)
<mask> : refs_(0), dirty_(false), alloc_(alloc) { lock_.init(); }
<mask>
<mask> explicit NodeRecycler() : refs_(0), dirty_(false) { lock_.init(); }
<mask>
<mask> ~NodeRecycler() {
<mask> CHECK_EQ(refs(), 0);
<mask> if (nodes_) {
<mask> for (auto& node : *nodes_) {
</s> [sdk33] Update iOS with RN 0.59 </s> remove : refs_(0), dirty_(false), alloc_(alloc) { lock_.init(); }
</s> add : refs_(0), dirty_(false), alloc_(alloc) {
lock_.init();
} </s> remove template<typename NodeType, typename NodeAlloc>
class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
!NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
</s> add template <typename NodeType, typename NodeAlloc>
class NodeRecycler<
NodeType,
NodeAlloc,
typename std::enable_if<
!NodeType::template DestroyIsNoOp<NodeAlloc>::value>::type> { </s> remove explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) { }
</s> add explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) {} </s> remove void addRef() { }
void releaseRef() { }
</s> add void addRef() {}
void releaseRef() {} </s> remove template<typename NodeType, typename NodeAlloc>
class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
</s> add template <typename NodeType, typename NodeAlloc>
class NodeRecycler<
NodeType,
NodeAlloc,
typename std::enable_if<
NodeType::template DestroyIsNoOp<NodeAlloc>::value>::type> { </s> remove explicit basic_fbstring(const A&) noexcept {
}
</s> add explicit basic_fbstring(const A&) noexcept {}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> void add(NodeType* node) {
<mask> std::lock_guard<MicroSpinLock> g(lock_);
<mask> if (nodes_.get() == nullptr) {
<mask> nodes_.reset(new std::vector<NodeType*>(1, node));
<mask> } else {
<mask> nodes_->push_back(node);
<mask> }
<mask> DCHECK_GT(refs(), 0);
<mask> dirty_.store(true, std::memory_order_relaxed);
</s> [sdk33] Update iOS with RN 0.59 </s> remove TeardownFunc t) {
</s> add TeardownFunc t) { </s> remove if (c == '\r') output += 'r';
else if (c == '\n') output += 'n';
else if (c == '\t') output += 't';
else if (c == '\a') output += 'a';
else if (c == '\b') output += 'b';
else if (c == '\0') output += '0';
else if (c == '\\') output += '\\';
else {
</s> add if (c == '\r') {
output += 'r';
} else if (c == '\n') {
output += 'n';
} else if (c == '\t') {
output += 't';
} else if (c == '\a') {
output += 'a';
} else if (c == '\b') {
output += 'b';
} else if (c == '\0') {
output += '0';
} else if (c == '\\') {
output += '\\';
} else { </s> remove if (UNLIKELY(numUpdates_ >
parent_->cacheSize_.load(std::memory_order_acquire))) {
</s> add if (UNLIKELY(
numUpdates_ >
parent_->cacheSize_.load(std::memory_order_acquire))) { </s> remove return [](T* v) { delete v; };
</s> add return [](T* v) { delete v; }; </s> remove static void make_mock(CreateFunc c,
typename Singleton<T>::TeardownFunc t = nullptr) {
</s> add static void make_mock(
CreateFunc c,
typename Singleton<T>::TeardownFunc t = nullptr) { </s> remove static bool greater(const value_type &data, const NodeType *node) {
</s> add static bool greater(const value_type& data, const NodeType* node) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // nodes again.
<mask> return refs_.fetch_add(-1, std::memory_order_relaxed);
<mask> }
<mask>
<mask> NodeAlloc& alloc() { return alloc_; }
<mask>
<mask> private:
<mask> int refs() const {
<mask> return refs_.load(std::memory_order_relaxed);
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeAlloc& alloc() { return alloc_; }
</s> add NodeAlloc& alloc() {
return alloc_;
} </s> remove void addRef() { }
void releaseRef() { }
</s> add void addRef() {}
void releaseRef() {} </s> remove static std::shared_ptr<SkipListType> createInstance(int height,
const NodeAlloc& alloc) {
</s> add static std::shared_ptr<SkipListType> createInstance(
int height,
const NodeAlloc& alloc) { </s> remove value_type& data() { return data_; }
const value_type& data() const { return data_; }
int maxLayer() const { return height_ - 1; }
int height() const { return height_; }
</s> add value_type& data() {
return data_;
}
const value_type& data() const {
return data_;
}
int maxLayer() const {
return height_ - 1;
}
int height() const {
return height_;
} </s> remove ~SubprocessSpawnError() throw() = default;
const char* what() const throw() override { return what_.c_str(); }
int errnoValue() const { return errnoValue_; }
</s> add ~SubprocessSpawnError() throw() override = default;
int errnoValue() const {
return errnoValue_;
} </s> remove int maxLayer() const { return height() - 1; }
</s> add int maxLayer() const {
return height() - 1;
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep keep keep replace replace replace keep replace keep keep
|
<mask> };
<mask>
<mask> // In case of arena allocator, no recycling is necessary, and it's possible
<mask> // to save on ConcurrentSkipList size.
<mask> template<typename NodeType, typename NodeAlloc>
<mask> class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
<mask> NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
<mask> public:
<mask> explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) { }
<mask>
<mask> void addRef() { }
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<typename NodeType, typename NodeAlloc>
class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
!NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
</s> add template <typename NodeType, typename NodeAlloc>
class NodeRecycler<
NodeType,
NodeAlloc,
typename std::enable_if<
!NodeType::template DestroyIsNoOp<NodeAlloc>::value>::type> { </s> remove : refs_(0), dirty_(false), alloc_(alloc) { lock_.init(); }
</s> add : refs_(0), dirty_(false), alloc_(alloc) {
lock_.init();
} </s> remove void addRef() { }
void releaseRef() { }
</s> add void addRef() {}
void releaseRef() {} </s> remove template<typename NodeType, typename NodeAlloc, typename = void>
</s> add template <typename NodeType, typename NodeAlloc, typename = void> </s> remove explicit NodeRecycler() : refs_(0), dirty_(false) { lock_.init(); }
</s> add explicit NodeRecycler() : refs_(0), dirty_(false) {
lock_.init();
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep replace replace keep keep keep replace
|
<mask> explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) { }
<mask>
<mask> void addRef() { }
<mask> void releaseRef() { }
<mask>
<mask> void add(NodeType* /* node */) {}
<mask>
<mask> NodeAlloc& alloc() { return alloc_; }
</s> [sdk33] Update iOS with RN 0.59 </s> remove explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) { }
</s> add explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) {} </s> remove template<typename NodeType, typename NodeAlloc>
class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
</s> add template <typename NodeType, typename NodeAlloc>
class NodeRecycler<
NodeType,
NodeAlloc,
typename std::enable_if<
NodeType::template DestroyIsNoOp<NodeAlloc>::value>::type> { </s> remove explicit NodeRecycler() : refs_(0), dirty_(false) { lock_.init(); }
</s> add explicit NodeRecycler() : refs_(0), dirty_(false) {
lock_.init();
} </s> remove : refs_(0), dirty_(false), alloc_(alloc) { lock_.init(); }
</s> add : refs_(0), dirty_(false), alloc_(alloc) {
lock_.init();
} </s> remove NodeAlloc& alloc() { return alloc_; }
</s> add NodeAlloc& alloc() {
return alloc_;
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep keep keep keep replace
|
<mask> private:
<mask> NodeAlloc alloc_;
<mask> };
<mask>
<mask> }} // namespaces
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeAlloc& alloc() { return alloc_; }
</s> add NodeAlloc& alloc() {
return alloc_;
} </s> remove }} // namespaces
</s> add } // namespace detail
} // namespace folly </s> remove NodeAlloc& alloc() { return alloc_; }
</s> add NodeAlloc& alloc() {
return alloc_;
} </s> remove private:
</s> add private: </s> remove }
</s> add } // namespace folly </s> remove
}} // folly::detail
</s> add } // namespace detail
} // namespace folly
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList-inl.h
|
keep replace keep keep keep keep keep
|
<mask> /*
<mask> * Copyright 2016 Facebook, Inc.
<mask> *
<mask> * Licensed under the Apache License, Version 2.0 (the "License");
<mask> * you may not use this file except in compliance with the License.
<mask> * You may obtain a copy of the License at
<mask> *
</s> [sdk33] Update iOS with RN 0.59
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep replace keep keep keep replace replace replace replace replace replace
|
<mask> #include <folly/Likely.h>
<mask> #include <folly/Memory.h>
<mask> #include <folly/MicroSpinLock.h>
<mask>
<mask> namespace folly {
<mask>
<mask> template<typename T,
<mask> typename Comp = std::less<T>,
<mask> // All nodes are allocated using provided SimpleAllocator,
<mask> // it should be thread-safe.
<mask> typename NodeAlloc = SysAlloc,
<mask> int MAX_HEIGHT = 24>
</s> [sdk33] Update iOS with RN 0.59 </s> remove #include <folly/MicroSpinLock.h>
</s> add </s> remove namespace folly { namespace detail {
</s> add namespace folly {
namespace detail { </s> remove #include <type_traits>
#include <utility>
namespace folly {
enum class TLPDestructionMode {
THIS_THREAD,
ALL_THREADS
};
struct AccessModeStrict {};
} // namespace
</s> add </s> add #include <folly/lang/Exception.h> </s> add #include <folly/synchronization/MicroSpinLock.h>
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> class ConcurrentSkipList {
<mask> // MAX_HEIGHT needs to be at least 2 to suppress compiler
<mask> // warnings/errors (Werror=uninitialized tiggered due to preds_[1]
<mask> // being treated as a scalar in the compiler).
<mask> static_assert(MAX_HEIGHT >= 2 && MAX_HEIGHT < 64,
<mask> "MAX_HEIGHT can only be in the range of [2, 64)");
<mask> typedef std::unique_lock<folly::MicroSpinLock> ScopedLocker;
<mask> typedef ConcurrentSkipList<T, Comp, NodeAlloc, MAX_HEIGHT> SkipListType;
<mask>
<mask> public:
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<typename T,
typename Comp = std::less<T>,
// All nodes are allocated using provided SimpleAllocator,
// it should be thread-safe.
typename NodeAlloc = SysAlloc,
int MAX_HEIGHT = 24>
</s> add template <
typename T,
typename Comp = std::less<T>,
// All nodes are allocated using provided SysAllocator,
// it should be thread-safe.
typename NodeAlloc = SysAllocator<void>,
int MAX_HEIGHT = 24> </s> remove template<typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT>
</s> add template <typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT> </s> remove template<typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT>
</s> add template <typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT> </s> remove typedef T value_type;
</s> add typedef T value_type; </s> remove * Holds a type T, in addition to enough padding to round the size up to the
* next multiple of the false sharing range used by folly.
*
* If T is standard-layout, then casting a T* you get from this class to a
* CachelinePadded<T>* is safe.
*
* This class handles padding, but imperfectly handles alignment. (Note that
* alignment matters for false-sharing: imagine a cacheline size of 64, and two
* adjacent 64-byte objects, with the first starting at an offset of 32. The
* last 32 bytes of the first object share a cacheline with the first 32 bytes
* of the second.). We alignas this class to be at least cacheline-sized, but
* it's implementation-defined what that means (since a cacheline is almost
* certainly larger than the maximum natural alignment). The following should be
* true for recent compilers on common architectures:
*
* For heap objects, alignment needs to be handled at the allocator level, such
* as with posix_memalign (this isn't necessary with jemalloc, which aligns
* objects that are a multiple of cacheline size to a cacheline).
</s> add * Holds a type T, in addition to enough padding to ensure that it isn't subject
* to false sharing within the range used by folly. </s> remove * For static and stack objects, the alignment should be obeyed, and no specific
* intervention is necessary.
</s> add * If `sizeof(T) <= alignof(T)` then the inner `T` will be entirely within one
* false sharing range (AKA cache line).
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> return Accessor(createInstance(height));
<mask> }
<mask>
<mask> // Create a shared_ptr skiplist object with initial head height.
<mask> static std::shared_ptr<SkipListType> createInstance(int height,
<mask> const NodeAlloc& alloc) {
<mask> return std::make_shared<ConcurrentSkipList>(height, alloc);
<mask> }
<mask>
<mask> static std::shared_ptr<SkipListType> createInstance(int height = 1) {
<mask> return std::make_shared<ConcurrentSkipList>(height);
</s> [sdk33] Update iOS with RN 0.59 </s> remove int maxLayer() const { return headHeight_ - 1; }
</s> add int maxLayer() const {
return headHeight_ - 1;
} </s> remove bool good() const { return succs_[0] != nullptr; }
</s> add bool good() const {
return succs_[0] != nullptr;
} </s> remove size_t size = sizeof(SkipListNode) +
height * sizeof(std::atomic<SkipListNode*>);
auto* node = static_cast<SkipListNode*>(alloc.allocate(size));
</s> add size_t size =
sizeof(SkipListNode) + height * sizeof(std::atomic<SkipListNode*>);
auto storage = std::allocator_traits<NodeAlloc>::allocate(alloc, size); </s> remove void addRef() { }
void releaseRef() { }
</s> add void addRef() {}
void releaseRef() {} </s> remove const value_type &data() const {
</s> add const value_type& data() const { </s> remove SkipListType *sl_;
</s> add SkipListType* sl_;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep replace keep keep keep replace keep
|
<mask> ~ConcurrentSkipList() {
<mask> /* static */ if (NodeType::template destroyIsNoOp<NodeAlloc>()) {
<mask> // Avoid traversing the list if using arena allocator.
<mask> return;
<mask> }
<mask> for (NodeType* current = head_.load(std::memory_order_relaxed); current; ) {
<mask> NodeType* tmp = current->skip(0);
</s> [sdk33] Update iOS with RN 0.59 </s> remove if (oldHead->height() >= height) { // someone else already did this
</s> add if (oldHead->height() >= height) { // someone else already did this </s> remove if (!head_.compare_exchange_strong(expected, newHead,
std::memory_order_release)) {
</s> add if (!head_.compare_exchange_strong(
expected, newHead, std::memory_order_release)) { </s> remove SingletonHolderState::NotRegistered) {
auto ptr = SingletonVault::stackTraceGetter().load();
LOG(FATAL) << "Creating instance for unregistered singleton: "
<< type().name() << "\n"
<< "Stacktrace:"
<< "\n"
<< (ptr ? (*ptr)() : "(not available)");
</s> add SingletonHolderState::NotRegistered) {
detail::singletonWarnCreateUnregisteredAndAbort(type()); </s> remove if (layer < 0) return false; // reaches the end of the list
</s> add if (layer < 0) {
return false; // reaches the end of the list
} </s> remove static T& get() { return instance(); }
</s> add static T& get() {
return instance();
}
static void make_mock(std::nullptr_t /* c */ = nullptr) {
make_mock([]() { return new T; });
}
static void make_mock(CreateFunc createFunc) {
if (createFunc == nullptr) {
detail::singletonThrowNullCreator(typeid(T));
}
auto& entry = entryInstance();
if (entry.ptr) {
// Make sure existing pointer doesn't get reported as a leak by LSAN.
entry.leakedPtrs.push_back(std::exchange(entry.ptr, nullptr));
}
entry.createFunc = createFunc;
entry.state = State::Dead;
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep replace keep keep keep replace keep keep
|
<mask> private:
<mask> static bool greater(const value_type &data, const NodeType *node) {
<mask> return node && Comp()(node->data(), data);
<mask> }
<mask>
<mask> static bool less(const value_type &data, const NodeType *node) {
<mask> return (node == nullptr) || Comp()(data, node->data());
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove static int findInsertionPoint(NodeType *cur, int cur_layer,
const value_type &data,
NodeType *preds[], NodeType *succs[]) {
</s> add static int findInsertionPoint(
NodeType* cur,
int cur_layer,
const value_type& data,
NodeType* preds[],
NodeType* succs[]) { </s> remove return candidate->fullyLinked() &&
candidate->maxLayer() == layer &&
!candidate->markedForRemoval();
</s> add return candidate->fullyLinked() && candidate->maxLayer() == layer &&
!candidate->markedForRemoval(); </s> remove int findInsertionPointGetMaxLayer(const value_type &data,
NodeType *preds[], NodeType *succs[], int *max_layer) const {
</s> add int findInsertionPointGetMaxLayer(
const value_type& data,
NodeType* preds[],
NodeType* succs[],
int* max_layer) const { </s> remove NodeType *pred = cur;
NodeType *foundNode = nullptr;
</s> add NodeType* pred = cur;
NodeType* foundNode = nullptr; </s> remove const value_type *last() const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add const value_type* last() const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep replace replace replace keep replace replace keep keep keep keep
|
<mask> }
<mask>
<mask> static int findInsertionPoint(NodeType *cur, int cur_layer,
<mask> const value_type &data,
<mask> NodeType *preds[], NodeType *succs[]) {
<mask> int foundLayer = -1;
<mask> NodeType *pred = cur;
<mask> NodeType *foundNode = nullptr;
<mask> for (int layer = cur_layer; layer >= 0; --layer) {
<mask> NodeType *node = pred->skip(layer);
<mask> while (greater(data, node)) {
<mask> pred = node;
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeType *node = pred->skip(layer);
</s> add NodeType* node = pred->skip(layer); </s> remove std::pair<NodeType*, int> findNodeRightDown(const value_type &data) const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add std::pair<NodeType*, int> findNodeRightDown(const value_type& data) const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove const value_type *last() const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add const value_type* last() const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove if (node) pred = node;
</s> add if (node) {
pred = node;
} </s> remove static bool less(const value_type &data, const NodeType *node) {
</s> add static bool less(const value_type& data, const NodeType* node) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> int foundLayer = -1;
<mask> NodeType *pred = cur;
<mask> NodeType *foundNode = nullptr;
<mask> for (int layer = cur_layer; layer >= 0; --layer) {
<mask> NodeType *node = pred->skip(layer);
<mask> while (greater(data, node)) {
<mask> pred = node;
<mask> node = node->skip(layer);
<mask> }
<mask> if (foundLayer == -1 && !less(data, node)) { // the two keys equal
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeType *pred = cur;
NodeType *foundNode = nullptr;
</s> add NodeType* pred = cur;
NodeType* foundNode = nullptr; </s> remove static int findInsertionPoint(NodeType *cur, int cur_layer,
const value_type &data,
NodeType *preds[], NodeType *succs[]) {
</s> add static int findInsertionPoint(
NodeType* cur,
int cur_layer,
const value_type& data,
NodeType* preds[],
NodeType* succs[]) { </s> remove std::pair<NodeType*, int> findNodeRightDown(const value_type &data) const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add std::pair<NodeType*, int> findNodeRightDown(const value_type& data) const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove if (node) pred = node;
</s> add if (node) {
pred = node;
} </s> remove const value_type *last() const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add const value_type* last() const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove NodeType *node = nullptr;
</s> add NodeType* node = nullptr;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> preds[layer] = pred;
<mask>
<mask> // if found, succs[0..foundLayer] need to point to the cached foundNode,
<mask> // as foundNode might be deleted at the same time thus pred->skip() can
<mask> // return NULL or another node.
<mask> succs[layer] = foundNode ? foundNode : node;
<mask> }
<mask> return foundLayer;
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove int maxLayer() const { return headHeight_ - 1; }
</s> add int maxLayer() const {
return headHeight_ - 1;
} </s> remove while (UNLIKELY(!nodeFound->fullyLinked())) {}
</s> add while (UNLIKELY(!nodeFound->fullyLinked())) {
} </s> remove bool good() const { return succs_[0] != nullptr; }
</s> add bool good() const {
return succs_[0] != nullptr;
} </s> remove continue; // if it's getting deleted retry finding node.
</s> add continue; // if it's getting deleted retry finding node. </s> remove // This implementation is similar to std::exception_ptr's implementation
// where two exception_wrappers are equal when the address in the underlying
// reference field both point to the same exception object. The reference
// field remains the same when the exception_wrapper is copied or when
// the exception_wrapper is "rethrown".
bool operator==(const exception_wrapper& a) const {
if (item_) {
return a.item_ && item_.get() == a.item_.get();
} else {
return eptr_ == a.eptr_;
}
}
</s> add template <class Fn, class A>
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN auto fold(Fn&&, A&& a) {
return static_cast<A&&>(a);
} </s> remove // If the exception_wrapper does not contain an exception, std::terminate()
// is invoked to assure the [[noreturn]] behaviour.
[[noreturn]] void throwException() const {
if (throwfn_) {
throwfn_(item_.get());
} else if (eptr_) {
std::rethrow_exception(eptr_);
}
std::cerr
<< "Cannot use `throwException` with an empty folly::exception_wrapper"
<< std::endl;
std::terminate();
}
explicit operator bool() const {
return item_ || eptr_;
}
</s> add template <bool If, class T>
using AddConstIf = _t<std::conditional<If, const T, T>>;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> return foundLayer;
<mask> }
<mask>
<mask> size_t size() const { return size_.load(std::memory_order_relaxed); }
<mask>
<mask> int height() const {
<mask> return head_.load(std::memory_order_consume)->height();
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove int maxLayer() const { return height() - 1; }
</s> add int maxLayer() const {
return height() - 1;
} </s> remove value_type& data() { return data_; }
const value_type& data() const { return data_; }
int maxLayer() const { return height_ - 1; }
int height() const { return height_; }
</s> add value_type& data() {
return data_;
}
const value_type& data() const {
return data_;
}
int maxLayer() const {
return height_ - 1;
}
int height() const {
return height_;
} </s> remove iterator lower_bound(const key_type &data) const {
</s> add iterator lower_bound(const key_type& data) const { </s> remove size_t height() const { return sl_->height(); }
</s> add size_t height() const {
return sl_->height();
} </s> remove bool empty() const { return sl_->size() == 0; }
size_t size() const { return sl_->size(); }
size_type max_size() const { return std::numeric_limits<size_type>::max(); }
</s> add bool empty() const {
return sl_->size() == 0;
}
size_t size() const {
return sl_->size();
}
size_type max_size() const {
return std::numeric_limits<size_type>::max();
} </s> remove size_type size() const { return store_.size(); }
</s> add size_type size() const {
return store_.size();
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> int height() const {
<mask> return head_.load(std::memory_order_consume)->height();
<mask> }
<mask>
<mask> int maxLayer() const { return height() - 1; }
<mask>
<mask> size_t incrementSize(int delta) {
<mask> return size_.fetch_add(delta, std::memory_order_relaxed) + delta;
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove value_type& data() { return data_; }
const value_type& data() const { return data_; }
int maxLayer() const { return height_ - 1; }
int height() const { return height_; }
</s> add value_type& data() {
return data_;
}
const value_type& data() const {
return data_;
}
int maxLayer() const {
return height_ - 1;
}
int height() const {
return height_;
} </s> remove size_t size() const { return size_.load(std::memory_order_relaxed); }
</s> add size_t size() const {
return size_.load(std::memory_order_relaxed);
} </s> remove int maxLayer() const { return headHeight_ - 1; }
</s> add int maxLayer() const {
return headHeight_ - 1;
} </s> remove bool good() const { return succs_[0] != nullptr; }
</s> add bool good() const {
return succs_[0] != nullptr;
} </s> remove NodeType* find(const value_type &data) {
</s> add NodeType* find(const value_type& data) { </s> remove iterator lower_bound(const key_type &data) const {
</s> add iterator lower_bound(const key_type& data) const {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep replace keep keep keep keep keep keep keep keep replace keep keep keep keep
|
<mask> }
<mask>
<mask> // Returns the node if found, nullptr otherwise.
<mask> NodeType* find(const value_type &data) {
<mask> auto ret = findNode(data);
<mask> if (ret.second && !ret.first->markedForRemoval()) return ret.first;
<mask> return nullptr;
<mask> }
<mask>
<mask> // Returns the node if found, nullptr otherwise.
<mask> NodeType* find(const value_type &data) {
<mask> auto ret = findNode(data);
<mask> if (ret.second && !ret.first->markedForRemoval()) return ret.first;
<mask> return nullptr;
<mask> }
<mask>
<mask> // lock all the necessary nodes for changing (adding or removing) the list.
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeType* lower_bound(const value_type &data) const {
</s> add NodeType* lower_bound(const value_type& data) const { </s> remove bool lockNodesForChange(int nodeHeight,
</s> add bool lockNodesForChange(
int nodeHeight, </s> remove if (layer < 0) return false; // reaches the end of the list
</s> add if (layer < 0) {
return false; // reaches the end of the list
} </s> remove SkipListType* skiplist() const { return sl_; }
</s> add SkipListType* skiplist() const {
return sl_;
} </s> remove const value_type *last() const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add const value_type* last() const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep replace keep replace replace replace keep
|
<mask> // are all validate (not in certain pending states), false otherwise.
<mask> bool lockNodesForChange(int nodeHeight,
<mask> ScopedLocker guards[MAX_HEIGHT],
<mask> NodeType *preds[MAX_HEIGHT],
<mask> NodeType *succs[MAX_HEIGHT],
<mask> bool adding=true) {
<mask> NodeType *pred, *succ, *prevPred = nullptr;
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeType* preds[MAX_HEIGHT], *succs[MAX_HEIGHT];
</s> add NodeType *preds[MAX_HEIGHT], *succs[MAX_HEIGHT]; </s> remove bool remove(const value_type &data) {
NodeType *nodeToDelete = nullptr;
</s> add bool remove(const value_type& data) {
NodeType* nodeToDelete = nullptr; </s> remove static int findInsertionPoint(NodeType *cur, int cur_layer,
const value_type &data,
NodeType *preds[], NodeType *succs[]) {
</s> add static int findInsertionPoint(
NodeType* cur,
int cur_layer,
const value_type& data,
NodeType* preds[],
NodeType* succs[]) { </s> remove NodeType *pred = cur;
NodeType *foundNode = nullptr;
</s> add NodeType* pred = cur;
NodeType* foundNode = nullptr; </s> remove NodeType *node = nullptr;
</s> add NodeType* node = nullptr;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> bool valid = true;
<mask> for (int layer = 0; valid && layer < nodeHeight; ++layer) {
<mask> pred = preds[layer];
<mask> DCHECK(pred != nullptr) << "layer=" << layer << " height=" << height()
<mask> << " nodeheight=" << nodeHeight;
<mask> succ = succs[layer];
<mask> if (pred != prevPred) {
<mask> guards[layer] = pred->acquireGuard();
<mask> prevPred = pred;
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeType *preds[MAX_HEIGHT],
NodeType *succs[MAX_HEIGHT],
bool adding=true) {
</s> add NodeType* preds[MAX_HEIGHT],
NodeType* succs[MAX_HEIGHT],
bool adding = true) { </s> remove DCHECK(succs_[0] != nullptr) << "lyr=" << lyr
<< "; max_layer=" << max_layer;
</s> add DCHECK(succs_[0] != nullptr)
<< "lyr=" << lyr << "; max_layer=" << max_layer; </s> remove auto wait_result = destroy_baton_->timed_wait(
std::chrono::steady_clock::now() + kDestroyWaitTime);
if (!wait_result) {
</s> add auto last_reference_released =
destroy_baton_->try_wait_for(kDestroyWaitTime);
if (last_reference_released) {
teardown_(instance_ptr_);
} else { </s> remove LOG(ERROR) << "Singleton of type " << type().name() << " has a "
<< "living reference at destroyInstances time; beware! Raw "
<< "pointer is " << instance_ptr_ << ". It is very likely "
<< "that some other singleton is holding a shared_ptr to it. "
<< "Make sure dependencies between these singletons are "
<< "properly defined.";
</s> add detail::singletonWarnDestroyInstanceLeak(type(), instance_ptr_); </s> remove LOG(FATAL) << "Double registration of singletons of the same "
<< "underlying type; check for multiple definitions "
<< "of type folly::LeakySingleton<" + entry.type_.name() + ">";
</s> add detail::singletonWarnLeakyDoubleRegistrationAndAbort(entry.type_); </s> remove SingletonHolderState::NotRegistered) {
auto ptr = SingletonVault::stackTraceGetter().load();
LOG(FATAL) << "Creating instance for unregistered singleton: "
<< type().name() << "\n"
<< "Stacktrace:"
<< "\n"
<< (ptr ? (*ptr)() : "(not available)");
</s> add SingletonHolderState::NotRegistered) {
detail::singletonWarnCreateUnregisteredAndAbort(type());
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> guards[layer] = pred->acquireGuard();
<mask> prevPred = pred;
<mask> }
<mask> valid = !pred->markedForRemoval() &&
<mask> pred->skip(layer) == succ; // check again after locking
<mask>
<mask> if (adding) { // when adding a node, the succ shouldn't be going away
<mask> valid = valid && (succ == nullptr || !succ->markedForRemoval());
<mask> }
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove if (adding) { // when adding a node, the succ shouldn't be going away
</s> add if (adding) { // when adding a node, the succ shouldn't be going away </s> remove << " nodeheight=" << nodeHeight;
</s> add << " nodeheight=" << nodeHeight; </s> remove for (node = skip(0);
(node != nullptr && node->markedForRemoval());
node = node->skip(0)) {}
</s> add for (node = skip(0); (node != nullptr && node->markedForRemoval());
node = node->skip(0)) {
} </s> remove src->advance(length);
return result;
</s> add if (length >= 2) {
const char* suffix = src->data() + length - 1;
// double_conversion doesn't update length correctly when there is an
// incomplete exponent specifier. Converting "12e-f-g" shouldn't consume
// any more than "12", but it will consume "12e-".
// "123-" should only parse "123"
if (*suffix == '-' || *suffix == '+') {
--suffix;
--length;
}
// "12e-f-g" or "12euro" should only parse "12"
if (*suffix == 'e' || *suffix == 'E') {
--length;
}
}
src->advance(size_t(length));
return Tgt(result); </s> remove if (length == 0 || (result == 0.0 && std::isspace((*src)[length - 1]))) {
</s> add if (length == 0 ||
(result == 0.0 && std::isspace((*src)[size_t(length) - 1]))) { </s> remove if (UNLIKELY(cache == nullptr || cache->parent_ == nullptr)) {
</s> add if (UNLIKELY(cache == nullptr)) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> valid = !pred->markedForRemoval() &&
<mask> pred->skip(layer) == succ; // check again after locking
<mask>
<mask> if (adding) { // when adding a node, the succ shouldn't be going away
<mask> valid = valid && (succ == nullptr || !succ->markedForRemoval());
<mask> }
<mask> }
<mask>
<mask> return valid;
</s> [sdk33] Update iOS with RN 0.59 </s> remove pred->skip(layer) == succ; // check again after locking
</s> add pred->skip(layer) == succ; // check again after locking </s> remove for (node = skip(0);
(node != nullptr && node->markedForRemoval());
node = node->skip(0)) {}
</s> add for (node = skip(0); (node != nullptr && node->markedForRemoval());
node = node->skip(0)) {
} </s> remove << " nodeheight=" << nodeHeight;
</s> add << " nodeheight=" << nodeHeight; </s> remove src->advance(length);
return result;
</s> add if (length >= 2) {
const char* suffix = src->data() + length - 1;
// double_conversion doesn't update length correctly when there is an
// incomplete exponent specifier. Converting "12e-f-g" shouldn't consume
// any more than "12", but it will consume "12e-".
// "123-" should only parse "123"
if (*suffix == '-' || *suffix == '+') {
--suffix;
--length;
}
// "12e-f-g" or "12euro" should only parse "12"
if (*suffix == 'e' || *suffix == 'E') {
--length;
}
}
src->advance(size_t(length));
return Tgt(result); </s> remove if (length == 0 || (result == 0.0 && std::isspace((*src)[length - 1]))) {
</s> add if (length == 0 ||
(result == 0.0 && std::isspace((*src)[size_t(length) - 1]))) { </s> remove bool notStarted() const { return state() == NOT_STARTED; }
bool running() const { return state() == RUNNING; }
bool exited() const { return state() == EXITED; }
bool killed() const { return state() == KILLED; }
</s> add bool notStarted() const {
return state() == NOT_STARTED;
}
bool running() const {
return state() == RUNNING;
}
bool exited() const {
return state() == EXITED;
}
bool killed() const {
return state() == KILLED;
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep replace replace keep replace keep keep keep
|
<mask> // list with the same key.
<mask> // pair.second stores whether the data is added successfully:
<mask> // 0 means not added, otherwise reutrns the new size.
<mask> template<typename U>
<mask> std::pair<NodeType*, size_t> addOrGetData(U &&data) {
<mask> NodeType *preds[MAX_HEIGHT], *succs[MAX_HEIGHT];
<mask> NodeType *newNode;
<mask> size_t newSize;
<mask> while (true) {
<mask> int max_layer = 0;
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeType* preds[MAX_HEIGHT], *succs[MAX_HEIGHT];
</s> add NodeType *preds[MAX_HEIGHT], *succs[MAX_HEIGHT]; </s> remove return findInsertionPoint(head_.load(std::memory_order_consume),
*max_layer, data, preds, succs);
</s> add return findInsertionPoint(
head_.load(std::memory_order_consume), *max_layer, data, preds, succs); </s> remove NodeType *node = nullptr;
</s> add NodeType* node = nullptr; </s> remove std::pair<NodeType*, int> findNodeDownRight(const value_type &data) const {
NodeType *pred = head_.load(std::memory_order_consume);
</s> add std::pair<NodeType*, int> findNodeDownRight(const value_type& data) const {
NodeType* pred = head_.load(std::memory_order_consume); </s> remove if (layer < 0) return false; // reaches the end of the list
</s> add if (layer < 0) {
return false; // reaches the end of the list
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep replace keep keep replace
|
<mask>
<mask> if (layer >= 0) {
<mask> NodeType *nodeFound = succs[layer];
<mask> DCHECK(nodeFound != nullptr);
<mask> if (nodeFound->markedForRemoval()) {
<mask> continue; // if it's getting deleted retry finding node.
</s> [sdk33] Update iOS with RN 0.59 </s> remove while (UNLIKELY(!nodeFound->fullyLinked())) {}
</s> add while (UNLIKELY(!nodeFound->fullyLinked())) {
} </s> remove if (node) pred = node;
</s> add if (node) {
pred = node;
} </s> remove const value_type *last() const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add const value_type* last() const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove if (layer < 0) return false; // reaches the end of the list
</s> add if (layer < 0) {
return false; // reaches the end of the list
} </s> remove NodeType* preds[MAX_HEIGHT], *succs[MAX_HEIGHT];
</s> add NodeType *preds[MAX_HEIGHT], *succs[MAX_HEIGHT];
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep replace keep keep keep keep replace replace
|
<mask> }
<mask> // wait until fully linked.
<mask> while (UNLIKELY(!nodeFound->fullyLinked())) {}
<mask> return std::make_pair(nodeFound, 0);
<mask> }
<mask>
<mask> // need to capped at the original height -- the real height may have grown
<mask> int nodeHeight = detail::SkipListRandomHeight::instance()->
<mask> getHeight(max_layer + 1);
</s> [sdk33] Update iOS with RN 0.59 </s> remove continue; // if it's getting deleted retry finding node.
</s> add continue; // if it's getting deleted retry finding node. </s> remove int maxLayer() const { return headHeight_ - 1; }
</s> add int maxLayer() const {
return headHeight_ - 1;
} </s> remove NodeType *nodeFound = succs[layer];
</s> add NodeType* nodeFound = succs[layer]; </s> remove bool good() const { return succs_[0] != nullptr; }
</s> add bool good() const {
return succs_[0] != nullptr;
} </s> remove size_t size = sizeof(SkipListNode) +
height * sizeof(std::atomic<SkipListNode*>);
auto* node = static_cast<SkipListNode*>(alloc.allocate(size));
</s> add size_t size =
sizeof(SkipListNode) + height * sizeof(std::atomic<SkipListNode*>);
auto storage = std::allocator_traits<NodeAlloc>::allocate(alloc, size);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> continue; // give up the locks and retry until all valid
<mask> }
<mask>
<mask> // locks acquired and all valid, need to modify the links under the locks.
<mask> newNode =
<mask> NodeType::create(recycler_.alloc(), nodeHeight, std::forward<U>(data));
<mask> for (int k = 0; k < nodeHeight; ++k) {
<mask> newNode->setSkip(k, succs[k]);
<mask> preds[k]->setSkip(k, newNode);
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove continue; // this will unlock all the locks
</s> add continue; // this will unlock all the locks </s> remove int nodeHeight = detail::SkipListRandomHeight::instance()->
getHeight(max_layer + 1);
</s> add int nodeHeight =
detail::SkipListRandomHeight::instance()->getHeight(max_layer + 1); </s> remove NodeType *preds[MAX_HEIGHT],
NodeType *succs[MAX_HEIGHT],
bool adding=true) {
</s> add NodeType* preds[MAX_HEIGHT],
NodeType* succs[MAX_HEIGHT],
bool adding = true) { </s> remove while (UNLIKELY(!nodeFound->fullyLinked())) {}
</s> add while (UNLIKELY(!nodeFound->fullyLinked())) {
} </s> remove << " nodeheight=" << nodeHeight;
</s> add << " nodeheight=" << nodeHeight; </s> remove for (int i = 0; i < node->height_; ++i) {
</s> add for (uint8_t i = 0; i < node->height_; ++i) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask>
<mask> int hgt = height();
<mask> size_t sizeLimit =
<mask> detail::SkipListRandomHeight::instance()->getSizeLimit(hgt);
<mask>
<mask> if (hgt < MAX_HEIGHT && newSize > sizeLimit) {
<mask> growHeight(hgt + 1);
<mask> }
<mask> CHECK_GT(newSize, 0);
</s> [sdk33] Update iOS with RN 0.59 </s> remove sizeLimitTable_[i] = sizeLimit > kMaxSizeLimit ?
kMaxSizeLimit :
static_cast<size_t>(sizeLimit);
</s> add sizeLimitTable_[i] = sizeLimit > kMaxSizeLimit
? kMaxSizeLimit
: static_cast<size_t>(sizeLimit); </s> add } // namespace detail </s> remove int nodeHeight = detail::SkipListRandomHeight::instance()->
getHeight(max_layer + 1);
</s> add int nodeHeight =
detail::SkipListRandomHeight::instance()->getHeight(max_layer + 1); </s> remove static RefCounted * reallocate(Char *const data,
const size_t currentSize,
const size_t currentCapacity,
const size_t newCapacity) {
FBSTRING_ASSERT(newCapacity > 0 && newCapacity > currentSize);
</s> add static RefCounted* reallocate(
Char* const data,
const size_t currentSize,
const size_t currentCapacity,
size_t* newCapacity) {
FBSTRING_ASSERT(*newCapacity > 0 && *newCapacity > currentSize);
const size_t allocNewCapacity =
goodMallocSize(getDataOffset() + (*newCapacity + 1) * sizeof(Char)); </s> remove this->consumeImpl(
</s> add consumeImpl( </s> remove return this->consumeImpl(
</s> add return consumeImpl(
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep replace replace keep keep keep replace keep keep keep
|
<mask> }
<mask>
<mask> bool remove(const value_type &data) {
<mask> NodeType *nodeToDelete = nullptr;
<mask> ScopedLocker nodeGuard;
<mask> bool isMarked = false;
<mask> int nodeHeight = 0;
<mask> NodeType* preds[MAX_HEIGHT], *succs[MAX_HEIGHT];
<mask>
<mask> while (true) {
<mask> int max_layer = 0;
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeType *newNode;
</s> add NodeType* newNode; </s> remove static int findInsertionPoint(NodeType *cur, int cur_layer,
const value_type &data,
NodeType *preds[], NodeType *succs[]) {
</s> add static int findInsertionPoint(
NodeType* cur,
int cur_layer,
const value_type& data,
NodeType* preds[],
NodeType* succs[]) { </s> remove NodeType *pred = cur;
NodeType *foundNode = nullptr;
</s> add NodeType* pred = cur;
NodeType* foundNode = nullptr; </s> remove NodeType *node = nullptr;
</s> add NodeType* node = nullptr; </s> remove std::pair<NodeType*, int> findNodeRightDown(const value_type &data) const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add std::pair<NodeType*, int> findNodeRightDown(const value_type& data) const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> if (!isMarked) {
<mask> nodeToDelete = succs[layer];
<mask> nodeHeight = nodeToDelete->height();
<mask> nodeGuard = nodeToDelete->acquireGuard();
<mask> if (nodeToDelete->markedForRemoval()) return false;
<mask> nodeToDelete->setMarkedForRemoval();
<mask> isMarked = true;
<mask> }
<mask>
<mask> // acquire pred locks from bottom layer up
</s> [sdk33] Update iOS with RN 0.59 </s> remove continue; // this will unlock all the locks
</s> add continue; // this will unlock all the locks </s> remove bool remove(const value_type &data) {
NodeType *nodeToDelete = nullptr;
</s> add bool remove(const value_type& data) {
NodeType* nodeToDelete = nullptr; </s> remove << " nodeheight=" << nodeHeight;
</s> add << " nodeheight=" << nodeHeight; </s> remove NodeType* preds[MAX_HEIGHT], *succs[MAX_HEIGHT];
</s> add NodeType *preds[MAX_HEIGHT], *succs[MAX_HEIGHT]; </s> remove if (node) pred = node;
</s> add if (node) {
pred = node;
} </s> remove int nodeHeight = detail::SkipListRandomHeight::instance()->
getHeight(max_layer + 1);
</s> add int nodeHeight =
detail::SkipListRandomHeight::instance()->getHeight(max_layer + 1);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> // acquire pred locks from bottom layer up
<mask> ScopedLocker guards[MAX_HEIGHT];
<mask> if (!lockNodesForChange(nodeHeight, guards, preds, succs, false)) {
<mask> continue; // this will unlock all the locks
<mask> }
<mask>
<mask> for (int k = nodeHeight - 1; k >= 0; --k) {
<mask> preds[k]->setSkip(k, nodeToDelete->skip(k));
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove newNode =
NodeType::create(recycler_.alloc(), nodeHeight, std::forward<U>(data));
</s> add newNode = NodeType::create(
recycler_.alloc(), nodeHeight, std::forward<U>(data)); </s> remove int nodeHeight = detail::SkipListRandomHeight::instance()->
getHeight(max_layer + 1);
</s> add int nodeHeight =
detail::SkipListRandomHeight::instance()->getHeight(max_layer + 1); </s> remove if (nodeToDelete->markedForRemoval()) return false;
</s> add if (nodeToDelete->markedForRemoval()) {
return false;
} </s> remove if (node) pred = node;
</s> add if (node) {
pred = node;
} </s> remove NodeType *nodeFound = succs[layer];
</s> add NodeType* nodeFound = succs[layer]; </s> remove NodeType* preds[MAX_HEIGHT], *succs[MAX_HEIGHT];
</s> add NodeType *preds[MAX_HEIGHT], *succs[MAX_HEIGHT];
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep replace keep keep keep keep replace replace replace keep keep
|
<mask> }
<mask>
<mask> const value_type *first() const {
<mask> auto node = head_.load(std::memory_order_consume)->skip(0);
<mask> return node ? &node->data() : nullptr;
<mask> }
<mask>
<mask> const value_type *last() const {
<mask> NodeType *pred = head_.load(std::memory_order_consume);
<mask> NodeType *node = nullptr;
<mask> for (int layer = maxLayer(); layer >= 0; --layer) {
<mask> do {
</s> [sdk33] Update iOS with RN 0.59 </s> remove std::pair<NodeType*, int> findNodeRightDown(const value_type &data) const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add std::pair<NodeType*, int> findNodeRightDown(const value_type& data) const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove if (node) pred = node;
</s> add if (node) {
pred = node;
} </s> remove NodeType *pred = cur;
NodeType *foundNode = nullptr;
</s> add NodeType* pred = cur;
NodeType* foundNode = nullptr; </s> remove static int findInsertionPoint(NodeType *cur, int cur_layer,
const value_type &data,
NodeType *preds[], NodeType *succs[]) {
</s> add static int findInsertionPoint(
NodeType* cur,
int cur_layer,
const value_type& data,
NodeType* preds[],
NodeType* succs[]) { </s> remove NodeType *node = pred->skip(layer);
</s> add NodeType* node = pred->skip(layer);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep replace keep keep replace replace keep keep
|
<mask> node = pred->skip(layer);
<mask> if (node) pred = node;
<mask> } while (node != nullptr);
<mask> }
<mask> return pred == head_.load(std::memory_order_relaxed)
<mask> ? nullptr : &pred->data();
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove const value_type *last() const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add const value_type* last() const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove static bool okToDelete(NodeType *candidate, int layer) {
</s> add static bool okToDelete(NodeType* candidate, int layer) { </s> remove NodeType* lower_bound(const value_type &data) const {
</s> add NodeType* lower_bound(const value_type& data) const { </s> remove for (node = skip(0);
(node != nullptr && node->markedForRemoval());
node = node->skip(0)) {}
</s> add for (node = skip(0); (node != nullptr && node->markedForRemoval());
node = node->skip(0)) {
} </s> remove NodeType *node = pred->skip(layer);
</s> add NodeType* node = pred->skip(layer);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep replace keep keep keep keep keep keep keep keep replace replace replace keep
|
<mask> }
<mask>
<mask> static bool okToDelete(NodeType *candidate, int layer) {
<mask> DCHECK(candidate != nullptr);
<mask> return candidate->fullyLinked() &&
<mask> candidate->maxLayer() == layer &&
<mask> !candidate->markedForRemoval();
<mask> }
<mask>
<mask> static bool okToDelete(NodeType *candidate, int layer) {
<mask> DCHECK(candidate != nullptr);
<mask> return candidate->fullyLinked() &&
<mask> candidate->maxLayer() == layer &&
<mask> !candidate->markedForRemoval();
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove return pred == head_.load(std::memory_order_relaxed)
? nullptr : &pred->data();
</s> add return pred == head_.load(std::memory_order_relaxed) ? nullptr
: &pred->data(); </s> remove static bool less(const value_type &data, const NodeType *node) {
</s> add static bool less(const value_type& data, const NodeType* node) { </s> remove if (node) pred = node;
</s> add if (node) {
pred = node;
} </s> remove return (e_->elements &&
accessor_->id_ < e_->elementsCapacity &&
e_->elements[accessor_->id_].ptr);
</s> add return (e_->getThreadEntry()->elements[accessor_->id_].ptr); </s> remove static bool greater(const value_type &data, const NodeType *node) {
</s> add static bool greater(const value_type& data, const NodeType* node) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep replace replace keep replace replace
|
<mask> // find node for insertion/deleting
<mask> int findInsertionPointGetMaxLayer(const value_type &data,
<mask> NodeType *preds[], NodeType *succs[], int *max_layer) const {
<mask> *max_layer = maxLayer();
<mask> return findInsertionPoint(head_.load(std::memory_order_consume),
<mask> *max_layer, data, preds, succs);
</s> [sdk33] Update iOS with RN 0.59 </s> remove return candidate->fullyLinked() &&
candidate->maxLayer() == layer &&
!candidate->markedForRemoval();
</s> add return candidate->fullyLinked() && candidate->maxLayer() == layer &&
!candidate->markedForRemoval(); </s> remove static int findInsertionPoint(NodeType *cur, int cur_layer,
const value_type &data,
NodeType *preds[], NodeType *succs[]) {
</s> add static int findInsertionPoint(
NodeType* cur,
int cur_layer,
const value_type& data,
NodeType* preds[],
NodeType* succs[]) { </s> remove static bool less(const value_type &data, const NodeType *node) {
</s> add static bool less(const value_type& data, const NodeType* node) { </s> remove NodeType *pred = cur;
NodeType *foundNode = nullptr;
</s> add NodeType* pred = cur;
NodeType* foundNode = nullptr; </s> remove static bool greater(const value_type &data, const NodeType *node) {
</s> add static bool greater(const value_type& data, const NodeType* node) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // pair.first = the first node that no-less than data value
<mask> // pair.second = 1 when the data value is founded, or 0 otherwise.
<mask> // This is like lower_bound, but not exact: we could have the node marked for
<mask> // removal so still need to check that.
<mask> std::pair<NodeType*, int> findNode(const value_type &data) const {
<mask> return findNodeDownRight(data);
<mask> }
<mask>
<mask> // Find node by first stepping down then stepping right. Based on benchmark
<mask> // results, this is slightly faster than findNodeRightDown for better
</s> [sdk33] Update iOS with RN 0.59 </s> remove std::pair<NodeType*, int> findNodeDownRight(const value_type &data) const {
NodeType *pred = head_.load(std::memory_order_consume);
</s> add std::pair<NodeType*, int> findNodeDownRight(const value_type& data) const {
NodeType* pred = head_.load(std::memory_order_consume); </s> remove return findInsertionPoint(head_.load(std::memory_order_consume),
*max_layer, data, preds, succs);
</s> add return findInsertionPoint(
head_.load(std::memory_order_consume), *max_layer, data, preds, succs); </s> remove std::pair<NodeType*, int> findNodeRightDown(const value_type &data) const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add std::pair<NodeType*, int> findNodeRightDown(const value_type& data) const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove NodeType *node = nullptr;
</s> add NodeType* node = nullptr; </s> remove for (; ht > 0 && less(data, node = pred->skip(ht - 1)); --ht) {}
if (ht == 0) return std::make_pair(node, 0); // not found
</s> add for (; ht > 0 && less(data, node = pred->skip(ht - 1)); --ht) {
}
if (ht == 0) {
return std::make_pair(node, 0); // not found
} </s> remove template<typename U>
std::pair<NodeType*, size_t> addOrGetData(U &&data) {
</s> add template <typename U>
std::pair<NodeType*, size_t> addOrGetData(U&& data) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep replace replace keep replace
|
<mask> // localality on the skipping pointers.
<mask> std::pair<NodeType*, int> findNodeDownRight(const value_type &data) const {
<mask> NodeType *pred = head_.load(std::memory_order_consume);
<mask> int ht = pred->height();
<mask> NodeType *node = nullptr;
</s> [sdk33] Update iOS with RN 0.59 </s> remove std::pair<NodeType*, int> findNodeRightDown(const value_type &data) const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add std::pair<NodeType*, int> findNodeRightDown(const value_type& data) const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove const value_type *last() const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add const value_type* last() const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove NodeType *pred = cur;
NodeType *foundNode = nullptr;
</s> add NodeType* pred = cur;
NodeType* foundNode = nullptr; </s> remove static int findInsertionPoint(NodeType *cur, int cur_layer,
const value_type &data,
NodeType *preds[], NodeType *succs[]) {
</s> add static int findInsertionPoint(
NodeType* cur,
int cur_layer,
const value_type& data,
NodeType* preds[],
NodeType* succs[]) { </s> remove NodeType *node = pred->skip(layer);
</s> add NodeType* node = pred->skip(layer);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask>
<mask> bool found = false;
<mask> while (!found) {
<mask> // stepping down
<mask> for (; ht > 0 && less(data, node = pred->skip(ht - 1)); --ht) {}
<mask> if (ht == 0) return std::make_pair(node, 0); // not found
<mask> // node <= data now, but we need to fix up ht
<mask> --ht;
<mask>
<mask> // stepping right
<mask> while (greater(data, node)) {
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeType *node = nullptr;
</s> add NodeType* node = nullptr; </s> remove std::pair<NodeType*, int> findNodeDownRight(const value_type &data) const {
NodeType *pred = head_.load(std::memory_order_consume);
</s> add std::pair<NodeType*, int> findNodeDownRight(const value_type& data) const {
NodeType* pred = head_.load(std::memory_order_consume); </s> remove std::pair<NodeType*, int> findNodeRightDown(const value_type &data) const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add std::pair<NodeType*, int> findNodeRightDown(const value_type& data) const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove std::pair<NodeType*, int> findNode(const value_type &data) const {
</s> add std::pair<NodeType*, int> findNode(const value_type& data) const { </s> remove NodeType *node = pred->skip(layer);
</s> add NodeType* node = pred->skip(layer); </s> remove NodeType* lower_bound(const value_type &data) const {
</s> add NodeType* lower_bound(const value_type& data) const {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> }
<mask>
<mask> // find node by first stepping right then stepping down.
<mask> // We still keep this for reference purposes.
<mask> std::pair<NodeType*, int> findNodeRightDown(const value_type &data) const {
<mask> NodeType *pred = head_.load(std::memory_order_consume);
<mask> NodeType *node = nullptr;
<mask> auto top = maxLayer();
<mask> int found = 0;
<mask> for (int layer = top; !found && layer >= 0; --layer) {
<mask> node = pred->skip(layer);
<mask> while (greater(data, node)) {
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeType *node = pred->skip(layer);
</s> add NodeType* node = pred->skip(layer); </s> remove const value_type *last() const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add const value_type* last() const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove std::pair<NodeType*, int> findNodeDownRight(const value_type &data) const {
NodeType *pred = head_.load(std::memory_order_consume);
</s> add std::pair<NodeType*, int> findNodeDownRight(const value_type& data) const {
NodeType* pred = head_.load(std::memory_order_consume); </s> remove NodeType *pred = cur;
NodeType *foundNode = nullptr;
</s> add NodeType* pred = cur;
NodeType* foundNode = nullptr; </s> remove NodeType *node = nullptr;
</s> add NodeType* node = nullptr; </s> remove if (node) pred = node;
</s> add if (node) {
pred = node;
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> return std::make_pair(node, found);
<mask> }
<mask>
<mask> NodeType* lower_bound(const value_type &data) const {
<mask> auto node = findNode(data).first;
<mask> while (node != nullptr && node->markedForRemoval()) {
<mask> node = node->skip(0);
<mask> }
<mask> return node;
</s> [sdk33] Update iOS with RN 0.59 </s> remove for (node = skip(0);
(node != nullptr && node->markedForRemoval());
node = node->skip(0)) {}
</s> add for (node = skip(0); (node != nullptr && node->markedForRemoval());
node = node->skip(0)) {
} </s> remove const value_type *last() const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add const value_type* last() const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove return pred == head_.load(std::memory_order_relaxed)
? nullptr : &pred->data();
</s> add return pred == head_.load(std::memory_order_relaxed) ? nullptr
: &pred->data(); </s> remove NodeType* find(const value_type &data) {
</s> add NodeType* find(const value_type& data) { </s> remove if (node) pred = node;
</s> add if (node) {
pred = node;
} </s> remove static bool greater(const value_type &data, const NodeType *node) {
</s> add static bool greater(const value_type& data, const NodeType* node) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep replace keep keep keep keep replace keep keep
|
<mask> NodeType* oldHead = head_.load(std::memory_order_consume);
<mask> if (oldHead->height() >= height) { // someone else already did this
<mask> return;
<mask> }
<mask>
<mask> NodeType* newHead =
<mask> NodeType::create(recycler_.alloc(), height, value_type(), true);
<mask>
<mask> { // need to guard the head node in case others are adding/removing
</s> [sdk33] Update iOS with RN 0.59 </s> remove if (!head_.compare_exchange_strong(expected, newHead,
std::memory_order_release)) {
</s> add if (!head_.compare_exchange_strong(
expected, newHead, std::memory_order_release)) { </s> remove const value_type *last() const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add const value_type* last() const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove std::pair<NodeType*, int> findNodeRightDown(const value_type &data) const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add std::pair<NodeType*, int> findNodeRightDown(const value_type& data) const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove int maxLayer() const { return headHeight_ - 1; }
</s> add int maxLayer() const {
return headHeight_ - 1;
} </s> remove bool good() const { return succs_[0] != nullptr; }
</s> add bool good() const {
return succs_[0] != nullptr;
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> // nodes linked to the head.
<mask> ScopedLocker g = oldHead->acquireGuard();
<mask> newHead->copyHead(oldHead);
<mask> NodeType* expected = oldHead;
<mask> if (!head_.compare_exchange_strong(expected, newHead,
<mask> std::memory_order_release)) {
<mask> // if someone has already done the swap, just return.
<mask> NodeType::destroy(recycler_.alloc(), newHead);
<mask> return;
<mask> }
<mask> oldHead->setMarkedForRemoval();
</s> [sdk33] Update iOS with RN 0.59 </s> remove NodeType::create(recycler_.alloc(), height, value_type(), true);
</s> add NodeType::create(recycler_.alloc(), height, value_type(), true); </s> remove if (oldHead->height() >= height) { // someone else already did this
</s> add if (oldHead->height() >= height) { // someone else already did this </s> remove for (NodeType* current = head_.load(std::memory_order_relaxed); current; ) {
</s> add for (NodeType* current = head_.load(std::memory_order_relaxed); current;) { </s> remove if (ret.second && !ret.first->markedForRemoval()) return ret.first;
</s> add if (ret.second && !ret.first->markedForRemoval()) {
return ret.first;
} </s> remove NodeType *preds[MAX_HEIGHT],
NodeType *succs[MAX_HEIGHT],
bool adding=true) {
</s> add NodeType* preds[MAX_HEIGHT],
NodeType* succs[MAX_HEIGHT],
bool adding = true) { </s> remove /* static */ if (NodeType::template destroyIsNoOp<NodeAlloc>()) {
</s> add if /* constexpr */ (NodeType::template DestroyIsNoOp<NodeAlloc>::value) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> recycle(oldHead);
<mask> }
<mask>
<mask> void recycle(NodeType *node) {
<mask> recycler_.add(node);
<mask> }
<mask>
<mask> detail::NodeRecycler<NodeType, NodeAlloc> recycler_;
<mask> std::atomic<NodeType*> head_;
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<typename NodeAlloc>
</s> add template <typename NodeAlloc> </s> remove static bool greater(const value_type &data, const NodeType *node) {
</s> add static bool greater(const value_type& data, const NodeType* node) { </s> add size_t size = sizeof(SkipListNode) +
node->height_ * sizeof(std::atomic<SkipListNode*>); </s> remove explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) { }
</s> add explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) {} </s> remove alloc.deallocate(node);
</s> add std::allocator_traits<NodeAlloc>::deallocate(alloc, node, size); </s> remove template<typename NodeType, typename NodeAlloc>
class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
</s> add template <typename NodeType, typename NodeAlloc>
class NodeRecycler<
NodeType,
NodeAlloc,
typename std::enable_if<
NodeType::template DestroyIsNoOp<NodeAlloc>::value>::type> {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> std::atomic<NodeType*> head_;
<mask> std::atomic<size_t> size_;
<mask> };
<mask>
<mask> template<typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT>
<mask> class ConcurrentSkipList<T, Comp, NodeAlloc, MAX_HEIGHT>::Accessor {
<mask> typedef detail::SkipListNode<T> NodeType;
<mask> typedef ConcurrentSkipList<T, Comp, NodeAlloc, MAX_HEIGHT> SkipListType;
<mask> public:
<mask> typedef T value_type;
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT>
</s> add template <typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT> </s> remove typedef T value_type;
</s> add typedef T value_type; </s> remove static_assert(MAX_HEIGHT >= 2 && MAX_HEIGHT < 64,
</s> add static_assert(
MAX_HEIGHT >= 2 && MAX_HEIGHT < 64, </s> remove template<typename NodeAlloc, typename U,
typename=typename std::enable_if<std::is_convertible<U, T>::value>::type>
static SkipListNode* create(
NodeAlloc& alloc, int height, U&& data, bool isHead = false) {
</s> add template <
typename NodeAlloc,
typename U,
typename =
typename std::enable_if<std::is_convertible<U, T>::value>::type>
static SkipListNode*
create(NodeAlloc& alloc, int height, U&& data, bool isHead = false) { </s> remove template<typename NodeType, typename NodeAlloc, typename = void>
</s> add template <typename NodeType, typename NodeAlloc, typename = void> </s> remove template<typename NodeType, typename NodeAlloc>
class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
!NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
</s> add template <typename NodeType, typename NodeAlloc>
class NodeRecycler<
NodeType,
NodeAlloc,
typename std::enable_if<
!NodeType::template DestroyIsNoOp<NodeAlloc>::value>::type> {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> typedef typename SkipListType::const_iterator const_iterator;
<mask> typedef typename SkipListType::Skipper Skipper;
<mask>
<mask> explicit Accessor(std::shared_ptr<ConcurrentSkipList> skip_list)
<mask> : slHolder_(std::move(skip_list))
<mask> {
<mask> sl_ = slHolder_.get();
<mask> DCHECK(sl_ != nullptr);
<mask> sl_->recycler_.addRef();
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove explicit Accessor(ConcurrentSkipList *skip_list) : sl_(skip_list) {
</s> add explicit Accessor(ConcurrentSkipList* skip_list) : sl_(skip_list) { </s> remove Accessor(const Accessor &accessor) :
sl_(accessor.sl_),
slHolder_(accessor.slHolder_) {
</s> add Accessor(const Accessor& accessor)
: sl_(accessor.sl_), slHolder_(accessor.slHolder_) { </s> remove Accessor& operator=(const Accessor &accessor) {
</s> add Accessor& operator=(const Accessor& accessor) { </s> remove typedef std::size_t size_type;
typedef Value value_type;
typedef value_type& reference;
typedef value_type const& const_reference;
typedef value_type* iterator;
typedef value_type const* const_iterator;
typedef std::ptrdiff_t difference_type;
typedef std::reverse_iterator<iterator> reverse_iterator;
</s> add typedef std::size_t size_type;
typedef Value value_type;
typedef value_type& reference;
typedef value_type const& const_reference;
typedef value_type* iterator;
typedef value_type* pointer;
typedef value_type const* const_iterator;
typedef std::ptrdiff_t difference_type;
typedef std::reverse_iterator<iterator> reverse_iterator; </s> remove typedef std::reverse_iterator<iterator
#ifdef NO_ITERATOR_TRAITS
, value_type
#endif
> reverse_iterator;
typedef std::reverse_iterator<const_iterator
#ifdef NO_ITERATOR_TRAITS
, const value_type
#endif
> const_reverse_iterator;
</s> add typedef std::reverse_iterator<iterator> reverse_iterator;
typedef std::reverse_iterator<const_iterator> const_reverse_iterator; </s> remove typedef typename std::conditional<
kHasInlineCapacity,
HeapPtrWithCapacity,
HeapPtr
>::type PointerType;
</s> add typedef typename std::
conditional<kHasInlineCapacity, HeapPtrWithCapacity, HeapPtr>::type
PointerType;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep replace replace replace keep keep keep
|
<mask> }
<mask>
<mask> // Unsafe initializer: the caller assumes the responsibility to keep
<mask> // skip_list valid during the whole life cycle of the Acessor.
<mask> explicit Accessor(ConcurrentSkipList *skip_list) : sl_(skip_list) {
<mask> DCHECK(sl_ != nullptr);
<mask> sl_->recycler_.addRef();
<mask> }
<mask>
<mask> Accessor(const Accessor &accessor) :
<mask> sl_(accessor.sl_),
<mask> slHolder_(accessor.slHolder_) {
<mask> sl_->recycler_.addRef();
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove Accessor& operator=(const Accessor &accessor) {
</s> add Accessor& operator=(const Accessor& accessor) { </s> remove : slHolder_(std::move(skip_list))
{
</s> add : slHolder_(std::move(skip_list)) { </s> remove FOLLY_DEPRECATED("Replaced by try_get")
static T* get() { return getEntry().get(); }
</s> add [[deprecated("Replaced by try_get")]] static T* get() {
return getEntry().get();
} </s> remove bool empty() const { return sl_->size() == 0; }
size_t size() const { return sl_->size(); }
size_type max_size() const { return std::numeric_limits<size_type>::max(); }
</s> add bool empty() const {
return sl_->size() == 0;
}
size_t size() const {
return sl_->size();
}
size_type max_size() const {
return std::numeric_limits<size_type>::max();
} </s> remove iterator find(const key_type &value) { return iterator(sl_->find(value)); }
const_iterator find(const key_type &value) const {
</s> add iterator find(const key_type& value) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> slHolder_(accessor.slHolder_) {
<mask> sl_->recycler_.addRef();
<mask> }
<mask>
<mask> Accessor& operator=(const Accessor &accessor) {
<mask> if (this != &accessor) {
<mask> slHolder_ = accessor.slHolder_;
<mask> sl_->recycler_.releaseRef();
<mask> sl_ = accessor.sl_;
<mask> sl_->recycler_.addRef();
</s> [sdk33] Update iOS with RN 0.59 </s> remove Accessor(const Accessor &accessor) :
sl_(accessor.sl_),
slHolder_(accessor.slHolder_) {
</s> add Accessor(const Accessor& accessor)
: sl_(accessor.sl_), slHolder_(accessor.slHolder_) { </s> remove explicit Accessor(ConcurrentSkipList *skip_list) : sl_(skip_list) {
</s> add explicit Accessor(ConcurrentSkipList* skip_list) : sl_(skip_list) { </s> remove : slHolder_(std::move(skip_list))
{
</s> add : slHolder_(std::move(skip_list)) { </s> remove : ti_(other.ti_), tag_ti_(other.tag_ti_) {
}
</s> add : ti_(other.ti_), tag_ti_(other.tag_ti_) {} </s> remove bool empty() const { return sl_->size() == 0; }
size_t size() const { return sl_->size(); }
size_type max_size() const { return std::numeric_limits<size_type>::max(); }
</s> add bool empty() const {
return sl_->size() == 0;
}
size_t size() const {
return sl_->size();
}
size_type max_size() const {
return std::numeric_limits<size_type>::max();
} </s> remove BenchmarkSuspender& operator=(const BenchmarkSuspender &) = delete;
BenchmarkSuspender& operator=(BenchmarkSuspender && rhs) {
if (start.tv_nsec > 0 || start.tv_sec > 0) {
</s> add BenchmarkSuspender& operator=(const BenchmarkSuspender&) = delete;
BenchmarkSuspender& operator=(BenchmarkSuspender&& rhs) {
if (start != TimePoint{}) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace replace replace keep keep keep keep replace replace keep keep
|
<mask> ~Accessor() {
<mask> sl_->recycler_.releaseRef();
<mask> }
<mask>
<mask> bool empty() const { return sl_->size() == 0; }
<mask> size_t size() const { return sl_->size(); }
<mask> size_type max_size() const { return std::numeric_limits<size_type>::max(); }
<mask>
<mask> // returns end() if the value is not in the list, otherwise returns an
<mask> // iterator pointing to the data, and it's guaranteed that the data is valid
<mask> // as far as the Accessor is hold.
<mask> iterator find(const key_type &value) { return iterator(sl_->find(value)); }
<mask> const_iterator find(const key_type &value) const {
<mask> return iterator(sl_->find(value));
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove size_type count(const key_type &data) const { return contains(data); }
</s> add const_iterator find(const key_type& value) const {
return iterator(sl_->find(value));
}
size_type count(const key_type& data) const {
return contains(data);
} </s> remove size_type size() const { return this->doSize(); }
bool empty() const { return !size(); }
</s> add size_type size() const {
return this->doSize();
}
bool empty() const {
return !size();
} </s> remove size_t height() const { return sl_->height(); }
</s> add size_t height() const {
return sl_->height();
} </s> remove iterator begin() { return data(); }
iterator end() { return data() + size(); }
const_iterator begin() const { return data(); }
const_iterator end() const { return data() + size(); }
const_iterator cbegin() const { return begin(); }
const_iterator cend() const { return end(); }
</s> add iterator begin() {
return data();
}
iterator end() {
return data() + size();
}
const_iterator begin() const {
return data();
}
const_iterator end() const {
return data() + size();
}
const_iterator cbegin() const {
return begin();
}
const_iterator cend() const {
return end();
} </s> remove bool empty() const { return size() == 0; }
</s> add bool empty() const {
return size() == 0;
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> iterator find(const key_type &value) { return iterator(sl_->find(value)); }
<mask> const_iterator find(const key_type &value) const {
<mask> return iterator(sl_->find(value));
<mask> }
<mask> size_type count(const key_type &data) const { return contains(data); }
<mask>
<mask> iterator begin() const {
<mask> NodeType* head = sl_->head_.load(std::memory_order_consume);
<mask> return iterator(head->next());
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove iterator find(const key_type &value) { return iterator(sl_->find(value)); }
const_iterator find(const key_type &value) const {
</s> add iterator find(const key_type& value) { </s> remove bool empty() const { return sl_->size() == 0; }
size_t size() const { return sl_->size(); }
size_type max_size() const { return std::numeric_limits<size_type>::max(); }
</s> add bool empty() const {
return sl_->size() == 0;
}
size_t size() const {
return sl_->size();
}
size_type max_size() const {
return std::numeric_limits<size_type>::max();
} </s> remove iterator end() const { return iterator(nullptr); }
const_iterator cbegin() const { return begin(); }
const_iterator cend() const { return end(); }
</s> add iterator end() const {
return iterator(nullptr);
}
const_iterator cbegin() const {
return begin();
}
const_iterator cend() const {
return end();
} </s> remove iterator lower_bound(const key_type &data) const {
</s> add iterator lower_bound(const key_type& data) const { </s> remove size_t erase(const key_type &data) { return remove(data); }
</s> add size_t erase(const key_type& data) {
return remove(data);
} </s> remove iterator begin() { return data(); }
iterator end() { return data() + size(); }
const_iterator begin() const { return data(); }
const_iterator end() const { return data() + size(); }
const_iterator cbegin() const { return begin(); }
const_iterator cend() const { return end(); }
</s> add iterator begin() {
return data();
}
iterator end() {
return data() + size();
}
const_iterator begin() const {
return data();
}
const_iterator end() const {
return data() + size();
}
const_iterator cbegin() const {
return begin();
}
const_iterator cend() const {
return end();
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace replace replace keep replace replace keep keep keep keep
|
<mask> iterator begin() const {
<mask> NodeType* head = sl_->head_.load(std::memory_order_consume);
<mask> return iterator(head->next());
<mask> }
<mask> iterator end() const { return iterator(nullptr); }
<mask> const_iterator cbegin() const { return begin(); }
<mask> const_iterator cend() const { return end(); }
<mask>
<mask> template<typename U,
<mask> typename=typename std::enable_if<std::is_convertible<U, T>::value>::type>
<mask> std::pair<iterator, bool> insert(U&& data) {
<mask> auto ret = sl_->addOrGetData(std::forward<U>(data));
<mask> return std::make_pair(iterator(ret.first), ret.second);
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove iterator begin() { return data(); }
iterator end() { return data() + size(); }
const_iterator begin() const { return data(); }
const_iterator end() const { return data() + size(); }
const_iterator cbegin() const { return begin(); }
const_iterator cend() const { return end(); }
</s> add iterator begin() {
return data();
}
iterator end() {
return data() + size();
}
const_iterator begin() const {
return data();
}
const_iterator end() const {
return data() + size();
}
const_iterator cbegin() const {
return begin();
}
const_iterator cend() const {
return end();
} </s> remove size_t erase(const key_type &data) { return remove(data); }
</s> add size_t erase(const key_type& data) {
return remove(data);
} </s> remove size_type count(const key_type &data) const { return contains(data); }
</s> add const_iterator find(const key_type& value) const {
return iterator(sl_->find(value));
}
size_type count(const key_type& data) const {
return contains(data);
} </s> remove reverse_iterator rbegin() { return reverse_iterator(end()); }
reverse_iterator rend() { return reverse_iterator(begin()); }
</s> add reverse_iterator rbegin() {
return reverse_iterator(end());
}
reverse_iterator rend() {
return reverse_iterator(begin());
} </s> remove const_iterator cend() const { return end(); }
</s> add const_iterator cend() const {
return end();
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep replace keep replace keep
|
<mask> }
<mask> size_t erase(const key_type &data) { return remove(data); }
<mask>
<mask> iterator lower_bound(const key_type &data) const {
<mask> return iterator(sl_->lower_bound(data));
</s> [sdk33] Update iOS with RN 0.59 </s> remove size_t height() const { return sl_->height(); }
</s> add size_t height() const {
return sl_->height();
} </s> remove template<typename U,
typename=typename std::enable_if<std::is_convertible<U, T>::value>::type>
</s> add template <
typename U,
typename =
typename std::enable_if<std::is_convertible<U, T>::value>::type> </s> remove size_type count(const key_type &data) const { return contains(data); }
</s> add const_iterator find(const key_type& value) const {
return iterator(sl_->find(value));
}
size_type count(const key_type& data) const {
return contains(data);
} </s> remove SkipListType *sl_;
</s> add SkipListType* sl_; </s> remove iterator find(const key_type &value) { return iterator(sl_->find(value)); }
const_iterator find(const key_type &value) const {
</s> add iterator find(const key_type& value) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> iterator lower_bound(const key_type &data) const {
<mask> return iterator(sl_->lower_bound(data));
<mask> }
<mask>
<mask> size_t height() const { return sl_->height(); }
<mask>
<mask> // first() returns pointer to the first element in the skiplist, or
<mask> // nullptr if empty.
<mask> //
<mask> // last() returns the pointer to the last element in the skiplist,
</s> [sdk33] Update iOS with RN 0.59 </s> remove iterator lower_bound(const key_type &data) const {
</s> add iterator lower_bound(const key_type& data) const { </s> remove const key_type *first() const { return sl_->first(); }
const key_type *last() const { return sl_->last(); }
</s> add const key_type* first() const {
return sl_->first();
}
const key_type* last() const {
return sl_->last();
} </s> remove iterator find(const key_type &value) { return iterator(sl_->find(value)); }
const_iterator find(const key_type &value) const {
</s> add iterator find(const key_type& value) { </s> remove size_t erase(const key_type &data) { return remove(data); }
</s> add size_t erase(const key_type& data) {
return remove(data);
} </s> remove bool empty() const { return sl_->size() == 0; }
size_t size() const { return sl_->size(); }
size_type max_size() const { return std::numeric_limits<size_type>::max(); }
</s> add bool empty() const {
return sl_->size() == 0;
}
size_t size() const {
return sl_->size();
}
size_type max_size() const {
return std::numeric_limits<size_type>::max();
} </s> remove bool contains(const key_type &data) const { return sl_->find(data); }
bool add(const key_type &data) { return sl_->addOrGetData(data).second; }
bool remove(const key_type &data) { return sl_->remove(data); }
</s> add bool contains(const key_type& data) const {
return sl_->find(data);
}
bool add(const key_type& data) {
return sl_->addOrGetData(data).second;
}
bool remove(const key_type& data) {
return sl_->remove(data);
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> // guaranteed to be the min_element() in the list. Similarly
<mask> // last() is not guaranteed to be the max_element(), and both of them can
<mask> // be invalid (i.e. nullptr), so we name them differently from front() and
<mask> // tail() here.
<mask> const key_type *first() const { return sl_->first(); }
<mask> const key_type *last() const { return sl_->last(); }
<mask>
<mask> // Try to remove the last element in the skip list.
<mask> //
<mask> // Returns true if we removed it, false if either the list is empty
<mask> // or a race condition happened (i.e. the used-to-be last element
</s> [sdk33] Update iOS with RN 0.59 </s> remove size_t height() const { return sl_->height(); }
</s> add size_t height() const {
return sl_->height();
} </s> remove bool contains(const key_type &data) const { return sl_->find(data); }
bool add(const key_type &data) { return sl_->addOrGetData(data).second; }
bool remove(const key_type &data) { return sl_->remove(data); }
</s> add bool contains(const key_type& data) const {
return sl_->find(data);
}
bool add(const key_type& data) {
return sl_->addOrGetData(data).second;
}
bool remove(const key_type& data) {
return sl_->remove(data);
} </s> remove iterator find(const key_type &value) { return iterator(sl_->find(value)); }
const_iterator find(const key_type &value) const {
</s> add iterator find(const key_type& value) { </s> remove SkipListType* skiplist() const { return sl_; }
</s> add SkipListType* skiplist() const {
return sl_;
} </s> remove bool empty() const { return sl_->size() == 0; }
size_t size() const { return sl_->size(); }
size_type max_size() const { return std::numeric_limits<size_type>::max(); }
</s> add bool empty() const {
return sl_->size() == 0;
}
size_t size() const {
return sl_->size();
}
size_type max_size() const {
return std::numeric_limits<size_type>::max();
} </s> remove if (&that != this) {
// Q: Why is is safe to destroy and reconstruct this object in place?
// A: Two reasons: First, `Function` is a final class, so in doing this
// we aren't slicing off any derived parts. And second, the move
// operation is guaranteed not to throw so we always leave the object
// in a valid state.
this->~Function();
::new (this) Function(std::move(that));
}
</s> add // Q: Why is it safe to destroy and reconstruct this object in place?
// A: Two reasons: First, `Function` is a final class, so in doing this
// we aren't slicing off any derived parts. And second, the move
// operation is guaranteed not to throw so we always leave the object
// in a valid state.
// In the case of self-move (this == &that), this leaves the object in
// a default-constructed state. First the object is destroyed, then we
// pass the destroyed object to the move constructor. The first thing the
// move constructor does is default-construct the object. That object is
// "moved" into itself, which is a no-op for a default-constructed Function.
this->~Function();
::new (this) Function(std::move(that));
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep replace keep keep keep keep replace keep keep keep
|
<mask> return last ? sl_->remove(*last) : false;
<mask> }
<mask>
<mask> std::pair<key_type*, bool> addOrGetData(const key_type &data) {
<mask> auto ret = sl_->addOrGetData(data);
<mask> return std::make_pair(&ret.first->data(), ret.second);
<mask> }
<mask>
<mask> SkipListType* skiplist() const { return sl_; }
<mask>
<mask> // legacy interfaces
<mask> // TODO:(xliu) remove these.
</s> [sdk33] Update iOS with RN 0.59 </s> remove bool contains(const key_type &data) const { return sl_->find(data); }
bool add(const key_type &data) { return sl_->addOrGetData(data).second; }
bool remove(const key_type &data) { return sl_->remove(data); }
</s> add bool contains(const key_type& data) const {
return sl_->find(data);
}
bool add(const key_type& data) {
return sl_->addOrGetData(data).second;
}
bool remove(const key_type& data) {
return sl_->remove(data);
} </s> remove size_t erase(const key_type &data) { return remove(data); }
</s> add size_t erase(const key_type& data) {
return remove(data);
} </s> remove template<typename U,
typename=typename std::enable_if<std::is_convertible<U, T>::value>::type>
</s> add template <
typename U,
typename =
typename std::enable_if<std::is_convertible<U, T>::value>::type> </s> remove SkipListType *sl_;
</s> add SkipListType* sl_; </s> remove iterator lower_bound(const key_type &data) const {
</s> add iterator lower_bound(const key_type& data) const {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep replace replace replace keep keep replace keep keep
|
<mask> // Returns true if the node is added successfully, false if not, i.e. the
<mask> // node with the same key already existed in the list.
<mask> bool contains(const key_type &data) const { return sl_->find(data); }
<mask> bool add(const key_type &data) { return sl_->addOrGetData(data).second; }
<mask> bool remove(const key_type &data) { return sl_->remove(data); }
<mask>
<mask> private:
<mask> SkipListType *sl_;
<mask> std::shared_ptr<SkipListType> slHolder_;
<mask> };
</s> [sdk33] Update iOS with RN 0.59 </s> remove SkipListType* skiplist() const { return sl_; }
</s> add SkipListType* skiplist() const {
return sl_;
} </s> remove iterator lower_bound(const key_type &data) const {
</s> add iterator lower_bound(const key_type& data) const { </s> remove iterator find(const key_type &value) { return iterator(sl_->find(value)); }
const_iterator find(const key_type &value) const {
</s> add iterator find(const key_type& value) { </s> remove size_t erase(const key_type &data) { return remove(data); }
</s> add size_t erase(const key_type& data) {
return remove(data);
} </s> remove const key_type *first() const { return sl_->first(); }
const key_type *last() const { return sl_->last(); }
</s> add const key_type* first() const {
return sl_->first();
}
const key_type* last() const {
return sl_->last();
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask> std::shared_ptr<SkipListType> slHolder_;
<mask> };
<mask>
<mask> // implements forward iterator concept.
<mask> template<typename ValT, typename NodeT>
<mask> class detail::csl_iterator :
<mask> public boost::iterator_facade<csl_iterator<ValT, NodeT>,
<mask> ValT, boost::forward_traversal_tag> {
<mask> public:
<mask> typedef ValT value_type;
<mask> typedef value_type& reference;
<mask> typedef value_type* pointer;
<mask> typedef ptrdiff_t difference_type;
</s> [sdk33] Update iOS with RN 0.59 </s> remove SkipListType *sl_;
</s> add SkipListType* sl_; </s> remove typedef T value_type;
</s> add typedef T value_type; </s> remove typedef std::size_t size_type;
typedef Value value_type;
typedef value_type& reference;
typedef value_type const& const_reference;
typedef value_type* iterator;
typedef value_type const* const_iterator;
typedef std::ptrdiff_t difference_type;
typedef std::reverse_iterator<iterator> reverse_iterator;
</s> add typedef std::size_t size_type;
typedef Value value_type;
typedef value_type& reference;
typedef value_type const& const_reference;
typedef value_type* iterator;
typedef value_type* pointer;
typedef value_type const* const_iterator;
typedef std::ptrdiff_t difference_type;
typedef std::reverse_iterator<iterator> reverse_iterator; </s> remove Skipper(const std::shared_ptr<SkipListType>& skipList) :
accessor_(skipList) {
</s> add Skipper(const std::shared_ptr<SkipListType>& skipList) : accessor_(skipList) { </s> remove template<typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT>
</s> add template <typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT> </s> remove template<typename ValT, typename NodeT> class csl_iterator;
</s> add template <typename ValT, typename NodeT>
class csl_iterator;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep replace replace replace replace keep keep replace replace keep keep keep keep
|
<mask> explicit csl_iterator(NodeT* node = nullptr) : node_(node) {}
<mask>
<mask> template<typename OtherVal, typename OtherNode>
<mask> csl_iterator(const csl_iterator<OtherVal, OtherNode> &other,
<mask> typename std::enable_if<std::is_convertible<OtherVal, ValT>::value>::type*
<mask> = 0) : node_(other.node_) {}
<mask>
<mask> size_t nodeSize() const {
<mask> return node_ == nullptr ? 0 :
<mask> node_->height() * sizeof(NodeT*) + sizeof(*this);
<mask> }
<mask>
<mask> bool good() const { return node_ != nullptr; }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove bool good() const { return node_ != nullptr; }
</s> add bool good() const {
return node_ != nullptr;
} </s> remove template<class,class> friend class csl_iterator;
</s> add template <class, class>
friend class csl_iterator; </s> remove explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) { }
</s> add explicit NodeRecycler(const NodeAlloc& alloc) : alloc_(alloc) {} </s> remove void increment() { node_ = node_->next(); };
bool equal(const csl_iterator& other) const { return node_ == other.node_; }
value_type& dereference() const { return node_->data(); }
</s> add void increment() {
node_ = node_->next();
}
bool equal(const csl_iterator& other) const {
return node_ == other.node_;
}
value_type& dereference() const {
return node_->data();
} </s> remove return pred == head_.load(std::memory_order_relaxed)
? nullptr : &pred->data();
</s> add return pred == head_.load(std::memory_order_relaxed) ? nullptr
: &pred->data();
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep replace
|
<mask> return node_ == nullptr ? 0 :
<mask> node_->height() * sizeof(NodeT*) + sizeof(*this);
<mask> }
<mask>
<mask> bool good() const { return node_ != nullptr; }
<mask>
<mask> private:
<mask> friend class boost::iterator_core_access;
<mask> template<class,class> friend class csl_iterator;
</s> [sdk33] Update iOS with RN 0.59 </s> remove return node_ == nullptr ? 0 :
node_->height() * sizeof(NodeT*) + sizeof(*this);
</s> add return node_ == nullptr ? 0
: node_->height() * sizeof(NodeT*) + sizeof(*this); </s> remove void increment() { node_ = node_->next(); };
bool equal(const csl_iterator& other) const { return node_ == other.node_; }
value_type& dereference() const { return node_->data(); }
</s> add void increment() {
node_ = node_->next();
}
bool equal(const csl_iterator& other) const {
return node_ == other.node_;
}
value_type& dereference() const {
return node_->data();
} </s> remove template<typename OtherVal, typename OtherNode>
csl_iterator(const csl_iterator<OtherVal, OtherNode> &other,
typename std::enable_if<std::is_convertible<OtherVal, ValT>::value>::type*
= 0) : node_(other.node_) {}
</s> add template <typename OtherVal, typename OtherNode>
csl_iterator(
const csl_iterator<OtherVal, OtherNode>& other,
typename std::enable_if<
std::is_convertible<OtherVal, ValT>::value>::type* = nullptr)
: node_(other.node_) {} </s> remove threadlocal_detail::ThreadEntry* e_;
</s> add threadlocal_detail::ThreadEntryNode* e_; </s> remove bool good() const { return succs_[0] != nullptr; }
</s> add bool good() const {
return succs_[0] != nullptr;
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> private:
<mask> friend class boost::iterator_core_access;
<mask> template<class,class> friend class csl_iterator;
<mask>
<mask> void increment() { node_ = node_->next(); };
<mask> bool equal(const csl_iterator& other) const { return node_ == other.node_; }
<mask> value_type& dereference() const { return node_->data(); }
<mask>
<mask> NodeT* node_;
<mask> };
<mask>
<mask> // Skipper interface
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<class,class> friend class csl_iterator;
</s> add template <class, class>
friend class csl_iterator; </s> remove bool good() const { return node_ != nullptr; }
</s> add bool good() const {
return node_ != nullptr;
} </s> remove threadlocal_detail::ThreadEntry* e_;
</s> add threadlocal_detail::ThreadEntryNode* e_; </s> remove friend class boost::iterator_core_access;
</s> add </s> remove T& dereference() const {
return *static_cast<T*>(e_->elements[accessor_->id_].ptr);
</s> add const T& dereference() const {
return *static_cast<T*>(
e_->getThreadEntry()->elements[accessor_->id_].ptr);
}
T& dereference() {
return *static_cast<T*>(
e_->getThreadEntry()->elements[accessor_->id_].ptr); </s> remove mutable ttype cache_;
mutable bool valid_;
</s> add mutable Optional<ttype> cache_;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> NodeT* node_;
<mask> };
<mask>
<mask> // Skipper interface
<mask> template<typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT>
<mask> class ConcurrentSkipList<T, Comp, NodeAlloc, MAX_HEIGHT>::Skipper {
<mask> typedef detail::SkipListNode<T> NodeType;
<mask> typedef ConcurrentSkipList<T, Comp, NodeAlloc, MAX_HEIGHT> SkipListType;
<mask> typedef typename SkipListType::Accessor Accessor;
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT>
</s> add template <typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT> </s> remove typedef T value_type;
</s> add typedef T value_type; </s> remove static_assert(MAX_HEIGHT >= 2 && MAX_HEIGHT < 64,
</s> add static_assert(
MAX_HEIGHT >= 2 && MAX_HEIGHT < 64, </s> remove template<typename NodeType, typename NodeAlloc, typename = void>
</s> add template <typename NodeType, typename NodeAlloc, typename = void> </s> remove template<typename NodeAlloc, typename U,
typename=typename std::enable_if<std::is_convertible<U, T>::value>::type>
static SkipListNode* create(
NodeAlloc& alloc, int height, U&& data, bool isHead = false) {
</s> add template <
typename NodeAlloc,
typename U,
typename =
typename std::enable_if<std::is_convertible<U, T>::value>::type>
static SkipListNode*
create(NodeAlloc& alloc, int height, U&& data, bool isHead = false) { </s> remove template<typename NodeType, typename NodeAlloc>
class NodeRecycler<NodeType, NodeAlloc, typename std::enable_if<
!NodeType::template destroyIsNoOp<NodeAlloc>()>::type> {
</s> add template <typename NodeType, typename NodeAlloc>
class NodeRecycler<
NodeType,
NodeAlloc,
typename std::enable_if<
!NodeType::template DestroyIsNoOp<NodeAlloc>::value>::type> {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep replace keep keep keep keep replace replace keep keep keep keep
|
<mask>
<mask> public:
<mask> typedef T value_type;
<mask> typedef T& reference;
<mask> typedef T* pointer;
<mask> typedef ptrdiff_t difference_type;
<mask>
<mask> Skipper(const std::shared_ptr<SkipListType>& skipList) :
<mask> accessor_(skipList) {
<mask> init();
<mask> }
<mask>
<mask> Skipper(const Accessor& accessor) : accessor_(accessor) {
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<typename ValT, typename NodeT>
class detail::csl_iterator :
public boost::iterator_facade<csl_iterator<ValT, NodeT>,
ValT, boost::forward_traversal_tag> {
</s> add template <typename ValT, typename NodeT>
class detail::csl_iterator : public boost::iterator_facade<
csl_iterator<ValT, NodeT>,
ValT,
boost::forward_traversal_tag> { </s> remove typedef std::size_t size_type;
typedef Value value_type;
typedef value_type& reference;
typedef value_type const& const_reference;
typedef value_type* iterator;
typedef value_type const* const_iterator;
typedef std::ptrdiff_t difference_type;
typedef std::reverse_iterator<iterator> reverse_iterator;
</s> add typedef std::size_t size_type;
typedef Value value_type;
typedef value_type& reference;
typedef value_type const& const_reference;
typedef value_type* iterator;
typedef value_type* pointer;
typedef value_type const* const_iterator;
typedef std::ptrdiff_t difference_type;
typedef std::reverse_iterator<iterator> reverse_iterator; </s> remove template<typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT>
</s> add template <typename T, typename Comp, typename NodeAlloc, int MAX_HEIGHT> </s> remove : slHolder_(std::move(skip_list))
{
</s> add : slHolder_(std::move(skip_list)) { </s> remove template<typename OtherVal, typename OtherNode>
csl_iterator(const csl_iterator<OtherVal, OtherNode> &other,
typename std::enable_if<std::is_convertible<OtherVal, ValT>::value>::type*
= 0) : node_(other.node_) {}
</s> add template <typename OtherVal, typename OtherNode>
csl_iterator(
const csl_iterator<OtherVal, OtherNode>& other,
typename std::enable_if<
std::is_convertible<OtherVal, ValT>::value>::type* = nullptr)
: node_(other.node_) {}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> succs_[i] = head_node->skip(i);
<mask> }
<mask> int max_layer = maxLayer();
<mask> for (int i = 0; i < max_layer; ++i) {
<mask> hints_[i] = i + 1;
<mask> }
<mask> hints_[max_layer] = max_layer;
<mask> }
<mask>
<mask> // advance to the next node in the list.
</s> [sdk33] Update iOS with RN 0.59 </s> remove Skipper& operator ++() {
</s> add Skipper& operator++() { </s> remove for (int i = 0; i < node->height_; ++i) {
</s> add for (uint8_t i = 0; i < node->height_; ++i) { </s> remove for (std::size_t i = 0; i < idx; ++i) {
mem[i].~T();
</s> add for (SizeType i = 0; i <= pos; ++i) {
out[i].~T(); </s> remove for (size_t i = 0; i < n; ++i) {
op(&mem[idx]);
++idx;
</s> add if (begin + pos < end) {
this->moveToUninitialized(begin + pos, end, out + pos + 1); </s> remove sizeLimitTable_[i] = sizeLimit > kMaxSizeLimit ?
kMaxSizeLimit :
static_cast<size_t>(sizeLimit);
</s> add sizeLimitTable_[i] = sizeLimit > kMaxSizeLimit
? kMaxSizeLimit
: static_cast<size_t>(sizeLimit); </s> remove int highBits = unhex(input[i]);
int lowBits = unhex(input[i + 1]);
if (highBits < 0 || lowBits < 0) {
</s> add int highBits = detail::hexTable[static_cast<uint8_t>(input[i])];
int lowBits = detail::hexTable[static_cast<uint8_t>(input[i + 1])];
if ((highBits | lowBits) & 0x10) {
// One of the characters wasn't a hex digit
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> hints_[max_layer] = max_layer;
<mask> }
<mask>
<mask> // advance to the next node in the list.
<mask> Skipper& operator ++() {
<mask> preds_[0] = succs_[0];
<mask> succs_[0] = preds_[0]->skip(0);
<mask> int height = curHeight();
<mask> for (int i = 1; i < height && preds_[0] == succs_[i]; ++i) {
<mask> preds_[i] = succs_[i];
</s> [sdk33] Update iOS with RN 0.59 </s> remove hints_[i] = i + 1;
</s> add hints_[i] = uint8_t(i + 1); </s> remove for (int i = 0; i < node->height_; ++i) {
</s> add for (uint8_t i = 0; i < node->height_; ++i) { </s> remove int maxLayer() const { return headHeight_ - 1; }
</s> add int maxLayer() const {
return headHeight_ - 1;
} </s> remove bool good() const { return succs_[0] != nullptr; }
</s> add bool good() const {
return succs_[0] != nullptr;
} </s> remove for (std::size_t i = 0; i < idx; ++i) {
mem[i].~T();
</s> add for (SizeType i = 0; i <= pos; ++i) {
out[i].~T(); </s> remove sizeLimitTable_[i] = sizeLimit > kMaxSizeLimit ?
kMaxSizeLimit :
static_cast<size_t>(sizeLimit);
</s> add sizeLimitTable_[i] = sizeLimit > kMaxSizeLimit
? kMaxSizeLimit
: static_cast<size_t>(sizeLimit);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep replace keep keep keep keep
|
<mask> }
<mask> return *this;
<mask> }
<mask>
<mask> bool good() const { return succs_[0] != nullptr; }
<mask>
<mask> int maxLayer() const { return headHeight_ - 1; }
<mask>
<mask> int curHeight() const {
<mask> // need to cap the height to the cached head height, as the current node
<mask> // might be some newly inserted node and also during the time period the
</s> [sdk33] Update iOS with RN 0.59 </s> remove int maxLayer() const { return height() - 1; }
</s> add int maxLayer() const {
return height() - 1;
} </s> remove value_type& data() { return data_; }
const value_type& data() const { return data_; }
int maxLayer() const { return height_ - 1; }
int height() const { return height_; }
</s> add value_type& data() {
return data_;
}
const value_type& data() const {
return data_;
}
int maxLayer() const {
return height_ - 1;
}
int height() const {
return height_;
} </s> remove Skipper& operator ++() {
</s> add Skipper& operator++() { </s> remove const value_type &data() const {
</s> add const value_type& data() const { </s> remove static std::shared_ptr<SkipListType> createInstance(int height,
const NodeAlloc& alloc) {
</s> add static std::shared_ptr<SkipListType> createInstance(
int height,
const NodeAlloc& alloc) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep replace keep keep keep keep replace keep keep keep
|
<mask>
<mask> const value_type &data() const {
<mask> DCHECK(succs_[0] != nullptr);
<mask> return succs_[0]->data();
<mask> }
<mask>
<mask> value_type &operator *() const {
<mask> DCHECK(succs_[0] != nullptr);
<mask> return succs_[0]->data();
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove value_type *operator->() {
</s> add value_type* operator->() { </s> remove return candidate->fullyLinked() &&
candidate->maxLayer() == layer &&
!candidate->markedForRemoval();
</s> add return candidate->fullyLinked() && candidate->maxLayer() == layer &&
!candidate->markedForRemoval(); </s> remove DCHECK(succs_[0] != nullptr) << "lyr=" << lyr
<< "; max_layer=" << max_layer;
</s> add DCHECK(succs_[0] != nullptr)
<< "lyr=" << lyr << "; max_layer=" << max_layer; </s> remove const value_type *last() const {
NodeType *pred = head_.load(std::memory_order_consume);
NodeType *node = nullptr;
</s> add const value_type* last() const {
NodeType* pred = head_.load(std::memory_order_consume);
NodeType* node = nullptr; </s> remove NodeType* lower_bound(const value_type &data) const {
</s> add NodeType* lower_bound(const value_type& data) const {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> DCHECK(succs_[0] != nullptr);
<mask> return succs_[0]->data();
<mask> }
<mask>
<mask> value_type *operator->() {
<mask> DCHECK(succs_[0] != nullptr);
<mask> return &succs_[0]->data();
<mask> }
<mask>
<mask> /*
</s> [sdk33] Update iOS with RN 0.59 </s> remove value_type &operator *() const {
</s> add value_type& operator*() const { </s> remove const value_type &data() const {
</s> add const value_type& data() const { </s> remove DCHECK(succs_[0] != nullptr) << "lyr=" << lyr
<< "; max_layer=" << max_layer;
</s> add DCHECK(succs_[0] != nullptr)
<< "lyr=" << lyr << "; max_layer=" << max_layer; </s> remove return pred == head_.load(std::memory_order_relaxed)
? nullptr : &pred->data();
</s> add return pred == head_.load(std::memory_order_relaxed) ? nullptr
: &pred->data(); </s> remove Accessor(const Accessor &accessor) :
sl_(accessor.sl_),
slHolder_(accessor.slHolder_) {
</s> add Accessor(const Accessor& accessor)
: sl_(accessor.sl_), slHolder_(accessor.slHolder_) { </s> remove return candidate->fullyLinked() &&
candidate->maxLayer() == layer &&
!candidate->markedForRemoval();
</s> add return candidate->fullyLinked() && candidate->maxLayer() == layer &&
!candidate->markedForRemoval();
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep replace keep replace keep keep
|
<mask> * Returns true if the data is found, false otherwise.
<mask> */
<mask> bool to(const value_type &data) {
<mask> int layer = curHeight() - 1;
<mask> if (layer < 0) return false; // reaches the end of the list
<mask>
<mask> int lyr = hints_[layer];
</s> [sdk33] Update iOS with RN 0.59 </s> remove if (ret.second && !ret.first->markedForRemoval()) return ret.first;
</s> add if (ret.second && !ret.first->markedForRemoval()) {
return ret.first;
} </s> remove NodeType* find(const value_type &data) {
</s> add NodeType* find(const value_type& data) { </s> remove hints_[layer] = lyr; // update the hint
</s> add hints_[layer] = lyr; // update the hint </s> remove int foundLayer = SkipListType::
findInsertionPoint(preds_[lyr], lyr, data, preds_, succs_);
if (foundLayer < 0) return false;
</s> add int foundLayer = SkipListType::findInsertionPoint(
preds_[lyr], lyr, data, preds_, succs_);
if (foundLayer < 0) {
return false;
} </s> remove NodeType* preds[MAX_HEIGHT], *succs[MAX_HEIGHT];
</s> add NodeType *preds[MAX_HEIGHT], *succs[MAX_HEIGHT];
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep replace keep replace replace replace keep
|
<mask> while (SkipListType::greater(data, succs_[lyr]) && lyr < max_layer) {
<mask> ++lyr;
<mask> }
<mask> hints_[layer] = lyr; // update the hint
<mask>
<mask> int foundLayer = SkipListType::
<mask> findInsertionPoint(preds_[lyr], lyr, data, preds_, succs_);
<mask> if (foundLayer < 0) return false;
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove DCHECK(succs_[0] != nullptr) << "lyr=" << lyr
<< "; max_layer=" << max_layer;
</s> add DCHECK(succs_[0] != nullptr)
<< "lyr=" << lyr << "; max_layer=" << max_layer; </s> remove if (layer < 0) return false; // reaches the end of the list
</s> add if (layer < 0) {
return false; // reaches the end of the list
} </s> remove bool to(const value_type &data) {
</s> add bool to(const value_type& data) { </s> remove NodeType *node = pred->skip(layer);
</s> add NodeType* node = pred->skip(layer); </s> remove int highBits = unhex(input[i]);
int lowBits = unhex(input[i + 1]);
if (highBits < 0 || lowBits < 0) {
</s> add int highBits = detail::hexTable[static_cast<uint8_t>(input[i])];
int lowBits = detail::hexTable[static_cast<uint8_t>(input[i + 1])];
if ((highBits | lowBits) & 0x10) {
// One of the characters wasn't a hex digit
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> int foundLayer = SkipListType::
<mask> findInsertionPoint(preds_[lyr], lyr, data, preds_, succs_);
<mask> if (foundLayer < 0) return false;
<mask>
<mask> DCHECK(succs_[0] != nullptr) << "lyr=" << lyr
<mask> << "; max_layer=" << max_layer;
<mask> return !succs_[0]->markedForRemoval();
<mask> }
<mask>
<mask> private:
<mask> NodeType* head() const {
</s> [sdk33] Update iOS with RN 0.59 </s> remove int foundLayer = SkipListType::
findInsertionPoint(preds_[lyr], lyr, data, preds_, succs_);
if (foundLayer < 0) return false;
</s> add int foundLayer = SkipListType::findInsertionPoint(
preds_[lyr], lyr, data, preds_, succs_);
if (foundLayer < 0) {
return false;
} </s> remove hints_[layer] = lyr; // update the hint
</s> add hints_[layer] = lyr; // update the hint </s> remove << " nodeheight=" << nodeHeight;
</s> add << " nodeheight=" << nodeHeight; </s> remove NodeType *preds[MAX_HEIGHT],
NodeType *succs[MAX_HEIGHT],
bool adding=true) {
</s> add NodeType* preds[MAX_HEIGHT],
NodeType* succs[MAX_HEIGHT],
bool adding = true) { </s> remove SingletonHolderState::NotRegistered) {
auto ptr = SingletonVault::stackTraceGetter().load();
LOG(FATAL) << "Creating instance for unregistered singleton: "
<< type().name() << "\n"
<< "Stacktrace:"
<< "\n"
<< (ptr ? (*ptr)() : "(not available)");
</s> add SingletonHolderState::NotRegistered) {
detail::singletonWarnCreateUnregisteredAndAbort(type()); </s> remove int highBits = unhex(input[i]);
int lowBits = unhex(input[i + 1]);
if (highBits < 0 || lowBits < 0) {
</s> add int highBits = detail::hexTable[static_cast<uint8_t>(input[i])];
int lowBits = detail::hexTable[static_cast<uint8_t>(input[i + 1])];
if ((highBits | lowBits) & 0x10) {
// One of the characters wasn't a hex digit
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/ConcurrentSkipList.h
|
keep replace keep keep keep keep keep
|
<mask> /*
<mask> * Copyright 2016 Facebook, Inc.
<mask> *
<mask> * Licensed under the Apache License, Version 2.0 (the "License");
<mask> * you may not use this file except in compliance with the License.
<mask> * You may obtain a copy of the License at
<mask> *
</s> [sdk33] Update iOS with RN 0.59
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep replace replace replace keep replace replace
|
<mask> };
<mask>
<mask> template <> const char *const MaxString<uint8_t>::value = "255";
<mask> template <> const char *const MaxString<uint16_t>::value = "65535";
<mask> template <> const char *const MaxString<uint32_t>::value = "4294967295";
<mask> #if __SIZEOF_LONG__ == 4
<mask> template <> const char *const MaxString<unsigned long>::value =
<mask> "4294967295";
</s> [sdk33] Update iOS with RN 0.59 </s> remove template <> const char *const MaxString<unsigned long>::value =
"18446744073709551615";
</s> add template <>
const char* const MaxString<unsigned long>::value = "18446744073709551615"; </s> remove static_assert(sizeof(unsigned long) >= 4,
"Wrong value for MaxString<unsigned long>::value,"
" please update.");
template <> const char *const MaxString<unsigned long long>::value =
"18446744073709551615";
static_assert(sizeof(unsigned long long) >= 8,
"Wrong value for MaxString<unsigned long long>::value"
", please update.");
</s> add static_assert(
sizeof(unsigned long) >= 4,
"Wrong value for MaxString<unsigned long>::value,"
" please update.");
template <>
const char* const MaxString<unsigned long long>::value = "18446744073709551615";
static_assert(
sizeof(unsigned long long) >= 8,
"Wrong value for MaxString<unsigned long long>::value"
", please update."); </s> remove template <> const char *const MaxString<__uint128_t>::value =
"340282366920938463463374607431768211455";
</s> add template <>
const char* const MaxString<__uint128_t>::value =
"340282366920938463463374607431768211455"; </s> remove template <class String1, class String2>
void backslashify(const String1& input, String2& output, bool hex_style) {
</s> add template <class OutputString>
void backslashify(
folly::StringPiece input,
OutputString& output,
bool hex_style) { </s> remove struct AllConvertible<> {
enum { value = true };
};
</s> add struct IsConvertible<void, decltype(std::ignore)> : std::true_type {};
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep replace replace keep replace replace replace replace replace replace replace replace keep keep
|
<mask> "4294967295";
<mask> #else
<mask> template <> const char *const MaxString<unsigned long>::value =
<mask> "18446744073709551615";
<mask> #endif
<mask> static_assert(sizeof(unsigned long) >= 4,
<mask> "Wrong value for MaxString<unsigned long>::value,"
<mask> " please update.");
<mask> template <> const char *const MaxString<unsigned long long>::value =
<mask> "18446744073709551615";
<mask> static_assert(sizeof(unsigned long long) >= 8,
<mask> "Wrong value for MaxString<unsigned long long>::value"
<mask> ", please update.");
<mask>
<mask> #if FOLLY_HAVE_INT128_T
</s> [sdk33] Update iOS with RN 0.59 </s> remove template <> const char *const MaxString<unsigned long>::value =
"4294967295";
</s> add template <>
const char* const MaxString<unsigned long>::value = "4294967295"; </s> remove template <> const char *const MaxString<__uint128_t>::value =
"340282366920938463463374607431768211455";
</s> add template <>
const char* const MaxString<__uint128_t>::value =
"340282366920938463463374607431768211455"; </s> remove template <> const char *const MaxString<uint8_t>::value = "255";
template <> const char *const MaxString<uint16_t>::value = "65535";
template <> const char *const MaxString<uint32_t>::value = "4294967295";
</s> add template <>
const char* const MaxString<uint8_t>::value = "255";
template <>
const char* const MaxString<uint16_t>::value = "65535";
template <>
const char* const MaxString<uint32_t>::value = "4294967295"; </s> remove return (int)(_BitScanForward64(&index, (unsigned long long)x) ? index + 1 : 0);
</s> add return int(_BitScanForward64(&index, (unsigned long long)x) ? index + 1 : 0);
}
FOLLY_ALWAYS_INLINE int __builtin_popcount(unsigned int x) {
return int(__popcnt(x));
}
FOLLY_ALWAYS_INLINE int __builtin_popcountl(unsigned long x) {
static_assert(sizeof(x) == 4, "");
return int(__popcnt(x)); </s> remove struct AllConvertible<> {
enum { value = true };
};
</s> add struct IsConvertible<void, decltype(std::ignore)> : std::true_type {};
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> "Wrong value for MaxString<unsigned long long>::value"
<mask> ", please update.");
<mask>
<mask> #if FOLLY_HAVE_INT128_T
<mask> template <> const char *const MaxString<__uint128_t>::value =
<mask> "340282366920938463463374607431768211455";
<mask> #endif
<mask>
<mask> /*
<mask> * Lookup tables that converts from a decimal character value to an integral
<mask> * binary value, shifted by a decimal "shift" multiplier.
</s> [sdk33] Update iOS with RN 0.59 </s> remove static_assert(sizeof(unsigned long) >= 4,
"Wrong value for MaxString<unsigned long>::value,"
" please update.");
template <> const char *const MaxString<unsigned long long>::value =
"18446744073709551615";
static_assert(sizeof(unsigned long long) >= 8,
"Wrong value for MaxString<unsigned long long>::value"
", please update.");
</s> add static_assert(
sizeof(unsigned long) >= 4,
"Wrong value for MaxString<unsigned long>::value,"
" please update.");
template <>
const char* const MaxString<unsigned long long>::value = "18446744073709551615";
static_assert(
sizeof(unsigned long long) >= 8,
"Wrong value for MaxString<unsigned long long>::value"
", please update."); </s> remove template <> const char *const MaxString<unsigned long>::value =
"18446744073709551615";
</s> add template <>
const char* const MaxString<unsigned long>::value = "18446744073709551615"; </s> remove template <> const char *const MaxString<unsigned long>::value =
"4294967295";
</s> add template <>
const char* const MaxString<unsigned long>::value = "4294967295"; </s> remove template <> const char *const MaxString<uint8_t>::value = "255";
template <> const char *const MaxString<uint16_t>::value = "65535";
template <> const char *const MaxString<uint32_t>::value = "4294967295";
</s> add template <>
const char* const MaxString<uint8_t>::value = "255";
template <>
const char* const MaxString<uint16_t>::value = "65535";
template <>
const char* const MaxString<uint32_t>::value = "4294967295"; </s> remove template <class T, class Enable = void>
struct IsSomeVector {
enum { value = false };
};
template <class T>
struct IsSomeVector<std::vector<T>, void> {
enum { value = true };
};
template <class T>
struct IsSomeVector<fbvector<T>, void> {
enum { value = true };
};
template <class T, class Enable = void>
struct IsConvertible {
enum { value = false };
};
template <class T>
struct IsConvertible<
T,
decltype(static_cast<void>(
parseTo(std::declval<folly::StringPiece>(), std::declval<T&>())))> {
enum { value = true };
};
template <class... Types>
struct AllConvertible;
template <class Head, class... Tail>
struct AllConvertible<Head, Tail...> {
enum { value = IsConvertible<Head>::value && AllConvertible<Tail...>::value };
};
</s> add namespace detail {
template <typename Void, typename OutputType>
struct IsConvertible : std::false_type {}; </s> remove *
</s> add
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep
|
<mask> // four decimal bytes (9999), but four of these added up together should
<mask> // still not overflow uint16_t.
<mask> constexpr int32_t OOR = 10000;
<mask>
<mask> FOLLY_ALIGNED(16) constexpr uint16_t shift1[] = {
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 0-9
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 10
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 20
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 30
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, 0, // 40
<mask> 1, 2, 3, 4, 5, 6, 7, 8, 9, OOR, OOR,
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 60
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 70
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 80
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 90
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 100
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 110
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 120
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 130
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 140
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 150
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 160
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 170
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 180
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 190
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 200
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 210
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 220
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 230
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 240
<mask> OOR, OOR, OOR, OOR, OOR, OOR // 250
<mask> };
<mask>
<mask> FOLLY_ALIGNED(16) constexpr uint16_t shift10[] = {
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 0-9
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 10
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 20
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 30
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, 0, // 40
<mask> 10, 20, 30, 40, 50, 60, 70, 80, 90, OOR, OOR,
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 60
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 70
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 80
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 90
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 100
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 110
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 120
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 130
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 140
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 150
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 160
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 170
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 180
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 190
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 200
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 210
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 220
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 230
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 240
<mask> OOR, OOR, OOR, OOR, OOR, OOR // 250
<mask> };
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove FOLLY_ALIGNED(16) constexpr uint16_t shift100[] = {
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 0-9
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 10
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 20
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 30
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, 0, // 40
100, 200, 300, 400, 500, 600, 700, 800, 900, OOR, OOR,
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 60
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 70
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 80
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 90
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 100
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 110
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 120
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 130
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 140
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 150
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 160
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 170
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 180
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 190
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 200
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 210
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 220
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 230
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 240
OOR, OOR, OOR, OOR, OOR, OOR // 250
</s> add alignas(16) constexpr uint16_t shift100[] = {
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 0-9
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 10
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 20
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 30
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, 0, 100, // 40
200, 300, 400, 500, 600, 700, 800, 900, OOR, OOR,
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 60
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 70
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 80
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 90
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 100
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 110
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 120
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 130
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 140
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 150
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 160
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 170
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 180
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 190
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 200
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 210
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 220
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 230
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 240
OOR, OOR, OOR, OOR, OOR, OOR // 250 </s> remove FOLLY_ALIGNED(16) constexpr uint16_t shift1000[] = {
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 0-9
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 10
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 20
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 30
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, 0, // 40
1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, OOR, OOR,
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 60
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 70
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 80
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 90
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 100
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 110
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 120
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 130
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 140
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 150
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 160
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 170
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 180
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 190
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 200
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 210
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 220
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 230
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 240
OOR, OOR, OOR, OOR, OOR, OOR // 250
</s> add alignas(16) constexpr uint16_t shift1000[] = {
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 0-9
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 10
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 20
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 30
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, 0, 1000, // 40
2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, OOR, OOR,
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 60
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 70
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 80
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 90
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 100
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 110
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 120
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 130
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 140
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 150
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 160
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 170
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 180
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 190
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 200
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 210
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 220
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 230
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 240
OOR, OOR, OOR, OOR, OOR, OOR // 250 </s> remove // class MyExpensiveService { ... };
</s> add // class MyExpensiveService {
// // Caution - may return a null ptr during startup and shutdown.
// static std::shared_ptr<MyExpensiveService> getInstance();
// ....
// }; </s> remove // namespace { folly::Singleton<MyExpensiveService> the_singleton; }
</s> add // namespace { struct PrivateTag {}; }
// static folly::Singleton<MyExpensiveService, PrivateTag> the_singleton;
// std::shared_ptr<MyExpensiveService> MyExpensiveService::getInstance() {
// return the_singleton.try_get();
// } </s> remove constexpr static bool value = !folly::IsTriviallyCopyable<Decayed>::value ||
</s> add constexpr static bool value = !folly::is_trivially_copyable<Decayed>::value ||
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep
|
<mask>
<mask> FOLLY_ALIGNED(16) constexpr uint16_t shift100[] = {
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 0-9
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 10
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 20
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 30
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, 0, // 40
<mask> 100, 200, 300, 400, 500, 600, 700, 800, 900, OOR, OOR,
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 60
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 70
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 80
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 90
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 100
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 110
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 120
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 130
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 140
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 150
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 160
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 170
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 180
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 190
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 200
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 210
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 220
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 230
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 240
<mask> OOR, OOR, OOR, OOR, OOR, OOR // 250
<mask> };
<mask>
<mask> FOLLY_ALIGNED(16) constexpr uint16_t shift1000[] = {
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 0-9
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 10
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 20
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 30
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, 0, // 40
<mask> 1000, 2000, 3000, 4000, 5000, 6000, 7000, 8000, 9000, OOR, OOR,
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 60
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 70
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 80
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 90
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 100
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 110
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 120
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 130
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 140
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 150
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 160
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 170
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 180
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 190
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 200
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 210
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 220
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 230
<mask> OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 240
<mask> OOR, OOR, OOR, OOR, OOR, OOR // 250
<mask> };
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove FOLLY_ALIGNED(16) constexpr uint16_t shift10[] = {
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 0-9
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 10
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 20
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 30
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, 0, // 40
10, 20, 30, 40, 50, 60, 70, 80, 90, OOR, OOR,
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 60
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 70
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 80
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 90
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 100
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 110
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 120
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 130
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 140
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 150
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 160
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 170
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 180
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 190
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 200
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 210
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 220
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 230
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 240
OOR, OOR, OOR, OOR, OOR, OOR // 250
</s> add alignas(16) constexpr uint16_t shift10[] = {
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 0-9
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 10
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 20
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 30
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, 0, 10, // 40
20, 30, 40, 50, 60, 70, 80, 90, OOR, OOR,
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 60
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 70
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 80
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 90
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 100
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 110
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 120
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 130
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 140
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 150
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 160
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 170
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 180
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 190
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 200
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 210
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 220
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 230
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 240
OOR, OOR, OOR, OOR, OOR, OOR // 250 </s> remove FOLLY_ALIGNED(16) constexpr uint16_t shift1[] = {
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 0-9
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 10
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 20
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 30
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, 0, // 40
1, 2, 3, 4, 5, 6, 7, 8, 9, OOR, OOR,
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 60
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 70
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 80
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 90
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 100
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 110
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 120
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 130
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 140
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 150
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 160
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 170
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 180
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 190
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 200
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 210
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 220
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 230
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 240
OOR, OOR, OOR, OOR, OOR, OOR // 250
</s> add alignas(16) constexpr uint16_t shift1[] = {
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 0-9
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 10
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 20
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 30
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, 0, 1, // 40
2, 3, 4, 5, 6, 7, 8, 9, OOR, OOR,
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 60
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 70
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 80
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 90
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 100
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 110
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 120
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 130
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 140
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 150
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 160
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 170
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 180
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 190
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 200
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 210
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 220
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 230
OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, OOR, // 240
OOR, OOR, OOR, OOR, OOR, OOR // 250 </s> remove // namespace { folly::Singleton<MyExpensiveService> the_singleton; }
</s> add // namespace { struct PrivateTag {}; }
// static folly::Singleton<MyExpensiveService, PrivateTag> the_singleton;
// std::shared_ptr<MyExpensiveService> MyExpensiveService::getInstance() {
// return the_singleton.try_get();
// } </s> remove // class MyExpensiveService { ... };
</s> add // class MyExpensiveService {
// // Caution - may return a null ptr during startup and shutdown.
// static std::shared_ptr<MyExpensiveService> getInstance();
// ....
// }; </s> remove } // detail namespace
</s> add } // namespace detail
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep replace replace keep keep keep keep replace keep keep keep
|
<mask>
<mask> // Check if ASCII is really ASCII
<mask> using IsAscii = std::
<mask> integral_constant<bool, 'A' == 65 && 'Z' == 90 && 'a' == 97 && 'z' == 122>;
<mask>
<mask> // The code in this file that uses tolower() really only cares about
<mask> // 7-bit ASCII characters, so we can take a nice shortcut here.
<mask> inline char tolower_ascii(char in) {
<mask> return IsAscii::value ? in | 0x20 : std::tolower(in);
<mask> }
<mask>
<mask> inline bool bool_str_cmp(const char** b, size_t len, const char* value) {
</s> [sdk33] Update iOS with RN 0.59 </s> remove return *s == c;
</s> add return *s == c; </s> remove inline size_t delimSize(char) { return 1; }
inline size_t delimSize(StringPiece s) { return s.size(); }
</s> add inline size_t delimSize(char) {
return 1;
}
inline size_t delimSize(StringPiece s) {
return s.size();
} </s> remove if (length == 0 || (result == 0.0 && std::isspace((*src)[length - 1]))) {
</s> add if (length == 0 ||
(result == 0.0 && std::isspace((*src)[size_t(length) - 1]))) { </s> remove size_t minCapacity, const bool disableSSO) {
</s> add size_t minCapacity,
const bool disableSSO) { </s> remove return
begin() <= end() &&
empty() == (size() == 0) &&
empty() == (begin() == end()) &&
size() <= max_size() &&
capacity() <= max_size() &&
size() <= capacity() &&
begin()[size()] == '\0';
</s> add return begin() <= end() && empty() == (size() == 0) &&
empty() == (begin() == end()) && size() <= max_size() &&
capacity() <= max_size() && size() <= capacity() &&
begin()[size()] == '\0';
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> *b = p;
<mask> return true;
<mask> }
<mask>
<mask> } // anonymous namespace
<mask>
<mask> Expected<bool, ConversionCode> str_to_bool(StringPiece* src) noexcept {
<mask> auto b = src->begin(), e = src->end();
<mask> for (;; ++b) {
<mask> if (b >= e) {
</s> [sdk33] Update iOS with RN 0.59 </s> remove for (; b >= dest; --b) b->~T();
</s> add for (; b >= dest; --b) {
b->~T();
} </s> remove size_t len = e - b;
</s> add size_t len = size_t(e - b); </s> remove size = e - b;
</s> add size = size_t(e - b); </s> remove static StringToDoubleConverter
conv(StringToDoubleConverter::ALLOW_TRAILING_JUNK
| StringToDoubleConverter::ALLOW_LEADING_SPACES,
0.0,
// return this for junk input string
std::numeric_limits<double>::quiet_NaN(),
nullptr, nullptr);
</s> add static StringToDoubleConverter conv(
StringToDoubleConverter::ALLOW_TRAILING_JUNK |
StringToDoubleConverter::ALLOW_LEADING_SPACES,
0.0,
// return this for junk input string
std::numeric_limits<double>::quiet_NaN(),
nullptr,
nullptr); </s> remove src->advance(length);
return result;
</s> add if (length >= 2) {
const char* suffix = src->data() + length - 1;
// double_conversion doesn't update length correctly when there is an
// incomplete exponent specifier. Converting "12e-f-g" shouldn't consume
// any more than "12", but it will consume "12e-".
// "123-" should only parse "123"
if (*suffix == '-' || *suffix == '+') {
--suffix;
--length;
}
// "12e-f-g" or "12euro" should only parse "12"
if (*suffix == 'e' || *suffix == 'E') {
--length;
}
}
src->advance(size_t(length));
return Tgt(result); </s> remove p = static_cast<const char*>(memchr(b, '[', e - b));
enforce(p, "unmatched ']'");
</s> add p = static_cast<const char*>(memchr(b, '[', size_t(e - b)));
enforce(p != nullptr, "unmatched ']'");
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> }
<mask>
<mask> bool result;
<mask> size_t len = e - b;
<mask> switch (*b) {
<mask> case '0':
<mask> case '1': {
<mask> result = false;
<mask> for (; b < e && isdigit(*b); ++b) {
</s> [sdk33] Update iOS with RN 0.59 </s> remove for (; b >= dest; --b) b->~T();
</s> add for (; b >= dest; --b) {
b->~T();
} </s> remove } // anonymous namespace
</s> add } // namespace </s> remove size_t size = e - b;
</s> add size_t size = size_t(e - b); </s> remove result += sum;
</s> add result += UT(sum); </s> remove result *= 10000;
</s> add result *= static_cast<UT>(10000); </s> remove size = e - b;
</s> add size = size_t(e - b);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> case 'y':
<mask> case 'Y':
<mask> result = true;
<mask> if (!bool_str_cmp(&b, len, "yes")) {
<mask> ++b; // accept the single 'y' character
<mask> }
<mask> break;
<mask> case 'n':
<mask> case 'N':
<mask> result = false;
</s> [sdk33] Update iOS with RN 0.59 </s> remove case Op::FULL:
return true;
</s> add </s> remove case 3: {
const int32_t r0 = shift100[static_cast<size_t>(b[0])];
const int32_t r1 = shift10[static_cast<size_t>(b[1])];
const int32_t r2 = shift1[static_cast<size_t>(b[2])];
const auto sum = r0 + r1 + r2;
if (sum >= OOR) {
goto outOfRange;
}
result = 1000 * result + sum;
break;
}
case 2: {
const int32_t r0 = shift10[static_cast<size_t>(b[0])];
const int32_t r1 = shift1[static_cast<size_t>(b[1])];
const auto sum = r0 + r1;
if (sum >= OOR) {
goto outOfRange;
</s> add case 3: {
const int32_t r0 = shift100[static_cast<size_t>(b[0])];
const int32_t r1 = shift10[static_cast<size_t>(b[1])];
const int32_t r2 = shift1[static_cast<size_t>(b[2])];
const auto sum = r0 + r1 + r2;
if (sum >= OOR) {
goto outOfRange;
}
result = UT(1000 * result + sum);
break; </s> remove case Op::FULL:
</s> add </s> remove result = 100 * result + sum;
break;
}
case 1: {
const int32_t sum = shift1[static_cast<size_t>(b[0])];
if (sum >= OOR) {
goto outOfRange;
</s> add case 2: {
const int32_t r0 = shift10[static_cast<size_t>(b[0])];
const int32_t r1 = shift1[static_cast<size_t>(b[1])];
const auto sum = r0 + r1;
if (sum >= OOR) {
goto outOfRange;
}
result = UT(100 * result + sum);
break; </s> remove size_t len = e - b;
</s> add size_t len = size_t(e - b); </s> remove result = 10 * result + sum;
break;
}
default:
assert(b == e);
if (size == 0) {
return makeUnexpected(ConversionCode::NO_DIGITS);
</s> add case 1: {
const int32_t sum = shift1[static_cast<size_t>(b[0])];
if (sum >= OOR) {
goto outOfRange;
}
result = UT(10 * result + sum);
break;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace replace replace replace replace replace replace keep keep keep keep keep
|
<mask> */
<mask> template <class Tgt>
<mask> Expected<Tgt, ConversionCode> str_to_floating(StringPiece* src) noexcept {
<mask> using namespace double_conversion;
<mask> static StringToDoubleConverter
<mask> conv(StringToDoubleConverter::ALLOW_TRAILING_JUNK
<mask> | StringToDoubleConverter::ALLOW_LEADING_SPACES,
<mask> 0.0,
<mask> // return this for junk input string
<mask> std::numeric_limits<double>::quiet_NaN(),
<mask> nullptr, nullptr);
<mask>
<mask> if (src->empty()) {
<mask> return makeUnexpected(ConversionCode::EMPTY_INPUT_STRING);
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove } // anonymous namespace
</s> add } // namespace </s> remove return exec_(Op::HEAP, nullptr, nullptr);
</s> add return exec(Op::HEAP, nullptr, nullptr); </s> remove auto result = conv.StringToDouble(src->data(),
static_cast<int>(src->size()),
&length); // processed char count
</s> add auto result = conv.StringToDouble(
src->data(),
static_cast<int>(src->size()),
&length); // processed char count </s> remove return result;
</s> add return Tgt(result); </s> remove return exec_(Op::FULL, nullptr, nullptr);
</s> add return exec_ != nullptr; </s> remove template <class Ex>
bool is_compatible_with() const {
if (item_) {
return dynamic_cast<const Ex*>(item_.get());
} else if (eptr_) {
try {
std::rethrow_exception(eptr_);
} catch (typename std::decay<Ex>::type&) {
return true;
} catch (...) {
// fall through
}
}
return false;
}
</s> add [[noreturn]] static void onNoExceptionError(char const* name);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> return makeUnexpected(ConversionCode::EMPTY_INPUT_STRING);
<mask> }
<mask>
<mask> int length;
<mask> auto result = conv.StringToDouble(src->data(),
<mask> static_cast<int>(src->size()),
<mask> &length); // processed char count
<mask>
<mask> if (!std::isnan(result)) {
<mask> // If we get here with length = 0, the input string is empty.
<mask> // If we get here with result = 0.0, it's either because the string
<mask> // contained only whitespace, or because we had an actual zero value
</s> [sdk33] Update iOS with RN 0.59 </s> remove if (length == 0 || (result == 0.0 && std::isspace((*src)[length - 1]))) {
</s> add if (length == 0 ||
(result == 0.0 && std::isspace((*src)[size_t(length) - 1]))) { </s> remove static StringToDoubleConverter
conv(StringToDoubleConverter::ALLOW_TRAILING_JUNK
| StringToDoubleConverter::ALLOW_LEADING_SPACES,
0.0,
// return this for junk input string
std::numeric_limits<double>::quiet_NaN(),
nullptr, nullptr);
</s> add static StringToDoubleConverter conv(
StringToDoubleConverter::ALLOW_TRAILING_JUNK |
StringToDoubleConverter::ALLOW_LEADING_SPACES,
0.0,
// return this for junk input string
std::numeric_limits<double>::quiet_NaN(),
nullptr,
nullptr); </s> remove inline
std::string&& toStdString(std::string&& s) {
</s> add inline std::string&& toStdString(std::string&& s) { </s> remove #include <sys/locking.h>
</s> add #include <sys/locking.h> // @manual
</s> remove // This is a little tricky - it's possible that our IntCaches are still alive
// in another thread and will get destroyed after this destructor runs, so we
// need to make sure we signal that this parent is dead.
~ThreadCachedInt() {
for (auto& cache : cache_.accessAllThreads()) {
cache.parent_ = nullptr;
}
}
</s> add </s> remove /*
</s> add /**
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep replace keep keep replace replace keep keep keep
|
<mask> // that was processed, so we need to check if that character was
<mask> // whitespace or not.
<mask> if (length == 0 || (result == 0.0 && std::isspace((*src)[length - 1]))) {
<mask> return makeUnexpected(ConversionCode::EMPTY_INPUT_STRING);
<mask> }
<mask> src->advance(length);
<mask> return result;
<mask> }
<mask>
<mask> auto* e = src->end();
</s> [sdk33] Update iOS with RN 0.59 </s> remove for (; ht > 0 && less(data, node = pred->skip(ht - 1)); --ht) {}
if (ht == 0) return std::make_pair(node, 0); // not found
</s> add for (; ht > 0 && less(data, node = pred->skip(ht - 1)); --ht) {
}
if (ht == 0) {
return std::make_pair(node, 0); // not found
} </s> remove size_t size = e - b;
</s> add size_t size = size_t(e - b); </s> remove /*
* Determine whether we should allow spilling to the heap or not.
*/
typedef typename mpl::count<
PolicyList,small_vector_policy::NoHeap
>::type HasNoHeap;
</s> add /*
* Determine whether we should allow spilling to the heap or not.
*/
typedef typename mpl::count<PolicyList, small_vector_policy::NoHeap>::type
HasNoHeap; </s> remove size = e - b;
</s> add size = size_t(e - b); </s> remove pred->skip(layer) == succ; // check again after locking
</s> add pred->skip(layer) == succ; // check again after locking
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> std::find_if_not(src->begin(), e, [](char c) { return std::isspace(c); });
<mask>
<mask> // There must be non-whitespace, otherwise we would have caught this above
<mask> assert(b < e);
<mask> size_t size = e - b;
<mask>
<mask> bool negative = false;
<mask> if (*b == '-') {
<mask> negative = true;
<mask> ++b;
</s> [sdk33] Update iOS with RN 0.59 </s> remove size = e - b;
</s> add size = size_t(e - b); </s> remove src->advance(length);
return result;
</s> add if (length >= 2) {
const char* suffix = src->data() + length - 1;
// double_conversion doesn't update length correctly when there is an
// incomplete exponent specifier. Converting "12e-f-g" shouldn't consume
// any more than "12", but it will consume "12e-".
// "123-" should only parse "123"
if (*suffix == '-' || *suffix == '+') {
--suffix;
--length;
}
// "12e-f-g" or "12euro" should only parse "12"
if (*suffix == 'e' || *suffix == 'E') {
--length;
}
}
src->advance(size_t(length));
return Tgt(result); </s> remove size_t len = e - b;
</s> add size_t len = size_t(e - b); </s> remove size_t size = e - b;
</s> add size_t size = size_t(e - b); </s> remove break;
</s> add default:
assert(b == e);
if (size == 0) {
return makeUnexpected(ConversionCode::NO_DIGITS);
}
break; </s> remove p = static_cast<const char*>(memchr(b, '[', e - b));
enforce(p, "unmatched ']'");
</s> add p = static_cast<const char*>(memchr(b, '[', size_t(e - b)));
enforce(p != nullptr, "unmatched ']'");
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask>
<mask> src->assign(b, e);
<mask>
<mask> return result;
<mask> }
<mask>
<mask> template Expected<float, ConversionCode> str_to_floating<float>(
<mask> StringPiece* src) noexcept;
<mask> template Expected<double, ConversionCode> str_to_floating<double>(
</s> [sdk33] Update iOS with RN 0.59 </s> remove } // anonymous namespace
</s> add } // namespace </s> remove static StringToDoubleConverter
conv(StringToDoubleConverter::ALLOW_TRAILING_JUNK
| StringToDoubleConverter::ALLOW_LEADING_SPACES,
0.0,
// return this for junk input string
std::numeric_limits<double>::quiet_NaN(),
nullptr, nullptr);
</s> add static StringToDoubleConverter conv(
StringToDoubleConverter::ALLOW_TRAILING_JUNK |
StringToDoubleConverter::ALLOW_LEADING_SPACES,
0.0,
// return this for junk input string
std::numeric_limits<double>::quiet_NaN(),
nullptr,
nullptr); </s> remove rv = -value;
</s> add rv = T(-value); </s> remove break;
</s> add default:
assert(b == e);
if (size == 0) {
return makeUnexpected(ConversionCode::NO_DIGITS);
}
break; </s> remove auto& fn = *static_cast<const Function<ReturnType(Args...) const>*>(this);
</s> add auto& fn = *static_cast<const Function<ConstSignature>*>(this);
return fn.call_(fn.data_, static_cast<Args&&>(args)...);
}
class SharedProxy {
std::shared_ptr<Function<ConstSignature>> sp_;
public:
explicit SharedProxy(Function<ConstSignature>&& func)
: sp_(std::make_shared<Function<ConstSignature>>(std::move(func))) {}
ReturnType operator()(Args&&... args) const {
return (*sp_)(static_cast<Args&&>(args)...);
}
};
};
#if FOLLY_HAVE_NOEXCEPT_FUNCTION_TYPE
template <typename ReturnType, typename... Args>
struct FunctionTraits<ReturnType(Args...) noexcept> {
using Call = ReturnType (*)(Data&, Args&&...) noexcept;
using IsConst = std::false_type;
using ConstSignature = ReturnType(Args...) const noexcept;
using NonConstSignature = ReturnType(Args...) noexcept;
using OtherSignature = ConstSignature;
template <typename F>
using ResultOf =
SafeResultOf<CallableResult<_t<std::decay<F>>&, Args...>, ReturnType>;
template <typename Fun>
static ReturnType callSmall(Data& p, Args&&... args) noexcept {
return static_cast<ReturnType>((*static_cast<Fun*>(
static_cast<void*>(&p.tiny)))(static_cast<Args&&>(args)...));
}
template <typename Fun>
static ReturnType callBig(Data& p, Args&&... args) noexcept {
return static_cast<ReturnType>(
(*static_cast<Fun*>(p.big))(static_cast<Args&&>(args)...));
}
static ReturnType uninitCall(Data&, Args&&...) noexcept {
terminate_with<std::bad_function_call>();
}
ReturnType operator()(Args... args) noexcept {
auto& fn = *static_cast<Function<NonConstSignature>*>(this); </s> remove basic_fbstring & operator=(const std::string & rhs) {
</s> add template <typename A2>
basic_fbstring& operator=(const std::basic_string<E, T, A2>& rhs) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep replace keep keep keep keep replace keep keep keep keep
|
<mask> if (negative_) {
<mask> rv = -value;
<mask> if (UNLIKELY(rv > 0)) {
<mask> return makeUnexpected(ConversionCode::NEGATIVE_OVERFLOW);
<mask> }
<mask> } else {
<mask> rv = value;
<mask> if (UNLIKELY(rv < 0)) {
<mask> return makeUnexpected(ConversionCode::POSITIVE_OVERFLOW);
<mask> }
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove static RefCounted * create(const Char * data, size_t * size) {
</s> add static RefCounted* create(const Char* data, size_t* size) { </s> remove throwSystemErrorExplicit(-ret, std::forward<Args>(args)...);
</s> add throwSystemErrorExplicit(int(-ret), std::forward<Args>(args)...); </s> remove if (start.tv_nsec > 0 || start.tv_sec > 0) {
</s> add if (start != TimePoint{}) { </s> remove if (c == '\r') output += 'r';
else if (c == '\n') output += 'n';
else if (c == '\t') output += 't';
else if (c == '\a') output += 'a';
else if (c == '\b') output += 'b';
else if (c == '\0') output += '0';
else if (c == '\\') output += '\\';
else {
</s> add if (c == '\r') {
output += 'r';
} else if (c == '\n') {
output += 'n';
} else if (c == '\t') {
output += 't';
} else if (c == '\a') {
output += 'a';
} else if (c == '\b') {
output += 'b';
} else if (c == '\0') {
output += '0';
} else if (c == '\\') {
output += '\\';
} else { </s> remove return C(dynamicconverter_detail::conversionIterator<C>
(d.items().begin()),
dynamicconverter_detail::conversionIterator<C>
(d.items().end()));
</s> add return C(
dynamicconverter_detail::conversionIterator<C>(d.items().begin()),
dynamicconverter_detail::conversionIterator<C>(d.items().end()));
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> if (UNLIKELY(err != ConversionCode::SUCCESS)) {
<mask> return makeUnexpected(err);
<mask> }
<mask>
<mask> size_t size = e - b;
<mask>
<mask> /* Although the string is entirely made of digits, we still need to
<mask> * check for overflow.
<mask> */
<mask> if (size > std::numeric_limits<UT>::digits10) {
</s> [sdk33] Update iOS with RN 0.59 </s> remove size = e - b;
</s> add size = size_t(e - b); </s> remove size_t size = e - b;
</s> add size_t size = size_t(e - b); </s> remove size_t len = e - b;
</s> add size_t len = size_t(e - b); </s> add // we just need to check the ptr since it can be set to nullptr
// even if the entry is part of the list </s> remove if (size <= this->capacity()) {
</s> add if (newSize <= capacity()) {
assert(!insert); </s> remove auto needBytes = size * sizeof(value_type);
</s> add assert(this->kShouldUseHeap);
// This branch isn't needed for correctness, but allows the optimizer to
// skip generating code for the rest of this function in NoHeap
// small_vectors.
if (!this->kShouldUseHeap) {
return;
}
newSize = std::max(newSize, computeNewSize());
auto needBytes = newSize * sizeof(value_type);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> if (b == e) {
<mask> return Tgt(0); // just zeros, e.g. "0000"
<mask> }
<mask> if (*b != '0') {
<mask> size = e - b;
<mask> break;
<mask> }
<mask> }
<mask> }
<mask> if (size > std::numeric_limits<UT>::digits10 &&
</s> [sdk33] Update iOS with RN 0.59 </s> remove size_t size = e - b;
</s> add size_t size = size_t(e - b); </s> remove break;
</s> add default:
assert(b == e);
if (size == 0) {
return makeUnexpected(ConversionCode::NO_DIGITS);
}
break; </s> remove } // anonymous namespace
</s> add } // namespace </s> remove size_t size = e - b;
</s> add size_t size = size_t(e - b); </s> remove result = 10 * result + sum;
break;
}
default:
assert(b == e);
if (size == 0) {
return makeUnexpected(ConversionCode::NO_DIGITS);
</s> add case 1: {
const int32_t sum = shift1[static_cast<size_t>(b[0])];
if (sum >= OOR) {
goto outOfRange;
}
result = UT(10 * result + sum);
break; </s> remove size_t len = e - b;
</s> add size_t len = size_t(e - b);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> UT result = 0;
<mask>
<mask> for (; e - b >= 4; b += 4) {
<mask> result *= 10000;
<mask> const int32_t r0 = shift1000[static_cast<size_t>(b[0])];
<mask> const int32_t r1 = shift100[static_cast<size_t>(b[1])];
<mask> const int32_t r2 = shift10[static_cast<size_t>(b[2])];
<mask> const int32_t r3 = shift1[static_cast<size_t>(b[3])];
<mask> const auto sum = r0 + r1 + r2 + r3;
</s> [sdk33] Update iOS with RN 0.59 </s> remove case 3: {
const int32_t r0 = shift100[static_cast<size_t>(b[0])];
const int32_t r1 = shift10[static_cast<size_t>(b[1])];
const int32_t r2 = shift1[static_cast<size_t>(b[2])];
const auto sum = r0 + r1 + r2;
if (sum >= OOR) {
goto outOfRange;
}
result = 1000 * result + sum;
break;
}
case 2: {
const int32_t r0 = shift10[static_cast<size_t>(b[0])];
const int32_t r1 = shift1[static_cast<size_t>(b[1])];
const auto sum = r0 + r1;
if (sum >= OOR) {
goto outOfRange;
</s> add case 3: {
const int32_t r0 = shift100[static_cast<size_t>(b[0])];
const int32_t r1 = shift10[static_cast<size_t>(b[1])];
const int32_t r2 = shift1[static_cast<size_t>(b[2])];
const auto sum = r0 + r1 + r2;
if (sum >= OOR) {
goto outOfRange;
}
result = UT(1000 * result + sum);
break; </s> remove result += sum;
</s> add result += UT(sum); </s> remove result = 100 * result + sum;
break;
}
case 1: {
const int32_t sum = shift1[static_cast<size_t>(b[0])];
if (sum >= OOR) {
goto outOfRange;
</s> add case 2: {
const int32_t r0 = shift10[static_cast<size_t>(b[0])];
const int32_t r1 = shift1[static_cast<size_t>(b[1])];
const auto sum = r0 + r1;
if (sum >= OOR) {
goto outOfRange;
}
result = UT(100 * result + sum);
break; </s> remove result = 10 * result + sum;
break;
}
default:
assert(b == e);
if (size == 0) {
return makeUnexpected(ConversionCode::NO_DIGITS);
</s> add case 1: {
const int32_t sum = shift1[static_cast<size_t>(b[0])];
if (sum >= OOR) {
goto outOfRange;
}
result = UT(10 * result + sum);
break; </s> remove size_t len = e - b;
</s> add size_t len = size_t(e - b); </s> remove auto const r2 = clock_gettime(CLOCK_REALTIME, &end);
</s> add auto end = std::chrono::high_resolution_clock::now();
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace
|
<mask> const auto sum = r0 + r1 + r2 + r3;
<mask> if (sum >= OOR) {
<mask> goto outOfRange;
<mask> }
<mask> result += sum;
<mask> }
<mask>
<mask> switch (e - b) {
<mask> case 3: {
<mask> const int32_t r0 = shift100[static_cast<size_t>(b[0])];
<mask> const int32_t r1 = shift10[static_cast<size_t>(b[1])];
<mask> const int32_t r2 = shift1[static_cast<size_t>(b[2])];
<mask> const auto sum = r0 + r1 + r2;
<mask> if (sum >= OOR) {
<mask> goto outOfRange;
<mask> }
<mask> result = 1000 * result + sum;
<mask> break;
<mask> }
<mask> case 2: {
<mask> const int32_t r0 = shift10[static_cast<size_t>(b[0])];
<mask> const int32_t r1 = shift1[static_cast<size_t>(b[1])];
<mask> const auto sum = r0 + r1;
<mask> if (sum >= OOR) {
<mask> goto outOfRange;
</s> [sdk33] Update iOS with RN 0.59 </s> remove result = 100 * result + sum;
break;
}
case 1: {
const int32_t sum = shift1[static_cast<size_t>(b[0])];
if (sum >= OOR) {
goto outOfRange;
</s> add case 2: {
const int32_t r0 = shift10[static_cast<size_t>(b[0])];
const int32_t r1 = shift1[static_cast<size_t>(b[1])];
const auto sum = r0 + r1;
if (sum >= OOR) {
goto outOfRange;
}
result = UT(100 * result + sum);
break; </s> remove result = 10 * result + sum;
break;
}
default:
assert(b == e);
if (size == 0) {
return makeUnexpected(ConversionCode::NO_DIGITS);
</s> add case 1: {
const int32_t sum = shift1[static_cast<size_t>(b[0])];
if (sum >= OOR) {
goto outOfRange;
}
result = UT(10 * result + sum);
break; </s> remove result *= 10000;
</s> add result *= static_cast<UT>(10000); </s> remove static RefCounted * create(const Char * data, size_t * size) {
</s> add static RefCounted* create(const Char* data, size_t* size) { </s> remove // Don't forget to allocate one extra Char for the terminating
// null. In this case, however, one Char is already part of the
// struct.
auto result = static_cast<RefCounted*>(
smartRealloc(dis,
sizeof(RefCounted) + currentSize * sizeof(Char),
sizeof(RefCounted) + currentCapacity * sizeof(Char),
sizeof(RefCounted) + newCapacity * sizeof(Char)));
</s> add auto result = static_cast<RefCounted*>(smartRealloc(
dis,
getDataOffset() + (currentSize + 1) * sizeof(Char),
getDataOffset() + (currentCapacity + 1) * sizeof(Char),
allocNewCapacity));
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace replace replace replace replace replace replace keep replace replace replace replace replace replace replace keep keep keep keep
|
<mask> const auto sum = r0 + r1;
<mask> if (sum >= OOR) {
<mask> goto outOfRange;
<mask> }
<mask> result = 100 * result + sum;
<mask> break;
<mask> }
<mask> case 1: {
<mask> const int32_t sum = shift1[static_cast<size_t>(b[0])];
<mask> if (sum >= OOR) {
<mask> goto outOfRange;
<mask> }
<mask> result = 10 * result + sum;
<mask> break;
<mask> }
<mask> default:
<mask> assert(b == e);
<mask> if (size == 0) {
<mask> return makeUnexpected(ConversionCode::NO_DIGITS);
<mask> }
<mask> break;
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove case 3: {
const int32_t r0 = shift100[static_cast<size_t>(b[0])];
const int32_t r1 = shift10[static_cast<size_t>(b[1])];
const int32_t r2 = shift1[static_cast<size_t>(b[2])];
const auto sum = r0 + r1 + r2;
if (sum >= OOR) {
goto outOfRange;
}
result = 1000 * result + sum;
break;
}
case 2: {
const int32_t r0 = shift10[static_cast<size_t>(b[0])];
const int32_t r1 = shift1[static_cast<size_t>(b[1])];
const auto sum = r0 + r1;
if (sum >= OOR) {
goto outOfRange;
</s> add case 3: {
const int32_t r0 = shift100[static_cast<size_t>(b[0])];
const int32_t r1 = shift10[static_cast<size_t>(b[1])];
const int32_t r2 = shift1[static_cast<size_t>(b[2])];
const auto sum = r0 + r1 + r2;
if (sum >= OOR) {
goto outOfRange;
}
result = UT(1000 * result + sum);
break; </s> remove result += sum;
</s> add result += UT(sum); </s> remove break;
</s> add default:
assert(b == e);
if (size == 0) {
return makeUnexpected(ConversionCode::NO_DIGITS);
}
break; </s> remove result *= 10000;
</s> add result *= static_cast<UT>(10000); </s> remove ++b; // accept the single 'y' character
</s> add ++b; // accept the single 'y' character
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> assert(b == e);
<mask> if (size == 0) {
<mask> return makeUnexpected(ConversionCode::NO_DIGITS);
<mask> }
<mask> break;
<mask> }
<mask>
<mask> return sgn.finalize(result);
<mask>
<mask> outOfRange:
</s> [sdk33] Update iOS with RN 0.59 </s> remove result = 10 * result + sum;
break;
}
default:
assert(b == e);
if (size == 0) {
return makeUnexpected(ConversionCode::NO_DIGITS);
</s> add case 1: {
const int32_t sum = shift1[static_cast<size_t>(b[0])];
if (sum >= OOR) {
goto outOfRange;
}
result = UT(10 * result + sum);
break; </s> remove size = e - b;
</s> add size = size_t(e - b); </s> remove case '+':
if (mode == UriEscapeMode::QUERY) {
out.append(&*last, p - last);
out.push_back(' ');
</s> add case '+':
if (mode == UriEscapeMode::QUERY) {
out.append(&*last, size_t(p - last));
out.push_back(' ');
++p;
last = p;
break;
}
// else fallthrough
FOLLY_FALLTHROUGH;
default: </s> remove size_t size = e - b;
</s> add size_t size = size_t(e - b); </s> remove return
begin() <= end() &&
empty() == (size() == 0) &&
empty() == (begin() == end()) &&
size() <= max_size() &&
capacity() <= max_size() &&
size() <= capacity() &&
begin()[size()] == '\0';
</s> add return begin() <= end() && empty() == (size() == 0) &&
empty() == (begin() == end()) && size() <= max_size() &&
capacity() <= max_size() && size() <= capacity() &&
begin()[size()] == '\0'; </s> remove #ifdef _WIN32
// We implement a sane comparison operand for
// pthread_t and an integer so that it may be
// compared against 0.
inline bool operator==(pthread_t ptA, unsigned int b) {
if (ptA.p == nullptr) {
return b == 0;
}
return pthread_getw32threadid_np(ptA) == b;
}
inline bool operator!=(pthread_t ptA, unsigned int b) {
if (ptA.p == nullptr) {
return b != 0;
}
return pthread_getw32threadid_np(ptA) != b;
}
inline bool operator==(pthread_t ptA, pthread_t ptB) {
return pthread_equal(ptA, ptB) != 0;
}
inline bool operator!=(pthread_t ptA, pthread_t ptB) {
return pthread_equal(ptA, ptB) == 0;
}
inline bool operator<(pthread_t ptA, pthread_t ptB) {
return ptA.p < ptB.p;
}
inline bool operator!(pthread_t ptA) {
return ptA == 0;
}
inline int pthread_attr_getstack(
pthread_attr_t* attr,
void** stackaddr,
size_t* stacksize) {
if (pthread_attr_getstackaddr(attr, stackaddr) != 0) {
return -1;
}
if (pthread_attr_getstacksize(attr, stacksize) != 0) {
return -1;
}
return 0;
}
inline int
pthread_attr_setstack(pthread_attr_t* attr, void* stackaddr, size_t stacksize) {
if (pthread_attr_setstackaddr(attr, stackaddr) != 0) {
return -1;
}
if (pthread_attr_setstacksize(attr, stacksize) != 0) {
return -1;
}
return 0;
}
inline int pthread_attr_getguardsize(pthread_attr_t* attr, size_t* guardsize) {
*guardsize = 0;
return 0;
}
#include <xstddef>
namespace std {
template <>
struct hash<pthread_t> {
std::size_t operator()(const pthread_t& k) const {
return 0 ^ std::hash<decltype(k.p)>()(k.p) ^
std::hash<decltype(k.x)>()(k.x);
}
</s> add #elif !FOLLY_HAVE_PTHREAD
#include <cstdint>
#include <memory>
#include <folly/portability/Sched.h>
#include <folly/portability/Time.h>
#include <folly/portability/Windows.h>
#define PTHREAD_CREATE_JOINABLE 0
#define PTHREAD_CREATE_DETACHED 1
#define PTHREAD_MUTEX_NORMAL 0
#define PTHREAD_MUTEX_RECURSIVE 1
#define PTHREAD_MUTEX_DEFAULT PTHREAD_MUTEX_NORMAL
#define _POSIX_TIMEOUTS 200112L
namespace folly {
namespace portability {
namespace pthread {
struct pthread_attr_t {
size_t stackSize;
bool detached;
};
int pthread_attr_init(pthread_attr_t* attr);
int pthread_attr_setdetachstate(pthread_attr_t* attr, int state);
int pthread_attr_setstacksize(pthread_attr_t* attr, size_t kb);
namespace pthread_detail {
struct pthread_t {
HANDLE handle{INVALID_HANDLE_VALUE};
DWORD threadID{0};
bool detached{false};
~pthread_t() noexcept;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Conv.cpp
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.