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 keep keep keep keep keep
|
<mask> vault->reenableInstances();
<mask> }
<mask> };
<mask>
<mask> explicit SingletonVault(Type type = Type::Relaxed) : type_(type) {}
<mask>
<mask> // Destructor is only called by unit tests to check destroyInstances.
<mask> ~SingletonVault();
<mask>
<mask> typedef std::function<void(void*)> TeardownFunc;
</s> [sdk33] Update iOS with RN 0.59 </s> remove explicit ScopedExpunger(SingletonVault* v) : vault(v) { expunge(); }
~ScopedExpunger() { expunge(); }
</s> add explicit ScopedExpunger(SingletonVault* v) : vault(v) {
expunge();
}
~ScopedExpunger() {
expunge();
} </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 TimeoutQueue() : nextId_(1) { }
</s> add TimeoutQueue() : nextId_(1) {} </s> remove explicit SharedProxy(Function<ReturnType(Args...)>&& func)
: sp_(std::make_shared<Function<ReturnType(Args...)>>(
std::move(func))) {}
</s> add explicit SharedProxy(Function<NonConstSignature>&& func)
: sp_(std::make_shared<Function<NonConstSignature>>(std::move(func))) {} </s> remove public:
explicit Transformer(const It& it)
: Transformer::iterator_adaptor_(it), valid_(false) {}
</s> add public:
explicit Transformer(const It& it) : Transformer::iterator_adaptor_(it) {} </s> remove explicit SharedProxy(Function<ReturnType(Args...) const>&& func)
: sp_(std::make_shared<Function<ReturnType(Args...) const>>(
std::move(func))) {}
</s> add explicit SharedProxy(Function<NonConstSignature>&& func)
: sp_(std::make_shared<Function<NonConstSignature>>(std::move(func))) {}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> * retry initialization.
<mask> *
<mask> * Sample usage:
<mask> *
<mask> * wangle::IOThreadPoolExecutor executor(max_concurrency_level);
<mask> * folly::Baton<> done;
<mask> * doEagerInitVia(executor, &done);
<mask> * done.wait(); // or 'timed_wait', or spin with 'try_wait'
<mask> *
<mask> */
</s> [sdk33] Update iOS with RN 0.59 </s> remove * done.wait(); // or 'timed_wait', or spin with 'try_wait'
</s> add * done.wait(); // or 'try_wait_for', etc. </s> add /**
* Attempts to acquire the lock in exclusive mode. If acquisition is
* unsuccessful, the returned LockedPtr will be null.
*
* (Use LockedPtr::operator bool() or LockedPtr::isNull() to check for
* validity.)
*/
TryLockedPtr tryLock() {
return TryLockedPtr{static_cast<Subclass*>(this)};
}
ConstTryLockedPtr tryLock() const {
return ConstTryLockedPtr{static_cast<const Subclass*>(this)};
}
</s> remove * acquisition is unsuccessful, the returned ConstLockedPtr is NULL.
</s> add * acquisition is unsuccessful, the returned ConstLockedPtr is nullptr. </s> remove * acquisition is unsuccessful, the returned LockedPtr is NULL.
</s> add * acquisition is unsuccessful, the returned LockedPtr is nullptr. </s> add /*
* Author: Eric Niebler <[email protected]>
*/ </s> remove *
</s> add */
/*
* @author Eric Niebler ([email protected]), Sven Over ([email protected])
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> *
<mask> * wangle::IOThreadPoolExecutor executor(max_concurrency_level);
<mask> * folly::Baton<> done;
<mask> * doEagerInitVia(executor, &done);
<mask> * done.wait(); // or 'timed_wait', or spin with 'try_wait'
<mask> *
<mask> */
<mask> void doEagerInitVia(Executor& exe, folly::Baton<>* done = nullptr);
<mask>
<mask> // Destroy all singletons; when complete, the vault can't create
</s> [sdk33] Update iOS with RN 0.59 </s> remove * wangle::IOThreadPoolExecutor executor(max_concurrency_level);
</s> add * folly::IOThreadPoolExecutor executor(max_concurrency_level); </s> remove * Move constructor moves the data (with locking the source and all)
* but does not move the mutex.
</s> add * Move constructor; deprecated
*
* Move-constructs from the source data without locking either the source or
* the destination mutex. </s> remove * ASAN/MSAN/TSAN define pre-processor symbols:
* ADDRESS_SANITIZER/MEMORY_SANITIZER/THREAD_SANITIZER.
*
* UBSAN doesn't define anything and makes it hard to
* conditionally compile.
*
* The build system should define UNDEFINED_SANITIZER=1 when UBSAN is
* used as folly whitelists some functions.
</s> add * Define a convenience macro to test when ASAN, UBSAN or TSAN sanitizer are
* being used </s> remove /*
* Now inherit from them all. This is done in such a convoluted
* way to make sure we get the empty base optimizaton on all these
* types to keep sizeof(small_vector<>) minimal.
*/
typedef boost::totally_ordered1<
small_vector<Value,RequestedMaxInline,InPolicyA,InPolicyB,InPolicyC>,
ActualSizePolicy
> type;
};
</s> add /*
* Now inherit from them all. This is done in such a convoluted
* way to make sure we get the empty base optimizaton on all these
* types to keep sizeof(small_vector<>) minimal.
*/
typedef boost::totally_ordered1<
small_vector<Value, RequestedMaxInline, InPolicyA, InPolicyB, InPolicyC>,
ActualSizePolicy>
type;
}; </s> remove Synchronized(Synchronized&& rhs) /* may throw */
: Synchronized(std::move(rhs), rhs.contextualLock()) {}
</s> add Synchronized(Synchronized&& rhs) noexcept(nxMoveCtor)
: Synchronized(std::move(rhs.datum_)) {} </s> add /**
* Attempts to acquire the lock in exclusive mode. If acquisition is
* unsuccessful, the returned LockedPtr will be null.
*
* (Use LockedPtr::operator bool() or LockedPtr::isNull() to check for
* validity.)
*/
TryLockedPtr tryLock() {
return TryLockedPtr{static_cast<Subclass*>(this)};
}
ConstTryLockedPtr tryLock() const {
return ConstTryLockedPtr{static_cast<const Subclass*>(this)};
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> void reenableInstances();
<mask>
<mask> // For testing; how many registered and living singletons we have.
<mask> size_t registeredSingletonCount() const {
<mask> RWSpinLock::ReadHolder rh(&mutex_);
<mask>
<mask> return singletons_.size();
<mask> }
<mask>
<mask> /**
<mask> * Flips to true if eager initialization was used, and has completed.
<mask> * Never set to true if "doEagerInit()" or "doEagerInitVia" never called.
</s> [sdk33] Update iOS with RN 0.59 </s> remove RWSpinLock::ReadHolder rh(&mutex_);
</s> add auto singletons = singletons_.rlock(); </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 for (const auto& p : singletons_) {
</s> add for (const auto& p : *singletons) { </s> remove // The two stages of life for a vault, as mentioned in the class comment.
enum class SingletonVaultState {
Running,
Quiescing,
};
// Each singleton in the vault can be in two states: dead
// (registered but never created), living (CreateFunc returned an instance).
void stateCheck(SingletonVaultState expected,
const char* msg="Unexpected singleton state change") {
if (expected != state_) {
throw std::logic_error(msg);
}
}
</s> add </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 (ret.second && !ret.first->markedForRemoval()) return ret.first;
</s> add if (ret.second && !ret.first->markedForRemoval()) {
return ret.first;
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep replace keep keep replace keep keep
|
<mask>
<mask> size_t livingSingletonCount() const {
<mask> RWSpinLock::ReadHolder rh(&mutex_);
<mask>
<mask> size_t ret = 0;
<mask> for (const auto& p : singletons_) {
<mask> if (p.second->hasLiveInstance()) {
<mask> ++ret;
</s> [sdk33] Update iOS with RN 0.59 </s> remove auto accessor = cache_.accessAllThreads();
</s> add const auto accessor = cache_.accessAllThreads(); </s> remove for (auto& item : x) {
</s> add for (const auto& item : x) { </s> remove for (auto& pair : x) {
</s> add for (const auto& pair : x) { </s> remove RWSpinLock::ReadHolder rh(&mutex_);
return singletons_.size();
</s> add return singletons_.rlock()->size(); </s> remove size_t erase(const key_type &data) { return remove(data); }
</s> add size_t erase(const key_type& data) {
return remove(data);
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> detail::createGlobal<SingletonVault, VaultTag>();
<mask> return vault;
<mask> }
<mask>
<mask> typedef std::string(*StackTraceGetterPtr)();
<mask>
<mask> static std::atomic<StackTraceGetterPtr>& stackTraceGetter() {
<mask> /* library-local */ static auto stackTraceGetterPtr = detail::
<mask> createGlobal<std::atomic<StackTraceGetterPtr>, SingletonVault>();
<mask> return *stackTraceGetterPtr;
</s> [sdk33] Update iOS with RN 0.59 </s> add std::list<T*> leakedPtrs; </s> remove return new SingletonHolder<T>({typeid(T), typeid(Tag)},
*SingletonVault::singleton<VaultTag>());
</s> add return new SingletonHolder<T>(
{typeid(T), typeid(Tag)}, *SingletonVault::singleton<VaultTag>()); </s> remove static void incrementRefs(Char * p) {
</s> add static void incrementRefs(Char* p) { </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 private:
</s> add private: </s> remove explicit Singleton(std::nullptr_t /* _ */ = nullptr,
typename Singleton::TeardownFunc t = nullptr)
</s> add // Quickly ensure the instance exists.
static void vivify() {
getEntry().vivify();
}
explicit Singleton(
std::nullptr_t /* _ */ = nullptr,
typename Singleton::TeardownFunc t = nullptr)
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
|
<mask> private:
<mask> template <typename T>
<mask> friend struct detail::SingletonHolder;
<mask>
<mask> // The two stages of life for a vault, as mentioned in the class comment.
<mask> enum class SingletonVaultState {
<mask> Running,
<mask> Quiescing,
<mask> };
<mask>
<mask> // Each singleton in the vault can be in two states: dead
<mask> // (registered but never created), living (CreateFunc returned an instance).
<mask>
<mask> void stateCheck(SingletonVaultState expected,
<mask> const char* msg="Unexpected singleton state change") {
<mask> if (expected != state_) {
<mask> throw std::logic_error(msg);
<mask> }
<mask> }
<mask>
<mask> // This method only matters if registrationComplete() is never called.
<mask> // Otherwise destroyInstances is scheduled to be executed atexit.
<mask> //
<mask> // Initializes static object, which calls destroyInstances on destruction.
<mask> // Used to have better deletion ordering with singleton not managed by
</s> [sdk33] Update iOS with RN 0.59 </s> remove * Construct and inject a mock singleton which should be used only from tests.
* Unlike regular singletons which are initialized once per process lifetime,
* mock singletons live for the duration of a test. This means that one process
* running multiple tests can initialize and register the same singleton
* multiple times. This functionality should be used only from tests
* since it relaxes validation and performance in order to be able to perform
* the injection. The returned mock singleton is functionality identical to
* regular singletons.
*/
static void make_mock(std::nullptr_t /* c */ = nullptr,
typename Singleton<T>::TeardownFunc t = nullptr) {
</s> add * Construct and inject a mock singleton which should be used only from tests.
* Unlike regular singletons which are initialized once per process lifetime,
* mock singletons live for the duration of a test. This means that one
* process running multiple tests can initialize and register the same
* singleton multiple times. This functionality should be used only from tests
* since it relaxes validation and performance in order to be able to perform
* the injection. The returned mock singleton is functionality identical to
* regular singletons.
*/
static void make_mock(
std::nullptr_t /* c */ = nullptr,
typename Singleton<T>::TeardownFunc t = nullptr) { </s> remove
LOG(ERROR) << output;
}
});
</s> add }); </s> remove FOLLY_DEPRECATED("Replaced by try_get")
static std::weak_ptr<T> get_weak() { return getEntry().get_weak(); }
</s> add [[deprecated("Replaced by try_get")]] static std::weak_ptr<T> get_weak() {
return getEntry().get_weak();
} </s> remove std::atomic<std::thread::id> creating_thread_;
</s> add std::atomic<std::thread::id> creating_thread_{}; </s> remove // Please note, however, that all non-weak_ptr interfaces are
// inherently subject to races with destruction. Use responsibly.
</s> add // You can also access a singleton instance with
// `Singleton<ObjectType, TagType>::try_get()`. We recommend
// that you prefer the form `the_singleton.try_get()` because it ensures that
// `the_singleton` is used and cannot be garbage-collected during linking: this
// is necessary because the constructor of `the_singleton` is what registers it
// to the SingletonVault. </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/Singleton.h
|
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
|
<mask> // 3. Singletons, not managed by folly::Singleton, which were created before
<mask> // any of the singletons managed by folly::Singleton was requested.
<mask> static void scheduleDestroyInstances();
<mask>
<mask> typedef std::unordered_map<detail::TypeDescriptor,
<mask> detail::SingletonHolderBase*,
<mask> detail::TypeDescriptorHasher> SingletonMap;
<mask>
<mask> mutable folly::RWSpinLock mutex_;
<mask> SingletonMap singletons_;
<mask> std::unordered_set<detail::SingletonHolderBase*> eagerInitSingletons_;
<mask> std::vector<detail::TypeDescriptor> creation_order_;
<mask> SingletonVaultState state_{SingletonVaultState::Running};
<mask> bool registrationComplete_{false};
<mask> folly::RWSpinLock stateMutex_;
<mask> Type type_{Type::Relaxed};
<mask> };
<mask>
<mask> // This is the wrapper class that most users actually interact with.
<mask> // It allows for simple access to registering and instantiating
<mask> // singletons. Create instances of this class in the global scope of
</s> [sdk33] Update iOS with RN 0.59 </s> remove template <typename T,
typename Tag = detail::DefaultTag,
typename VaultTag = detail::DefaultTag /* for testing */>
</s> add template <
typename T,
typename Tag = detail::DefaultTag,
typename VaultTag = detail::DefaultTag /* for testing */> </s> remove
LOG(ERROR) << output;
}
});
</s> add }); </s> remove // The two stages of life for a vault, as mentioned in the class comment.
enum class SingletonVaultState {
Running,
Quiescing,
};
// Each singleton in the vault can be in two states: dead
// (registered but never created), living (CreateFunc returned an instance).
void stateCheck(SingletonVaultState expected,
const char* msg="Unexpected singleton state change") {
if (expected != state_) {
throw std::logic_error(msg);
}
}
</s> add </s> remove // Please note, however, that all non-weak_ptr interfaces are
// inherently subject to races with destruction. Use responsibly.
</s> add // You can also access a singleton instance with
// `Singleton<ObjectType, TagType>::try_get()`. We recommend
// that you prefer the form `the_singleton.try_get()` because it ensures that
// `the_singleton` is used and cannot be garbage-collected during linking: this
// is necessary because the constructor of `the_singleton` is what registers it
// to the SingletonVault. </s> add /**
* Disambiguate the name var by concatenating the line number of the original
* point of expansion. This avoids shadowing warnings for nested
* SYNCHRONIZEDs. The name is consistent if used multiple times within
* another macro.
* Only for internal use.
*/
#define SYNCHRONIZED_VAR(var) FB_CONCATENATE(SYNCHRONIZED_##var##_, __LINE__)
</s> remove bool operator!=(const exception_wrapper& a) const {
return !(*this == a);
}
</s> add template <class Fn, class A, class B, class... Bs>
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN auto
fold(Fn&& fn, A&& a, B&& b, Bs&&... bs) {
return fold(
// This looks like a use of fn after a move of fn, but in reality, this is
// just a cast and not a move. That's because regardless of which fold
// overload is selected, fn gets bound to a &&. Had fold taken fn by value
// there would indeed be a problem here.
static_cast<Fn&&>(fn),
static_cast<Fn&&>(fn)(static_cast<A&&>(a), static_cast<B&&>(b)),
static_cast<Bs&&>(bs)...);
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> // It allows for simple access to registering and instantiating
<mask> // singletons. Create instances of this class in the global scope of
<mask> // type Singleton<T> to register your singleton for later access via
<mask> // Singleton<T>::try_get().
<mask> template <typename T,
<mask> typename Tag = detail::DefaultTag,
<mask> typename VaultTag = detail::DefaultTag /* for testing */>
<mask> class Singleton {
<mask> public:
<mask> typedef std::function<T*(void)> CreateFunc;
<mask> typedef std::function<void(T*)> TeardownFunc;
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove typedef std::unordered_map<detail::TypeDescriptor,
detail::SingletonHolderBase*,
detail::TypeDescriptorHasher> SingletonMap;
mutable folly::RWSpinLock mutex_;
SingletonMap singletons_;
std::unordered_set<detail::SingletonHolderBase*> eagerInitSingletons_;
std::vector<detail::TypeDescriptor> creation_order_;
SingletonVaultState state_{SingletonVaultState::Running};
bool registrationComplete_{false};
folly::RWSpinLock stateMutex_;
Type type_{Type::Relaxed};
</s> add typedef std::unordered_map<
detail::TypeDescriptor,
detail::SingletonHolderBase*,
detail::TypeDescriptorHasher>
SingletonMap;
// Use SharedMutexSuppressTSAN to suppress noisy lock inversions when building
// with TSAN. If TSAN is not enabled, SharedMutexSuppressTSAN is equivalent
// to a normal SharedMutex.
Synchronized<SingletonMap, SharedMutexSuppressTSAN> singletons_;
Synchronized<
std::unordered_set<detail::SingletonHolderBase*>,
SharedMutexSuppressTSAN>
eagerInitSingletons_;
Synchronized<std::vector<detail::TypeDescriptor>, SharedMutexSuppressTSAN>
creationOrder_;
// Using SharedMutexReadPriority is important here, because we want to make
// sure we don't block nested singleton creation happening concurrently with
// destroyInstances().
Synchronized<detail::SingletonVaultState, SharedMutexReadPriority> state_;
Type type_; </s> remove namespace mpl = boost::mpl;
template<class Value,
std::size_t RequestedMaxInline,
class InPolicyA,
class InPolicyB,
class InPolicyC>
struct small_vector_base {
typedef mpl::vector<InPolicyA,InPolicyB,InPolicyC> PolicyList;
/*
* Determine the size type
*/
typedef typename mpl::filter_view<
</s> add typedef typename mpl::filter_view< </s> remove struct DefaultTag {};
</s> add </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 static_assert(!std::is_same<Tag, void>::value,
"Must use a unique Tag to use the accessAllThreads feature");
</s> add static_assert(
!std::is_same<Tag, void>::value,
"Must use a unique Tag to use the accessAllThreads feature"); </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/Singleton.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask>
<mask> // Generally your program life cycle should be fine with calling
<mask> // get() repeatedly rather than saving the reference, and then not
<mask> // call get() during process shutdown.
<mask> FOLLY_DEPRECATED("Replaced by try_get")
<mask> static T* get() { return getEntry().get(); }
<mask>
<mask> // If, however, you do need to hold a reference to the specific
<mask> // singleton, you can try to do so with a weak_ptr. Avoid this when
<mask> // possible but the inability to lock the weak pointer can be a
<mask> // signal that the vault has been destroyed.
</s> [sdk33] Update iOS with RN 0.59 </s> remove FOLLY_DEPRECATED("Replaced by try_get")
static std::weak_ptr<T> get_weak() { return getEntry().get_weak(); }
</s> add [[deprecated("Replaced by try_get")]] static std::weak_ptr<T> get_weak() {
return getEntry().get_weak();
} </s> remove // Please note, however, that all non-weak_ptr interfaces are
// inherently subject to races with destruction. Use responsibly.
</s> add // You can also access a singleton instance with
// `Singleton<ObjectType, TagType>::try_get()`. We recommend
// that you prefer the form `the_singleton.try_get()` because it ensures that
// `the_singleton` is used and cannot be garbage-collected during linking: this
// is necessary because the constructor of `the_singleton` is what registers it
// to the SingletonVault. </s> remove // each must be given a unique tag. If no tag is specified - default tag is used
</s> add // each must be given a unique tag. If no tag is specified a default tag is
// used. We recommend that you use a tag from an anonymous namespace private to
// your implementation file, as this ensures that the singleton is only
// available via your interface and not also through Singleton<T>::try_get() </s> remove // You also can directly access it by the variable defining the
// singleton rather than via get(), and even treat that variable like
// a smart pointer (dereferencing it or using the -> operator).
</s> add // Advanced usage and notes: </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 * 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.
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> // If, however, you do need to hold a reference to the specific
<mask> // singleton, you can try to do so with a weak_ptr. Avoid this when
<mask> // possible but the inability to lock the weak pointer can be a
<mask> // signal that the vault has been destroyed.
<mask> FOLLY_DEPRECATED("Replaced by try_get")
<mask> static std::weak_ptr<T> get_weak() { return getEntry().get_weak(); }
<mask>
<mask> // Preferred alternative to get_weak, it returns shared_ptr that can be
<mask> // stored; a singleton won't be destroyed unless shared_ptr is destroyed.
<mask> // Avoid holding these shared_ptrs beyond the scope of a function;
<mask> // don't put them in member variables, always use try_get() instead
</s> [sdk33] Update iOS with RN 0.59 </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 // Please note, however, that all non-weak_ptr interfaces are
// inherently subject to races with destruction. Use responsibly.
</s> add // You can also access a singleton instance with
// `Singleton<ObjectType, TagType>::try_get()`. We recommend
// that you prefer the form `the_singleton.try_get()` because it ensures that
// `the_singleton` is used and cannot be garbage-collected during linking: this
// is necessary because the constructor of `the_singleton` is what registers it
// to the SingletonVault. </s> remove // The following two constructors are meant to emulate the behavior of
// try_and_catch in performance sensitive code as well as to be flexible
// enough to wrap exceptions of unknown type. There is an overload that
// takes an exception reference so that the wrapper can extract and store
// the exception's type and what() when possible.
//
// The canonical use case is to construct an all-catching exception wrapper
// with minimal overhead like so:
//
// try {
// // some throwing code
// } catch (const std::exception& e) {
// // won't lose e's type and what()
// exception_wrapper ew{std::current_exception(), e};
// } catch (...) {
// // everything else
// exception_wrapper ew{std::current_exception()};
// }
//
// try_and_catch is cleaner and preferable. Use it unless you're sure you need
// something like this instead.
template <typename Ex>
explicit exception_wrapper(std::exception_ptr eptr, Ex& exn) {
assign_eptr(eptr, exn);
}
</s> add namespace exception_wrapper_detail { </s> remove // You also can directly access it by the variable defining the
// singleton rather than via get(), and even treat that variable like
// a smart pointer (dereferencing it or using the -> operator).
</s> add // Advanced usage and notes: </s> remove // This is actually defined in our pthread implementation on
// Windows, but we don't want to include all of that just for this.
using pid_t = void*;
</s> add // This is a massive pain to have be an `int` due to the pthread implementation
// we support, but it's far more compatible with the rest of the windows world
// as an `int` than it would be as a `void*`
using pid_t = int; </s> remove // each must be given a unique tag. If no tag is specified - default tag is used
</s> add // each must be given a unique tag. If no tag is specified a default tag is
// used. We recommend that you use a tag from an anonymous namespace private to
// your implementation file, as this ensures that the singleton is only
// available via your interface and not also through Singleton<T>::try_get()
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep keep replace replace keep keep replace replace keep keep keep
|
<mask> return getEntry().try_get_fast();
<mask> }
<mask>
<mask> explicit Singleton(std::nullptr_t /* _ */ = nullptr,
<mask> typename Singleton::TeardownFunc t = nullptr)
<mask> : Singleton([]() { return new T; }, std::move(t)) {}
<mask>
<mask> explicit Singleton(typename Singleton::CreateFunc c,
<mask> typename Singleton::TeardownFunc t = nullptr) {
<mask> if (c == nullptr) {
<mask> throw std::logic_error(
<mask> "nullptr_t should be passed if you want T to be default constructed");
</s> [sdk33] Update iOS with RN 0.59 </s> remove throw std::logic_error(
"nullptr_t should be passed if you want T to be default constructed");
</s> add detail::singletonThrowNullCreator(typeid(T)); </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 throw std::logic_error(
"nullptr_t should be passed if you want T to be default constructed");
</s> add detail::singletonThrowNullCreator(typeid(T)); </s> remove * Construct and inject a mock singleton which should be used only from tests.
* Unlike regular singletons which are initialized once per process lifetime,
* mock singletons live for the duration of a test. This means that one process
* running multiple tests can initialize and register the same singleton
* multiple times. This functionality should be used only from tests
* since it relaxes validation and performance in order to be able to perform
* the injection. The returned mock singleton is functionality identical to
* regular singletons.
*/
static void make_mock(std::nullptr_t /* c */ = nullptr,
typename Singleton<T>::TeardownFunc t = nullptr) {
</s> add * Construct and inject a mock singleton which should be used only from tests.
* Unlike regular singletons which are initialized once per process lifetime,
* mock singletons live for the duration of a test. This means that one
* process running multiple tests can initialize and register the same
* singleton multiple times. This functionality should be used only from tests
* since it relaxes validation and performance in order to be able to perform
* the injection. The returned mock singleton is functionality identical to
* regular singletons.
*/
static void make_mock(
std::nullptr_t /* c */ = nullptr,
typename Singleton<T>::TeardownFunc t = nullptr) { </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/Singleton.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask>
<mask> explicit Singleton(typename Singleton::CreateFunc c,
<mask> typename Singleton::TeardownFunc t = nullptr) {
<mask> if (c == nullptr) {
<mask> throw std::logic_error(
<mask> "nullptr_t should be passed if you want T to be default constructed");
<mask> }
<mask>
<mask> auto vault = SingletonVault::singleton<VaultTag>();
<mask> getEntry().registerSingleton(std::move(c), getTeardownFunc(std::move(t)));
<mask> vault->registerSingleton(&getEntry());
</s> [sdk33] Update iOS with RN 0.59 </s> remove explicit Singleton(typename Singleton::CreateFunc c,
typename Singleton::TeardownFunc t = nullptr) {
</s> add explicit Singleton(
typename Singleton::CreateFunc c,
typename Singleton::TeardownFunc t = nullptr) { </s> remove throw std::logic_error(
"nullptr_t should be passed if you want T to be default constructed");
</s> add detail::singletonThrowNullCreator(typeid(T)); </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 explicit Singleton(std::nullptr_t /* _ */ = nullptr,
typename Singleton::TeardownFunc t = nullptr)
</s> add // Quickly ensure the instance exists.
static void vivify() {
getEntry().vivify();
}
explicit Singleton(
std::nullptr_t /* _ */ = nullptr,
typename Singleton::TeardownFunc t = nullptr) </s> remove * Construct and inject a mock singleton which should be used only from tests.
* Unlike regular singletons which are initialized once per process lifetime,
* mock singletons live for the duration of a test. This means that one process
* running multiple tests can initialize and register the same singleton
* multiple times. This functionality should be used only from tests
* since it relaxes validation and performance in order to be able to perform
* the injection. The returned mock singleton is functionality identical to
* regular singletons.
*/
static void make_mock(std::nullptr_t /* c */ = nullptr,
typename Singleton<T>::TeardownFunc t = nullptr) {
</s> add * Construct and inject a mock singleton which should be used only from tests.
* Unlike regular singletons which are initialized once per process lifetime,
* mock singletons live for the duration of a test. This means that one
* process running multiple tests can initialize and register the same
* singleton multiple times. This functionality should be used only from tests
* since it relaxes validation and performance in order to be able to perform
* the injection. The returned mock singleton is functionality identical to
* regular singletons.
*/
static void make_mock(
std::nullptr_t /* c */ = nullptr,
typename Singleton<T>::TeardownFunc t = nullptr) { </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 {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep keep keep keep replace replace keep keep keep keep
|
<mask>
<mask> /**
<mask> * Construct and inject a mock singleton which should be used only from tests.
<mask> * Unlike regular singletons which are initialized once per process lifetime,
<mask> * mock singletons live for the duration of a test. This means that one process
<mask> * running multiple tests can initialize and register the same singleton
<mask> * multiple times. This functionality should be used only from tests
<mask> * since it relaxes validation and performance in order to be able to perform
<mask> * the injection. The returned mock singleton is functionality identical to
<mask> * regular singletons.
<mask> */
<mask> static void make_mock(std::nullptr_t /* c */ = nullptr,
<mask> typename Singleton<T>::TeardownFunc t = nullptr) {
<mask> make_mock([]() { return new T; }, t);
<mask> }
<mask>
<mask> static void make_mock(CreateFunc c,
<mask> typename Singleton<T>::TeardownFunc t = nullptr) {
<mask> make_mock([]() { return new T; }, t);
<mask> }
<mask>
<mask> static void make_mock(CreateFunc c,
<mask> typename Singleton<T>::TeardownFunc t = nullptr) {
<mask> if (c == nullptr) {
<mask> throw std::logic_error(
<mask> "nullptr_t should be passed if you want T to be default constructed");
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove throw std::logic_error(
"nullptr_t should be passed if you want T to be default constructed");
</s> add detail::singletonThrowNullCreator(typeid(T)); </s> remove explicit Singleton(typename Singleton::CreateFunc c,
typename Singleton::TeardownFunc t = nullptr) {
</s> add explicit Singleton(
typename Singleton::CreateFunc c,
typename Singleton::TeardownFunc t = nullptr) { </s> remove throw std::logic_error(
"nullptr_t should be passed if you want T to be default constructed");
</s> add detail::singletonThrowNullCreator(typeid(T)); </s> remove explicit Singleton(std::nullptr_t /* _ */ = nullptr,
typename Singleton::TeardownFunc t = nullptr)
</s> add // Quickly ensure the instance exists.
static void vivify() {
getEntry().vivify();
}
explicit Singleton(
std::nullptr_t /* _ */ = nullptr,
typename Singleton::TeardownFunc t = nullptr) </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/Singleton.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask>
<mask> static void make_mock(CreateFunc c,
<mask> typename Singleton<T>::TeardownFunc t = nullptr) {
<mask> if (c == nullptr) {
<mask> throw std::logic_error(
<mask> "nullptr_t should be passed if you want T to be default constructed");
<mask> }
<mask>
<mask> auto& entry = getEntry();
<mask>
<mask> entry.registerSingletonMock(c, getTeardownFunc(t));
</s> [sdk33] Update iOS with RN 0.59 </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 throw std::logic_error(
"nullptr_t should be passed if you want T to be default constructed");
</s> add detail::singletonThrowNullCreator(typeid(T)); </s> remove explicit Singleton(typename Singleton::CreateFunc c,
typename Singleton::TeardownFunc t = nullptr) {
</s> add explicit Singleton(
typename Singleton::CreateFunc c,
typename Singleton::TeardownFunc t = nullptr) { </s> remove explicit Singleton(std::nullptr_t /* _ */ = nullptr,
typename Singleton::TeardownFunc t = nullptr)
</s> add // Quickly ensure the instance exists.
static void vivify() {
getEntry().vivify();
}
explicit Singleton(
std::nullptr_t /* _ */ = nullptr,
typename Singleton::TeardownFunc t = nullptr) </s> remove * Construct and inject a mock singleton which should be used only from tests.
* Unlike regular singletons which are initialized once per process lifetime,
* mock singletons live for the duration of a test. This means that one process
* running multiple tests can initialize and register the same singleton
* multiple times. This functionality should be used only from tests
* since it relaxes validation and performance in order to be able to perform
* the injection. The returned mock singleton is functionality identical to
* regular singletons.
*/
static void make_mock(std::nullptr_t /* c */ = nullptr,
typename Singleton<T>::TeardownFunc t = nullptr) {
</s> add * Construct and inject a mock singleton which should be used only from tests.
* Unlike regular singletons which are initialized once per process lifetime,
* mock singletons live for the duration of a test. This means that one
* process running multiple tests can initialize and register the same
* singleton multiple times. This functionality should be used only from tests
* since it relaxes validation and performance in order to be able to perform
* the injection. The returned mock singleton is functionality identical to
* regular singletons.
*/
static void make_mock(
std::nullptr_t /* c */ = nullptr,
typename Singleton<T>::TeardownFunc t = nullptr) { </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/Singleton.h
|
keep keep keep keep replace keep replace keep keep
|
<mask> }
<mask>
<mask> // Construct TeardownFunc.
<mask> static typename detail::SingletonHolder<T>::TeardownFunc getTeardownFunc(
<mask> TeardownFunc t) {
<mask> if (t == nullptr) {
<mask> return [](T* v) { delete v; };
<mask> } else {
<mask> return t;
</s> [sdk33] Update iOS with RN 0.59 </s> remove template <typename T, typename = void>
struct constexpr_abs_helper {};
template <typename T>
struct constexpr_abs_helper<
T,
typename std::enable_if<std::is_floating_point<T>::value>::type> {
static constexpr T go(T t) {
return t < static_cast<T>(0) ? -t : t;
}
};
template <typename T>
struct constexpr_abs_helper<
T,
typename std::enable_if<
std::is_integral<T>::value && !std::is_same<T, bool>::value &&
std::is_unsigned<T>::value>::type> {
static constexpr T go(T t) {
return t;
}
};
template <typename T>
struct constexpr_abs_helper<
T,
typename std::enable_if<
std::is_integral<T>::value && !std::is_same<T, bool>::value &&
std::is_signed<T>::value>::type> {
static constexpr typename std::make_unsigned<T>::type go(T t) {
return t < static_cast<T>(0) ? -t : t;
}
};
</s> add template <typename Char>
constexpr size_t constexpr_strlen_internal(const Char* s, size_t len) {
// clang-format off
return
*(s + 0) == Char(0) ? len + 0 :
*(s + 1) == Char(0) ? len + 1 :
*(s + 2) == Char(0) ? len + 2 :
*(s + 3) == Char(0) ? len + 3 :
*(s + 4) == Char(0) ? len + 4 :
*(s + 5) == Char(0) ? len + 5 :
*(s + 6) == Char(0) ? len + 6 :
*(s + 7) == Char(0) ? len + 7 :
constexpr_strlen_internal(s + 8, len + 8);
// clang-format on </s> remove // call helper function for static dispatch of special cases
emplaceBack(std::forward<Args>(args)...);
}
void emplace_back(const value_type& t) {
push_back(t);
}
void emplace_back(value_type& t) {
push_back(t);
}
void emplace_back(value_type&& t) {
push_back(std::move(t));
}
void push_back(value_type&& t) {
</s> add </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 LOG(FATAL) << "Registering mock before singleton was registered: "
<< type().name();
</s> add detail::singletonWarnRegisterMockEarlyAndAbort(type());
}
if (state_ == SingletonHolderState::Living) {
destroyInstance(); </s> remove explicit Singleton(std::nullptr_t /* _ */ = nullptr,
typename Singleton::TeardownFunc t = nullptr)
</s> add // Quickly ensure the instance exists.
static void vivify() {
getEntry().vivify();
}
explicit Singleton(
std::nullptr_t /* _ */ = nullptr,
typename Singleton::TeardownFunc t = nullptr)
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask>
<mask> explicit LeakySingleton(CreateFunc createFunc) {
<mask> auto& entry = entryInstance();
<mask> if (entry.state != State::NotRegistered) {
<mask> LOG(FATAL) << "Double registration of singletons of the same "
<mask> << "underlying type; check for multiple definitions "
<mask> << "of type folly::LeakySingleton<" + entry.type_.name() + ">";
<mask> }
<mask> entry.createFunc = createFunc;
<mask> entry.state = State::Dead;
<mask> }
<mask>
</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 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 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 << " nodeheight=" << nodeHeight;
</s> add << " nodeheight=" << nodeHeight; </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 destroyInstance();
</s> add
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> entry.createFunc = createFunc;
<mask> entry.state = State::Dead;
<mask> }
<mask>
<mask> static T& get() { return instance(); }
<mask>
<mask> private:
<mask> enum class State { NotRegistered, Dead, Living };
<mask>
<mask> struct Entry {
</s> [sdk33] Update iOS with RN 0.59 </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 static SkipListRandomHeight *instance() {
</s> add static SkipListRandomHeight* instance() { </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 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 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 #include <type_traits>
#include <utility>
namespace folly {
enum class TLPDestructionMode {
THIS_THREAD,
ALL_THREADS
};
struct AccessModeStrict {};
} // namespace
</s> add
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep add keep keep keep keep keep
|
<mask> CreateFunc createFunc;
<mask> std::mutex mutex;
<mask> detail::TypeDescriptor type_{typeid(T), typeid(Tag)};
<mask> };
<mask>
<mask> static Entry& entryInstance() {
<mask> /* library-local */ static auto entry = detail::createGlobal<Entry, Tag>();
<mask> return *entry;
</s> [sdk33] Update iOS with RN 0.59 </s> remove return new SingletonHolder<T>({typeid(T), typeid(Tag)},
*SingletonVault::singleton<VaultTag>());
</s> add return new SingletonHolder<T>(
{typeid(T), typeid(Tag)}, *SingletonVault::singleton<VaultTag>()); </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 typedef std::string(*StackTraceGetterPtr)();
</s> add typedef std::string (*StackTraceGetterPtr)(); </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 void incrementRefs(Char * p) {
</s> add static void incrementRefs(Char* p) { </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_);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Singleton.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> ++p;
<mask> last = p;
<mask> }
<mask> }
<mask> out.append(&*last, p - last);
<mask> }
<mask>
<mask> template <class String>
<mask> void uriUnescape(StringPiece str, String& out, UriEscapeMode mode) {
<mask> out.reserve(out.size() + str.size());
</s> [sdk33] Update iOS with RN 0.59 </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 }
// else fallthrough
default:
++p;
break;
</s> add </s> remove last = p;
</s> add </s> remove out.append(&*last, p - last);
</s> add out.append(&*last, size_t(p - last)); </s> remove void uriUnescape(StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL);
</s> add void uriUnescape(
StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL); </s> remove void uriEscape(StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL);
</s> add void uriEscape(
StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> // this is faster than calling push_back repeatedly.
<mask> while (p != str.end()) {
<mask> char c = *p;
<mask> switch (c) {
<mask> case '%':
<mask> {
<mask> if (UNLIKELY(std::distance(p, str.end()) < 3)) {
<mask> throw std::invalid_argument("incomplete percent encode sequence");
<mask> }
<mask> auto h1 = detail::hexTable[static_cast<unsigned char>(p[1])];
<mask> auto h2 = detail::hexTable[static_cast<unsigned char>(p[2])];
</s> [sdk33] Update iOS with RN 0.59 </s> remove out.append(&*last, p - last);
</s> add out.append(&*last, size_t(p - last)); </s> remove result += sum;
</s> add result += UT(sum); </s> remove size_t len = e - b;
</s> add size_t len = size_t(e - b); </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 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 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) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> auto h2 = detail::hexTable[static_cast<unsigned char>(p[2])];
<mask> if (UNLIKELY(h1 == 16 || h2 == 16)) {
<mask> throw std::invalid_argument("invalid percent encode sequence");
<mask> }
<mask> out.append(&*last, p - last);
<mask> out.push_back((h1 << 4) | h2);
<mask> p += 3;
<mask> last = p;
<mask> break;
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </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 case '%':
{
</s> add case '%': { </s> remove last = p;
</s> add </s> remove }
// else fallthrough
default:
++p;
break;
</s> add </s> remove out.append(&*last, p - last);
</s> add out.append(&*last, size_t(p - last)); </s> remove out.append(&*last, p - last);
</s> add out.append(&*last, size_t(p - last));
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace replace replace replace keep replace keep
|
<mask> p += 3;
<mask> last = p;
<mask> break;
<mask> }
<mask> case '+':
<mask> if (mode == UriEscapeMode::QUERY) {
<mask> out.append(&*last, p - last);
<mask> out.push_back(' ');
<mask> ++p;
<mask> last = p;
<mask> break;
</s> [sdk33] Update iOS with RN 0.59 </s> remove }
// else fallthrough
default:
++p;
break;
</s> add </s> remove out.append(&*last, p - last);
</s> add out.append(&*last, size_t(p - last)); </s> remove out.append(&*last, p - last);
</s> add out.append(&*last, size_t(p - last)); </s> remove out.append(&*last, p - last);
</s> add out.append(&*last, size_t(p - last)); </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/String-inl.h
|
keep keep keep replace replace replace replace replace keep keep replace keep keep keep
|
<mask> ++p;
<mask> last = p;
<mask> break;
<mask> }
<mask> // else fallthrough
<mask> default:
<mask> ++p;
<mask> break;
<mask> }
<mask> }
<mask> out.append(&*last, p - last);
<mask> }
<mask>
<mask> namespace detail {
</s> [sdk33] Update iOS with RN 0.59 </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 last = p;
</s> add </s> remove out.append(&*last, p - last);
</s> add out.append(&*last, size_t(p - last)); </s> remove out.append(&*last, p - last);
</s> add out.append(&*last, size_t(p - last)); </s> remove default: {}
</s> add break;
default:
break;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep replace replace keep replace keep keep keep
|
<mask> * internalSplit().
<mask> */
<mask> inline size_t delimSize(char) { return 1; }
<mask> inline size_t delimSize(StringPiece s) { return s.size(); }
<mask> inline bool atDelim(const char* s, char c) {
<mask> return *s == c;
<mask> }
<mask> inline bool atDelim(const char* s, StringPiece sp) {
<mask> return !std::memcmp(s, sp.start(), sp.size());
</s> [sdk33] Update iOS with RN 0.59 </s> remove inline char prepareDelim(char c) { return c; }
</s> add inline char prepareDelim(char c) {
return c;
}
template <class OutputType>
void toOrIgnore(StringPiece input, OutputType& output) {
output = folly::to<OutputType>(input);
}
inline void toOrIgnore(StringPiece, decltype(std::ignore)&) {} </s> remove template<class String> StringPiece prepareDelim(const String& s) {
</s> add template <class String>
StringPiece prepareDelim(const String& s) { </s> remove static_assert(constexpr_strlen_internal("123456789", 0) == 9,
"Someone appears to have broken constexpr_strlen...");
#endif
</s> add </s> remove #ifdef _MSC_VER
constexpr size_t constexpr_strlen_internal(const char* s, size_t len) {
return *s == '\0' ? len : constexpr_strlen_internal(s + 1, len + 1);
</s> add template <typename Char>
constexpr size_t constexpr_strlen(const Char* s) {
return detail::constexpr_strlen_internal(s, 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/String-inl.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> * character instead of a whole string.
<mask> *
<mask> * @param ignoreEmpty iff true, don't copy empty segments to output
<mask> */
<mask> template<class OutStringT, class DelimT, class OutputIterator>
<mask> void internalSplit(DelimT delim, StringPiece sp, OutputIterator out,
<mask> bool ignoreEmpty) {
<mask> assert(sp.empty() || sp.start() != nullptr);
<mask>
<mask> const char* s = sp.start();
<mask> const size_t strSize = sp.size();
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
const bool ignoreEmpty = false);
template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
folly::fbvector<OutputType>& out,
const bool ignoreEmpty = false);
template<class OutputValueType, class Delim, class String,
class OutputIterator>
void splitTo(const Delim& delimiter,
const String& input,
OutputIterator out,
const bool ignoreEmpty = false);
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
const bool ignoreEmpty = false);
template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
folly::fbvector<OutputType>& out,
const bool ignoreEmpty = false);
template <
class OutputValueType,
class Delim,
class String,
class OutputIterator>
void splitTo(
const Delim& delimiter,
const String& input,
OutputIterator out,
const bool ignoreEmpty = false); </s> remove template<class OutputValueType, class Delim, class String,
class OutputIterator>
void splitTo(const Delim& delimiter,
const String& input,
OutputIterator out,
bool ignoreEmpty) {
</s> add template <
class OutputValueType,
class Delim,
class String,
class OutputIterator>
void splitTo(
const Delim& delimiter,
const String& input,
OutputIterator out,
bool ignoreEmpty) { </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty);
</s> add detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty); </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) { </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) { </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
out,
ignoreEmpty);
</s> add detail::prepareDelim(delimiter), StringPiece(input), out, ignoreEmpty);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace keep replace replace keep keep
|
<mask> *out++ = to<OutStringT>(sp);
<mask> }
<mask> return;
<mask> }
<mask> if (boost::is_same<DelimT,StringPiece>::value && dSize == 1) {
<mask> // Call the char version because it is significantly faster.
<mask> return internalSplit<OutStringT>(delimFront(delim), sp, out,
<mask> ignoreEmpty);
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove if (std::is_same<Delim, StringPiece>::value &&
delimSize(delimiter) == 1) {
</s> add if (std::is_same<Delim, StringPiece>::value && delimSize(delimiter) == 1) { </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
out,
ignoreEmpty);
</s> add detail::prepareDelim(delimiter), StringPiece(input), out, ignoreEmpty); </s> remove struct DynamicConverter<std::pair<F,S>> {
</s> add struct DynamicConverter<std::pair<F, S>> { </s> remove // TODO: we'd like to make use of makeSize (it can be optimized better,
// because it manipulates the internals)
// unfortunately the current implementation only supports moving from
// a supplied rvalue, and doing an extra move just to reuse it is a perf
// net loss
if (size() == capacity()) {// && isInside(&t)) {
value_type tmp(t);
emplaceBack(std::move(tmp));
} else {
emplaceBack(t);
}
</s> add emplace_back(t); </s> remove template<class String> StringPiece prepareDelim(const String& s) {
</s> add template <class String>
StringPiece prepareDelim(const String& s) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> *out++ = to<OutStringT>(sp.subpiece(tokenStartPos, tokenSize));
<mask> }
<mask> }
<mask>
<mask> template<class String> StringPiece prepareDelim(const String& s) {
<mask> return StringPiece(s);
<mask> }
<mask> inline char prepareDelim(char c) { return c; }
<mask>
<mask> template <bool exact, class Delim, class OutputType>
</s> [sdk33] Update iOS with RN 0.59 </s> remove inline char prepareDelim(char c) { return c; }
</s> add inline char prepareDelim(char c) {
return c;
}
template <class OutputType>
void toOrIgnore(StringPiece input, OutputType& output) {
output = folly::to<OutputType>(input);
}
inline void toOrIgnore(StringPiece, decltype(std::ignore)&) {} </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 AllConvertible<OutputTypes...>::value && sizeof...(OutputTypes) >= 1,
</s> add StrictConjunction<IsConvertible<OutputTypes>...>::value &&
sizeof...(OutputTypes) >= 1, </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) { </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask>
<mask> template<class String> StringPiece prepareDelim(const String& s) {
<mask> return StringPiece(s);
<mask> }
<mask> inline char prepareDelim(char c) { return c; }
<mask>
<mask> template <bool exact, class Delim, class OutputType>
<mask> bool splitFixed(const Delim& delimiter, StringPiece input, OutputType& output) {
<mask> static_assert(
<mask> exact || std::is_same<OutputType, StringPiece>::value ||
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<class String> StringPiece prepareDelim(const String& s) {
</s> add template <class String>
StringPiece prepareDelim(const String& s) { </s> remove IsSomeString<OutputType>::value,
"split<false>() requires that the last argument be a string type");
</s> add IsSomeString<OutputType>::value ||
std::is_same<OutputType, decltype(std::ignore)>::value,
"split<false>() requires that the last argument be a string type "
"or std::ignore"); </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) { </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) { </s> remove AllConvertible<OutputTypes...>::value && sizeof...(OutputTypes) >= 1,
</s> add StrictConjunction<IsConvertible<OutputTypes>...>::value &&
sizeof...(OutputTypes) >= 1, </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(
detail::prepareDelim(delimiter),
begin,
end,
output);
</s> add void join(
const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(detail::prepareDelim(delimiter), begin, end, output);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep replace replace keep keep keep replace
|
<mask> bool splitFixed(const Delim& delimiter, StringPiece input, OutputType& output) {
<mask> static_assert(
<mask> exact || std::is_same<OutputType, StringPiece>::value ||
<mask> IsSomeString<OutputType>::value,
<mask> "split<false>() requires that the last argument be a string type");
<mask> if (exact && UNLIKELY(std::string::npos != input.find(delimiter))) {
<mask> return false;
<mask> }
<mask> output = folly::to<OutputType>(input);
</s> [sdk33] Update iOS with RN 0.59 </s> remove inline char prepareDelim(char c) { return c; }
</s> add inline char prepareDelim(char c) {
return c;
}
template <class OutputType>
void toOrIgnore(StringPiece input, OutputType& output) {
output = folly::to<OutputType>(input);
}
inline void toOrIgnore(StringPiece, decltype(std::ignore)&) {} </s> remove AllConvertible<OutputTypes...>::value && sizeof...(OutputTypes) >= 1,
</s> add StrictConjunction<IsConvertible<OutputTypes>...>::value &&
sizeof...(OutputTypes) >= 1, </s> remove template<class InputString, class OutputString>
</s> add template <class InputString, class OutputString> </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(
detail::prepareDelim(delimiter),
begin,
end,
output);
</s> add void join(
const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(detail::prepareDelim(delimiter), begin, end, output); </s> remove if (std::is_same<Delim, StringPiece>::value &&
delimSize(delimiter) == 1) {
</s> add if (std::is_same<Delim, StringPiece>::value && delimSize(delimiter) == 1) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace replace keep replace keep keep keep
|
<mask> if (UNLIKELY(cut == std::string::npos)) {
<mask> return false;
<mask> }
<mask> StringPiece head(input.begin(), input.begin() + cut);
<mask> StringPiece tail(input.begin() + cut + detail::delimSize(delimiter),
<mask> input.end());
<mask> if (LIKELY(splitFixed<exact>(delimiter, tail, outTail...))) {
<mask> outHead = folly::to<OutputType>(head);
<mask> return true;
<mask> }
<mask> return false;
</s> [sdk33] Update iOS with RN 0.59 </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 </s> remove if (cmp(*hint, value)) {
if (hint + 1 == cont.end() || cmp(value, *(hint + 1))) {
typename OurContainer::iterator it =
po.increase_capacity(cont, hint + 1);
return cont.insert(it, std::move(value));
}
</s> add if (cmp(*hint, value)) {
if (hint + 1 == cont.end() || cmp(value, *(hint + 1))) {
hint = po.increase_capacity(cont, hint + 1);
return cont.insert(hint, std::move(value));
} else {
return sorted.insert(std::move(value)).first; </s> add } </s> remove if (nodeToDelete->markedForRemoval()) return false;
</s> add if (nodeToDelete->markedForRemoval()) {
return false;
} </s> remove if (LIKELY(!valid_)) {
cache_.~ttype();
</s> add if (!cache_) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace keep keep keep replace replace replace replace replace
|
<mask> }
<mask> return false;
<mask> }
<mask>
<mask> }
<mask>
<mask> //////////////////////////////////////////////////////////////////////
<mask>
<mask> template<class Delim, class String, class OutputType>
<mask> void split(const Delim& delimiter,
<mask> const String& input,
<mask> std::vector<OutputType>& out,
<mask> bool ignoreEmpty) {
</s> [sdk33] Update iOS with RN 0.59 </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty);
</s> add detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty); </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) { </s> remove template<class OutputValueType, class Delim, class String,
class OutputIterator>
void splitTo(const Delim& delimiter,
const String& input,
OutputIterator out,
bool ignoreEmpty) {
</s> add template <
class OutputValueType,
class Delim,
class String,
class OutputIterator>
void splitTo(
const Delim& delimiter,
const String& input,
OutputIterator out,
bool ignoreEmpty) { </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
const bool ignoreEmpty = false);
template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
folly::fbvector<OutputType>& out,
const bool ignoreEmpty = false);
template<class OutputValueType, class Delim, class String,
class OutputIterator>
void splitTo(const Delim& delimiter,
const String& input,
OutputIterator out,
const bool ignoreEmpty = false);
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
const bool ignoreEmpty = false);
template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
folly::fbvector<OutputType>& out,
const bool ignoreEmpty = false);
template <
class OutputValueType,
class Delim,
class String,
class OutputIterator>
void splitTo(
const Delim& delimiter,
const String& input,
OutputIterator out,
const bool ignoreEmpty = false); </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty);
</s> add detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep replace replace replace replace keep keep replace replace replace replace replace keep keep keep
|
<mask> bool ignoreEmpty) {
<mask> detail::internalSplit<OutputType>(
<mask> detail::prepareDelim(delimiter),
<mask> StringPiece(input),
<mask> std::back_inserter(out),
<mask> ignoreEmpty);
<mask> }
<mask>
<mask> template<class Delim, class String, class OutputType>
<mask> void split(const Delim& delimiter,
<mask> const String& input,
<mask> fbvector<OutputType>& out,
<mask> bool ignoreEmpty) {
<mask> detail::internalSplit<OutputType>(
<mask> detail::prepareDelim(delimiter),
<mask> StringPiece(input),
</s> [sdk33] Update iOS with RN 0.59 </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty);
</s> add detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty); </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) { </s> remove template<class OutputValueType, class Delim, class String,
class OutputIterator>
void splitTo(const Delim& delimiter,
const String& input,
OutputIterator out,
bool ignoreEmpty) {
</s> add template <
class OutputValueType,
class Delim,
class String,
class OutputIterator>
void splitTo(
const Delim& delimiter,
const String& input,
OutputIterator out,
bool ignoreEmpty) { </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
out,
ignoreEmpty);
</s> add detail::prepareDelim(delimiter), StringPiece(input), out, ignoreEmpty); </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
const bool ignoreEmpty = false);
template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
folly::fbvector<OutputType>& out,
const bool ignoreEmpty = false);
template<class OutputValueType, class Delim, class String,
class OutputIterator>
void splitTo(const Delim& delimiter,
const String& input,
OutputIterator out,
const bool ignoreEmpty = false);
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
const bool ignoreEmpty = false);
template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
folly::fbvector<OutputType>& out,
const bool ignoreEmpty = false);
template <
class OutputValueType,
class Delim,
class String,
class OutputIterator>
void splitTo(
const Delim& delimiter,
const String& input,
OutputIterator out,
const bool ignoreEmpty = false);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep replace replace replace replace keep keep replace replace replace replace replace replace keep keep keep keep
|
<mask> fbvector<OutputType>& out,
<mask> bool ignoreEmpty) {
<mask> detail::internalSplit<OutputType>(
<mask> detail::prepareDelim(delimiter),
<mask> StringPiece(input),
<mask> std::back_inserter(out),
<mask> ignoreEmpty);
<mask> }
<mask>
<mask> template<class OutputValueType, class Delim, class String,
<mask> class OutputIterator>
<mask> void splitTo(const Delim& delimiter,
<mask> const String& input,
<mask> OutputIterator out,
<mask> bool ignoreEmpty) {
<mask> detail::internalSplit<OutputValueType>(
<mask> detail::prepareDelim(delimiter),
<mask> StringPiece(input),
<mask> out,
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) { </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty);
</s> add detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty); </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) { </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
out,
ignoreEmpty);
</s> add detail::prepareDelim(delimiter), StringPiece(input), out, ignoreEmpty); </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
const bool ignoreEmpty = false);
template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
folly::fbvector<OutputType>& out,
const bool ignoreEmpty = false);
template<class OutputValueType, class Delim, class String,
class OutputIterator>
void splitTo(const Delim& delimiter,
const String& input,
OutputIterator out,
const bool ignoreEmpty = false);
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
const bool ignoreEmpty = false);
template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
folly::fbvector<OutputType>& out,
const bool ignoreEmpty = false);
template <
class OutputValueType,
class Delim,
class String,
class OutputIterator>
void splitTo(
const Delim& delimiter,
const String& input,
OutputIterator out,
const bool ignoreEmpty = false);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace replace replace replace keep keep keep keep replace keep
|
<mask> const String& input,
<mask> OutputIterator out,
<mask> bool ignoreEmpty) {
<mask> detail::internalSplit<OutputValueType>(
<mask> detail::prepareDelim(delimiter),
<mask> StringPiece(input),
<mask> out,
<mask> ignoreEmpty);
<mask> }
<mask>
<mask> template <bool exact, class Delim, class... OutputTypes>
<mask> typename std::enable_if<
<mask> AllConvertible<OutputTypes...>::value && sizeof...(OutputTypes) >= 1,
<mask> bool>::type
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<class OutputValueType, class Delim, class String,
class OutputIterator>
void splitTo(const Delim& delimiter,
const String& input,
OutputIterator out,
bool ignoreEmpty) {
</s> add template <
class OutputValueType,
class Delim,
class String,
class OutputIterator>
void splitTo(
const Delim& delimiter,
const String& input,
OutputIterator out,
bool ignoreEmpty) { </s> remove AllConvertible<OutputTypes...>::value && sizeof...(OutputTypes) >= 1,
</s> add StrictConjunction<IsConvertible<OutputTypes>...>::value &&
sizeof...(OutputTypes) >= 1, </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty);
</s> add detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty); </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) { </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep replace replace replace keep keep keep replace replace replace
|
<mask> * to implement append()).
<mask> */
<mask> template <class T> struct IsSizableString {
<mask> enum { value = IsSomeString<T>::value
<mask> || std::is_same<T, StringPiece>::value };
<mask> };
<mask>
<mask> template <class Iterator>
<mask> struct IsSizableStringContainerIterator :
<mask> IsSizableString<typename std::iterator_traits<Iterator>::value_type> {
<mask> };
</s> [sdk33] Update iOS with RN 0.59 </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 // Hook into boost's type traits
namespace boost {
template <class T>
struct has_nothrow_constructor<folly::basic_fbstring<T> > : true_type {
enum { value = true };
};
} // namespace boost
</s> add </s> remove struct AllConvertible<> {
enum { value = true };
};
</s> add struct IsConvertible<void, decltype(std::ignore)> : std::true_type {}; </s> remove void internalJoinAppend(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add void internalJoinAppend(
Delim delimiter,
Iterator begin,
Iterator end,
String& output) { </s> add };
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep replace replace replace replace keep replace replace keep keep keep
|
<mask> };
<mask>
<mask> template <class Delim, class Iterator, class String>
<mask> void internalJoinAppend(Delim delimiter,
<mask> Iterator begin,
<mask> Iterator end,
<mask> String& output) {
<mask> assert(begin != end);
<mask> if (std::is_same<Delim, StringPiece>::value &&
<mask> delimSize(delimiter) == 1) {
<mask> internalJoinAppend(delimFront(delimiter), begin, end, output);
<mask> return;
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove typename
std::enable_if<!IsSizableStringContainerIterator<Iterator>::value>::type
internalJoin(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add typename std::enable_if<
!IsSizableStringContainerIterator<Iterator>::value>::type
internalJoin(Delim delimiter, Iterator begin, Iterator end, String& output) { </s> remove internalJoin(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add internalJoin(Delim delimiter, Iterator begin, Iterator end, String& output) { </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(
detail::prepareDelim(delimiter),
begin,
end,
output);
</s> add void join(
const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(detail::prepareDelim(delimiter), begin, end, output); </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output);
</s> add void join(const Delim& delimiter, Iterator begin, Iterator end, String& output); </s> remove struct IsSizableStringContainerIterator :
IsSizableString<typename std::iterator_traits<Iterator>::value_type> {
};
</s> add struct IsSizableStringContainerIterator
: IsSizableString<typename std::iterator_traits<Iterator>::value_type> {};
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask> }
<mask>
<mask> template <class Delim, class Iterator, class String>
<mask> typename std::enable_if<IsSizableStringContainerIterator<Iterator>::value>::type
<mask> internalJoin(Delim delimiter,
<mask> Iterator begin,
<mask> Iterator end,
<mask> String& output) {
<mask> output.clear();
<mask> if (begin == end) {
<mask> return;
<mask> }
<mask> const size_t dsize = delimSize(delimiter);
</s> [sdk33] Update iOS with RN 0.59 </s> remove typename
std::enable_if<!IsSizableStringContainerIterator<Iterator>::value>::type
internalJoin(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add typename std::enable_if<
!IsSizableStringContainerIterator<Iterator>::value>::type
internalJoin(Delim delimiter, Iterator begin, Iterator end, String& output) { </s> remove void internalJoinAppend(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add void internalJoinAppend(
Delim delimiter,
Iterator begin,
Iterator end,
String& output) { </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(
detail::prepareDelim(delimiter),
begin,
end,
output);
</s> add void join(
const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(detail::prepareDelim(delimiter), begin, end, output); </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output);
</s> add void join(const Delim& delimiter, Iterator begin, Iterator end, String& output); </s> remove void join(const Delim& delimiter,
const Container& container,
String& output) {
</s> add void join(const Delim& delimiter, const Container& container, String& output) { </s> remove template <class Delim,
class Iterator,
typename std::enable_if<std::is_same<
typename std::iterator_traits<Iterator>::iterator_category,
std::random_access_iterator_tag>::value>::type* = nullptr>
</s> add template <
class Delim,
class Iterator,
typename std::enable_if<std::is_base_of<
std::forward_iterator_tag,
typename std::iterator_traits<Iterator>::iterator_category>::value>::
type* = nullptr>
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
|
<mask> internalJoinAppend(delimiter, begin, end, output);
<mask> }
<mask>
<mask> template <class Delim, class Iterator, class String>
<mask> typename
<mask> std::enable_if<!IsSizableStringContainerIterator<Iterator>::value>::type
<mask> internalJoin(Delim delimiter,
<mask> Iterator begin,
<mask> Iterator end,
<mask> String& output) {
<mask> output.clear();
<mask> if (begin == end) {
<mask> return;
<mask> }
<mask> internalJoinAppend(delimiter, begin, end, output);
</s> [sdk33] Update iOS with RN 0.59 </s> remove internalJoin(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add internalJoin(Delim delimiter, Iterator begin, Iterator end, String& output) { </s> remove void internalJoinAppend(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add void internalJoinAppend(
Delim delimiter,
Iterator begin,
Iterator end,
String& output) { </s> remove } // namespace detail
</s> add } // namespace detail </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(
detail::prepareDelim(delimiter),
begin,
end,
output);
</s> add void join(
const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(detail::prepareDelim(delimiter), begin, end, output); </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output);
</s> add void join(const Delim& delimiter, Iterator begin, Iterator end, String& output); </s> remove template <class Delim,
class Iterator,
typename std::enable_if<std::is_same<
typename std::iterator_traits<Iterator>::iterator_category,
std::random_access_iterator_tag>::value>::type* = nullptr>
</s> add template <
class Delim,
class Iterator,
typename std::enable_if<std::is_base_of<
std::forward_iterator_tag,
typename std::iterator_traits<Iterator>::iterator_category>::value>::
type* = nullptr>
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> internalJoinAppend(delimiter, begin, end, output);
<mask> }
<mask>
<mask> } // namespace detail
<mask>
<mask> template <class Delim, class Iterator, class String>
<mask> void join(const Delim& delimiter,
<mask> Iterator begin,
<mask> Iterator end,
</s> [sdk33] Update iOS with RN 0.59 </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(
detail::prepareDelim(delimiter),
begin,
end,
output);
</s> add void join(
const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(detail::prepareDelim(delimiter), begin, end, output); </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output);
</s> add void join(const Delim& delimiter, Iterator begin, Iterator end, String& output); </s> remove typename
std::enable_if<!IsSizableStringContainerIterator<Iterator>::value>::type
internalJoin(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add typename std::enable_if<
!IsSizableStringContainerIterator<Iterator>::value>::type
internalJoin(Delim delimiter, Iterator begin, Iterator end, String& output) { </s> remove template <class Delim,
class Iterator,
typename std::enable_if<std::is_same<
typename std::iterator_traits<Iterator>::iterator_category,
std::random_access_iterator_tag>::value>::type* = nullptr>
</s> add template <
class Delim,
class Iterator,
typename std::enable_if<std::is_base_of<
std::forward_iterator_tag,
typename std::iterator_traits<Iterator>::iterator_category>::value>::
type* = nullptr> </s> remove void internalJoinAppend(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add void internalJoinAppend(
Delim delimiter,
Iterator begin,
Iterator end,
String& output) { </s> remove internalJoin(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add internalJoin(Delim delimiter, Iterator begin, Iterator end, String& output) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep replace replace replace replace replace replace replace replace replace keep keep replace replace keep keep keep keep
|
<mask> template <class Delim, class Iterator, class String>
<mask> void join(const Delim& delimiter,
<mask> Iterator begin,
<mask> Iterator end,
<mask> String& output) {
<mask> detail::internalJoin(
<mask> detail::prepareDelim(delimiter),
<mask> begin,
<mask> end,
<mask> output);
<mask> }
<mask>
<mask> template <class String1, class String2>
<mask> void backslashify(const String1& input, String2& output, bool hex_style) {
<mask> static const char hexValues[] = "0123456789abcdef";
<mask> output.clear();
<mask> output.reserve(3 * input.size());
<mask> for (unsigned char c : input) {
</s> [sdk33] Update iOS with RN 0.59 </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output);
</s> add void join(const Delim& delimiter, Iterator begin, Iterator end, String& output); </s> remove typename
std::enable_if<!IsSizableStringContainerIterator<Iterator>::value>::type
internalJoin(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add typename std::enable_if<
!IsSizableStringContainerIterator<Iterator>::value>::type
internalJoin(Delim delimiter, Iterator begin, Iterator end, String& output) { </s> remove internalJoin(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add internalJoin(Delim delimiter, Iterator begin, Iterator end, String& output) { </s> remove void internalJoinAppend(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add void internalJoinAppend(
Delim delimiter,
Iterator begin,
Iterator end,
String& output) { </s> remove void join(const Delim& delimiter,
const Container& container,
String& output) {
</s> add void join(const Delim& delimiter, const Container& container, String& output) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace replace replace replace replace replace replace replace keep keep keep keep keep
|
<mask> output.push_back('\\');
<mask> if (hex_style) {
<mask> hex_append = true;
<mask> } else {
<mask> if (c == '\r') output += 'r';
<mask> else if (c == '\n') output += 'n';
<mask> else if (c == '\t') output += 't';
<mask> else if (c == '\a') output += 'a';
<mask> else if (c == '\b') output += 'b';
<mask> else if (c == '\0') output += '0';
<mask> else if (c == '\\') output += '\\';
<mask> else {
<mask> hex_append = true;
<mask> }
<mask> }
<mask> if (hex_append) {
<mask> output.push_back('x');
</s> [sdk33] Update iOS with RN 0.59 </s> remove create_(),
[destroy_baton, print_destructor_stack_trace, teardown, type = type()]
(T* instance_ptr) mutable {
teardown(instance_ptr);
destroy_baton->post();
if (print_destructor_stack_trace->load()) {
std::string output = "Singleton " + type.name() + " was destroyed.\n";
auto stack_trace_getter = SingletonVault::stackTraceGetter().load();
auto stack_trace = stack_trace_getter ? stack_trace_getter() : "";
if (stack_trace.empty()) {
output += "Failed to get destructor stack trace.";
} else {
output += "Destructor stack trace:\n";
output += stack_trace;
</s> add create_(),
[destroy_baton, print_destructor_stack_trace, type = type()](T*) mutable {
destroy_baton->post();
if (print_destructor_stack_trace->load()) {
detail::singletonPrintDestructionStackTrace(type); </s> remove
LOG(ERROR) << output;
}
});
</s> add }); </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 std::string name() const {
auto ret = demangle(ti_.name());
if (tag_ti_ != std::type_index(typeid(DefaultTag))) {
ret += "/";
ret += demangle(tag_ti_.name());
}
return ret.toStdString();
}
</s> add std::string name() const; </s> remove throw std::logic_error(
"nullptr_t should be passed if you want T to be default constructed");
</s> add detail::singletonThrowNullCreator(typeid(T)); </s> remove throw std::logic_error(
"nullptr_t should be passed if you want T to be default constructed");
</s> add detail::singletonThrowNullCreator(typeid(T));
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask> backslashify(input, output);
<mask> }
<mask> }
<mask>
<mask> template<class InputString, class OutputString>
<mask> bool hexlify(const InputString& input, OutputString& output,
<mask> bool append_output) {
<mask> if (!append_output) output.clear();
<mask>
<mask> static char hexValues[] = "0123456789abcdef";
<mask> auto j = output.size();
<mask> output.resize(2 * input.size() + output.size());
<mask> for (size_t i = 0; i < input.size(); ++i) {
</s> [sdk33] Update iOS with RN 0.59 </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 template<class InputString, class OutputString>
bool hexlify(const InputString& input, OutputString& output,
bool append=false);
</s> add template <class InputString, class OutputString>
bool hexlify(
const InputString& input,
OutputString& output,
bool append = false); </s> remove template<class InputString, class OutputString>
</s> add template <class InputString, class OutputString> </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 template<class InputString, class OutputString>
</s> add template <class InputString, class OutputString> </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();
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> return true;
<mask> }
<mask>
<mask> template<class InputString, class OutputString>
<mask> bool unhexlify(const InputString& input, OutputString& output) {
<mask> if (input.size() % 2 != 0) {
<mask> return false;
<mask> }
<mask> output.resize(input.size() / 2);
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<class InputString, class OutputString>
bool hexlify(const InputString& input, OutputString& output,
bool append_output) {
if (!append_output) output.clear();
</s> add template <class InputString, class OutputString>
bool hexlify(
const InputString& input,
OutputString& output,
bool append_output) {
if (!append_output) {
output.clear();
} </s> remove template<class InputString, class OutputString>
</s> add template <class InputString, class OutputString> </s> remove template<class InputString, class OutputString>
bool hexlify(const InputString& input, OutputString& output,
bool append=false);
</s> add template <class InputString, class OutputString>
bool hexlify(
const InputString& input,
OutputString& output,
bool append = false); </s> remove inline char prepareDelim(char c) { return c; }
</s> add inline char prepareDelim(char c) {
return c;
}
template <class OutputType>
void toOrIgnore(StringPiece input, OutputType& output) {
output = folly::to<OutputType>(input);
}
inline void toOrIgnore(StringPiece, decltype(std::ignore)&) {} </s> remove IsSomeString<OutputType>::value,
"split<false>() requires that the last argument be a string type");
</s> add IsSomeString<OutputType>::value ||
std::is_same<OutputType, decltype(std::ignore)>::value,
"split<false>() requires that the last argument be a string type "
"or std::ignore"); </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) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep replace replace replace replace replace replace keep keep replace replace replace keep
|
<mask> }
<mask> output.resize(input.size() / 2);
<mask> int j = 0;
<mask> auto unhex = [](char c) -> int {
<mask> return c >= '0' && c <= '9' ? c - '0' :
<mask> c >= 'A' && c <= 'F' ? c - 'A' + 10 :
<mask> c >= 'a' && c <= 'f' ? c - 'a' + 10 :
<mask> -1;
<mask> };
<mask>
<mask> for (size_t i = 0; i < input.size(); i += 2) {
<mask> int highBits = unhex(input[i]);
<mask> int lowBits = unhex(input[i + 1]);
<mask> if (highBits < 0 || lowBits < 0) {
<mask> return false;
</s> [sdk33] Update iOS with RN 0.59 </s> remove size_type capacity() const { return store_.capacity(); }
</s> add size_type capacity() const {
return store_.capacity();
} </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 return internalSplit<OutStringT>(delimFront(delim), sp, out,
ignoreEmpty);
</s> add return internalSplit<OutStringT>(delimFront(delim), sp, out, ignoreEmpty); </s> remove case '%':
{
</s> add case '%': {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> /**
<mask> * Hex-dump at most 16 bytes starting at offset from a memory area of size
<mask> * bytes. Return the number of bytes actually dumped.
<mask> */
<mask> size_t hexDumpLine(const void* ptr, size_t offset, size_t size,
<mask> std::string& line);
<mask> } // namespace detail
<mask>
<mask> template <class OutIt>
<mask> void hexDump(const void* ptr, size_t size, OutIt out) {
<mask> size_t offset = 0;
<mask> std::string line;
</s> [sdk33] Update iOS with RN 0.59 </s> remove #include <stdlib.h>
</s> add #include <folly/Memory.h> // @shim </s> remove void* aligned_malloc(size_t size, size_t align);
void aligned_free(void* aligned_ptr);
}
}
</s> add using folly::aligned_free;
using folly::aligned_malloc;
} // namespace detail
} // namespace folly </s> remove * @param len Length of str, in bytes
</s> add * @param length Length of str, in bytes </s> remove int pread(int fd, void* buf, size_t count, off_t offset);
int pwrite(int fd, const void* buf, size_t count, off_t offset);
</s> add ssize_t pread(int fd, void* buf, size_t count, off_t offset);
ssize_t pwrite(int fd, const void* buf, size_t count, off_t offset); </s> remove size_t size = e - b;
</s> add size_t size = size_t(e - b); </s> remove int setmode(int fh, int md);
</s> add
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-inl.h
|
keep keep keep keep replace
|
<mask> *out++ = line;
<mask> }
<mask> }
<mask>
<mask> } // namespace folly
</s> [sdk33] Update iOS with RN 0.59 </s> remove } // namespace folly
</s> add } // namespace folly </s> remove }
</s> add } // namespace folly </s> remove }
}
</s> add } // namespace portability
} // namespace folly </s> remove }
}
</s> add } // namespace detail
} // namespace folly </s> remove void* aligned_malloc(size_t size, size_t align);
void aligned_free(void* aligned_ptr);
}
}
</s> add using folly::aligned_free;
using folly::aligned_malloc;
} // namespace detail
} // namespace folly </s> remove } // namespace folly
</s> add } // namespace folly
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String-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/String.h
|
keep keep keep add keep keep keep keep
|
<mask>
<mask> #pragma once
<mask> #define FOLLY_STRING_H_
<mask>
<mask> #include <exception>
<mask> #include <string>
<mask> #include <unordered_map>
<mask> #include <unordered_set>
</s> [sdk33] Update iOS with RN 0.59 </s> remove #include <stdarg.h>
</s> add </s> remove #include <vector>
#include <boost/type_traits.hpp>
#include <boost/regex/pending/unicode_iterator.hpp>
#ifdef FOLLY_HAVE_DEPRECATED_ASSOC
#ifdef _GLIBCXX_SYMVER
#include <ext/hash_set>
#include <ext/hash_map>
#endif
#endif
#include <unordered_set>
</s> add </s> add #include <unordered_set>
#include <vector> </s> add #include <cstdint> </s> remove #include <iostream>
</s> add #include <iosfwd> </s> remove #include <string>
</s> add
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep replace keep keep keep keep keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep
|
<mask>
<mask> #include <exception>
<mask> #include <stdarg.h>
<mask> #include <string>
<mask> #include <vector>
<mask> #include <boost/type_traits.hpp>
<mask> #include <boost/regex/pending/unicode_iterator.hpp>
<mask>
<mask> #include <exception>
<mask> #include <stdarg.h>
<mask> #include <string>
<mask> #include <vector>
<mask> #include <boost/type_traits.hpp>
<mask> #include <boost/regex/pending/unicode_iterator.hpp>
<mask>
<mask> #ifdef FOLLY_HAVE_DEPRECATED_ASSOC
<mask> #ifdef _GLIBCXX_SYMVER
<mask> #include <ext/hash_set>
<mask> #include <ext/hash_map>
<mask> #endif
<mask> #endif
<mask>
<mask> #include <unordered_set>
<mask> #include <unordered_map>
<mask>
<mask> #include <folly/Conv.h>
</s> [sdk33] Update iOS with RN 0.59 </s> add #include <unordered_set>
#include <vector> </s> remove #include <vector>
</s> add </s> add #include <vector> </s> add #include <cstdarg> </s> remove #include <android/api-level.h>
</s> add #include <android/api-level.h> // @manual
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep add keep keep keep keep keep
|
<mask> #include <string>
<mask> #include <unordered_map>
<mask>
<mask> #include <folly/Conv.h>
<mask> #include <folly/ExceptionString.h>
<mask> #include <folly/FBString.h>
<mask> #include <folly/FBVector.h>
</s> [sdk33] Update iOS with RN 0.59 </s> remove #include <vector>
#include <boost/type_traits.hpp>
#include <boost/regex/pending/unicode_iterator.hpp>
#ifdef FOLLY_HAVE_DEPRECATED_ASSOC
#ifdef _GLIBCXX_SYMVER
#include <ext/hash_set>
#include <ext/hash_map>
#endif
#endif
#include <unordered_set>
</s> add </s> add #include <cstdarg> </s> add #include <new>
#include <type_traits>
#include <typeinfo>
#include <utility>
#include <folly/CPortability.h>
#include <folly/Demangle.h> </s> add #include <folly/CPortability.h> </s> remove #include <boost/implicit_cast.hpp>
</s> add </s> remove #include <iostream>
</s> add #include <iosfwd>
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep add keep keep keep keep keep
|
<mask> #include <folly/FBVector.h>
<mask> #include <folly/Portability.h>
<mask> #include <folly/Range.h>
<mask> #include <folly/ScopeGuard.h>
<mask>
<mask> // Compatibility function, to make sure toStdString(s) can be called
<mask> // to convert a std::string or fbstring variable s into type std::string
<mask> // with very little overhead if s was already std::string
<mask> namespace folly {
</s> [sdk33] Update iOS with RN 0.59 </s> remove inline
std::string toStdString(const folly::fbstring& s) {
</s> add inline std::string toStdString(const folly::fbstring& s) { </s> remove namespace folly { namespace detail {
</s> add namespace folly {
namespace detail { </s> add #include <string>
</s> add #include <folly/gen/String.h>
#include <folly/io/IOBufQueue.h>
#include <folly/portability/SysResource.h> </s> remove #include <type_traits>
#include <utility>
namespace folly {
enum class TLPDestructionMode {
THIS_THREAD,
ALL_THREADS
};
struct AccessModeStrict {};
} // namespace
</s> add </s> remove #include <folly/gen/String.h>
#include <folly/io/IOBufQueue.h>
</s> add
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace replace keep keep keep replace replace keep
|
<mask> // to convert a std::string or fbstring variable s into type std::string
<mask> // with very little overhead if s was already std::string
<mask> namespace folly {
<mask>
<mask> inline
<mask> std::string toStdString(const folly::fbstring& s) {
<mask> return std::string(s.data(), s.size());
<mask> }
<mask>
<mask> inline
<mask> const std::string& toStdString(const std::string& s) {
<mask> return s;
</s> [sdk33] Update iOS with RN 0.59 </s> add #include <folly/Traits.h> </s> remove namespace folly { namespace detail {
</s> add namespace folly {
namespace detail { </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) { </s> remove Formatter<true, Container> vformatChecked(StringPiece fmt,
Container&& container) {
</s> add Formatter<true, Container> vformatChecked(
StringPiece fmt,
Container&& container) { </s> remove : store_(std::move(goner.store_)) {
}
</s> add : store_(std::move(goner.store_)) {}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> }
<mask>
<mask> // If called with a temporary, the compiler will select this overload instead
<mask> // of the above, so we don't return a (lvalue) reference to a temporary.
<mask> inline
<mask> std::string&& toStdString(std::string&& s) {
<mask> return std::move(s);
<mask> }
<mask>
<mask> /**
<mask> * C-Escape a string, making it suitable for representation as a C string
</s> [sdk33] Update iOS with RN 0.59 </s> remove inline
const std::string& toStdString(const std::string& s) {
</s> add inline const std::string& toStdString(const std::string& s) { </s> remove FOLLY_DEPRECATED("Replaced by try_get")
static std::weak_ptr<T> get_weak() { return getEntry().get_weak(); }
</s> add [[deprecated("Replaced by try_get")]] static std::weak_ptr<T> get_weak() {
return getEntry().get_weak();
} </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)); </s> remove bool operator!=(const exception_wrapper& a) const {
return !(*this == a);
}
</s> add template <class Fn, class A, class B, class... Bs>
FOLLY_ALWAYS_INLINE FOLLY_ATTR_VISIBILITY_HIDDEN auto
fold(Fn&& fn, A&& a, B&& b, Bs&&... bs) {
return fold(
// This looks like a use of fn after a move of fn, but in reality, this is
// just a cast and not a move. That's because regardless of which fold
// overload is selected, fn gets bound to a &&. Had fold taken fn by value
// there would indeed be a problem here.
static_cast<Fn&&>(fn),
static_cast<Fn&&>(fn)(static_cast<A&&>(a), static_cast<B&&>(b)),
static_cast<Bs&&>(bs)...);
} </s> remove * acquisition is unsuccessful, the returned ConstLockedPtr is NULL.
</s> add * acquisition is unsuccessful, the returned ConstLockedPtr is nullptr. </s> remove * acquisition is unsuccessful, the returned LockedPtr is NULL.
</s> add * acquisition is unsuccessful, the returned LockedPtr is nullptr.
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> QUERY = 1,
<mask> PATH = 2
<mask> };
<mask> template <class String>
<mask> void uriEscape(StringPiece str,
<mask> String& out,
<mask> UriEscapeMode mode = UriEscapeMode::ALL);
<mask>
<mask> /**
<mask> * Similar to uriEscape above, but returns the escaped string.
<mask> */
<mask> template <class String>
</s> [sdk33] Update iOS with RN 0.59 </s> remove void uriUnescape(StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL);
</s> add void uriUnescape(
StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL); </s> remove out.append(&*last, p - last);
</s> add out.append(&*last, size_t(p - last)); </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output);
</s> add void join(const Delim& delimiter, Iterator begin, Iterator end, String& output); </s> remove void join(const Delim& delimiter,
const Container& container,
String& output) {
</s> add void join(const Delim& delimiter, const Container& container, String& output) { </s> remove template <class String>
String backslashify(const String& input, bool hex_style=false) {
String output;
</s> add template <class OutputString = std::string>
OutputString backslashify(StringPiece input, bool hex_style = false) {
OutputString output; </s> remove template<class String> StringPiece prepareDelim(const String& s) {
</s> add template <class String>
StringPiece prepareDelim(const String& s) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> * In QUERY mode, '+' are replaced by space. %XX sequences are decoded if
<mask> * XX is a valid hex sequence, otherwise we throw invalid_argument.
<mask> */
<mask> template <class String>
<mask> void uriUnescape(StringPiece str,
<mask> String& out,
<mask> UriEscapeMode mode = UriEscapeMode::ALL);
<mask>
<mask> /**
<mask> * Similar to uriUnescape above, but returns the unescaped string.
<mask> */
<mask> template <class String>
</s> [sdk33] Update iOS with RN 0.59 </s> remove void uriEscape(StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL);
</s> add void uriEscape(
StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL); </s> remove out.append(&*last, p - last);
</s> add out.append(&*last, size_t(p - last)); </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output);
</s> add void join(const Delim& delimiter, Iterator begin, Iterator end, String& output); </s> remove void join(const Delim& delimiter,
const Container& container,
String& output) {
</s> add void join(const Delim& delimiter, const Container& container, String& output) { </s> remove template <class String1, class String2>
void backslashify(const String1& input, String2& output, bool hex_style=false);
</s> add template <class OutputString>
void backslashify(
folly::StringPiece input,
OutputString& output,
bool hex_style = false); </s> remove template <class String>
String backslashify(const String& input, bool hex_style=false) {
String output;
</s> add template <class OutputString = std::string>
OutputString backslashify(StringPiece input, bool hex_style = false) {
OutputString output;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep replace keep keep keep replace keep keep
|
<mask> */
<mask> std::string stringPrintf(FOLLY_PRINTF_FORMAT const char* format, ...)
<mask> FOLLY_PRINTF_FORMAT_ATTR(1, 2);
<mask>
<mask> /* Similar to stringPrintf, with different signature. */
<mask> void stringPrintf(std::string* out, FOLLY_PRINTF_FORMAT const char* fmt, ...)
<mask> FOLLY_PRINTF_FORMAT_ATTR(2, 3);
<mask>
<mask> std::string& stringAppendf(std::string* output,
</s> [sdk33] Update iOS with RN 0.59 </s> remove std::string& stringAppendf(std::string* output,
FOLLY_PRINTF_FORMAT const char* format, ...)
FOLLY_PRINTF_FORMAT_ATTR(2, 3);
</s> add std::string& stringAppendf(
std::string* output,
FOLLY_PRINTF_FORMAT const char* format,
...) FOLLY_PRINTF_FORMAT_ATTR(2, 3); </s> remove char* strptime(const char* __restrict buf,
const char* __restrict fmt,
struct tm* __restrict tm);
</s> add char* strptime(
const char* __restrict buf,
const char* __restrict fmt,
struct tm* __restrict tm); </s> remove (FB_VA_GLUE(FB_ARG_2_OR_1, (__VA_ARGS__))).asConst())
</s> add as_const(FB_VA_GLUE(FB_ARG_2_OR_1, (__VA_ARGS__)))) </s> remove /**
* Adds a benchmark wrapped in a std::function. Only used
* internally. Pass by value is intentional.
*/
void addBenchmarkImpl(const char* file,
const char* name,
std::function<TimeIterPair(unsigned int)>);
</s> add struct BenchmarkRegistration {
std::string file;
std::string name;
BenchmarkFun func;
}; </s> remove inline
std::string toStdString(const folly::fbstring& s) {
</s> add inline std::string toStdString(const folly::fbstring& s) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> /* Similar to stringPrintf, with different signature. */
<mask> void stringPrintf(std::string* out, FOLLY_PRINTF_FORMAT const char* fmt, ...)
<mask> FOLLY_PRINTF_FORMAT_ATTR(2, 3);
<mask>
<mask> std::string& stringAppendf(std::string* output,
<mask> FOLLY_PRINTF_FORMAT const char* format, ...)
<mask> FOLLY_PRINTF_FORMAT_ATTR(2, 3);
<mask>
<mask> /**
<mask> * Similar to stringPrintf, but accepts a va_list argument.
<mask> *
<mask> * As with vsnprintf() itself, the value of ap is undefined after the call.
</s> [sdk33] Update iOS with RN 0.59 </s> remove FOLLY_PRINTF_FORMAT_ATTR(2, 3);
</s> add FOLLY_PRINTF_FORMAT_ATTR(2, 3); </s> remove FOLLY_PRINTF_FORMAT_ATTR(1, 2);
</s> add FOLLY_PRINTF_FORMAT_ATTR(1, 2); </s> remove (FB_VA_GLUE(FB_ARG_2_OR_1, (__VA_ARGS__))).asConst())
</s> add as_const(FB_VA_GLUE(FB_ARG_2_OR_1, (__VA_ARGS__)))) </s> remove /**
* Adds a benchmark wrapped in a std::function. Only used
* internally. Pass by value is intentional.
*/
void addBenchmarkImpl(const char* file,
const char* name,
std::function<TimeIterPair(unsigned int)>);
</s> add struct BenchmarkRegistration {
std::string file;
std::string name;
BenchmarkFun func;
}; </s> remove void uriUnescape(StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL);
</s> add void uriUnescape(
StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL); </s> remove void uriEscape(StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL);
</s> add void uriEscape(
StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace replace keep replace replace replace keep
|
<mask> * purposed only. If you want a string you can embed for use in C or
<mask> * C++, use cEscape instead. This function is for display purposes
<mask> * only.
<mask> */
<mask> template <class String1, class String2>
<mask> void backslashify(const String1& input, String2& output, bool hex_style=false);
<mask>
<mask> template <class String>
<mask> String backslashify(const String& input, bool hex_style=false) {
<mask> String output;
<mask> backslashify(input, output, hex_style);
</s> [sdk33] Update iOS with RN 0.59 </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 void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(
detail::prepareDelim(delimiter),
begin,
end,
output);
</s> add void join(
const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(detail::prepareDelim(delimiter), begin, end, output); </s> remove template<class InputString, class OutputString>
bool hexlify(const InputString& input, OutputString& output,
bool append=false);
</s> add template <class InputString, class OutputString>
bool hexlify(
const InputString& input,
OutputString& output,
bool append = false); </s> remove template<class InputString, class OutputString>
bool hexlify(const InputString& input, OutputString& output,
bool append_output) {
if (!append_output) output.clear();
</s> add template <class InputString, class OutputString>
bool hexlify(
const InputString& input,
OutputString& output,
bool append_output) {
if (!append_output) {
output.clear();
} </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
const bool ignoreEmpty = false);
template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
folly::fbvector<OutputType>& out,
const bool ignoreEmpty = false);
template<class OutputValueType, class Delim, class String,
class OutputIterator>
void splitTo(const Delim& delimiter,
const String& input,
OutputIterator out,
const bool ignoreEmpty = false);
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
const bool ignoreEmpty = false);
template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
folly::fbvector<OutputType>& out,
const bool ignoreEmpty = false);
template <
class OutputValueType,
class Delim,
class String,
class OutputIterator>
void splitTo(
const Delim& delimiter,
const String& input,
OutputIterator out,
const bool ignoreEmpty = false);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace replace replace keep keep keep keep keep
|
<mask> *
<mask> * If append_output is true, append data to the output rather than
<mask> * replace it.
<mask> */
<mask> template<class InputString, class OutputString>
<mask> bool hexlify(const InputString& input, OutputString& output,
<mask> bool append=false);
<mask>
<mask> template <class OutputString = std::string>
<mask> OutputString hexlify(ByteRange input) {
<mask> OutputString output;
<mask> if (!hexlify(input, output)) {
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<class InputString, class OutputString>
</s> add template <class InputString, class OutputString> </s> remove template <class String>
String backslashify(const String& input, bool hex_style=false) {
String output;
</s> add template <class OutputString = std::string>
OutputString backslashify(StringPiece input, bool hex_style = false) {
OutputString output; </s> remove template<class InputString, class OutputString>
bool hexlify(const InputString& input, OutputString& output,
bool append_output) {
if (!append_output) output.clear();
</s> add template <class InputString, class OutputString>
bool hexlify(
const InputString& input,
OutputString& output,
bool append_output) {
if (!append_output) {
output.clear();
} </s> remove template<class InputString, class OutputString>
</s> add template <class InputString, class OutputString> </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 template <class String1, class String2>
void backslashify(const String1& input, String2& output, bool hex_style=false);
</s> add template <class OutputString>
void backslashify(
folly::StringPiece input,
OutputString& output,
bool hex_style = false);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> /**
<mask> * Same functionality as Python's binascii.unhexlify. Returns true
<mask> * on successful conversion.
<mask> */
<mask> template<class InputString, class OutputString>
<mask> bool unhexlify(const InputString& input, OutputString& output);
<mask>
<mask> template <class OutputString = std::string>
<mask> OutputString unhexlify(StringPiece input) {
<mask> OutputString output;
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<class InputString, class OutputString>
bool hexlify(const InputString& input, OutputString& output,
bool append=false);
</s> add template <class InputString, class OutputString>
bool hexlify(
const InputString& input,
OutputString& output,
bool append = false); </s> remove template <class String>
String backslashify(const String& input, bool hex_style=false) {
String output;
</s> add template <class OutputString = std::string>
OutputString backslashify(StringPiece input, bool hex_style = false) {
OutputString output; </s> remove template<class InputString, class OutputString>
</s> add template <class InputString, class OutputString> </s> remove template<class InputString, class OutputString>
bool hexlify(const InputString& input, OutputString& output,
bool append_output) {
if (!append_output) output.clear();
</s> add template <class InputString, class OutputString>
bool hexlify(
const InputString& input,
OutputString& output,
bool append_output) {
if (!append_output) {
output.clear();
} </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 template <class String1, class String2>
void backslashify(const String1& input, String2& output, bool hex_style=false);
</s> add template <class OutputString>
void backslashify(
folly::StringPiece input,
OutputString& output,
bool hex_style = false);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> }
<mask> return output;
<mask> }
<mask>
<mask> /*
<mask> * A pretty-printer for numbers that appends suffixes of units of the
<mask> * given type. It prints 4 sig-figs of value with the most
<mask> * appropriate unit.
<mask> *
<mask> * If `addSpace' is true, we put a space between the units suffix and
</s> [sdk33] Update iOS with RN 0.59 </s> remove TimeoutQueue() : nextId_(1) { }
</s> add TimeoutQueue() : nextId_(1) {} </s> remove * acquisition is unsuccessful, the returned LockedPtr is NULL.
</s> add * acquisition is unsuccessful, the returned LockedPtr is nullptr. </s> remove * acquisition is unsuccessful, the returned ConstLockedPtr is NULL.
</s> add * acquisition is unsuccessful, the returned ConstLockedPtr is nullptr. </s> remove template <typename E, typename V, typename... Args>
void throwOnFail(V&& value, Args&&... args) {
if (!value) {
throw E(std::forward<Args>(args)...);
}
}
</s> add </s> remove struct DefaultTag {};
</s> add </s> remove * Takes the difference between two sets of timespec values. The first
* two come from a high-resolution clock whereas the other two come
* from a low-resolution clock. The crux of the matter is that
* high-res values may be bogus as documented in
* http://linux.die.net/man/3/clock_gettime. The trouble is when the
* running process migrates from one CPU to another, which is more
* likely for long-running processes. Therefore we watch for high
* differences between the two timings.
*
* This function is subject to further improvements.
</s> add * Adds a benchmark wrapped in a std::function. Only used
* internally. Pass by value is intentional.
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep add keep keep keep keep
|
<mask> * Current types are:
<mask> * PRETTY_TIME - s, ms, us, ns, etc.
<mask> * PRETTY_BYTES_METRIC - kB, MB, GB, etc (goes up by 10^3 = 1000 each time)
<mask> * PRETTY_BYTES - kB, MB, GB, etc (goes up by 2^10 = 1024 each time)
<mask> * PRETTY_BYTES_IEC - KiB, MiB, GiB, etc
<mask> * PRETTY_UNITS_METRIC - k, M, G, etc (goes up by 10^3 = 1000 each time)
</s> [sdk33] Update iOS with RN 0.59 </s> remove * - insert() and erase() invalidate iterators and references
</s> add * - insert() and erase() invalidate iterators and references.
erase(iterator) returns an iterator pointing to the next valid element. </s> remove *size = (allocSize - sizeof(RefCounted)) / sizeof(Char);
</s> add *size = (allocSize - getDataOffset()) / sizeof(Char) - 1; </s> add *newCapacity = (allocNewCapacity - getDataOffset()) / sizeof(Char) - 1; </s> remove continue; // this will unlock all the locks
</s> add continue; // this will unlock all the locks </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 const value_type& front() const { return *begin(); }
</s> add const value_type& front() const {
return *begin();
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep add keep keep keep keep
|
<mask> * PRETTY_SI - full SI metric prefixes from yocto to Yotta
<mask> * http://en.wikipedia.org/wiki/Metric_prefix
<mask> * @author Mark Rabkin <[email protected]>
<mask> */
<mask> enum PrettyType {
<mask> PRETTY_TIME,
</s> [sdk33] Update iOS with RN 0.59 </s> add PRETTY_TIME_HMS, </s> remove /*
</s> add /** </s> remove double prettyToDouble(folly::StringPiece *const prettyString,
const PrettyType type);
</s> add double prettyToDouble(
folly::StringPiece* const prettyString,
const PrettyType type); </s> remove template <class T> struct IsSizableString {
enum { value = IsSomeString<T>::value
|| std::is_same<T, StringPiece>::value };
</s> add template <class T>
struct IsSizableString {
enum {
value = IsSomeString<T>::value || std::is_same<T, StringPiece>::value
}; </s> remove /**
* Takes the difference between two timespec values. end is assumed to
* occur after start.
*/
inline uint64_t timespecDiff(timespec end, timespec start) {
if (end.tv_sec == start.tv_sec) {
assert(end.tv_nsec >= start.tv_nsec);
return end.tv_nsec - start.tv_nsec;
}
assert(end.tv_sec > start.tv_sec);
auto diff = uint64_t(end.tv_sec - start.tv_sec);
assert(diff <
std::numeric_limits<uint64_t>::max() / 1000000000UL);
return diff * 1000000000UL
+ end.tv_nsec - start.tv_nsec;
}
</s> add struct BenchmarkResult {
std::string file;
std::string name;
double timeInNs;
}; </s> remove * - insert() and erase() invalidate iterators and references
</s> add * - insert() and erase() invalidate iterators and references.
erase(iterator) returns an iterator pointing to the next valid element.
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep add keep keep keep keep keep
|
<mask> */
<mask> enum PrettyType {
<mask> PRETTY_TIME,
<mask>
<mask> PRETTY_BYTES_METRIC,
<mask> PRETTY_BYTES_BINARY,
<mask> PRETTY_BYTES = PRETTY_BYTES_BINARY,
<mask> PRETTY_BYTES_BINARY_IEC,
</s> [sdk33] Update iOS with RN 0.59 </s> add * </s> remove /*
</s> add /** </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 enum {
</s> add enum : uint16_t { </s> remove enum class Op { MOVE, NUKE, FULL, HEAP };
</s> add enum class Op { MOVE, NUKE, HEAP }; </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/String.h
|
keep replace replace keep replace keep keep
|
<mask> */
<mask> double prettyToDouble(folly::StringPiece *const prettyString,
<mask> const PrettyType type);
<mask>
<mask> /*
<mask> * Same as prettyToDouble(folly::StringPiece*, PrettyType), but
<mask> * expects whole string to be correctly parseable. Throws std::range_error
</s> [sdk33] Update iOS with RN 0.59 </s> remove #define BENCHMARK_PARAM_MULTI(name, param) \
</s> add #define BENCHMARK_PARAM_MULTI(name, param) \ </s> remove #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \
</s> add #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \ </s> remove #define BENCHMARK_RELATIVE_PARAM(name, param) \
</s> add #define BENCHMARK_RELATIVE_PARAM(name, param) \ </s> remove #define BENCHMARK_RELATIVE(name, ...) \
BENCHMARK_IMPL( \
name, \
"%" FB_STRINGIZE(name), \
FB_ARG_2_OR_1(1, ## __VA_ARGS__), \
FB_ONE_OR_NONE(unsigned, ## __VA_ARGS__), \
__VA_ARGS__)
</s> add #define BENCHMARK_RELATIVE(name, ...) \
BENCHMARK_IMPL( \
name, \
"%" FB_STRINGIZE(name), \
FB_ARG_2_OR_1(1, ##__VA_ARGS__), \
FB_ONE_OR_NONE(unsigned, ##__VA_ARGS__), \
__VA_ARGS__) </s> remove #define BENCHMARK_PARAM(name, param) \
BENCHMARK_NAMED_PARAM(name, param, param)
</s> add #define BENCHMARK_PARAM(name, param) BENCHMARK_NAMED_PARAM(name, param, param)
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep
|
<mask> * delimiters should be treated as one single separator (ignoring empty tokens)
<mask> * or not (generating empty tokens).
<mask> */
<mask>
<mask> template<class Delim, class String, class OutputType>
<mask> void split(const Delim& delimiter,
<mask> const String& input,
<mask> std::vector<OutputType>& out,
<mask> const bool ignoreEmpty = false);
<mask>
<mask> template<class Delim, class String, class OutputType>
<mask> void split(const Delim& delimiter,
<mask> const String& input,
<mask> folly::fbvector<OutputType>& out,
<mask> const bool ignoreEmpty = false);
<mask>
<mask> template<class OutputValueType, class Delim, class String,
<mask> class OutputIterator>
<mask> void splitTo(const Delim& delimiter,
<mask> const String& input,
<mask> OutputIterator out,
<mask> const bool ignoreEmpty = false);
<mask>
<mask> /*
<mask> * Split a string into a fixed number of string pieces and/or numeric types
<mask> * by delimiter. Conversions are supported for any type which folly:to<> can
<mask> * target, including all overloads of parseTo(). Returns 'true' if the fields
</s> [sdk33] Update iOS with RN 0.59 </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
std::vector<OutputType>& out,
bool ignoreEmpty) { </s> remove template<class OutputValueType, class Delim, class String,
class OutputIterator>
void splitTo(const Delim& delimiter,
const String& input,
OutputIterator out,
bool ignoreEmpty) {
</s> add template <
class OutputValueType,
class Delim,
class String,
class OutputIterator>
void splitTo(
const Delim& delimiter,
const String& input,
OutputIterator out,
bool ignoreEmpty) { </s> remove template<class Delim, class String, class OutputType>
void split(const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) {
</s> add template <class Delim, class String, class OutputType>
void split(
const Delim& delimiter,
const String& input,
fbvector<OutputType>& out,
bool ignoreEmpty) { </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty);
</s> add detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty); </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty);
</s> add detail::prepareDelim(delimiter),
StringPiece(input),
std::back_inserter(out),
ignoreEmpty); </s> remove }
</s> add } // namespace detail
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
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 replace replace replace replace replace replace replace replace keep keep replace replace replace keep
|
<mask> *
<mask> * Note that this will likely not work if the last field's target is of numeric
<mask> * type, in which case folly::to<> will throw an exception.
<mask> */
<mask> template <class T, class Enable = void>
<mask> struct IsSomeVector {
<mask> enum { value = false };
<mask> };
<mask>
<mask> template <class T>
<mask> struct IsSomeVector<std::vector<T>, void> {
<mask> enum { value = true };
<mask> };
<mask>
<mask> template <class T>
<mask> struct IsSomeVector<fbvector<T>, void> {
<mask> enum { value = true };
<mask> };
<mask>
<mask> template <class T, class Enable = void>
<mask> struct IsConvertible {
<mask> enum { value = false };
<mask> };
<mask>
<mask> template <class T>
<mask> struct IsConvertible<
<mask> T,
<mask> decltype(static_cast<void>(
<mask> parseTo(std::declval<folly::StringPiece>(), std::declval<T&>())))> {
<mask> enum { value = true };
<mask> };
<mask>
<mask> template <class... Types>
<mask> struct AllConvertible;
<mask>
<mask> template <class Head, class... Tail>
<mask> struct AllConvertible<Head, Tail...> {
<mask> enum { value = IsConvertible<Head>::value && AllConvertible<Tail...>::value };
<mask> };
<mask>
<mask> template <>
<mask> struct AllConvertible<> {
<mask> enum { value = true };
<mask> };
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove template <class T> struct IsSizableString {
enum { value = IsSomeString<T>::value
|| std::is_same<T, StringPiece>::value };
</s> add template <class T>
struct IsSizableString {
enum {
value = IsSomeString<T>::value || std::is_same<T, StringPiece>::value
}; </s> remove // Hook into boost's type traits
namespace boost {
template <class T>
struct has_nothrow_constructor<folly::basic_fbstring<T> > : true_type {
enum { value = true };
};
} // namespace boost
</s> add </s> remove static_assert(AllConvertible<float>::value, "");
static_assert(AllConvertible<int>::value, "");
static_assert(AllConvertible<bool>::value, "");
static_assert(AllConvertible<int>::value, "");
static_assert(!AllConvertible<std::vector<int>>::value, "");
</s> add template <typename OutputType>
struct IsConvertible<
void_t<decltype(parseTo(StringPiece{}, std::declval<OutputType&>()))>,
OutputType> : std::true_type {};
} // namespace detail
template <typename OutputType>
struct IsConvertible : detail::IsConvertible<void, OutputType> {}; </s> remove #include <type_traits>
#include <utility>
namespace folly {
enum class TLPDestructionMode {
THIS_THREAD,
ALL_THREADS
};
struct AccessModeStrict {};
} // namespace
</s> add </s> remove template <typename T, typename Enable = void> struct DynamicConverter;
</s> add template <typename T, typename Enable = void>
struct DynamicConverter;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep replace replace replace replace replace keep keep keep replace
|
<mask> enum { value = true };
<mask> };
<mask>
<mask> static_assert(AllConvertible<float>::value, "");
<mask> static_assert(AllConvertible<int>::value, "");
<mask> static_assert(AllConvertible<bool>::value, "");
<mask> static_assert(AllConvertible<int>::value, "");
<mask> static_assert(!AllConvertible<std::vector<int>>::value, "");
<mask>
<mask> template <bool exact = true, class Delim, class... OutputTypes>
<mask> typename std::enable_if<
<mask> AllConvertible<OutputTypes...>::value && sizeof...(OutputTypes) >= 1,
</s> [sdk33] Update iOS with RN 0.59 </s> remove struct AllConvertible<> {
enum { value = true };
};
</s> add struct IsConvertible<void, decltype(std::ignore)> : std::true_type {}; </s> remove AllConvertible<OutputTypes...>::value && sizeof...(OutputTypes) >= 1,
</s> add StrictConjunction<IsConvertible<OutputTypes>...>::value &&
sizeof...(OutputTypes) >= 1, </s> remove detail::prepareDelim(delimiter),
StringPiece(input),
out,
ignoreEmpty);
</s> add detail::prepareDelim(delimiter), StringPiece(input), out, ignoreEmpty); </s> remove enforce(n <= size(), std::__throw_out_of_range, "");
</s> add enforce<std::out_of_range>(n < size(), ""); </s> remove enforce(n < size(), std::__throw_out_of_range, "");
</s> add enforce<std::out_of_range>(n < size(), "");
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep replace replace replace replace keep keep replace replace replace keep keep keep
|
<mask> */
<mask>
<mask> template <class Delim, class Iterator, class String>
<mask> void join(const Delim& delimiter,
<mask> Iterator begin,
<mask> Iterator end,
<mask> String& output);
<mask>
<mask> template <class Delim, class Container, class String>
<mask> void join(const Delim& delimiter,
<mask> const Container& container,
<mask> String& output) {
<mask> join(delimiter, container.begin(), container.end(), output);
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove void join(const Delim& delimiter,
const std::initializer_list<Value>& values,
String& output) {
</s> add void join(
const Delim& delimiter,
const std::initializer_list<Value>& values,
String& output) { </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(
detail::prepareDelim(delimiter),
begin,
end,
output);
</s> add void join(
const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(detail::prepareDelim(delimiter), begin, end, output); </s> remove } // namespace detail
</s> add } // namespace detail </s> remove typename
std::enable_if<!IsSizableStringContainerIterator<Iterator>::value>::type
internalJoin(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add typename std::enable_if<
!IsSizableStringContainerIterator<Iterator>::value>::type
internalJoin(Delim delimiter, Iterator begin, Iterator end, String& output) { </s> remove std::string join(const Delim& delimiter,
const Container& container) {
</s> add std::string join(const Delim& delimiter, const Container& container) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep replace replace replace keep keep keep keep replace replace keep keep keep
|
<mask>
<mask> template <class Delim, class Value, class String>
<mask> void join(const Delim& delimiter,
<mask> const std::initializer_list<Value>& values,
<mask> String& output) {
<mask> join(delimiter, values.begin(), values.end(), output);
<mask> }
<mask>
<mask> template <class Delim, class Container>
<mask> std::string join(const Delim& delimiter,
<mask> const Container& container) {
<mask> std::string output;
<mask> join(delimiter, container.begin(), container.end(), output);
<mask> return output;
</s> [sdk33] Update iOS with RN 0.59 </s> remove void join(const Delim& delimiter,
const Container& container,
String& output) {
</s> add void join(const Delim& delimiter, const Container& container, String& output) { </s> remove std::string join(const Delim& delimiter,
const std::initializer_list<Value>& values) {
</s> add std::string join(
const Delim& delimiter,
const std::initializer_list<Value>& values) { </s> remove template <class Delim,
class Iterator,
typename std::enable_if<std::is_same<
typename std::iterator_traits<Iterator>::iterator_category,
std::random_access_iterator_tag>::value>::type* = nullptr>
</s> add template <
class Delim,
class Iterator,
typename std::enable_if<std::is_base_of<
std::forward_iterator_tag,
typename std::iterator_traits<Iterator>::iterator_category>::value>::
type* = nullptr> </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output);
</s> add void join(const Delim& delimiter, Iterator begin, Iterator end, String& output); </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(
detail::prepareDelim(delimiter),
begin,
end,
output);
</s> add void join(
const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(detail::prepareDelim(delimiter), begin, end, output);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> return output;
<mask> }
<mask>
<mask> template <class Delim, class Value>
<mask> std::string join(const Delim& delimiter,
<mask> const std::initializer_list<Value>& values) {
<mask> std::string output;
<mask> join(delimiter, values.begin(), values.end(), output);
<mask> return output;
<mask> }
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove std::string join(const Delim& delimiter,
const Container& container) {
</s> add std::string join(const Delim& delimiter, const Container& container) { </s> remove template <class Delim,
class Iterator,
typename std::enable_if<std::is_same<
typename std::iterator_traits<Iterator>::iterator_category,
std::random_access_iterator_tag>::value>::type* = nullptr>
</s> add template <
class Delim,
class Iterator,
typename std::enable_if<std::is_base_of<
std::forward_iterator_tag,
typename std::iterator_traits<Iterator>::iterator_category>::value>::
type* = nullptr> </s> remove void join(const Delim& delimiter,
const std::initializer_list<Value>& values,
String& output) {
</s> add void join(
const Delim& delimiter,
const std::initializer_list<Value>& values,
String& output) { </s> remove void join(const Delim& delimiter,
const Container& container,
String& output) {
</s> add void join(const Delim& delimiter, const Container& container, String& output) { </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output);
</s> add void join(const Delim& delimiter, Iterator begin, Iterator end, String& output); </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(
detail::prepareDelim(delimiter),
begin,
end,
output);
</s> add void join(
const Delim& delimiter,
Iterator begin,
Iterator end,
String& output) {
detail::internalJoin(detail::prepareDelim(delimiter), begin, end, output);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace replace replace replace replace keep keep keep keep keep
|
<mask> join(delimiter, values.begin(), values.end(), output);
<mask> return output;
<mask> }
<mask>
<mask> template <class Delim,
<mask> class Iterator,
<mask> typename std::enable_if<std::is_same<
<mask> typename std::iterator_traits<Iterator>::iterator_category,
<mask> std::random_access_iterator_tag>::value>::type* = nullptr>
<mask> std::string join(const Delim& delimiter, Iterator begin, Iterator end) {
<mask> std::string output;
<mask> join(delimiter, begin, end, output);
<mask> return output;
<mask> }
</s> [sdk33] Update iOS with RN 0.59 </s> remove std::string join(const Delim& delimiter,
const Container& container) {
</s> add std::string join(const Delim& delimiter, const Container& container) { </s> remove std::string join(const Delim& delimiter,
const std::initializer_list<Value>& values) {
</s> add std::string join(
const Delim& delimiter,
const std::initializer_list<Value>& values) { </s> remove typename
std::enable_if<!IsSizableStringContainerIterator<Iterator>::value>::type
internalJoin(Delim delimiter,
Iterator begin,
Iterator end,
String& output) {
</s> add typename std::enable_if<
!IsSizableStringContainerIterator<Iterator>::value>::type
internalJoin(Delim delimiter, Iterator begin, Iterator end, String& output) { </s> remove void join(const Delim& delimiter,
const std::initializer_list<Value>& values,
String& output) {
</s> add void join(
const Delim& delimiter,
const std::initializer_list<Value>& values,
String& output) { </s> remove void join(const Delim& delimiter,
Iterator begin,
Iterator end,
String& output);
</s> add void join(const Delim& delimiter, Iterator begin, Iterator end, String& output); </s> remove } // namespace detail
</s> add } // namespace detail
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> */
<mask> StringPiece rtrimWhitespace(StringPiece sp);
<mask>
<mask> /**
<mask> * Returns a subpiece with all whitespace removed from the back and front of @sp.
<mask> * Whitespace means any of [' ', '\n', '\r', '\t'].
<mask> */
<mask> inline StringPiece trimWhitespace(StringPiece sp) {
<mask> return ltrimWhitespace(rtrimWhitespace(sp));
<mask> }
<mask>
</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 * Constructs a new `Function` from any callable object. This
* handles function pointers, pointers to static member functions,
* `std::reference_wrapper` objects, `std::function` objects, and arbitrary
* objects that implement `operator()` if the parameter signature
* matches (i.e. it returns R when called with Args...).
* For a `Function` with a const function type, the object must be
* callable from a const-reference, i.e. implement `operator() const`.
* For a `Function` with a non-const function type, the object will
* be called from a non-const reference, which means that it will execute
* a non-const `operator()` if it is defined, and falls back to
* `operator() const` otherwise.
</s> add * Constructs a new `Function` from any callable object that is _not_ a
* `folly::Function`. This handles function pointers, pointers to static
* member functions, `std::reference_wrapper` objects, `std::function`
* objects, and arbitrary objects that implement `operator()` if the parameter
* signature matches (i.e. it returns an object convertible to `R` when called
* with `Args...`). </s> remove template <bool emptyOk=false>
</s> add template <bool emptyOk = false> </s> remove * For moving a `Function<X(Ys..) const>` into a `Function<X(Ys...)>`.
</s> add * For move-constructing from a `folly::Function<X(Ys...) [const?]>`.
* For a `Function` with a `const` function type, the object must be
* callable from a `const`-reference, i.e. implement `operator() const`.
* For a `Function` with a non-`const` function type, the object will
* be called from a non-const reference, which means that it will execute
* a non-const `operator()` if it is defined, and falls back to
* `operator() const` otherwise. </s> remove template<class String> StringPiece prepareDelim(const String& s) {
</s> add template <class String>
StringPiece prepareDelim(const String& s) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> * Fast, in-place lowercasing of ASCII alphabetic characters in strings.
<mask> * Leaves all other characters unchanged, including those with the 0x80
<mask> * bit set.
<mask> * @param str String to convert
<mask> * @param len Length of str, in bytes
<mask> */
<mask> void toLowerAscii(char* str, size_t length);
<mask>
<mask> inline void toLowerAscii(MutableStringPiece str) {
<mask> toLowerAscii(str.begin(), str.size());
</s> [sdk33] Update iOS with RN 0.59 </s> remove template <class Iterator = const char*,
class Base = folly::Range<boost::u8_to_u32_iterator<Iterator>>>
class UTF8Range : public Base {
public:
/* implicit */ UTF8Range(const folly::Range<Iterator> baseRange)
: Base(boost::u8_to_u32_iterator<Iterator>(
baseRange.begin(), baseRange.begin(), baseRange.end()),
boost::u8_to_u32_iterator<Iterator>(
baseRange.end(), baseRange.begin(), baseRange.end())) {}
/* implicit */ UTF8Range(const std::string& baseString)
: Base(folly::Range<Iterator>(baseString)) {}
};
using UTF8StringPiece = UTF8Range<const char*>;
</s> add inline void toLowerAscii(std::string& str) {
// str[0] is legal also if the string is empty.
toLowerAscii(&str[0], str.size());
} </s> remove const_reverse_iterator crbegin() const { return rbegin(); }
const_reverse_iterator crend() const { return rend(); }
</s> add const_reverse_iterator crbegin() const {
return rbegin();
}
const_reverse_iterator crend() const {
return rend();
} </s> remove template<class OutStringT, class DelimT, class OutputIterator>
void internalSplit(DelimT delim, StringPiece sp, OutputIterator out,
</s> add template <class OutStringT, class DelimT, class OutputIterator>
void internalSplit(
DelimT delim,
StringPiece sp,
OutputIterator out, </s> remove void uriEscape(StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL);
</s> add void uriEscape(
StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL); </s> remove FOLLY_PRINTF_FORMAT_ATTR(1, 2);
</s> add FOLLY_PRINTF_FORMAT_ATTR(1, 2); </s> remove void uriUnescape(StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL);
</s> add void uriUnescape(
StringPiece str,
String& out,
UriEscapeMode mode = UriEscapeMode::ALL);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.h
|
keep keep keep keep replace replace replace replace replace replace replace replace replace replace replace replace replace replace keep keep keep replace replace replace replace replace replace replace replace
|
<mask> inline void toLowerAscii(MutableStringPiece str) {
<mask> toLowerAscii(str.begin(), str.size());
<mask> }
<mask>
<mask> template <class Iterator = const char*,
<mask> class Base = folly::Range<boost::u8_to_u32_iterator<Iterator>>>
<mask> class UTF8Range : public Base {
<mask> public:
<mask> /* implicit */ UTF8Range(const folly::Range<Iterator> baseRange)
<mask> : Base(boost::u8_to_u32_iterator<Iterator>(
<mask> baseRange.begin(), baseRange.begin(), baseRange.end()),
<mask> boost::u8_to_u32_iterator<Iterator>(
<mask> baseRange.end(), baseRange.begin(), baseRange.end())) {}
<mask> /* implicit */ UTF8Range(const std::string& baseString)
<mask> : Base(folly::Range<Iterator>(baseString)) {}
<mask> };
<mask>
<mask> using UTF8StringPiece = UTF8Range<const char*>;
<mask>
<mask> } // namespace folly
<mask>
<mask> // Hook into boost's type traits
<mask> namespace boost {
<mask> template <class T>
<mask> struct has_nothrow_constructor<folly::basic_fbstring<T> > : true_type {
<mask> enum { value = true };
<mask> };
<mask> } // namespace boost
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove /* implicit */ Ignore(const T&) {}
</s> add constexpr /* implicit */ Ignore(const T&) {} </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 class BadFormatArg : public std::invalid_argument {
public:
explicit BadFormatArg(const std::string& msg)
: std::invalid_argument(msg) {}
</s> add class FOLLY_EXPORT BadFormatArg : public std::invalid_argument {
using invalid_argument::invalid_argument; </s> add Ignore() = default; </s> remove : container(container),
defaultValue(defaultValue) {
}
</s> add : container(container), defaultValue(defaultValue) {}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/String.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/Subprocess.h
|
keep replace replace keep keep keep replace replace keep
|
<mask> * A thread-safe [1] version of popen() (type="r", to read from the child):
<mask> * Subprocess proc(cmd, Subprocess::pipeStdout());
<mask> * // read from proc.stdout()
<mask> * proc.wait();
<mask> *
<mask> * A thread-safe [1] version of popen() (type="w", to write to the child):
<mask> * Subprocess proc(cmd, Subprocess::pipeStdin());
<mask> * // write to proc.stdin()
<mask> * proc.wait();
</s> [sdk33] Update iOS with RN 0.59 </s> add // This version of doNotOptimizeAway tells the compiler that the asm
// block will read datum from memory, and that in addition it might read
// or write from any memory location. If the memory clobber could be
// separated into input and output that would be preferrable. </s> remove #define BENCHMARK_RELATIVE_PARAM(name, param) \
</s> add #define BENCHMARK_RELATIVE_PARAM(name, param) \ </s> remove *
</s> add </s> remove #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \
</s> add #define BENCHMARK_RELATIVE_PARAM_MULTI(name, param) \ </s> remove private:
// This is the entire state of LockedGuardPtr.
SynchronizedType* const parent_{nullptr};
};
</s> add /**
* Acquire locks on many lockables or synchronized instances in such a way
* that the sequence of calls within the function does not cause deadlocks.
*
* This can often result in a performance boost as compared to simply
* acquiring your locks in an ordered manner. Even for very simple cases.
* The algorithm tried to adjust to contention by blocking on the mutex it
* thinks is the best fit, leaving all other mutexes open to be locked by
* other threads. See the benchmarks in folly/test/SynchronizedBenchmark.cpp
* for more
*
* This works differently as compared to the locking algorithm in libstdc++
* and is the recommended way to acquire mutexes in a generic order safe
* manner. Performance benchmarks show that this does better than the one in
* libstdc++ even for the simple cases
*
* Usage is the same as std::lock() for arbitrary lockables
*
* folly::lock(one, two, three);
*
* To make it work with folly::Synchronized you have to specify how you want
* the locks to be acquired, use the folly::wlock(), folly::rlock(),
* folly::ulock() and folly::lock() helpers defined below
*
* auto [one, two] = lock(folly::wlock(a), folly::rlock(b));
*
* Note that you can/must avoid the folly:: namespace prefix on the lock()
* function if you use the helpers, ADL lookup is done to find the lock function
*
* This will execute the deadlock avoidance algorithm and acquire a write lock
* for a and a read lock for b
*/
template <typename LockableOne, typename LockableTwo, typename... Lockables>
void lock(LockableOne& one, LockableTwo& two, Lockables&... lockables) {
auto locker = [](auto& lockable) {
using Lockable = std::remove_reference_t<decltype(lockable)>;
return detail::makeSynchronizedLocker(
lockable,
[](auto& l) { return std::unique_lock<Lockable>{l}; },
[](auto& l) {
auto lock = std::unique_lock<Lockable>{l, std::defer_lock};
lock.try_lock();
return lock;
});
};
auto locks = lock(locker(one), locker(two), locker(lockables)...);
// release ownership of the locks from the RAII lock wrapper returned by the
// function above
for_each(locks, [&](auto& lock) { lock.release(); });
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> */
<mask>
<mask> #pragma once
<mask>
<mask> #include <sys/types.h>
<mask> #include <signal.h>
<mask> #if __APPLE__
<mask> #include <sys/wait.h>
<mask> #else
<mask> #include <wait.h>
</s> [sdk33] Update iOS with RN 0.59 </s> add #include <sys/types.h>
</s> remove #ifdef USE_JEMALLOC
</s> add #include <folly/CPortability.h>
#include <folly/portability/Config.h>
#if (defined(USE_JEMALLOC) || defined(FOLLY_USE_JEMALLOC)) && !FOLLY_SANITIZE </s> remove #include <string>
</s> add </s> remove #include <string.h>
</s> add </s> add #include <folly/portability/Config.h>
#if !defined(_WIN32)
</s> add #include <string.h>
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep add keep keep keep keep keep
|
<mask>
<mask> #include <signal.h>
<mask> #if __APPLE__
<mask> #include <sys/wait.h>
<mask> #else
<mask> #include <wait.h>
<mask> #endif
</s> [sdk33] Update iOS with RN 0.59 </s> remove #include <sys/types.h>
</s> add </s> remove #include <vector>
</s> add </s> remove #include <android/api-level.h>
</s> add #include <android/api-level.h> // @manual </s> remove #include <Availability.h>
</s> add #include <Availability.h> // @manual </s> remove #ifdef USE_JEMALLOC
</s> add #include <folly/CPortability.h>
#include <folly/portability/Config.h>
#if (defined(USE_JEMALLOC) || defined(FOLLY_USE_JEMALLOC)) && !FOLLY_SANITIZE </s> remove #include <folly/portability/Config.h>
</s> add
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> #include <wait.h>
<mask> #endif
<mask>
<mask> #include <exception>
<mask> #include <vector>
<mask> #include <string>
<mask>
<mask> #include <boost/container/flat_map.hpp>
<mask> #include <boost/operators.hpp>
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> add #include <vector> </s> remove #include <vector>
#include <boost/type_traits.hpp>
#include <boost/regex/pending/unicode_iterator.hpp>
#ifdef FOLLY_HAVE_DEPRECATED_ASSOC
#ifdef _GLIBCXX_SYMVER
#include <ext/hash_set>
#include <ext/hash_map>
#endif
#endif
#include <unordered_set>
</s> add </s> remove #include <stdarg.h>
</s> add </s> add #include <unordered_set>
#include <vector> </s> remove #include <boost/operators.hpp>
#include <folly/portability/BitsFunctexcept.h>
</s> add #include <folly/Traits.h>
#include <folly/Utility.h>
#include <folly/lang/Exception.h> </s> add #include <cstdarg>
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep add keep keep keep keep keep
|
<mask> #include <exception>
<mask> #include <string>
<mask>
<mask> #include <boost/container/flat_map.hpp>
<mask> #include <boost/operators.hpp>
<mask>
<mask> #include <folly/Exception.h>
</s> [sdk33] Update iOS with RN 0.59 </s> remove #include <vector>
</s> add </s> add #include <cstdarg> </s> remove #include <stdarg.h>
</s> add </s> remove #include <vector>
#include <boost/type_traits.hpp>
#include <boost/regex/pending/unicode_iterator.hpp>
#ifdef FOLLY_HAVE_DEPRECATED_ASSOC
#ifdef _GLIBCXX_SYMVER
#include <ext/hash_set>
#include <ext/hash_map>
#endif
#endif
#include <unordered_set>
</s> add </s> remove #include <folly/Hash.h>
#include <folly/Memory.h>
#include <folly/RWSpinLock.h>
#include <folly/Demangle.h>
</s> add </s> remove #include <folly/gen/String.h>
#include <folly/io/IOBufQueue.h>
</s> add
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep keep replace replace keep keep keep keep keep
|
<mask> #include <folly/Exception.h>
<mask> #include <folly/File.h>
<mask> #include <folly/FileUtil.h>
<mask> #include <folly/Function.h>
<mask> #include <folly/gen/String.h>
<mask> #include <folly/io/IOBufQueue.h>
<mask> #include <folly/MapUtil.h>
<mask> #include <folly/Portability.h>
<mask> #include <folly/Range.h>
<mask>
<mask> namespace folly {
</s> [sdk33] Update iOS with RN 0.59 </s> add #include <folly/Optional.h> </s> add #include <folly/gen/String.h>
#include <folly/io/IOBufQueue.h>
#include <folly/portability/SysResource.h> </s> add #include <folly/lang/Exception.h> </s> add #include <folly/CPortability.h> </s> add #include <folly/Traits.h>
#include <folly/functional/Invoke.h>
#include <folly/lang/Exception.h> </s> remove #include <type_traits>
#include <utility>
namespace folly {
enum class TLPDestructionMode {
THIS_THREAD,
ALL_THREADS
};
struct AccessModeStrict {};
} // namespace
</s> add
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep add keep keep keep keep keep keep
|
<mask> #include <folly/FileUtil.h>
<mask> #include <folly/Function.h>
<mask> #include <folly/MapUtil.h>
<mask> #include <folly/Portability.h>
<mask> #include <folly/Range.h>
<mask> #include <folly/gen/String.h>
<mask> #include <folly/io/IOBufQueue.h>
<mask> #include <folly/portability/SysResource.h>
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove #include <folly/gen/String.h>
#include <folly/io/IOBufQueue.h>
</s> add </s> add #include <folly/gen/String.h>
#include <folly/io/IOBufQueue.h>
#include <folly/portability/SysResource.h> </s> add #include <folly/CPortability.h> </s> add #include <folly/lang/Exception.h> </s> remove #include <boost/mpl/count.hpp>
</s> add #include <boost/mpl/vector.hpp>
#include <boost/operators.hpp> </s> remove #include <folly/Malloc.h>
</s> add #include <folly/Likely.h>
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep add keep keep keep keep keep
|
<mask> #include <folly/MapUtil.h>
<mask> #include <folly/Optional.h>
<mask> #include <folly/Portability.h>
<mask> #include <folly/Range.h>
<mask>
<mask> namespace folly {
<mask>
<mask> /**
<mask> * Class to wrap a process return code.
</s> [sdk33] Update iOS with RN 0.59 </s> add #include <folly/Optional.h> </s> remove #include <folly/gen/String.h>
#include <folly/io/IOBufQueue.h>
</s> add </s> add #include <folly/lang/Exception.h> </s> add #include <folly/Traits.h> </s> remove friend class Subprocess;
</s> add </s> remove #include <type_traits>
#include <utility>
namespace folly {
enum class TLPDestructionMode {
THIS_THREAD,
ALL_THREADS
};
struct AccessModeStrict {};
} // namespace
</s> add
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> * Class to wrap a process return code.
<mask> */
<mask> class Subprocess;
<mask> class ProcessReturnCode {
<mask> friend class Subprocess;
<mask> public:
<mask> enum State {
<mask> // Subprocess starts in the constructor, so this state designates only
<mask> // default-initialized or moved-out ProcessReturnCodes.
<mask> NOT_STARTED,
</s> [sdk33] Update iOS with RN 0.59 </s> remove KILLED
</s> add KILLED, </s> add #include <folly/gen/String.h>
#include <folly/io/IOBufQueue.h>
#include <folly/portability/SysResource.h> </s> remove class Options : private boost::orable<Options> {
</s> add class Options { </s> remove Options() {} // E.g. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58328
</s> add Options() {} // E.g. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58328 </s> add /**
* Friend all instantiations of LockedPtr and LockedPtrBase
*/
template <typename S, typename L>
friend class folly::LockedPtr;
template <typename S, typename M, typename L>
friend class LockedPtrBase;
</s> remove // The two stages of life for a vault, as mentioned in the class comment.
enum class SingletonVaultState {
Running,
Quiescing,
};
// Each singleton in the vault can be in two states: dead
// (registered but never created), living (CreateFunc returned an instance).
void stateCheck(SingletonVaultState expected,
const char* msg="Unexpected singleton state change") {
if (expected != state_) {
throw std::logic_error(msg);
}
}
</s> add
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> // default-initialized or moved-out ProcessReturnCodes.
<mask> NOT_STARTED,
<mask> RUNNING,
<mask> EXITED,
<mask> KILLED
<mask> };
<mask>
<mask> // Default-initialized for convenience. Subprocess::returnCode() will
<mask> // never produce this value.
<mask> ProcessReturnCode() : ProcessReturnCode(RV_NOT_STARTED) {}
</s> [sdk33] Update iOS with RN 0.59 </s> remove ProcessReturnCode() : ProcessReturnCode(RV_NOT_STARTED) {}
</s> add ProcessReturnCode() : rawStatus_(RV_NOT_STARTED) {} </s> add static ProcessReturnCode makeNotStarted() {
return ProcessReturnCode(RV_NOT_STARTED);
}
static ProcessReturnCode makeRunning() {
return ProcessReturnCode(RV_RUNNING);
}
static ProcessReturnCode make(int status);
</s> remove friend class Subprocess;
</s> add </s> remove continue; // this will unlock all the locks
</s> add continue; // this will unlock all the locks </s> remove FOLLY_PUSH_WARNING
FOLLY_MSVC_DISABLE_WARNING(4521) // Multiple copy constructors
FOLLY_MSVC_DISABLE_WARNING(4522) // Multiple assignment operators
</s> add </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
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep add keep keep keep keep keep keep
|
<mask> EXITED,
<mask> KILLED,
<mask> };
<mask>
<mask> // Default-initialized for convenience. Subprocess::returnCode() will
<mask> // never produce this value.
<mask> ProcessReturnCode() : rawStatus_(RV_NOT_STARTED) {}
<mask>
<mask> // Trivially copyable
<mask> ProcessReturnCode(const ProcessReturnCode& p) = default;
</s> [sdk33] Update iOS with RN 0.59 </s> remove ProcessReturnCode() : ProcessReturnCode(RV_NOT_STARTED) {}
</s> add ProcessReturnCode() : rawStatus_(RV_NOT_STARTED) {} </s> remove KILLED
</s> add KILLED, </s> remove explicit small_vector() = default;
</s> add small_vector() = default;
// Allocator is unused here. It is taken in for compatibility with std::vector
// interface, but it will be ignored.
small_vector(const std::allocator<Value>&) {} </s> remove // NOTE: Deleting the non-const copy constructor is unusual but necessary to
// prevent copies from non-const `Function` object from selecting the
// perfect forwarding implicit converting constructor below
// (i.e., `template <typename Fun> Function(Fun&&)`).
Function(Function&) = delete;
</s> add </s> add template <
typename LockPolicyType,
EnableIfSameUnlockPolicy<LockPolicyType>* = nullptr>
LockedPtr(LockedPtr<SynchronizedType, LockPolicyType>&& other) noexcept
: Base{std::move(other)} {} </s> remove continue; // this will unlock all the locks
</s> add continue; // this will unlock all the locks
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> };
<mask>
<mask> // Default-initialized for convenience. Subprocess::returnCode() will
<mask> // never produce this value.
<mask> ProcessReturnCode() : ProcessReturnCode(RV_NOT_STARTED) {}
<mask>
<mask> // Trivially copyable
<mask> ProcessReturnCode(const ProcessReturnCode& p) = default;
<mask> ProcessReturnCode& operator=(const ProcessReturnCode& p) = default;
<mask> // Non-default move: In order for Subprocess to be movable, the "moved
</s> [sdk33] Update iOS with RN 0.59 </s> add static ProcessReturnCode makeNotStarted() {
return ProcessReturnCode(RV_NOT_STARTED);
}
static ProcessReturnCode makeRunning() {
return ProcessReturnCode(RV_RUNNING);
}
static ProcessReturnCode make(int status);
</s> remove KILLED
</s> add KILLED, </s> remove explicit small_vector() = default;
</s> add small_vector() = default;
// Allocator is unused here. It is taken in for compatibility with std::vector
// interface, but it will be ignored.
small_vector(const std::allocator<Value>&) {} </s> remove // NOTE: Deleting the non-const copy constructor is unusual but necessary to
// prevent copies from non-const `Function` object from selecting the
// perfect forwarding implicit converting constructor below
// (i.e., `template <typename Fun> Function(Fun&&)`).
Function(Function&) = delete;
</s> add </s> add template <
typename LockPolicyType,
EnableIfSameUnlockPolicy<LockPolicyType>* = nullptr>
LockedPtr(LockedPtr<SynchronizedType, LockPolicyType>&& other) noexcept
: Base{std::move(other)} {} </s> remove template<class Arg>
explicit small_vector(Arg arg1, Arg arg2) {
</s> add small_vector(size_type n, value_type const& t) {
doConstruct(n, [&](void* p) { new (p) value_type(t); });
}
template <class Arg>
explicit small_vector(Arg arg1, Arg arg2) {
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep keep replace replace replace replace keep keep keep keep keep
|
<mask>
<mask> /**
<mask> * Helper wrappers around state().
<mask> */
<mask> bool notStarted() const { return state() == NOT_STARTED; }
<mask> bool running() const { return state() == RUNNING; }
<mask> bool exited() const { return state() == EXITED; }
<mask> bool killed() const { return state() == KILLED; }
<mask>
<mask> /**
<mask> * Exit status. Only valid if state() == EXITED; throws otherwise.
<mask> */
<mask> int exitStatus() const;
</s> [sdk33] Update iOS with RN 0.59 </s> remove bool empty() const { return size() == 0; }
</s> add bool empty() const {
return size() == 0;
} </s> remove bool empty() const { return size() == 0; }
</s> add bool empty() const {
return size() == 0;
} </s> remove std::string name() const {
auto ret = demangle(ti_.name());
if (tag_ti_ != std::type_index(typeid(DefaultTag))) {
ret += "/";
ret += demangle(tag_ti_.name());
}
return ret.toStdString();
}
</s> add std::string name() const; </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 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 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();
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> * Throws std::logic_error if in an unexpected state.
<mask> */
<mask> void enforce(State state) const;
<mask> private:
<mask> explicit ProcessReturnCode(int rv) : rawStatus_(rv) { }
<mask> static constexpr int RV_NOT_STARTED = -2;
<mask> static constexpr int RV_RUNNING = -1;
<mask>
<mask> int rawStatus_;
<mask> };
</s> [sdk33] Update iOS with RN 0.59 </s> remove private:
</s> add private: </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 ~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 std::string what_;
</s> add </s> remove static bool okToDelete(NodeType *candidate, int layer) {
</s> add static bool okToDelete(NodeType* candidate, int layer) { </s> remove detail::CachelinePaddedImpl<T> impl_;
</s> add static constexpr size_t paddingSize() noexcept {
return hardware_destructive_interference_size -
(alignof(T) % hardware_destructive_interference_size);
}
char paddingPre_[paddingSize()];
T inner_;
char paddingPost_[paddingSize()];
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep keep replace keep keep keep keep replace keep keep
|
<mask>
<mask> /**
<mask> * Base exception thrown by the Subprocess methods.
<mask> */
<mask> class SubprocessError : public std::exception {};
<mask>
<mask> /**
<mask> * Exception thrown by *Checked methods of Subprocess.
<mask> */
<mask> class CalledProcessError : public SubprocessError {
<mask> public:
<mask> explicit CalledProcessError(ProcessReturnCode rc);
</s> [sdk33] Update iOS with RN 0.59 </s> remove class SubprocessSpawnError : public SubprocessError {
</s> add class FOLLY_EXPORT SubprocessSpawnError : public SubprocessError { </s> remove ~CalledProcessError() throw() = default;
const char* what() const throw() override { return what_.c_str(); }
ProcessReturnCode returnCode() const { return returnCode_; }
</s> add ~CalledProcessError() throw() override = default;
ProcessReturnCode returnCode() const {
return returnCode_;
}
</s> remove class BadFormatArg : public std::invalid_argument {
public:
explicit BadFormatArg(const std::string& msg)
: std::invalid_argument(msg) {}
</s> add class FOLLY_EXPORT BadFormatArg : public std::invalid_argument {
using invalid_argument::invalid_argument; </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 std::string what_;
</s> add
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep keep replace replace replace keep keep replace keep keep
|
<mask> */
<mask> class CalledProcessError : public SubprocessError {
<mask> public:
<mask> explicit CalledProcessError(ProcessReturnCode rc);
<mask> ~CalledProcessError() throw() = default;
<mask> const char* what() const throw() override { return what_.c_str(); }
<mask> ProcessReturnCode returnCode() const { return returnCode_; }
<mask> private:
<mask> ProcessReturnCode returnCode_;
<mask> std::string what_;
<mask> };
<mask>
</s> [sdk33] Update iOS with RN 0.59 </s> remove class CalledProcessError : public SubprocessError {
</s> add class FOLLY_EXPORT CalledProcessError : public SubprocessError { </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 class SubprocessSpawnError : public SubprocessError {
</s> add class FOLLY_EXPORT SubprocessSpawnError : public SubprocessError { </s> remove class SubprocessError : public std::exception {};
</s> add class FOLLY_EXPORT SubprocessError : public std::runtime_error {
public:
using std::runtime_error::runtime_error;
}; </s> add static ProcessReturnCode makeNotStarted() {
return ProcessReturnCode(RV_NOT_STARTED);
}
static ProcessReturnCode makeRunning() {
return ProcessReturnCode(RV_RUNNING);
}
static ProcessReturnCode make(int status);
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep replace keep keep replace replace replace keep keep
|
<mask> /**
<mask> * Exception thrown if the subprocess cannot be started.
<mask> */
<mask> class SubprocessSpawnError : public SubprocessError {
<mask> public:
<mask> SubprocessSpawnError(const char* executable, int errCode, int errnoValue);
<mask> ~SubprocessSpawnError() throw() = default;
<mask> const char* what() const throw() override { return what_.c_str(); }
<mask> int errnoValue() const { return errnoValue_; }
<mask>
<mask> private:
</s> [sdk33] Update iOS with RN 0.59 </s> remove std::string what_;
</s> add </s> remove class CalledProcessError : public SubprocessError {
</s> add class FOLLY_EXPORT CalledProcessError : public SubprocessError { </s> remove ~CalledProcessError() throw() = default;
const char* what() const throw() override { return what_.c_str(); }
ProcessReturnCode returnCode() const { return returnCode_; }
</s> add ~CalledProcessError() throw() override = default;
ProcessReturnCode returnCode() const {
return returnCode_;
}
</s> remove std::string what_;
</s> add </s> remove class SubprocessError : public std::exception {};
</s> add class FOLLY_EXPORT SubprocessError : public std::runtime_error {
public:
using std::runtime_error::runtime_error;
};
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep keep keep replace keep keep keep keep keep
|
<mask> int errnoValue() const { return errnoValue_; }
<mask>
<mask> private:
<mask> int errnoValue_;
<mask> std::string what_;
<mask> };
<mask>
<mask> /**
<mask> * Subprocess.
<mask> */
</s> [sdk33] Update iOS with RN 0.59 </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 class SubprocessSpawnError : public SubprocessError {
</s> add class FOLLY_EXPORT SubprocessSpawnError : public SubprocessError { </s> remove std::string what_;
</s> add </s> remove ~CalledProcessError() throw() = default;
const char* what() const throw() override { return what_.c_str(); }
ProcessReturnCode returnCode() const { return returnCode_; }
</s> add ~CalledProcessError() throw() override = default;
ProcessReturnCode returnCode() const {
return returnCode_;
}
</s> remove explicit ProcessReturnCode(int rv) : rawStatus_(rv) { }
</s> add explicit ProcessReturnCode(int rv) : rawStatus_(rv) {} </s> remove NodeAlloc& alloc() { return alloc_; }
</s> add NodeAlloc& alloc() {
return alloc_;
}
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep keep replace keep keep replace keep keep
|
<mask> * otherwise.
<mask> */
<mask> class Options : private boost::orable<Options> {
<mask> friend class Subprocess;
<mask> public:
<mask> Options() {} // E.g. https://gcc.gnu.org/bugzilla/show_bug.cgi?id=58328
<mask>
<mask> /**
</s> [sdk33] Update iOS with RN 0.59 </s> remove friend class Subprocess;
</s> add </s> remove class BadFormatArg : public std::invalid_argument {
public:
explicit BadFormatArg(const std::string& msg)
: std::invalid_argument(msg) {}
</s> add class FOLLY_EXPORT BadFormatArg : public std::invalid_argument {
using invalid_argument::invalid_argument; </s> add /**
* Friend all instantiations of LockedPtr and LockedPtrBase
*/
template <typename S, typename L>
friend class folly::LockedPtr;
template <typename S, typename M, typename L>
friend class LockedPtrBase;
</s> add /**
* Friend all instantiations of LockedPtr and LockedPtrBase
*/
template <typename S, typename L>
friend class folly::LockedPtr;
template <typename S, typename M, typename L>
friend class LockedPtrBase;
</s> remove class SubprocessError : public std::exception {};
</s> add class FOLLY_EXPORT SubprocessError : public std::runtime_error {
public:
using std::runtime_error::runtime_error;
};
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Subprocess.h
|
keep add keep keep keep keep keep
|
<mask> }
<mask>
<mask> /**
<mask> * Attempts to acquire the lock, or fails if the timeout elapses first.
<mask> * If acquisition is unsuccessful, the returned LockedPtr will be null.
<mask> */
<mask> template <class Rep, class Period>
</s> [sdk33] Update iOS with RN 0.59 </s> remove * acquisition is unsuccessful, the returned LockedPtr is NULL.
</s> add * acquisition is unsuccessful, the returned LockedPtr is nullptr. </s> remove * acquisition is unsuccessful, the returned ConstLockedPtr is NULL.
</s> add * acquisition is unsuccessful, the returned ConstLockedPtr is nullptr. </s> remove /**
* Access the locked data.
*/
CDataType& operator*() const {
return parent_->datum_;
}
</s> add /**
* Acquire locks for multiple Synchronized<> objects, in a deadlock-safe
* manner.
*
* Wrap the synchronized instances with the appropriate locking strategy by
* using one of the four strategies - folly::lock (exclusive acquire for
* exclusive only mutexes), folly::rlock (shared acquire for shareable
* mutexes), folly::wlock (exclusive acquire for shareable mutexes) or
* folly::ulock (upgrade acquire for upgrade mutexes) (see above)
*
* The locks will be acquired and the passed callable will be invoked with the
* LockedPtr instances in the order that they were passed to the function
*/
template <typename Func, typename... SynchronizedLockers>
decltype(auto) synchronized(Func&& func, SynchronizedLockers&&... lockers) {
return apply(
std::forward<Func>(func),
lock(std::forward<SynchronizedLockers>(lockers)...));
} </s> remove * The relationship between LockedGuardPtr and LockedPtr is similar to that
* between std::lock_guard and std::unique_lock.
</s> add * For example in the above rlock() produces an implementation defined read
* locking helper instance and wlock() a write locking helper
*
* Subsequent arguments passed to these locking helpers, after the first, will
* be passed by const-ref to the corresponding function on the synchronized
* instance. This means that if the function accepts these parameters by
* value, they will be copied. Note that it is not necessary that the primary
* locking function will be invoked at all (for eg. the implementation might
* just invoke the try*Lock() method)
*
* // Try to acquire the lock for one second
* synchronized([](auto) { ... }, wlock(one, 1s));
*
* // The timed lock acquire might never actually be called, if it is not
* // needed by the underlying deadlock avoiding algorithm
* synchronized([](auto, auto) { ... }, rlock(one), wlock(two, 1s));
*
* Note that the arguments passed to to *lock() calls will be passed by
* const-ref to the function invocation, as the implementation might use them
* many times </s> remove LockPolicy::lock(parent_->mutex_);
</s> add DCHECK(parent);
if (!LockPolicy::lock(parent_->mutex_)) {
parent_ = nullptr;
} </s> remove * LockedGuardPtr is a simplified version of LockedPtr.
</s> add * Helper functions that should be passed to either a lock() or synchronized()
* invocation, these return implementation defined structs that will be used
* to lock the synchronized instance appropriately.
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Synchronized.h
|
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep
|
<mask> ConstLockedPtr lock(const std::chrono::duration<Rep, Period>& timeout) const {
<mask> return ConstLockedPtr(static_cast<const Subclass*>(this), timeout);
<mask> }
<mask>
<mask> /*
<mask> * Note: C++ 17 adds guaranteed copy elision. (http://wg21.link/P0135)
<mask> * Once compilers support this, it would be nice to add guard() methods that
<mask> * return LockedGuardPtr objects.
<mask> */
<mask>
<mask> /**
<mask> * Invoke a function while holding the lock.
<mask> *
<mask> * A reference to the datum will be passed into the function as its only
<mask> * argument.
</s> [sdk33] Update iOS with RN 0.59 </s> remove * The relationship between LockedGuardPtr and LockedPtr is similar to that
* between std::lock_guard and std::unique_lock.
</s> add * For example in the above rlock() produces an implementation defined read
* locking helper instance and wlock() a write locking helper
*
* Subsequent arguments passed to these locking helpers, after the first, will
* be passed by const-ref to the corresponding function on the synchronized
* instance. This means that if the function accepts these parameters by
* value, they will be copied. Note that it is not necessary that the primary
* locking function will be invoked at all (for eg. the implementation might
* just invoke the try*Lock() method)
*
* // Try to acquire the lock for one second
* synchronized([](auto) { ... }, wlock(one, 1s));
*
* // The timed lock acquire might never actually be called, if it is not
* // needed by the underlying deadlock avoiding algorithm
* synchronized([](auto, auto) { ... }, rlock(one), wlock(two, 1s));
*
* Note that the arguments passed to to *lock() calls will be passed by
* const-ref to the function invocation, as the implementation might use them
* many times </s> remove LockedGuardPtr<const Subclass, LockPolicyExclusive> guardPtr(
static_cast<const Subclass*>(this));
return function(*guardPtr);
</s> add return function(*lock()); </s> add /**
* Assign another datum and return the original value. Recommended
* because it keeps the mutex held only briefly.
*/
T exchange(T&& rhs) {
swap(rhs);
return std::move(rhs);
}
</s> remove /**
* Access the locked data.
*/
CDataType& operator*() const {
return parent_->datum_;
}
</s> add /**
* Acquire locks for multiple Synchronized<> objects, in a deadlock-safe
* manner.
*
* Wrap the synchronized instances with the appropriate locking strategy by
* using one of the four strategies - folly::lock (exclusive acquire for
* exclusive only mutexes), folly::rlock (shared acquire for shareable
* mutexes), folly::wlock (exclusive acquire for shareable mutexes) or
* folly::ulock (upgrade acquire for upgrade mutexes) (see above)
*
* The locks will be acquired and the passed callable will be invoked with the
* LockedPtr instances in the order that they were passed to the function
*/
template <typename Func, typename... SynchronizedLockers>
decltype(auto) synchronized(Func&& func, SynchronizedLockers&&... lockers) {
return apply(
std::forward<Func>(func),
lock(std::forward<SynchronizedLockers>(lockers)...));
} </s> remove * LockedGuardPtr is a simplified version of LockedPtr.
</s> add * Helper functions that should be passed to either a lock() or synchronized()
* invocation, these return implementation defined structs that will be used
* to lock the synchronized instance appropriately. </s> remove * For moving a `Function<X(Ys..) const>` into a `Function<X(Ys...)>`.
</s> add * For move-constructing from a `folly::Function<X(Ys...) [const?]>`.
* For a `Function` with a `const` function type, the object must be
* callable from a `const`-reference, i.e. implement `operator() const`.
* For a `Function` with a non-`const` function type, the object will
* be called from a non-const reference, which means that it will execute
* a non-const `operator()` if it is defined, and falls back to
* `operator() const` otherwise.
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Synchronized.h
|
keep keep keep replace replace replace keep keep keep replace replace replace keep keep keep
|
<mask> */
<mask> template <class Function>
<mask> auto withLock(Function&& function) {
<mask> LockedGuardPtr<Subclass, LockPolicyExclusive> guardPtr(
<mask> static_cast<Subclass*>(this));
<mask> return function(*guardPtr);
<mask> }
<mask> template <class Function>
<mask> auto withLock(Function&& function) const {
<mask> LockedGuardPtr<const Subclass, LockPolicyExclusive> guardPtr(
<mask> static_cast<const Subclass*>(this));
<mask> return function(*guardPtr);
<mask> }
<mask>
<mask> /**
</s> [sdk33] Update iOS with RN 0.59 </s> remove auto dismissing(F f) -> typename std::result_of<F()>::type {
SCOPE_EXIT { rehire(); };
</s> add auto dismissing(F f) -> invoke_result_t<F> {
SCOPE_EXIT {
rehire();
}; </s> remove template <class SynchronizedType, class LockPolicy>
class LockedGuardPtr {
private:
// CDataType is the DataType with the appropriate const-qualification
using CDataType = detail::SynchronizedDataType<SynchronizedType>;
public:
using DataType = typename SynchronizedType::DataType;
using MutexType = typename SynchronizedType::MutexType;
using Synchronized = typename std::remove_const<SynchronizedType>::type;
LockedGuardPtr() = delete;
/**
* Takes a Synchronized<T> and locks it.
*/
explicit LockedGuardPtr(SynchronizedType* parent) : parent_(parent) {
LockPolicy::lock(parent_->mutex_);
}
/**
* Destructor releases.
*/
~LockedGuardPtr() {
LockPolicy::unlock(parent_->mutex_);
}
/**
* Access the locked data.
*/
CDataType* operator->() const {
return &parent_->datum_;
}
</s> add template <typename D, typename M, typename... Args>
auto wlock(Synchronized<D, M>& synchronized, Args&&... args) {
return detail::wlock(synchronized, std::forward<Args>(args)...);
}
template <typename Data, typename Mutex, typename... Args>
auto rlock(const Synchronized<Data, Mutex>& synchronized, Args&&... args) {
return detail::rlock(synchronized, std::forward<Args>(args)...);
}
template <typename D, typename M, typename... Args>
auto ulock(Synchronized<D, M>& synchronized, Args&&... args) {
return detail::ulock(synchronized, std::forward<Args>(args)...);
}
template <typename D, typename M, typename... Args>
auto lock(Synchronized<D, M>& synchronized, Args&&... args) {
return detail::lock(synchronized, std::forward<Args>(args)...);
}
template <typename D, typename M, typename... Args>
auto lock(const Synchronized<D, M>& synchronized, Args&&... args) {
return detail::lock(synchronized, std::forward<Args>(args)...);
} </s> remove const Ignore& operator=(T const&) const { return *this; }
</s> add const Ignore& operator=(T const&) const {
return *this;
} </s> remove /* implicit */ Ignore(const T&) {}
</s> add constexpr /* implicit */ Ignore(const T&) {} </s> add Ignore() = default;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Synchronized.h
|
keep keep keep add keep keep keep keep keep
|
<mask> std::is_nothrow_copy_constructible<T>::value};
<mask> static constexpr bool nxMoveCtor{
<mask> std::is_nothrow_move_constructible<T>::value};
<mask>
<mask> public:
<mask> using LockedPtr = typename Base::LockedPtr;
<mask> using ConstLockedPtr = typename Base::ConstLockedPtr;
<mask> using DataType = T;
<mask> using MutexType = Mutex;
</s> [sdk33] Update iOS with RN 0.59 </s> add // Enable only if the unlock policy of the other LockPolicy is the same as
// ours
template <typename LockPolicyOther>
using EnableIfSameUnlockPolicy = std::enable_if_t<std::is_same<
typename LockPolicy::UnlockPolicy,
typename LockPolicyOther::UnlockPolicy>::value>;
// friend other LockedPtr types
template <typename SynchronizedTypeOther, typename LockPolicyOther>
friend class LockedPtr; </s> add /**
* Friend all instantiations of LockedPtr and LockedPtrBase
*/
template <typename S, typename L>
friend class folly::LockedPtr;
template <typename S, typename M, typename L>
friend class LockedPtrBase;
</s> remove template <typename F, typename G = typename std::decay<F>::type>
using ResultOf = decltype(
static_cast<ReturnType>(std::declval<G&>()(std::declval<Args>()...)));
</s> add template <typename F>
using ResultOf =
SafeResultOf<CallableResult<_t<std::decay<F>>&, Args...>, ReturnType>; </s> remove template <class SynchronizedType, class LockPolicy>
class LockedGuardPtr {
private:
// CDataType is the DataType with the appropriate const-qualification
using CDataType = detail::SynchronizedDataType<SynchronizedType>;
public:
using DataType = typename SynchronizedType::DataType;
using MutexType = typename SynchronizedType::MutexType;
using Synchronized = typename std::remove_const<SynchronizedType>::type;
LockedGuardPtr() = delete;
/**
* Takes a Synchronized<T> and locks it.
*/
explicit LockedGuardPtr(SynchronizedType* parent) : parent_(parent) {
LockPolicy::lock(parent_->mutex_);
}
/**
* Destructor releases.
*/
~LockedGuardPtr() {
LockPolicy::unlock(parent_->mutex_);
}
/**
* Access the locked data.
*/
CDataType* operator->() const {
return &parent_->datum_;
}
</s> add template <typename D, typename M, typename... Args>
auto wlock(Synchronized<D, M>& synchronized, Args&&... args) {
return detail::wlock(synchronized, std::forward<Args>(args)...);
}
template <typename Data, typename Mutex, typename... Args>
auto rlock(const Synchronized<Data, Mutex>& synchronized, Args&&... args) {
return detail::rlock(synchronized, std::forward<Args>(args)...);
}
template <typename D, typename M, typename... Args>
auto ulock(Synchronized<D, M>& synchronized, Args&&... args) {
return detail::ulock(synchronized, std::forward<Args>(args)...);
}
template <typename D, typename M, typename... Args>
auto lock(Synchronized<D, M>& synchronized, Args&&... args) {
return detail::lock(synchronized, std::forward<Args>(args)...);
}
template <typename D, typename M, typename... Args>
auto lock(const Synchronized<D, M>& synchronized, Args&&... args) {
return detail::lock(synchronized, std::forward<Args>(args)...);
} </s> remove template <typename F, typename G = typename std::decay<F>::type>
using ResultOf = decltype(static_cast<ReturnType>(
std::declval<const G&>()(std::declval<Args>()...)));
</s> add template <typename F>
using ResultOf = SafeResultOf<
CallableResult<const _t<std::decay<F>>&, Args...>,
ReturnType>; </s> add /**
* Friend all instantiations of LockedPtr and LockedPtrBase
*/
template <typename S, typename L>
friend class folly::LockedPtr;
template <typename S, typename M, typename L>
friend class LockedPtrBase;
|
https://github.com/expo/expo/commit/6de1d01531ce3e3388db436409963b83ec2f7911
|
ios/Pods/Folly/folly/Synchronized.h
|
Subsets and Splits
No community queries yet
The top public SQL queries from the community will appear here once available.