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> // from RN and not only RN methods from UI
<mask>
<mask> std::vector<std::shared_ptr<ShareableValue>> params;
<mask> for (int i = 0; i < count; ++i) {
<mask> params.push_back(ShareableValue::adapt(rt, args[i], runtimeManager));
<mask> }
<mask>
<mask> runtimeManager->scheduler->scheduleOnUI([=] {
<mask> jsi::Runtime &rt = *runtimeManager->runtime.get();
<mask> auto jsThis = createFrozenWrapper(rt, frozenObject).getObject(rt);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove params.push_back(ShareableValue::adapt(rt, args[i], runtimeManager));
</s> add params.push_back(
ShareableValue::adapt(rt, args[i], runtimeManager)); </s> remove params.push_back(ShareableValue::adapt(rt, args[i], runtimeManager));
</s> add params.push_back(
ShareableValue::adapt(rt, args[i], runtimeManager)); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
// TODO: we should find thread based on runtime such that we could also call UI methods
// from RN and not only RN methods from UI
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
// TODO: we should find thread based on runtime such that we could
// also call UI methods from RN and not only RN methods from UI </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
// TODO: we should find thread based on runtime such that we could also call UI methods
// from RN and not only RN methods from UI
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
// TODO: we should find thread based on runtime such that we could
// also call UI methods from RN and not only RN methods from UI </s> remove auto clb = [=](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
// TODO: we should find thread based on runtime such that we could also call UI methods
// from RN and not only RN methods from UI
</s> add auto clb = [=](jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
// TODO: we should find thread based on runtime such that we could
// also call UI methods from RN and not only RN methods from UI </s> remove auto code = jsThis.getProperty(rt, "asString").asString(rt).utf8(rt);
std::shared_ptr<jsi::Function> funPtr(runtimeManager->workletsCache->getFunction(rt, frozenObject));
</s> add auto code =
jsThis.getProperty(rt, "asString").asString(rt).utf8(rt);
std::shared_ptr<jsi::Function> funPtr(
runtimeManager->workletsCache->getFunction(rt, frozenObject)); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/SharedItems/ShareableValue.cpp |
keep keep replace replace keep replace keep keep keep | <mask> jsi::Runtime &rt = *runtimeManager->runtime.get();
<mask> auto jsThis = createFrozenWrapper(rt, frozenObject).getObject(rt);
<mask> auto code = jsThis.getProperty(rt, "asString").asString(rt).utf8(rt);
<mask> std::shared_ptr<jsi::Function> funPtr(runtimeManager->workletsCache->getFunction(rt, frozenObject));
<mask>
<mask> jsi::Value * args = new jsi::Value[params.size()];
<mask> for (int i = 0; i < params.size(); ++i) {
<mask> args[i] = params[i]->getValue(rt);
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove jsi::Value * args = new jsi::Value[params.size()];
</s> add jsi::Value *args = new jsi::Value[params.size()]; </s> remove jsi::Value * args = new jsi::Value[params.size()];
</s> add jsi::Value *args = new jsi::Value[params.size()]; </s> remove params.push_back(ShareableValue::adapt(rt, args[i], runtimeManager));
</s> add params.push_back(
ShareableValue::adapt(rt, args[i], runtimeManager)); </s> remove params.push_back(ShareableValue::adapt(rt, args[i], runtimeManager));
</s> add params.push_back(
ShareableValue::adapt(rt, args[i], runtimeManager)); </s> remove params.push_back(ShareableValue::adapt(rt, args[i], runtimeManager));
</s> add params.push_back(
ShareableValue::adapt(rt, args[i], runtimeManager)); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/SharedItems/ShareableValue.cpp |
keep keep keep replace replace replace keep keep keep keep keep keep keep keep replace replace replace replace replace keep keep | <mask> }
<mask>
<mask> jsi::Value returnedValue;
<mask>
<mask> jsi::Value oldJSThis = rt.global().getProperty(rt, "jsThis");
<mask> rt.global().setProperty(rt, "jsThis", jsThis); //set jsThis
<mask> try {
<mask> returnedValue = funPtr->call(rt,
<mask> static_cast<const jsi::Value*>(args),
<mask> (size_t)params.size());
<mask>
<mask> jsi::Value oldJSThis = rt.global().getProperty(rt, "jsThis");
<mask> rt.global().setProperty(rt, "jsThis", jsThis); //set jsThis
<mask> try {
<mask> returnedValue = funPtr->call(rt,
<mask> static_cast<const jsi::Value*>(args),
<mask> (size_t)params.size());
<mask>
<mask> } catch(std::exception &e) {
<mask> std::string str = e.what();
<mask> runtimeManager->errorHandler->setError(str);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove auto clb = [=](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) mutable -> jsi::Value {
jsi::Value oldJSThis = rt.global().getProperty(rt, "jsThis");
rt.global().setProperty(rt, "jsThis", *jsThis); //set jsThis
jsi::Value res = jsi::Value::undefined();
try {
if (thisValue.isObject()) {
res = funPtr->callWithThis(rt, thisValue.asObject(rt), args, count);
} else {
res = funPtr->call(rt, args, count);
}
} catch(jsi::JSError &e) {
throw e;
} catch(...) {
// TODO find out a way to get the error's message on hermes
jsi::Value location = jsThis->getProperty(rt, "__location");
std::string str = "Javascript worklet error";
if (location.isString()) {
str += "\nIn file: " + location.asString(rt).utf8(rt);
}
runtimeManager->errorHandler->setError(str);
runtimeManager->errorHandler->raise();
</s> add auto clb = [=](jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) mutable -> jsi::Value {
const jsi::String jsThisName =
jsi::String::createFromAscii(rt, "jsThis");
jsi::Object global = rt.global();
jsi::Value oldJSThis = global.getProperty(rt, jsThisName);
global.setProperty(rt, jsThisName, *jsThis); // set jsThis
jsi::Value res = jsi::Value::undefined();
try {
if (thisValue.isObject()) {
res =
funPtr->callWithThis(rt, thisValue.asObject(rt), args, count);
} else {
res = funPtr->call(rt, args, count); </s> remove auto clb = [=](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) mutable -> jsi::Value {
jsi::Value oldJSThis = rt.global().getProperty(rt, "jsThis");
rt.global().setProperty(rt, "jsThis", *jsThis); //set jsThis
jsi::Value res = jsi::Value::undefined();
try {
if (thisValue.isObject()) {
res = funPtr->callWithThis(rt, thisValue.asObject(rt), args, count);
} else {
res = funPtr->call(rt, args, count);
}
} catch(jsi::JSError &e) {
throw e;
} catch(...) {
// TODO find out a way to get the error's message on hermes
jsi::Value location = jsThis->getProperty(rt, "__location");
std::string str = "Javascript worklet error";
if (location.isString()) {
str += "\nIn file: " + location.asString(rt).utf8(rt);
}
runtimeManager->errorHandler->setError(str);
runtimeManager->errorHandler->raise();
</s> add auto clb = [=](jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) mutable -> jsi::Value {
const jsi::String jsThisName =
jsi::String::createFromAscii(rt, "jsThis");
jsi::Object global = rt.global();
jsi::Value oldJSThis = global.getProperty(rt, jsThisName);
global.setProperty(rt, jsThisName, *jsThis); // set jsThis
jsi::Value res = jsi::Value::undefined();
try {
if (thisValue.isObject()) {
res =
funPtr->callWithThis(rt, thisValue.asObject(rt), args, count);
} else {
res = funPtr->call(rt, args, count); </s> remove jsi::Value returnedValue = hostFunction->getPureFunction().get()->call(*hostRuntime,
static_cast<const jsi::Value*>(args),
(size_t)params.size());
</s> add jsi::Value returnedValue =
hostFunction->getPureFunction().get()->call(
*hostRuntime,
static_cast<const jsi::Value *>(args),
static_cast<size_t>(params.size())); </s> remove jsi::Value returnedValue = hostFunction->getPureFunction().get()->call(*hostRuntime,
static_cast<const jsi::Value*>(args),
(size_t)params.size());
</s> add jsi::Value returnedValue =
hostFunction->getPureFunction().get()->call(
*hostRuntime,
static_cast<const jsi::Value *>(args),
static_cast<size_t>(params.size())); </s> remove delete [] args;
</s> add delete[] args; | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/SharedItems/ShareableValue.cpp |
keep keep keep keep replace keep keep keep keep keep | <mask> } catch(std::exception &e) {
<mask> std::string str = e.what();
<mask> runtimeManager->errorHandler->setError(str);
<mask> runtimeManager->errorHandler->raise();
<mask> } catch(...) {
<mask> // TODO find out a way to get the error's message on hermes
<mask> jsi::Value location = jsThis.getProperty(rt, "__location");
<mask> std::string str = "Javascript worklet error";
<mask> if (location.isString()) {
<mask> str += "\nIn file: " + location.asString(rt).utf8(rt);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove
rt.global().setProperty(rt, "jsThis", oldJSThis); //clean jsThis
return res;
</s> add } catch (jsi::JSError &e) {
throw e;
} catch (...) {
if (demangleExceptionName(
abi::__cxa_current_exception_type()->name()) ==
"facebook::jsi::JSError") {
throw jsi::JSError(rt, "Javascript worklet error");
}
// TODO find out a way to get the error's message on hermes
jsi::Value location = jsThis->getProperty(rt, "__location");
std::string str = "Javascript worklet error";
if (location.isString()) {
str += "\nIn file: " + location.asString(rt).utf8(rt);
}
runtimeManager->errorHandler->setError(str);
runtimeManager->errorHandler->raise();
}
global.setProperty(rt, jsThisName, oldJSThis); // clean jsThis
return res; </s> remove
rt.global().setProperty(rt, "jsThis", oldJSThis); //clean jsThis
return res;
</s> add } catch (jsi::JSError &e) {
throw e;
} catch (...) {
if (demangleExceptionName(
abi::__cxa_current_exception_type()->name()) ==
"facebook::jsi::JSError") {
throw jsi::JSError(rt, "Javascript worklet error");
}
// TODO find out a way to get the error's message on hermes
jsi::Value location = jsThis->getProperty(rt, "__location");
std::string str = "Javascript worklet error";
if (location.isString()) {
str += "\nIn file: " + location.asString(rt).utf8(rt);
}
runtimeManager->errorHandler->setError(str);
runtimeManager->errorHandler->raise();
}
global.setProperty(rt, jsThisName, oldJSThis); // clean jsThis
return res; </s> remove returnedValue = funPtr->call(rt,
static_cast<const jsi::Value*>(args),
(size_t)params.size());
} catch(std::exception &e) {
</s> add returnedValue = funPtr->call(
rt,
static_cast<const jsi::Value *>(args),
static_cast<size_t>(params.size()));
} catch (std::exception &e) { </s> remove auto clb = [=](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) mutable -> jsi::Value {
jsi::Value oldJSThis = rt.global().getProperty(rt, "jsThis");
rt.global().setProperty(rt, "jsThis", *jsThis); //set jsThis
jsi::Value res = jsi::Value::undefined();
try {
if (thisValue.isObject()) {
res = funPtr->callWithThis(rt, thisValue.asObject(rt), args, count);
} else {
res = funPtr->call(rt, args, count);
}
} catch(jsi::JSError &e) {
throw e;
} catch(...) {
// TODO find out a way to get the error's message on hermes
jsi::Value location = jsThis->getProperty(rt, "__location");
std::string str = "Javascript worklet error";
if (location.isString()) {
str += "\nIn file: " + location.asString(rt).utf8(rt);
}
runtimeManager->errorHandler->setError(str);
runtimeManager->errorHandler->raise();
</s> add auto clb = [=](jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) mutable -> jsi::Value {
const jsi::String jsThisName =
jsi::String::createFromAscii(rt, "jsThis");
jsi::Object global = rt.global();
jsi::Value oldJSThis = global.getProperty(rt, jsThisName);
global.setProperty(rt, jsThisName, *jsThis); // set jsThis
jsi::Value res = jsi::Value::undefined();
try {
if (thisValue.isObject()) {
res =
funPtr->callWithThis(rt, thisValue.asObject(rt), args, count);
} else {
res = funPtr->call(rt, args, count); </s> remove auto clb = [=](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) mutable -> jsi::Value {
jsi::Value oldJSThis = rt.global().getProperty(rt, "jsThis");
rt.global().setProperty(rt, "jsThis", *jsThis); //set jsThis
jsi::Value res = jsi::Value::undefined();
try {
if (thisValue.isObject()) {
res = funPtr->callWithThis(rt, thisValue.asObject(rt), args, count);
} else {
res = funPtr->call(rt, args, count);
}
} catch(jsi::JSError &e) {
throw e;
} catch(...) {
// TODO find out a way to get the error's message on hermes
jsi::Value location = jsThis->getProperty(rt, "__location");
std::string str = "Javascript worklet error";
if (location.isString()) {
str += "\nIn file: " + location.asString(rt).utf8(rt);
}
runtimeManager->errorHandler->setError(str);
runtimeManager->errorHandler->raise();
</s> add auto clb = [=](jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) mutable -> jsi::Value {
const jsi::String jsThisName =
jsi::String::createFromAscii(rt, "jsThis");
jsi::Object global = rt.global();
jsi::Value oldJSThis = global.getProperty(rt, jsThisName);
global.setProperty(rt, jsThisName, *jsThis); // set jsThis
jsi::Value res = jsi::Value::undefined();
try {
if (thisValue.isObject()) {
res =
funPtr->callWithThis(rt, thisValue.asObject(rt), args, count);
} else {
res = funPtr->call(rt, args, count); </s> remove } catch(std::exception &e) {
</s> add } catch (std::exception &e) { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/SharedItems/ShareableValue.cpp |
keep keep keep keep replace keep replace | <mask> }
<mask> runtimeManager->errorHandler->setError(str);
<mask> runtimeManager->errorHandler->raise();
<mask> }
<mask> rt.global().setProperty(rt, "jsThis", oldJSThis); //clean jsThis
<mask>
<mask> delete [] args;
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove
rt.global().setProperty(rt, "jsThis", oldJSThis); //clean jsThis
return res;
</s> add } catch (jsi::JSError &e) {
throw e;
} catch (...) {
if (demangleExceptionName(
abi::__cxa_current_exception_type()->name()) ==
"facebook::jsi::JSError") {
throw jsi::JSError(rt, "Javascript worklet error");
}
// TODO find out a way to get the error's message on hermes
jsi::Value location = jsThis->getProperty(rt, "__location");
std::string str = "Javascript worklet error";
if (location.isString()) {
str += "\nIn file: " + location.asString(rt).utf8(rt);
}
runtimeManager->errorHandler->setError(str);
runtimeManager->errorHandler->raise();
}
global.setProperty(rt, jsThisName, oldJSThis); // clean jsThis
return res; </s> remove
rt.global().setProperty(rt, "jsThis", oldJSThis); //clean jsThis
return res;
</s> add } catch (jsi::JSError &e) {
throw e;
} catch (...) {
if (demangleExceptionName(
abi::__cxa_current_exception_type()->name()) ==
"facebook::jsi::JSError") {
throw jsi::JSError(rt, "Javascript worklet error");
}
// TODO find out a way to get the error's message on hermes
jsi::Value location = jsThis->getProperty(rt, "__location");
std::string str = "Javascript worklet error";
if (location.isString()) {
str += "\nIn file: " + location.asString(rt).utf8(rt);
}
runtimeManager->errorHandler->setError(str);
runtimeManager->errorHandler->raise();
}
global.setProperty(rt, jsThisName, oldJSThis); // clean jsThis
return res; </s> remove returnedValue = funPtr->call(rt,
static_cast<const jsi::Value*>(args),
(size_t)params.size());
} catch(std::exception &e) {
</s> add returnedValue = funPtr->call(
rt,
static_cast<const jsi::Value *>(args),
static_cast<size_t>(params.size()));
} catch (std::exception &e) { </s> remove return jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, name.c_str()), 0, clb);
</s> add return jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, name.c_str()), 0, clb); </s> remove return jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, name.c_str()), 0, clb);
</s> add return jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, name.c_str()), 0, clb); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/SharedItems/ShareableValue.cpp |
keep keep keep keep replace keep keep keep keep keep | <mask> // ToDo use returned value to return promise
<mask> });
<mask> return jsi::Value::undefined();
<mask> };
<mask> return jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_workletFunction"), 0, clb);
<mask> }
<mask> }
<mask> default: {
<mask> throw "Unable to find conversion method for this type";
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove delete [] args;
</s> add delete[] args; </s> remove rt.global().setProperty(rt, "jsThis", oldJSThis); //clean jsThis
</s> add global.setProperty(rt, jsThisName, oldJSThis); // clean jsThis </s> remove delete [] args;
</s> add delete[] args; </s> remove delete [] args;
</s> add delete[] args; </s> remove jsi::Value returnedValue = hostFunction->getPureFunction().get()->call(*hostRuntime,
static_cast<const jsi::Value*>(args),
(size_t)params.size());
</s> add jsi::Value returnedValue =
hostFunction->getPureFunction().get()->call(
*hostRuntime,
static_cast<const jsi::Value *>(args),
static_cast<size_t>(params.size())); </s> remove jsi::Value returnedValue = hostFunction->getPureFunction().get()->call(*hostRuntime,
static_cast<const jsi::Value*>(args),
(size_t)params.size());
</s> add jsi::Value returnedValue =
hostFunction->getPureFunction().get()->call(
*hostRuntime,
static_cast<const jsi::Value *>(args),
static_cast<size_t>(params.size())); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/SharedItems/ShareableValue.cpp |
keep keep keep add keep keep keep | <mask> }
<mask> throw "convert error";
<mask> }
<mask>
<mask> }
<mask>
<mask> } // namespace reanimated
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove }
</s> add } // namespace reanimated </s> remove }
</s> add } // namespace reanimated </s> remove
}
</s> add } // namespace reanimated </s> remove
}
</s> add } // namespace reanimated </s> remove }
</s> add } // namespace reanimated </s> remove }
</s> add } // namespace reanimated | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/SharedItems/ShareableValue.cpp |
add keep keep keep keep keep | <mask> #include "JSIStoreValueUser.h"
<mask>
<mask> namespace reanimated {
<mask>
<mask> std::weak_ptr<jsi::Value> StoreUser::getWeakRef(jsi::Runtime &rt) {
<mask> const std::lock_guard<std::recursive_mutex> lock(storeUserData->storeMutex);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove std::atomic<int> StoreUser::ctr;
std::recursive_mutex StoreUser::storeMutex;
std::unordered_map<int, std::vector<std::shared_ptr<jsi::Value>>> StoreUser::store;
</s> add </s> remove const std::lock_guard<std::recursive_mutex> lock(storeMutex);
if (StoreUser::store.count(identifier) == 0) {
StoreUser::store[identifier] = std::vector<std::shared_ptr<jsi::Value>>();
</s> add const std::lock_guard<std::recursive_mutex> lock(storeUserData->storeMutex);
if (storeUserData->store.count(identifier) == 0) {
storeUserData->store[identifier] =
std::vector<std::shared_ptr<jsi::Value>>(); </s> add /**
Holds the JSI-Value Store where JSI::Values are cached on a
per-RuntimeManager basis.
*/
std::shared_ptr<StaticStoreUser> storeUserData;
private:
void clearStore() {
const std::lock_guard<std::recursive_mutex> lock(storeUserData->storeMutex);
storeUserData->store.clear();
} </s> add #include "SharedParent.h" </s> add #include "JSIStoreValueUser.h"
#include "SharedParent.h"
#include "WorkletsCache.h" </s> add #include "SharedParent.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/JSIStoreValueUser.cpp |
keep keep replace replace replace replace keep replace replace replace | <mask> namespace reanimated {
<mask>
<mask> std::atomic<int> StoreUser::ctr;
<mask> std::recursive_mutex StoreUser::storeMutex;
<mask> std::unordered_map<int, std::vector<std::shared_ptr<jsi::Value>>> StoreUser::store;
<mask>
<mask> std::weak_ptr<jsi::Value> StoreUser::getWeakRef(jsi::Runtime &rt) {
<mask> const std::lock_guard<std::recursive_mutex> lock(storeMutex);
<mask> if (StoreUser::store.count(identifier) == 0) {
<mask> StoreUser::store[identifier] = std::vector<std::shared_ptr<jsi::Value>>();
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove std::shared_ptr<jsi::Value> sv = std::make_shared<jsi::Value>(rt, jsi::Value::undefined());
StoreUser::store[identifier].push_back(sv);
</s> add std::shared_ptr<jsi::Value> sv =
std::make_shared<jsi::Value>(rt, jsi::Value::undefined());
storeUserData->store[identifier].push_back(sv);
</s> remove static std::atomic<int> ctr;
static std::unordered_map<int, std::vector<std::shared_ptr<jsi::Value>>> store;
static std::recursive_mutex storeMutex;
</s> add </s> add class RuntimeManager;
struct StaticStoreUser {
std::atomic<int> ctr;
std::unordered_map<int, std::vector<std::shared_ptr<jsi::Value>>> store;
std::recursive_mutex storeMutex;
};
</s> add #include "RuntimeManager.h"
#ifdef ONANDROID
#include <AndroidScheduler.h>
#endif </s> remove strongScheduler->scheduleOnUI([id]() {
const std::lock_guard<std::recursive_mutex> lock(storeMutex);
if (StoreUser::store.count(id) > 0) {
StoreUser::store.erase(id);
</s> add std::shared_ptr<StaticStoreUser> sud = storeUserData;
#ifdef ONANDROID
jni::ThreadScope::WithClassLoader([&] {
strongScheduler->scheduleOnUI([id, sud]() {
const std::lock_guard<std::recursive_mutex> lock(sud->storeMutex);
if (sud->store.count(id) > 0) {
sud->store.erase(id);
}
});
});
#else
strongScheduler->scheduleOnUI([id, sud]() {
const std::lock_guard<std::recursive_mutex> lock(sud->storeMutex);
if (sud->store.count(id) > 0) {
sud->store.erase(id); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/JSIStoreValueUser.cpp |
keep replace replace replace keep keep keep replace replace keep keep keep | <mask> }
<mask> std::shared_ptr<jsi::Value> sv = std::make_shared<jsi::Value>(rt, jsi::Value::undefined());
<mask> StoreUser::store[identifier].push_back(sv);
<mask>
<mask> return sv;
<mask> }
<mask>
<mask> StoreUser::StoreUser(std::shared_ptr<Scheduler> s): scheduler(s) {
<mask> identifier = StoreUser::ctr++;
<mask> }
<mask>
<mask> StoreUser::~StoreUser() {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove const std::lock_guard<std::recursive_mutex> lock(storeMutex);
if (StoreUser::store.count(identifier) == 0) {
StoreUser::store[identifier] = std::vector<std::shared_ptr<jsi::Value>>();
</s> add const std::lock_guard<std::recursive_mutex> lock(storeUserData->storeMutex);
if (storeUserData->store.count(identifier) == 0) {
storeUserData->store[identifier] =
std::vector<std::shared_ptr<jsi::Value>>(); </s> remove std::shared_ptr<ShareableValue> ShareableValue::adapt(jsi::Runtime &rt, const jsi::Value &value, RuntimeManager *runtimeManager, ValueType valueType) {
auto sv = std::shared_ptr<ShareableValue>(new ShareableValue(runtimeManager, runtimeManager->scheduler));
</s> add std::shared_ptr<ShareableValue> ShareableValue::adapt(
jsi::Runtime &rt,
const jsi::Value &value,
RuntimeManager *runtimeManager,
ValueType valueType) {
auto sv = std::shared_ptr<ShareableValue>(
new ShareableValue(runtimeManager, runtimeManager->scheduler)); </s> remove std::shared_ptr<ShareableValue> ShareableValue::adapt(jsi::Runtime &rt, const jsi::Value &value, RuntimeManager *runtimeManager, ValueType valueType) {
auto sv = std::shared_ptr<ShareableValue>(new ShareableValue(runtimeManager, runtimeManager->scheduler));
</s> add std::shared_ptr<ShareableValue> ShareableValue::adapt(
jsi::Runtime &rt,
const jsi::Value &value,
RuntimeManager *runtimeManager,
ValueType valueType) {
auto sv = std::shared_ptr<ShareableValue>(
new ShareableValue(runtimeManager, runtimeManager->scheduler)); </s> remove }
</s> add </s> remove }
</s> add | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/JSIStoreValueUser.cpp |
keep keep keep keep replace replace replace replace keep keep keep keep keep | <mask> StoreUser::~StoreUser() {
<mask> int id = identifier;
<mask> std::shared_ptr<Scheduler> strongScheduler = scheduler.lock();
<mask> if (strongScheduler != nullptr) {
<mask> strongScheduler->scheduleOnUI([id]() {
<mask> const std::lock_guard<std::recursive_mutex> lock(storeMutex);
<mask> if (StoreUser::store.count(id) > 0) {
<mask> StoreUser::store.erase(id);
<mask> }
<mask> });
<mask> }
<mask> }
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove StoreUser::StoreUser(std::shared_ptr<Scheduler> s): scheduler(s) {
identifier = StoreUser::ctr++;
</s> add StoreUser::StoreUser(
std::shared_ptr<Scheduler> s,
const RuntimeManager &runtimeManager)
: scheduler(s) {
storeUserData = runtimeManager.storeUserData;
identifier = storeUserData->ctr++; </s> remove const std::lock_guard<std::recursive_mutex> lock(storeMutex);
if (StoreUser::store.count(identifier) == 0) {
StoreUser::store[identifier] = std::vector<std::shared_ptr<jsi::Value>>();
</s> add const std::lock_guard<std::recursive_mutex> lock(storeUserData->storeMutex);
if (storeUserData->store.count(identifier) == 0) {
storeUserData->store[identifier] =
std::vector<std::shared_ptr<jsi::Value>>(); </s> remove std::shared_ptr<jsi::Value> sv = std::make_shared<jsi::Value>(rt, jsi::Value::undefined());
StoreUser::store[identifier].push_back(sv);
</s> add std::shared_ptr<jsi::Value> sv =
std::make_shared<jsi::Value>(rt, jsi::Value::undefined());
storeUserData->store[identifier].push_back(sv);
</s> remove std::atomic<int> StoreUser::ctr;
std::recursive_mutex StoreUser::storeMutex;
std::unordered_map<int, std::vector<std::shared_ptr<jsi::Value>>> StoreUser::store;
</s> add </s> remove while (nodes.size() > 0 and nodes.begin()->first == 0) {
</s> add while (nodes.size() > 0 && nodes.begin()->first == 0) { </s> add #endif | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/JSIStoreValueUser.cpp |
keep keep keep add keep keep keep keep | <mask> if (sud->store.count(id) > 0) {
<mask> sud->store.erase(id);
<mask> }
<mask> });
<mask> }
<mask> }
<mask>
<mask> } // namespace reanimated
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove strongScheduler->scheduleOnUI([id]() {
const std::lock_guard<std::recursive_mutex> lock(storeMutex);
if (StoreUser::store.count(id) > 0) {
StoreUser::store.erase(id);
</s> add std::shared_ptr<StaticStoreUser> sud = storeUserData;
#ifdef ONANDROID
jni::ThreadScope::WithClassLoader([&] {
strongScheduler->scheduleOnUI([id, sud]() {
const std::lock_guard<std::recursive_mutex> lock(sud->storeMutex);
if (sud->store.count(id) > 0) {
sud->store.erase(id);
}
});
});
#else
strongScheduler->scheduleOnUI([id, sud]() {
const std::lock_guard<std::recursive_mutex> lock(sud->storeMutex);
if (sud->store.count(id) > 0) {
sud->store.erase(id); </s> remove while (nodes.size() > 0 and nodes.begin()->first == 0) {
</s> add while (nodes.size() > 0 && nodes.begin()->first == 0) { </s> remove
void StoreUser::clearStore() {
const std::lock_guard<std::recursive_mutex> lock(storeMutex);
StoreUser::store.clear();
}
}
</s> add } // namespace reanimated </s> remove for (auto & id : toUpdate) update(id);
</s> add for (auto &id : toUpdate)
update(id); </s> remove });
</s> add }
if (queueWasEmpty) {
mUIImplementation.dispatchViewUpdates(-1); // no associated batchId
}
if (shouldDispatchUpdates) {
semaphore.release();
}
}
}); </s> remove NativeReanimatedModule::~NativeReanimatedModule()
{
StoreUser::clearStore();
}
</s> add | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/JSIStoreValueUser.cpp |
keep keep keep keep replace replace replace replace replace replace replace | <mask> });
<mask> }
<mask> }
<mask>
<mask>
<mask> void StoreUser::clearStore() {
<mask> const std::lock_guard<std::recursive_mutex> lock(storeMutex);
<mask> StoreUser::store.clear();
<mask> }
<mask>
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove strongScheduler->scheduleOnUI([id]() {
const std::lock_guard<std::recursive_mutex> lock(storeMutex);
if (StoreUser::store.count(id) > 0) {
StoreUser::store.erase(id);
</s> add std::shared_ptr<StaticStoreUser> sud = storeUserData;
#ifdef ONANDROID
jni::ThreadScope::WithClassLoader([&] {
strongScheduler->scheduleOnUI([id, sud]() {
const std::lock_guard<std::recursive_mutex> lock(sud->storeMutex);
if (sud->store.count(id) > 0) {
sud->store.erase(id);
}
});
});
#else
strongScheduler->scheduleOnUI([id, sud]() {
const std::lock_guard<std::recursive_mutex> lock(sud->storeMutex);
if (sud->store.count(id) > 0) {
sud->store.erase(id); </s> remove std::shared_ptr<jsi::Value> sv = std::make_shared<jsi::Value>(rt, jsi::Value::undefined());
StoreUser::store[identifier].push_back(sv);
</s> add std::shared_ptr<jsi::Value> sv =
std::make_shared<jsi::Value>(rt, jsi::Value::undefined());
storeUserData->store[identifier].push_back(sv);
</s> remove std::atomic<int> StoreUser::ctr;
std::recursive_mutex StoreUser::storeMutex;
std::unordered_map<int, std::vector<std::shared_ptr<jsi::Value>>> StoreUser::store;
</s> add </s> remove const std::lock_guard<std::recursive_mutex> lock(storeMutex);
if (StoreUser::store.count(identifier) == 0) {
StoreUser::store[identifier] = std::vector<std::shared_ptr<jsi::Value>>();
</s> add const std::lock_guard<std::recursive_mutex> lock(storeUserData->storeMutex);
if (storeUserData->store.count(identifier) == 0) {
storeUserData->store[identifier] =
std::vector<std::shared_ptr<jsi::Value>>(); </s> remove });
</s> add }
if (queueWasEmpty) {
mUIImplementation.dispatchViewUpdates(-1); // no associated batchId
}
if (shouldDispatchUpdates) {
semaphore.release();
}
}
}); </s> remove mOperations.add(new UIThreadOperation() {
@Override
public void execute(NodesManager nodesManager) {
nodesManager.dropNode(tag);
}
});
</s> add mOperations.add(
new UIThreadOperation() {
@Override
public void execute(NodesManager nodesManager) {
nodesManager.dropNode(tag);
}
}); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/JSIStoreValueUser.cpp |
keep replace keep keep keep keep keep | <mask> #include "Mapper.h"
<mask> #include "SharedParent.h"
<mask> #include "MutableValue.h"
<mask>
<mask> namespace reanimated {
<mask>
<mask> Mapper::Mapper(NativeReanimatedModule *module,
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include "SharedParent.h" </s> add #include "MutableValue.h"
#include "SharedParent.h" </s> remove #include "SharedParent.h"
#include "MutableValue.h"
</s> add </s> add #include "MutableValue.h"
#include "SharedParent.h" </s> remove #include "SharedParent.h"
#include "MutableValue.h"
</s> add </s> remove #include "SharedParent.h"
#include "ShareableValue.h"
#include "RuntimeManager.h"
</s> add | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/Mapper.cpp |
keep add keep keep keep keep keep | <mask> #include "Mapper.h"
<mask> #include "MutableValue.h"
<mask>
<mask> namespace reanimated {
<mask>
<mask> Mapper::Mapper(
<mask> NativeReanimatedModule *module,
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include "SharedParent.h"
</s> add </s> remove Mapper::Mapper(NativeReanimatedModule *module,
unsigned long id,
std::shared_ptr<jsi::Function> mapper,
std::vector<std::shared_ptr<MutableValue>> inputs,
std::vector<std::shared_ptr<MutableValue>> outputs):
id(id),
module(module),
mapper(mapper),
inputs(inputs),
outputs(outputs) {
</s> add Mapper::Mapper(
NativeReanimatedModule *module,
unsigned long id,
std::shared_ptr<jsi::Function> mapper,
std::vector<std::shared_ptr<MutableValue>> inputs,
std::vector<std::shared_ptr<MutableValue>> outputs)
: id(id), module(module), mapper(mapper), inputs(inputs), outputs(outputs) { </s> remove #include "Mapper.h"
#include <map>
</s> add </s> add #include "Mapper.h" </s> add #include <map> </s> add #include "Mapper.h"
#include "MapperRegistry.h"
#include "ReanimatedHiddenHeaders.h"
#include "RuntimeDecorator.h"
#include "ShareableValue.h"
#include "WorkletEventHandler.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/Mapper.cpp |
keep keep keep keep replace replace replace replace replace replace replace replace replace replace keep keep keep keep keep | <mask> #include "MutableValue.h"
<mask>
<mask> namespace reanimated {
<mask>
<mask> Mapper::Mapper(NativeReanimatedModule *module,
<mask> unsigned long id,
<mask> std::shared_ptr<jsi::Function> mapper,
<mask> std::vector<std::shared_ptr<MutableValue>> inputs,
<mask> std::vector<std::shared_ptr<MutableValue>> outputs):
<mask> id(id),
<mask> module(module),
<mask> mapper(mapper),
<mask> inputs(inputs),
<mask> outputs(outputs) {
<mask> auto markDirty = [this, module]() {
<mask> this->dirty = true;
<mask> module->maybeRequestRender();
<mask> };
<mask> for (auto input : inputs) {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove public:
Mapper(NativeReanimatedModule *module,
unsigned long id,
std::shared_ptr<jsi::Function> mapper,
std::vector<std::shared_ptr<MutableValue>> inputs,
std::vector<std::shared_ptr<MutableValue>> outputs);
</s> add public:
Mapper(
NativeReanimatedModule *module,
unsigned long id,
std::shared_ptr<jsi::Function> mapper,
std::vector<std::shared_ptr<MutableValue>> inputs,
std::vector<std::shared_ptr<MutableValue>> outputs); </s> add std::shared_ptr<jsi::Function> userUpdater;
UpdaterFunction *updateProps;
int optimalizationLvl = 0;
std::shared_ptr<ShareableValue> viewDescriptors; </s> remove #include "SharedParent.h"
</s> add </s> remove namespace reanimated
{
void extractMutables(jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res)
{
switch (sv->type)
{
case ValueType::MutableValueType: {
auto& mutableValue = ValueWrapper::asMutableValue(sv->valueContainer);
res.push_back(mutableValue);
break;
}
case ValueType::FrozenArrayType:
for (auto &it : ValueWrapper::asFrozenArray(sv->valueContainer))
{
extractMutables(rt, it, res);
}
break;
case ValueType::RemoteObjectType:
case ValueType::FrozenObjectType:
for (auto &it : ValueWrapper::asFrozenObject(sv->valueContainer)->map)
{
extractMutables(rt, it.second, res);
</s> add namespace reanimated {
void extractMutables(
jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res) {
switch (sv->type) {
case ValueType::MutableValueType: {
auto &mutableValue = ValueWrapper::asMutableValue(sv->valueContainer);
res.push_back(mutableValue);
break; </s> remove private:
</s> add private: </s> remove for (auto & entry : mappers) {
</s> add for (auto &entry : mappers) { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/Mapper.cpp |
keep keep keep keep replace keep keep keep keep keep | <mask> }
<mask>
<mask> void Mapper::execute(jsi::Runtime &rt) {
<mask> dirty = false;
<mask> mapper->callWithThis(rt, *mapper);
<mask> }
<mask>
<mask> Mapper::~Mapper() {
<mask> for (auto input : inputs) {
<mask> input->removeListener(id);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove for (auto & mapper : sortedMappers) {
</s> add for (auto &mapper : sortedMappers) { </s> remove for (auto prop : map) {
object.setProperty(rt, jsi::String::createFromUtf8(rt, prop.first), prop.second->getValue(rt));
</s> add for (auto propName : namesOrder) {
auto value = map[propName];
object.setProperty(
rt, jsi::String::createFromUtf8(rt, propName), value->getValue(rt)); </s> remove for (auto & entry : deg) {
</s> add for (auto &entry : deg) { </s> remove if (deg.count(sharedValue) == 0) {
</s> add if (deg.count(sharedValueID) == 0) { </s> remove Mapper::Mapper(NativeReanimatedModule *module,
unsigned long id,
std::shared_ptr<jsi::Function> mapper,
std::vector<std::shared_ptr<MutableValue>> inputs,
std::vector<std::shared_ptr<MutableValue>> outputs):
id(id),
module(module),
mapper(mapper),
inputs(inputs),
outputs(outputs) {
</s> add Mapper::Mapper(
NativeReanimatedModule *module,
unsigned long id,
std::shared_ptr<jsi::Function> mapper,
std::vector<std::shared_ptr<MutableValue>> inputs,
std::vector<std::shared_ptr<MutableValue>> outputs)
: id(id), module(module), mapper(mapper), inputs(inputs), outputs(outputs) { </s> remove toUpdate.push_back(id);
</s> add toUpdate.push_back(NodeID(id)); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/Mapper.cpp |
keep keep keep keep replace | <mask> input->removeListener(id);
<mask> }
<mask> }
<mask>
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove mapper->callWithThis(rt, *mapper);
</s> add if (optimalizationLvl == 0) {
mapper->callWithThis(rt, *mapper); // call styleUpdater
} else {
jsi::Object newStyle = userUpdater->call(rt).asObject(rt);
auto jsViewDescriptorArray = viewDescriptors->getValue(rt)
.getObject(rt)
.getProperty(rt, "value")
.asObject(rt)
.getArray(rt);
for (int i = 0; i < jsViewDescriptorArray.length(rt); ++i) {
auto jsViewDescriptor =
jsViewDescriptorArray.getValueAtIndex(rt, i).getObject(rt);
(*updateProps)(
rt,
static_cast<int>(jsViewDescriptor.getProperty(rt, "tag").asNumber()),
jsViewDescriptor.getProperty(rt, "name"),
newStyle);
}
}
}
void Mapper::enableFastMode(
const int optimalizationLvl,
const std::shared_ptr<ShareableValue> &updater,
const std::shared_ptr<ShareableValue> &jsViewDescriptors) {
if (optimalizationLvl == 0) {
return;
}
viewDescriptors = jsViewDescriptors;
this->optimalizationLvl = optimalizationLvl;
updateProps = &module->updaterFunction;
jsi::Runtime *rt = module->runtime.get();
userUpdater = std::make_shared<jsi::Function>(
updater->getValue(*rt).asObject(*rt).asFunction(*rt)); </s> remove //noop
</s> add // noop </s> remove
}
</s> add } // namespace reanimated </s> remove
}
</s> add } // namespace reanimated </s> remove }
</s> add } // namespace reanimated </s> remove }
</s> add } // namespace reanimated | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/Mapper.cpp |
keep replace replace keep keep keep keep keep | <mask> #include "RuntimeDecorator.h"
<mask> #include "ReanimatedHiddenHeaders.h"
<mask> #include <unordered_map>
<mask> #include <memory>
<mask>
<mask> namespace reanimated {
<mask>
<mask> void RuntimeDecorator::decorateRuntime(jsi::Runtime &rt, std::string label) {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include <unordered_map>
#include "LayoutAnimationsProxy.h"
#include "MutableValue.h"
#include "ReanimatedHiddenHeaders.h" </s> add #include "Mapper.h"
#include "MapperRegistry.h"
#include "ReanimatedHiddenHeaders.h"
#include "RuntimeDecorator.h"
#include "ShareableValue.h"
#include "WorkletEventHandler.h" </s> add #include <stdio.h> </s> remove namespace reanimated
{
</s> add namespace reanimated { </s> add #include <unordered_map> </s> remove #include <stdio.h>
#include <unordered_map>
</s> add | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep add keep keep keep keep | <mask> #include "RuntimeDecorator.h"
<mask> #include <chrono>
<mask> #include <memory>
<mask>
<mask> namespace reanimated {
<mask>
<mask> std::unordered_map<RuntimePointer, RuntimeType>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include "ReanimatedHiddenHeaders.h"
#include <unordered_map>
</s> add #include <chrono> </s> add #include "JSIStoreValueUser.h"
#include "RuntimeDecorator.h" </s> add #include "RuntimeDecorator.h"
#include "SharedParent.h" </s> remove #include "SharedParent.h"
#include "RuntimeDecorator.h"
</s> add </s> add #include "RuntimeDecorator.h"
#include "SharedParent.h" </s> remove #include "SharedParent.h"
#include "RuntimeDecorator.h"
</s> add | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep keep replace replace keep keep replace keep keep keep keep | <mask>
<mask> namespace reanimated {
<mask>
<mask> void RuntimeDecorator::decorateRuntime(jsi::Runtime &rt, std::string label) {
<mask> // This property will be used to find out if a runtime is a custom worklet runtime (e.g. UI, VisionCamera frame processor, ...)
<mask> rt.global().setProperty(rt, "_WORKLET", jsi::Value(true));
<mask> // This property will be used for debugging
<mask> rt.global().setProperty(rt, "_LABEL", jsi::String::createFromAscii(rt, label));
<mask>
<mask> jsi::Object dummyGlobal(rt);
<mask> auto dummyFunction = [](
<mask> jsi::Runtime &rt,
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove auto dummyFunction = [](
jsi::Runtime &rt,
</s> add auto dummyFunction = [](jsi::Runtime &rt, </s> remove RemoteObjectType, /* object that can be instantiated on host side and modified on the remote (worklet) side */
MutableValueType, /* object with 'value' property that can be updated and read from any thread */
HostFunctionType, /* function that will be executed asynchronously on the host runtime */
WorkletFunctionType, /* function that gets run on the UI thread */
FrozenObjectType, /* frozen object, can only be set and never modified */
FrozenArrayType, /* frozen array, can only be set and never modified */
</s> add RemoteObjectType, // object that can be instantiated on host side and modified
// on the remote (worklet) side
MutableValueType, // object with 'value' property that can be updated and read
// from any thread
HostFunctionType, // function that will be executed asynchronously on the host
// runtime
WorkletFunctionType, // function that gets run on the UI thread
FrozenObjectType, // frozen object, can only be set and never modified
FrozenArrayType, // frozen array, can only be set and never modified </s> remove } catch(...) {
</s> add } catch (...) {
if (demangleExceptionName(
abi::__cxa_current_exception_type()->name()) ==
"facebook::jsi::JSError") {
throw jsi::JSError(rt, "Javascript worklet error");
} </s> remove #include "ReanimatedHiddenHeaders.h"
#include <unordered_map>
</s> add #include <chrono> </s> remove returnedValue = funPtr->call(rt,
static_cast<const jsi::Value*>(args),
(size_t)params.size());
} catch(std::exception &e) {
</s> add returnedValue = funPtr->call(
rt,
static_cast<const jsi::Value *>(args),
static_cast<size_t>(params.size()));
} catch (std::exception &e) { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep keep keep replace replace keep keep replace replace | <mask> // This property will be used for debugging
<mask> rt.global().setProperty(rt, "_LABEL", jsi::String::createFromAscii(rt, label));
<mask>
<mask> jsi::Object dummyGlobal(rt);
<mask> auto dummyFunction = [](
<mask> jsi::Runtime &rt,
<mask> const jsi::Value &thisValue,
<mask> const jsi::Value *args,
<mask> size_t count
<mask> ) -> jsi::Value {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove rt.global().setProperty(rt, "_LABEL", jsi::String::createFromAscii(rt, label));
</s> add rt.global().setProperty(
rt, "_LABEL", jsi::String::createFromAscii(rt, label)); </s> remove void RuntimeDecorator::decorateRuntime(jsi::Runtime &rt, std::string label) {
// This property will be used to find out if a runtime is a custom worklet runtime (e.g. UI, VisionCamera frame processor, ...)
</s> add std::unordered_map<RuntimePointer, RuntimeType>
&RuntimeDecorator::runtimeRegistry() {
static std::unordered_map<RuntimePointer, RuntimeType> runtimeRegistry;
return runtimeRegistry;
}
void RuntimeDecorator::registerRuntime(
jsi::Runtime *runtime,
RuntimeType runtimeType) {
runtimeRegistry().insert({runtime, runtimeType});
}
void RuntimeDecorator::decorateRuntime(
jsi::Runtime &rt,
const std::string &label) {
// This property will be used to find out if a runtime is a custom worklet
// runtime (e.g. UI, VisionCamera frame processor, ...) </s> remove auto callback = [](
jsi::Runtime &rt,
</s> add auto callback = [](jsi::Runtime &rt, </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove auto setGlobalConsole = [](
jsi::Runtime &rt,
</s> add auto setGlobalConsole = [](jsi::Runtime &rt, | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep keep keep replace replace replace keep keep keep keep replace replace keep keep keep keep | <mask> size_t count
<mask> ) -> jsi::Value {
<mask> return jsi::Value::undefined();
<mask> };
<mask> jsi::Function __reanimatedWorkletInit = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "__reanimatedWorkletInit"), 1, dummyFunction);
<mask>
<mask> dummyGlobal.setProperty(rt, "__reanimatedWorkletInit", __reanimatedWorkletInit);
<mask> rt.global().setProperty(rt, "global", dummyGlobal);
<mask>
<mask> rt.global().setProperty(rt, "jsThis", jsi::Value::undefined());
<mask>
<mask> auto callback = [](
<mask> jsi::Runtime &rt,
<mask> const jsi::Value &thisValue,
<mask> const jsi::Value *args,
<mask> size_t count
<mask> ) -> jsi::Value {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove auto setGlobalConsole = [](
jsi::Runtime &rt,
</s> add auto setGlobalConsole = [](jsi::Runtime &rt, </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep keep keep replace replace keep keep keep keep keep | <mask> auto callback = [](
<mask> jsi::Runtime &rt,
<mask> const jsi::Value &thisValue,
<mask> const jsi::Value *args,
<mask> size_t count
<mask> ) -> jsi::Value {
<mask> const jsi::Value *value = &args[0];
<mask> if (value->isString()) {
<mask> Logger::log(value->getString(rt).utf8(rt).c_str());
<mask> } else if (value->isNumber()) {
<mask> Logger::log(value->getNumber());
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove auto callback = [](
jsi::Runtime &rt,
</s> add auto callback = [](jsi::Runtime &rt, </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
auto fun = std::make_shared<jsi::Function>(args[0].asObject(rt).asFunction(rt));
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
auto fun =
std::make_shared<jsi::Function>(args[0].asObject(rt).asFunction(rt)); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
auto fun = std::make_shared<jsi::Function>(args[0].asObject(rt).asFunction(rt));
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
auto fun =
std::make_shared<jsi::Function>(args[0].asObject(rt).asFunction(rt)); </s> remove auto setGlobalConsole = [](
jsi::Runtime &rt,
</s> add auto setGlobalConsole = [](jsi::Runtime &rt, | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep replace keep keep replace replace keep keep keep keep | <mask> };
<mask> jsi::Value log = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_log"), 1, callback);
<mask> rt.global().setProperty(rt, "_log", log);
<mask>
<mask> auto setGlobalConsole = [](
<mask> jsi::Runtime &rt,
<mask> const jsi::Value &thisValue,
<mask> const jsi::Value *args,
<mask> size_t count
<mask> ) -> jsi::Value {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { </s> remove auto callback = [](
jsi::Runtime &rt,
</s> add auto callback = [](jsi::Runtime &rt, | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep keep replace replace keep keep keep replace | <mask> jsi::Runtime &rt,
<mask> const jsi::Value &thisValue,
<mask> const jsi::Value *args,
<mask> size_t count
<mask> ) -> jsi::Value {
<mask> rt.global().setProperty(rt, "console", args[0]);
<mask> return jsi::Value::undefined();
<mask> };
<mask> rt.global().setProperty(rt, "_setGlobalConsole", jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_setGlobalConsole"), 1, setGlobalConsole));
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove auto setGlobalConsole = [](
jsi::Runtime &rt,
</s> add auto setGlobalConsole = [](jsi::Runtime &rt, </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
int viewTag = (int)args[0].asNumber();
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
int viewTag = static_cast<int>(args[0].asNumber()); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep keep replace replace replace replace replace replace keep keep keep keep replace replace replace replace replace keep | <mask> rt.global().setProperty(rt, "_setGlobalConsole", jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_setGlobalConsole"), 1, setGlobalConsole));
<mask> }
<mask>
<mask> void RuntimeDecorator::decorateUIRuntime(jsi::Runtime &rt,
<mask> UpdaterFunction updater,
<mask> RequestFrameFunction requestFrame,
<mask> ScrollToFunction scrollTo,
<mask> MeasuringFunction measure,
<mask> TimeProviderFunction getCurrentTime) {
<mask> RuntimeDecorator::decorateRuntime(rt, "UI");
<mask> rt.global().setProperty(rt, "_UI", jsi::Value(true));
<mask>
<mask> auto clb = [updater](
<mask> jsi::Runtime &rt,
<mask> const jsi::Value &thisValue,
<mask> const jsi::Value *args,
<mask> size_t count
<mask> ) -> jsi::Value {
<mask> const auto viewTag = args[0].asNumber();
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove rt.global().setProperty(rt, "_setGlobalConsole", jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_setGlobalConsole"), 1, setGlobalConsole));
</s> add rt.global().setProperty(
rt,
"_setGlobalConsole",
jsi::Function::createFromHostFunction(
rt,
jsi::PropNameID::forAscii(rt, "_setGlobalConsole"),
1,
setGlobalConsole));
rt.global().setProperty(
rt,
"_chronoNow",
jsi::Function::createFromHostFunction(
rt,
jsi::PropNameID::forAscii(rt, "_chronoNow"),
0,
[](jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
double now = std::chrono::system_clock::now().time_since_epoch() /
std::chrono::milliseconds(1);
return jsi::Value(now);
})); </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { </s> remove auto setGlobalConsole = [](
jsi::Runtime &rt,
</s> add auto setGlobalConsole = [](jsi::Runtime &rt, | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep replace keep keep keep keep replace keep | <mask> const auto viewTag = args[0].asNumber();
<mask> const jsi::Value* viewName = &args[1];
<mask> const auto params = args[2].asObject(rt);
<mask> updater(rt, viewTag, *viewName, params);
<mask> return jsi::Value::undefined();
<mask> };
<mask> jsi::Value updateProps = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_updateProps"), 2, clb);
<mask> rt.global().setProperty(rt, "_updateProps", updateProps);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove jsi::Value updateProps = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_updateProps"), 2, clb);
</s> add jsi::Value updateProps = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_updateProps"), 2, clb); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
auto fun = std::make_shared<jsi::Function>(args[0].asObject(rt).asFunction(rt));
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
auto fun =
std::make_shared<jsi::Function>(args[0].asObject(rt).asFunction(rt)); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
auto fun = std::make_shared<jsi::Function>(args[0].asObject(rt).asFunction(rt));
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
auto fun =
std::make_shared<jsi::Function>(args[0].asObject(rt).asFunction(rt)); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
int viewTag = (int)args[0].asNumber();
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
int viewTag = static_cast<int>(args[0].asNumber()); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep keep keep replace replace replace replace replace replace keep keep keep keep keep | <mask> rt.global().setProperty(rt, "_updateProps", updateProps);
<mask>
<mask>
<mask> auto clb2 = [requestFrame](
<mask> jsi::Runtime &rt,
<mask> const jsi::Value &thisValue,
<mask> const jsi::Value *args,
<mask> size_t count
<mask> ) -> jsi::Value {
<mask> auto fun = std::make_shared<jsi::Function>(args[0].asObject(rt).asFunction(rt));
<mask> requestFrame([&rt, fun](double timestampMs) {
<mask> fun->call(rt, jsi::Value(timestampMs));
<mask> });
<mask> return jsi::Value::undefined();
<mask> };
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
auto fun = std::make_shared<jsi::Function>(args[0].asObject(rt).asFunction(rt));
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
auto fun =
std::make_shared<jsi::Function>(args[0].asObject(rt).asFunction(rt)); </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep replace keep keep keep replace replace replace replace replace replace keep | <mask> };
<mask> jsi::Value requestAnimationFrame = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "requestAnimationFrame"), 1, clb2);
<mask> rt.global().setProperty(rt, "requestAnimationFrame", requestAnimationFrame);
<mask>
<mask> auto clb3 = [scrollTo](
<mask> jsi::Runtime &rt,
<mask> const jsi::Value &thisValue,
<mask> const jsi::Value *args,
<mask> size_t count
<mask> ) -> jsi::Value {
<mask> int viewTag = (int)args[0].asNumber();
<mask> double x = args[1].asNumber();
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
int viewTag = (int)args[0].asNumber();
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
int viewTag = static_cast<int>(args[0].asNumber()); </s> remove jsi::Value requestAnimationFrame = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "requestAnimationFrame"), 1, clb2);
</s> add jsi::Value requestAnimationFrame = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "requestAnimationFrame"), 1, clb2); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
int viewTag = (int)args[0].asNumber();
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
int viewTag = static_cast<int>(args[0].asNumber()); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
int viewTag = (int)args[0].asNumber();
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
int viewTag = static_cast<int>(args[0].asNumber()); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep keep keep replace keep keep keep replace replace replace replace replace replace | <mask> bool animated = args[3].getBool();
<mask> scrollTo(viewTag, x, y, animated);
<mask> return jsi::Value::undefined();
<mask> };
<mask> jsi::Value scrollToFunction = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_scrollTo"), 4, clb3);
<mask> rt.global().setProperty(rt, "_scrollTo", scrollToFunction);
<mask>
<mask> auto clb4 = [measure](
<mask> jsi::Runtime &rt,
<mask> const jsi::Value &thisValue,
<mask> const jsi::Value *args,
<mask> size_t count
<mask> ) -> jsi::Value {
<mask> int viewTag = (int)args[0].asNumber();
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove jsi::Value scrollToFunction = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_scrollTo"), 4, clb3);
</s> add jsi::Value scrollToFunction = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_scrollTo"), 4, clb3); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
int viewTag = (int)args[0].asNumber();
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
int viewTag = static_cast<int>(args[0].asNumber()); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
int viewTag = (int)args[0].asNumber();
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
int viewTag = static_cast<int>(args[0].asNumber()); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
int viewTag = (int)args[0].asNumber();
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
int viewTag = static_cast<int>(args[0].asNumber()); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep replace keep keep keep keep replace keep | <mask> auto result = measure(viewTag);
<mask> jsi::Object resultObject(rt);
<mask> for (auto &i:result) {
<mask> resultObject.setProperty(rt, i.first.c_str(), i.second);
<mask> }
<mask> return resultObject;
<mask> };
<mask> jsi::Value measureFunction = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_measure"), 1, clb4);
<mask> rt.global().setProperty(rt, "_measure", measureFunction);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove for (auto &i:result) {
</s> add for (auto &i : result) { </s> remove jsi::Value measureFunction = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_measure"), 1, clb4);
</s> add jsi::Value measureFunction = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_measure"), 1, clb4); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
int viewTag = (int)args[0].asNumber();
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
int viewTag = static_cast<int>(args[0].asNumber()); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
int viewTag = (int)args[0].asNumber();
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value {
int viewTag = static_cast<int>(args[0].asNumber()); </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep replace replace replace replace replace keep keep replace | <mask>
<mask> auto clb6 = [getCurrentTime](
<mask> jsi::Runtime &rt,
<mask> const jsi::Value &thisValue,
<mask> const jsi::Value *args,
<mask> size_t count
<mask> ) -> jsi::Value {
<mask> return getCurrentTime();
<mask> };
<mask> jsi::Value timeFun = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_getCurrentTime"), 0, clb6);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count
) -> jsi::Value {
</s> add jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
const size_t count) -> jsi::Value { </s> remove jsi::Value timeFun = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_getCurrentTime"), 0, clb6);
</s> add jsi::Value timeFun = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_getCurrentTime"), 0, clb6); </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove size_t count
) -> jsi::Value {
</s> add size_t count) -> jsi::Value { </s> remove auto setGlobalConsole = [](
jsi::Runtime &rt,
</s> add auto setGlobalConsole = [](jsi::Runtime &rt, | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep keep keep replace keep replace replace replace replace replace replace replace replace replace replace replace replace keep | <mask> rt.global().setProperty(rt, "_getCurrentTime", timeFun);
<mask>
<mask> rt.global().setProperty(rt, "_frameTimestamp", jsi::Value::undefined());
<mask> rt.global().setProperty(rt, "_eventTimestamp", jsi::Value::undefined());
<mask> }
<mask>
<mask> bool RuntimeDecorator::isUIRuntime(jsi::Runtime& rt) {
<mask> auto isUi = rt.global().getProperty(rt, "_UI");
<mask> return isUi.isBool() && isUi.getBool();
<mask> }
<mask>
<mask> bool RuntimeDecorator::isWorkletRuntime(jsi::Runtime& rt) {
<mask> auto isWorklet = rt.global().getProperty(rt, "_WORKLET");
<mask> return isWorklet.isBool() && isWorklet.getBool();
<mask> }
<mask>
<mask> bool RuntimeDecorator::isReactRuntime(jsi::Runtime& rt) {
<mask> return !isWorkletRuntime(rt);
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove }
</s> add </s> remove bool RuntimeDecorator::isUIRuntime(jsi::Runtime& rt) {
auto isUi = rt.global().getProperty(rt, "_UI");
return isUi.isBool() && isUi.getBool();
}
bool RuntimeDecorator::isWorkletRuntime(jsi::Runtime& rt) {
auto isWorklet = rt.global().getProperty(rt, "_WORKLET");
return isWorklet.isBool() && isWorklet.getBool();
}
bool RuntimeDecorator::isReactRuntime(jsi::Runtime& rt) {
return !isWorkletRuntime(rt);
</s> add // layout animation
std::weak_ptr<LayoutAnimationsProxy> layoutProxy = layoutAnimationsProxy;
auto clb7 = [layoutProxy](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
std::shared_ptr<LayoutAnimationsProxy> proxy = layoutProxy.lock();
if (layoutProxy.expired()) {
return jsi::Value::undefined();
}
proxy->startObserving(
args[0].asNumber(),
args[1].asObject(rt).getHostObject<MutableValue>(rt),
rt);
return jsi::Value::undefined();
};
jsi::Value _startObservingProgress = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_startObservingProgress"), 0, clb7);
rt.global().setProperty(
rt, "_startObservingProgress", _startObservingProgress);
auto clb8 = [layoutProxy](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
std::shared_ptr<LayoutAnimationsProxy> proxy = layoutProxy.lock();
if (layoutProxy.expired()) {
return jsi::Value::undefined();
}
proxy->stopObserving(args[0].asNumber(), args[1].getBool());
return jsi::Value::undefined();
};
jsi::Value _stopObservingProgress = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_stopObservingProgress"), 0, clb8);
rt.global().setProperty(rt, "_stopObservingProgress", _stopObservingProgress);
auto clb9 = [setGestureState](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
int handlerTag = static_cast<int>(args[0].asNumber());
int newState = static_cast<int>(args[1].asNumber());
setGestureState(handlerTag, newState);
return jsi::Value::undefined();
};
jsi::Value setGestureStateFunction = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_setGestureState"), 2, clb9);
rt.global().setProperty(rt, "_setGestureState", setGestureStateFunction); </s> remove }
</s> add } // namespace reanimated </s> remove }
</s> add } // namespace reanimated </s> remove jsi::Value timeFun = jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_getCurrentTime"), 0, clb6);
</s> add jsi::Value timeFun = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_getCurrentTime"), 0, clb6); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep keep keep replace | <mask> bool RuntimeDecorator::isReactRuntime(jsi::Runtime& rt) {
<mask> return !isWorkletRuntime(rt);
<mask> }
<mask>
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove }
</s> add } // namespace reanimated </s> remove bool RuntimeDecorator::isUIRuntime(jsi::Runtime& rt) {
auto isUi = rt.global().getProperty(rt, "_UI");
return isUi.isBool() && isUi.getBool();
}
bool RuntimeDecorator::isWorkletRuntime(jsi::Runtime& rt) {
auto isWorklet = rt.global().getProperty(rt, "_WORKLET");
return isWorklet.isBool() && isWorklet.getBool();
}
bool RuntimeDecorator::isReactRuntime(jsi::Runtime& rt) {
return !isWorkletRuntime(rt);
</s> add // layout animation
std::weak_ptr<LayoutAnimationsProxy> layoutProxy = layoutAnimationsProxy;
auto clb7 = [layoutProxy](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
std::shared_ptr<LayoutAnimationsProxy> proxy = layoutProxy.lock();
if (layoutProxy.expired()) {
return jsi::Value::undefined();
}
proxy->startObserving(
args[0].asNumber(),
args[1].asObject(rt).getHostObject<MutableValue>(rt),
rt);
return jsi::Value::undefined();
};
jsi::Value _startObservingProgress = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_startObservingProgress"), 0, clb7);
rt.global().setProperty(
rt, "_startObservingProgress", _startObservingProgress);
auto clb8 = [layoutProxy](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
std::shared_ptr<LayoutAnimationsProxy> proxy = layoutProxy.lock();
if (layoutProxy.expired()) {
return jsi::Value::undefined();
}
proxy->stopObserving(args[0].asNumber(), args[1].getBool());
return jsi::Value::undefined();
};
jsi::Value _stopObservingProgress = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_stopObservingProgress"), 0, clb8);
rt.global().setProperty(rt, "_stopObservingProgress", _stopObservingProgress);
auto clb9 = [setGestureState](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
int handlerTag = static_cast<int>(args[0].asNumber());
int newState = static_cast<int>(args[1].asNumber());
setGestureState(handlerTag, newState);
return jsi::Value::undefined();
};
jsi::Value setGestureStateFunction = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_setGestureState"), 2, clb9);
rt.global().setProperty(rt, "_setGestureState", setGestureStateFunction); </s> remove bool RuntimeDecorator::isUIRuntime(jsi::Runtime& rt) {
auto isUi = rt.global().getProperty(rt, "_UI");
return isUi.isBool() && isUi.getBool();
}
bool RuntimeDecorator::isWorkletRuntime(jsi::Runtime& rt) {
auto isWorklet = rt.global().getProperty(rt, "_WORKLET");
return isWorklet.isBool() && isWorklet.getBool();
}
bool RuntimeDecorator::isReactRuntime(jsi::Runtime& rt) {
return !isWorkletRuntime(rt);
</s> add // layout animation
std::weak_ptr<LayoutAnimationsProxy> layoutProxy = layoutAnimationsProxy;
auto clb7 = [layoutProxy](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
std::shared_ptr<LayoutAnimationsProxy> proxy = layoutProxy.lock();
if (layoutProxy.expired()) {
return jsi::Value::undefined();
}
proxy->startObserving(
args[0].asNumber(),
args[1].asObject(rt).getHostObject<MutableValue>(rt),
rt);
return jsi::Value::undefined();
};
jsi::Value _startObservingProgress = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_startObservingProgress"), 0, clb7);
rt.global().setProperty(
rt, "_startObservingProgress", _startObservingProgress);
auto clb8 = [layoutProxy](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
std::shared_ptr<LayoutAnimationsProxy> proxy = layoutProxy.lock();
if (layoutProxy.expired()) {
return jsi::Value::undefined();
}
proxy->stopObserving(args[0].asNumber(), args[1].getBool());
return jsi::Value::undefined();
};
jsi::Value _stopObservingProgress = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_stopObservingProgress"), 0, clb8);
rt.global().setProperty(rt, "_stopObservingProgress", _stopObservingProgress);
auto clb9 = [setGestureState](
jsi::Runtime &rt,
const jsi::Value &thisValue,
const jsi::Value *args,
size_t count) -> jsi::Value {
int handlerTag = static_cast<int>(args[0].asNumber());
int newState = static_cast<int>(args[1].asNumber());
setGestureState(handlerTag, newState);
return jsi::Value::undefined();
};
jsi::Value setGestureStateFunction = jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_setGestureState"), 2, clb9);
rt.global().setProperty(rt, "_setGestureState", setGestureStateFunction); </s> remove }
</s> add </s> remove }
</s> add </s> remove bool NativeReanimatedModule::isAnyHandlerWaitingForEvent(std::string eventName) {
</s> add bool NativeReanimatedModule::isAnyHandlerWaitingForEvent(
std::string eventName) { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/RuntimeDecorator.cpp |
keep keep replace replace keep keep keep keep keep | <mask> #include "Scheduler.h"
<mask>
<mask> namespace reanimated
<mask> {
<mask>
<mask> void Scheduler::scheduleOnUI(std::function<void()> job) {
<mask> uiJobs.push(std::move(job));
<mask> }
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove namespace reanimated
{
</s> add namespace reanimated { </s> remove namespace reanimated
{
</s> add namespace reanimated { </s> remove #include "Scheduler.h"
</s> add #include <memory> </s> add #include "Scheduler.h" </s> remove namespace reanimated
{
</s> add namespace reanimated { </s> remove #include <jsi/jsi.h>
#include <memory>
</s> add | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/Scheduler.cpp |
keep keep replace replace keep keep replace keep keep keep keep | <mask>
<mask> void Scheduler::triggerUI() {
<mask> auto job = uiJobs.pop();
<mask> job();
<mask> }
<mask>
<mask> void Scheduler::setJSCallInvoker(std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker) {
<mask> jsCallInvoker_ = jsCallInvoker;
<mask> }
<mask>
<mask> void Scheduler::setRuntimeManager(std::shared_ptr<RuntimeManager> runtimeManager) {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove void Scheduler::setJSCallInvoker(std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker) {
</s> add void Scheduler::setJSCallInvoker(
std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker) { </s> remove auto job = uiJobs.pop();
job();
</s> add scheduledOnUI = false;
while (uiJobs.getSize()) {
auto job = uiJobs.pop();
job();
} </s> remove void Scheduler::setRuntimeManager(std::shared_ptr<RuntimeManager> runtimeManager) {
</s> add void Scheduler::setRuntimeManager(
std::shared_ptr<RuntimeManager> runtimeManager) { </s> remove void Scheduler::setRuntimeManager(std::shared_ptr<RuntimeManager> runtimeManager) {
</s> add void Scheduler::setRuntimeManager(
std::shared_ptr<RuntimeManager> runtimeManager) { </s> remove public void prepare() {
</s> add public void prepare(LayoutAnimations LayoutAnimations) { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/Scheduler.cpp |
keep keep keep keep replace keep keep keep keep keep | <mask> void Scheduler::setJSCallInvoker(std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker) {
<mask> jsCallInvoker_ = jsCallInvoker;
<mask> }
<mask>
<mask> void Scheduler::setRuntimeManager(std::shared_ptr<RuntimeManager> runtimeManager) {
<mask> this->runtimeManager = runtimeManager;
<mask> }
<mask>
<mask> Scheduler::~Scheduler() {}
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove void Scheduler::setRuntimeManager(std::shared_ptr<RuntimeManager> runtimeManager) {
</s> add void Scheduler::setRuntimeManager(
std::shared_ptr<RuntimeManager> runtimeManager) { </s> remove void Scheduler::setJSCallInvoker(std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker) {
</s> add void Scheduler::setJSCallInvoker(
std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker) { </s> remove void Scheduler::setJSCallInvoker(std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker) {
</s> add void Scheduler::setJSCallInvoker(
std::shared_ptr<facebook::react::CallInvoker> jsCallInvoker) { </s> remove auto job = uiJobs.pop();
job();
</s> add scheduledOnUI = false;
while (uiJobs.getSize()) {
auto job = uiJobs.pop();
job();
} </s> remove auto job = uiJobs.pop();
job();
</s> add scheduledOnUI = false;
while (uiJobs.getSize()) {
auto job = uiJobs.pop();
job();
} </s> add Scheduler::Scheduler() {
this->scheduledOnUI = false; | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/Scheduler.cpp |
keep keep add keep keep keep | <mask>
<mask> Scheduler::~Scheduler() {}
<mask>
<mask> }
<mask>
<mask> } // namespace reanimated
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add Scheduler::Scheduler() {
this->scheduledOnUI = false; </s> remove void Scheduler::setRuntimeManager(std::shared_ptr<RuntimeManager> runtimeManager) {
</s> add void Scheduler::setRuntimeManager(
std::shared_ptr<RuntimeManager> runtimeManager) { </s> remove void Scheduler::setRuntimeManager(std::shared_ptr<RuntimeManager> runtimeManager) {
</s> add void Scheduler::setRuntimeManager(
std::shared_ptr<RuntimeManager> runtimeManager) { </s> remove }
</s> add } // namespace reanimated </s> remove
}
</s> add } // namespace reanimated </s> remove
}
</s> add } // namespace reanimated | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/Scheduler.cpp |
keep keep keep keep replace keep keep keep replace | <mask> #include "WorkletEventHandler.h"
<mask>
<mask> namespace reanimated {
<mask>
<mask> void WorkletEventHandler::process(jsi::Runtime &rt, jsi::Value &eventValue) {
<mask> handler.callWithThis(rt, handler, eventValue);
<mask> }
<mask>
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove void WorkletEventHandler::process(jsi::Runtime &rt, jsi::Value &eventValue) {
</s> add void WorkletEventHandler::process(
jsi::Runtime &rt,
const jsi::Value &eventValue) { </s> remove }
</s> add } // namespace reanimated </s> remove void EventHandlerRegistry::registerEventHandler(std::shared_ptr<WorkletEventHandler> eventHandler) {
</s> add void EventHandlerRegistry::registerEventHandler(
std::shared_ptr<WorkletEventHandler> eventHandler) { </s> remove namespace reanimated
{
</s> add namespace reanimated { </s> remove namespace reanimated
{
</s> add namespace reanimated { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/Tools/WorkletEventHandler.cpp |
keep keep replace replace replace replace replace keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include "NativeReanimatedModuleSpec.h"
<mask> #include "Scheduler.h"
<mask> #include "ErrorHandler.h"
<mask> #include "RuntimeDecorator.h"
<mask> #include "PlatformDepMethodsHolder.h"
<mask> #include <unistd.h>
<mask> #include <memory>
<mask> #include <vector>
<mask> #include "RuntimeManager.h"
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include "NativeReanimatedModuleSpec.h"
#include "Scheduler.h"
#include "ErrorHandler.h"
#include "RuntimeDecorator.h"
#include "PlatformDepMethodsHolder.h"
</s> add </s> add #include "ErrorHandler.h"
#include "LayoutAnimationsProxy.h"
#include "NativeReanimatedModuleSpec.h"
#include "PlatformDepMethodsHolder.h"
#include "RuntimeDecorator.h" </s> add #include "ErrorHandler.h"
#include "LayoutAnimationsProxy.h"
#include "NativeReanimatedModuleSpec.h"
#include "PlatformDepMethodsHolder.h"
#include "RuntimeDecorator.h" </s> add #include <string> </s> add #include <string> </s> remove #include "ShareableValue.h"
</s> add #include <jsi/jsi.h>
#include <memory> | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModule.h |
keep keep keep add keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include <unistd.h>
<mask> #include <memory>
<mask> #include <vector>
<mask>
<mask> #include "ErrorHandler.h"
<mask> #include "LayoutAnimationsProxy.h"
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include "NativeReanimatedModuleSpec.h"
#include "Scheduler.h"
#include "ErrorHandler.h"
#include "RuntimeDecorator.h"
#include "PlatformDepMethodsHolder.h"
</s> add </s> remove #include "NativeReanimatedModuleSpec.h"
#include "Scheduler.h"
#include "ErrorHandler.h"
#include "RuntimeDecorator.h"
#include "PlatformDepMethodsHolder.h"
</s> add </s> add #include <string> </s> add #include <memory>
#include <mutex>
#include <vector> </s> remove #include "ShareableValue.h"
</s> add #include <jsi/jsi.h>
#include <memory> </s> add #include <jsi/jsi.h> | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModule.h |
keep add keep keep keep keep | <mask> #include <string>
<mask> #include <vector>
<mask> #include "RuntimeManager.h"
<mask> #include "Scheduler.h"
<mask>
<mask> namespace reanimated {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include "ErrorHandler.h"
#include "LayoutAnimationsProxy.h"
#include "NativeReanimatedModuleSpec.h"
#include "PlatformDepMethodsHolder.h"
#include "RuntimeDecorator.h" </s> add #include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "RuntimeManager.h"
#include "SharedParent.h"
#include "WorkletsCache.h" </s> remove #include <string>
#include <mutex>
#include <unordered_map>
#include <jsi/jsi.h>
</s> add #include "SharedParent.h"
#include "ValueWrapper.h"
#include "WorkletsCache.h" </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
#include "ValueWrapper.h"
</s> add #include <jsi/jsi.h>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector> </s> remove #include "Scheduler.h"
</s> add #include <memory> </s> add #include <unordered_map>
#include <vector> | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModule.h |
keep keep add keep keep keep keep keep keep | <mask> #include "PlatformDepMethodsHolder.h"
<mask> #include "RuntimeDecorator.h"
<mask> #include "RuntimeManager.h"
<mask>
<mask> namespace reanimated {
<mask>
<mask> using FrameCallback = std::function<void(double)>;
<mask>
<mask> class ShareableValue;
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include "Scheduler.h" </s> remove namespace reanimated
{
</s> add namespace reanimated { </s> remove namespace reanimated
{
</s> add namespace reanimated { </s> add #include "RuntimeManager.h"
#include "SharedParent.h" </s> add #include "RuntimeManager.h"
#include "SharedParent.h" </s> add #include "ErrorHandler.h"
#include "LayoutAnimationsProxy.h"
#include "NativeReanimatedModuleSpec.h"
#include "PlatformDepMethodsHolder.h"
#include "RuntimeDecorator.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModule.h |
keep keep keep keep replace replace keep keep keep keep keep | <mask> #include <memory>
<mask> #include <vector>
<mask> #include "RuntimeManager.h"
<mask>
<mask> namespace reanimated
<mask> {
<mask>
<mask> using FrameCallback = std::function<void(double)>;
<mask>
<mask> class ShareableValue;
<mask> class MutableValue;
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove namespace reanimated
{
</s> add namespace reanimated { </s> add #include "Scheduler.h" </s> add #include "Scheduler.h" </s> add #include <stdio.h>
#include <memory>
#include <vector>
#include "NativeReanimatedModule.h"
#include "ShareableValue.h" </s> add #include "RuntimeManager.h"
#include "SharedParent.h" </s> add #include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "RuntimeManager.h"
#include "SharedParent.h"
#include "WorkletsCache.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModule.h |
keep keep keep replace replace keep keep replace replace replace replace replace replace replace replace keep | <mask> class MapperRegistry;
<mask> class EventHandlerRegistry;
<mask>
<mask> class NativeReanimatedModule : public NativeReanimatedModuleSpec, public RuntimeManager
<mask> {
<mask> friend ShareableValue;
<mask> friend MutableValue;
<mask>
<mask> public:
<mask> NativeReanimatedModule(std::shared_ptr<CallInvoker> jsInvoker,
<mask> std::shared_ptr<Scheduler> scheduler,
<mask> std::unique_ptr<jsi::Runtime> rt,
<mask> std::shared_ptr<ErrorHandler> errorHandler,
<mask> std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)> propObtainer,
<mask> PlatformDepMethodsHolder platformDepMethodsHolder);
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove
public:
NativeReanimatedModule(std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::unique_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)> propObtainer,
PlatformDepMethodsHolder platformDepMethodsHolder);
</s> add </s> remove class NativeReanimatedModule : public NativeReanimatedModuleSpec, public RuntimeManager
{
</s> add class NativeReanimatedModule : public NativeReanimatedModuleSpec,
public RuntimeManager { </s> remove NativeReanimatedModule::NativeReanimatedModule(std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::unique_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)> propObtainer,
PlatformDepMethodsHolder platformDepMethodsHolder) :
NativeReanimatedModuleSpec(jsInvoker),
RuntimeManager(std::move(rt), errorHandler, scheduler),
mapperRegistry(std::make_shared<MapperRegistry>()),
eventHandlerRegistry(std::make_shared<EventHandlerRegistry>()),
requestRender(platformDepMethodsHolder.requestRender),
propObtainer(propObtainer)
{
</s> add NativeReanimatedModule::NativeReanimatedModule(
std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::shared_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)>
propObtainer,
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy,
PlatformDepMethodsHolder platformDepMethodsHolder)
: NativeReanimatedModuleSpec(jsInvoker),
RuntimeManager(rt, errorHandler, scheduler, RuntimeType::UI),
mapperRegistry(std::make_shared<MapperRegistry>()),
eventHandlerRegistry(std::make_shared<EventHandlerRegistry>()),
requestRender(platformDepMethodsHolder.requestRender),
propObtainer(propObtainer) { </s> remove virtual ~NativeReanimatedModule();
</s> add public:
NativeReanimatedModule(
std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::shared_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)>
propObtainer,
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy,
PlatformDepMethodsHolder platformDepMethodsHolder); </s> remove virtual ~NativeReanimatedModule();
</s> add public:
NativeReanimatedModule(
std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::shared_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)>
propObtainer,
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy,
PlatformDepMethodsHolder platformDepMethodsHolder); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModule.h |
keep keep keep keep replace keep replace keep | <mask> std::shared_ptr<ErrorHandler> errorHandler,
<mask> std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)> propObtainer,
<mask> PlatformDepMethodsHolder platformDepMethodsHolder);
<mask>
<mask> virtual ~NativeReanimatedModule();
<mask>
<mask> void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter) override;
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove virtual ~NativeReanimatedModule();
</s> add public:
NativeReanimatedModule(
std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::shared_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)>
propObtainer,
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy,
PlatformDepMethodsHolder platformDepMethodsHolder); </s> remove
public:
NativeReanimatedModule(std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::unique_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)> propObtainer,
PlatformDepMethodsHolder platformDepMethodsHolder);
</s> add </s> remove
public:
NativeReanimatedModule(std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::unique_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)> propObtainer,
PlatformDepMethodsHolder platformDepMethodsHolder);
</s> add </s> remove NativeReanimatedModule::NativeReanimatedModule(std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::unique_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)> propObtainer,
PlatformDepMethodsHolder platformDepMethodsHolder) :
NativeReanimatedModuleSpec(jsInvoker),
RuntimeManager(std::move(rt), errorHandler, scheduler),
mapperRegistry(std::make_shared<MapperRegistry>()),
eventHandlerRegistry(std::make_shared<EventHandlerRegistry>()),
requestRender(platformDepMethodsHolder.requestRender),
propObtainer(propObtainer)
{
</s> add NativeReanimatedModule::NativeReanimatedModule(
std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::shared_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)>
propObtainer,
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy,
PlatformDepMethodsHolder platformDepMethodsHolder)
: NativeReanimatedModuleSpec(jsInvoker),
RuntimeManager(rt, errorHandler, scheduler, RuntimeType::UI),
mapperRegistry(std::make_shared<MapperRegistry>()),
eventHandlerRegistry(std::make_shared<EventHandlerRegistry>()),
requestRender(platformDepMethodsHolder.requestRender),
propObtainer(propObtainer) { </s> remove void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter) override;
</s> add void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter)
override; | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModule.h |
keep keep keep replace keep keep keep keep keep keep keep keep replace replace keep keep keep | <mask> jsi::Value makeMutable(jsi::Runtime &rt, const jsi::Value &value) override;
<mask> jsi::Value makeRemote(jsi::Runtime &rt, const jsi::Value &value) override;
<mask>
<mask> jsi::Value startMapper(jsi::Runtime &rt, const jsi::Value &worklet, const jsi::Value &inputs, const jsi::Value &outputs) override;
<mask> void stopMapper(jsi::Runtime &rt, const jsi::Value &mapperId) override;
<mask>
<mask> jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) override;
<mask> void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) override;
<mask>
<mask> jsi::Value startMapper(jsi::Runtime &rt, const jsi::Value &worklet, const jsi::Value &inputs, const jsi::Value &outputs) override;
<mask> void stopMapper(jsi::Runtime &rt, const jsi::Value &mapperId) override;
<mask>
<mask> jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) override;
<mask> void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) override;
<mask>
<mask> jsi::Value getViewProp(jsi::Runtime &rt, const jsi::Value &viewTag, const jsi::Value &propName, const jsi::Value &callback) override;
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove jsi::Value startMapper(jsi::Runtime &rt, const jsi::Value &worklet, const jsi::Value &inputs, const jsi::Value &outputs) override;
</s> add jsi::Value startMapper(
jsi::Runtime &rt,
const jsi::Value &worklet,
const jsi::Value &inputs,
const jsi::Value &outputs,
const jsi::Value &updater,
const jsi::Value &viewDescriptors) override; </s> remove jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) override;
void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) override;
</s> add jsi::Value registerEventHandler(
jsi::Runtime &rt,
const jsi::Value &eventHash,
const jsi::Value &worklet) override;
void unregisterEventHandler(
jsi::Runtime &rt,
const jsi::Value ®istrationId) override;
jsi::Value getViewProp(
jsi::Runtime &rt,
const jsi::Value &viewTag,
const jsi::Value &propName,
const jsi::Value &callback) override; </s> remove jsi::Value getViewProp(jsi::Runtime &rt, const jsi::Value &viewTag, const jsi::Value &propName, const jsi::Value &callback) override;
</s> add jsi::Value enableLayoutAnimations(jsi::Runtime &rt, const jsi::Value &config)
override; </s> remove jsi::Value getViewProp(jsi::Runtime &rt, const jsi::Value &viewTag, const jsi::Value &propName, const jsi::Value &callback) override;
</s> add jsi::Value enableLayoutAnimations(jsi::Runtime &rt, const jsi::Value &config)
override; </s> remove void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter) override;
</s> add void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter)
override; | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModule.h |
keep keep keep keep replace keep keep keep keep keep | <mask>
<mask> jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) override;
<mask> void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) override;
<mask>
<mask> jsi::Value getViewProp(jsi::Runtime &rt, const jsi::Value &viewTag, const jsi::Value &propName, const jsi::Value &callback) override;
<mask>
<mask> void onRender(double timestampMs);
<mask> void onEvent(std::string eventName, std::string eventAsString);
<mask> bool isAnyHandlerWaitingForEvent(std::string eventName);
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove jsi::Value getViewProp(jsi::Runtime &rt, const jsi::Value &viewTag, const jsi::Value &propName, const jsi::Value &callback) override;
</s> add jsi::Value enableLayoutAnimations(jsi::Runtime &rt, const jsi::Value &config)
override; </s> remove jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) override;
void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) override;
</s> add jsi::Value registerEventHandler(
jsi::Runtime &rt,
const jsi::Value &eventHash,
const jsi::Value &worklet) override;
void unregisterEventHandler(
jsi::Runtime &rt,
const jsi::Value ®istrationId) override;
jsi::Value getViewProp(
jsi::Runtime &rt,
const jsi::Value &viewTag,
const jsi::Value &propName,
const jsi::Value &callback) override; </s> remove jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) override;
void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) override;
</s> add jsi::Value registerEventHandler(
jsi::Runtime &rt,
const jsi::Value &eventHash,
const jsi::Value &worklet) override;
void unregisterEventHandler(
jsi::Runtime &rt,
const jsi::Value ®istrationId) override;
jsi::Value getViewProp(
jsi::Runtime &rt,
const jsi::Value &viewTag,
const jsi::Value &propName,
const jsi::Value &callback) override; </s> remove jsi::Value startMapper(jsi::Runtime &rt, const jsi::Value &worklet, const jsi::Value &inputs, const jsi::Value &outputs) override;
</s> add jsi::Value startMapper(
jsi::Runtime &rt,
const jsi::Value &worklet,
const jsi::Value &inputs,
const jsi::Value &outputs,
const jsi::Value &updater,
const jsi::Value &viewDescriptors) override; </s> remove jsi::Value startMapper(jsi::Runtime &rt, const jsi::Value &worklet, const jsi::Value &inputs, const jsi::Value &outputs) override;
</s> add jsi::Value startMapper(
jsi::Runtime &rt,
const jsi::Value &worklet,
const jsi::Value &inputs,
const jsi::Value &outputs,
const jsi::Value &updater,
const jsi::Value &viewDescriptors) override; </s> remove virtual jsi::Value getViewProp(jsi::Runtime &rt, const jsi::Value &viewTag, const jsi::Value &propName, const jsi::Value &callback) = 0;
</s> add virtual jsi::Value getViewProp(
jsi::Runtime &rt,
const jsi::Value &viewTag,
const jsi::Value &propName,
const jsi::Value &callback) = 0;
// other
virtual jsi::Value enableLayoutAnimations(
jsi::Runtime &rt,
const jsi::Value &config) = 0; | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModule.h |
keep keep keep replace keep keep replace | <mask> bool isAnyHandlerWaitingForEvent(std::string eventName);
<mask>
<mask> void maybeRequestRender();
<mask> private:
<mask> std::shared_ptr<MapperRegistry> mapperRegistry;
<mask> std::shared_ptr<EventHandlerRegistry> eventHandlerRegistry;
<mask> std::function<void(FrameCallback, jsi::Runtime&)> requestRender;
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove private:
</s> add UpdaterFunction updaterFunction;
private: </s> remove std::function<void(FrameCallback, jsi::Runtime&)> requestRender;
</s> add std::function<void(FrameCallback &, jsi::Runtime &)> requestRender; </s> remove std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)> propObtainer;
</s> add std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)>
propObtainer;
std::function<void(double)> onRenderCallback;
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy; </s> remove }
</s> add } // namespace reanimated </s> remove void processEvent(jsi::Runtime &rt, std::string eventName, std::string eventPayload);
</s> add void processEvent(
jsi::Runtime &rt,
std::string eventName,
std::string eventPayload); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModule.h |
keep keep keep keep replace keep keep keep | <mask> std::function<void(FrameCallback, jsi::Runtime&)> requestRender;
<mask> std::shared_ptr<jsi::Value> dummyEvent;
<mask> std::vector<FrameCallback> frameCallbacks;
<mask> bool renderRequested = false;
<mask> std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)> propObtainer;
<mask> };
<mask>
<mask> } // namespace reanimated
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove std::function<void(FrameCallback, jsi::Runtime&)> requestRender;
</s> add std::function<void(FrameCallback &, jsi::Runtime &)> requestRender; </s> remove std::function<void(FrameCallback, jsi::Runtime&)> requestRender;
</s> add std::function<void(FrameCallback &, jsi::Runtime &)> requestRender; </s> remove private:
</s> add UpdaterFunction updaterFunction;
private: </s> remove private:
</s> add UpdaterFunction updaterFunction;
private: </s> remove NativeReanimatedModule::NativeReanimatedModule(std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::unique_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)> propObtainer,
PlatformDepMethodsHolder platformDepMethodsHolder) :
NativeReanimatedModuleSpec(jsInvoker),
RuntimeManager(std::move(rt), errorHandler, scheduler),
mapperRegistry(std::make_shared<MapperRegistry>()),
eventHandlerRegistry(std::make_shared<EventHandlerRegistry>()),
requestRender(platformDepMethodsHolder.requestRender),
propObtainer(propObtainer)
{
</s> add NativeReanimatedModule::NativeReanimatedModule(
std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::shared_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)>
propObtainer,
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy,
PlatformDepMethodsHolder platformDepMethodsHolder)
: NativeReanimatedModuleSpec(jsInvoker),
RuntimeManager(rt, errorHandler, scheduler, RuntimeType::UI),
mapperRegistry(std::make_shared<MapperRegistry>()),
eventHandlerRegistry(std::make_shared<EventHandlerRegistry>()),
requestRender(platformDepMethodsHolder.requestRender),
propObtainer(propObtainer) { </s> remove virtual ~NativeReanimatedModule();
</s> add public:
NativeReanimatedModule(
std::shared_ptr<CallInvoker> jsInvoker,
std::shared_ptr<Scheduler> scheduler,
std::shared_ptr<jsi::Runtime> rt,
std::shared_ptr<ErrorHandler> errorHandler,
std::function<jsi::Value(jsi::Runtime &, const int, const jsi::String &)>
propObtainer,
std::shared_ptr<LayoutAnimationsProxy> layoutAnimationsProxy,
PlatformDepMethodsHolder platformDepMethodsHolder); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModule.h |
keep keep keep keep replace keep keep keep keep keep | <mask> #include <string>
<mask> #include <vector>
<mask>
<mask> #ifdef ONANDROID
<mask> #include "TurboModule.h"
<mask> #else
<mask> #include <ReactCommon/TurboModule.h>
<mask> #endif
<mask>
<mask> #include <ReactCommon/CallInvoker.h>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include <ReactCommon/TurboModule.h>
</s> add #include <ReactCommon/TurboModule.h> </s> add #include "RuntimeManager.h"
#ifdef ONANDROID
#include <AndroidScheduler.h>
#endif </s> add #include <ReactCommon/CallInvoker.h>
#include <jsi/jsi.h>
#include <memory> </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
#include "ValueWrapper.h"
</s> add #include <jsi/jsi.h>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector> </s> add #include <string> </s> add #include <memory> | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h |
keep keep keep keep replace keep keep keep keep keep | <mask>
<mask> #ifdef ONANDROID
<mask> #include "TurboModule.h"
<mask> #else
<mask> #include <ReactCommon/TurboModule.h>
<mask> #endif
<mask>
<mask> #include <ReactCommon/CallInvoker.h>
<mask>
<mask> using namespace facebook;
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include "TurboModule.h"
</s> add #include "TurboModule.h" </s> add #include "RuntimeManager.h"
#ifdef ONANDROID
#include <AndroidScheduler.h>
#endif </s> remove namespace reanimated
{
</s> add namespace reanimated { </s> remove #include "ShareableValue.h"
</s> add </s> add #include "RuntimeDecorator.h"
#include "SharedParent.h" </s> remove #include "SharedParent.h"
#include "RuntimeDecorator.h"
</s> add | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h |
keep keep keep replace replace keep keep keep replace | <mask> using namespace facebook;
<mask> using namespace react;
<mask>
<mask> namespace reanimated
<mask> {
<mask>
<mask> class JSI_EXPORT NativeReanimatedModuleSpec : public TurboModule {
<mask> protected:
<mask> NativeReanimatedModuleSpec(std::shared_ptr<CallInvoker> jsInvoker);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove namespace reanimated
{
</s> add namespace reanimated { </s> remove class MutableValue : public jsi::HostObject, public std::enable_shared_from_this<MutableValue>, public StoreUser {
private:
</s> add class MutableValue : public jsi::HostObject,
public std::enable_shared_from_this<MutableValue>,
public StoreUser {
private: </s> remove namespace reanimated
{
</s> add namespace reanimated { </s> remove class RemoteObject: public jsi::HostObject, public StoreUser {
private:
</s> add class RemoteObject : public jsi::HostObject, public StoreUser {
private: </s> remove class MutableValueSetterProxy: public jsi::HostObject {
private:
</s> add class MutableValueSetterProxy : public jsi::HostObject {
private: | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h |
keep keep replace keep keep replace | <mask>
<mask> public:
<mask> virtual void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter) = 0;
<mask>
<mask> // SharedValue
<mask> virtual jsi::Value makeShareable(jsi::Runtime &rt, const jsi::Value &value) = 0;
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove NativeReanimatedModuleSpec(std::shared_ptr<CallInvoker> jsInvoker);
</s> add explicit NativeReanimatedModuleSpec(std::shared_ptr<CallInvoker> jsInvoker); </s> remove virtual jsi::Value startMapper(jsi::Runtime &rt, const jsi::Value &worklet, const jsi::Value &inputs, const jsi::Value &outputs) = 0;
</s> add virtual jsi::Value startMapper(
jsi::Runtime &rt,
const jsi::Value &worklet,
const jsi::Value &inputs,
const jsi::Value &outputs,
const jsi::Value &updater,
const jsi::Value &viewDescriptors) = 0; </s> remove void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter) override;
</s> add void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter)
override; </s> remove void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter) override;
</s> add void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter)
override; </s> remove virtual jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) = 0;
virtual void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) = 0;
</s> add virtual jsi::Value registerEventHandler(
jsi::Runtime &rt,
const jsi::Value &eventHash,
const jsi::Value &worklet) = 0;
virtual void unregisterEventHandler(
jsi::Runtime &rt,
const jsi::Value ®istrationId) = 0; | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h |
keep replace keep keep keep replace replace keep keep keep keep | <mask> // mappers
<mask> virtual jsi::Value startMapper(jsi::Runtime &rt, const jsi::Value &worklet, const jsi::Value &inputs, const jsi::Value &outputs) = 0;
<mask> virtual void stopMapper(jsi::Runtime &rt, const jsi::Value &mapperId) = 0;
<mask>
<mask> // events
<mask> virtual jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) = 0;
<mask> virtual void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) = 0;
<mask>
<mask> // views
<mask> virtual jsi::Value getViewProp(jsi::Runtime &rt, const jsi::Value &viewTag, const jsi::Value &propName, const jsi::Value &callback) = 0;
<mask> };
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove virtual jsi::Value getViewProp(jsi::Runtime &rt, const jsi::Value &viewTag, const jsi::Value &propName, const jsi::Value &callback) = 0;
</s> add virtual jsi::Value getViewProp(
jsi::Runtime &rt,
const jsi::Value &viewTag,
const jsi::Value &propName,
const jsi::Value &callback) = 0;
// other
virtual jsi::Value enableLayoutAnimations(
jsi::Runtime &rt,
const jsi::Value &config) = 0; </s> remove virtual jsi::Value makeShareable(jsi::Runtime &rt, const jsi::Value &value) = 0;
</s> add virtual jsi::Value makeShareable(
jsi::Runtime &rt,
const jsi::Value &value) = 0; </s> remove virtual void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter) = 0;
</s> add virtual void installCoreFunctions(
jsi::Runtime &rt,
const jsi::Value &valueSetter) = 0; </s> remove jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) override;
void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) override;
</s> add jsi::Value registerEventHandler(
jsi::Runtime &rt,
const jsi::Value &eventHash,
const jsi::Value &worklet) override;
void unregisterEventHandler(
jsi::Runtime &rt,
const jsi::Value ®istrationId) override;
jsi::Value getViewProp(
jsi::Runtime &rt,
const jsi::Value &viewTag,
const jsi::Value &propName,
const jsi::Value &callback) override; </s> remove jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) override;
void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) override;
</s> add jsi::Value registerEventHandler(
jsi::Runtime &rt,
const jsi::Value &eventHash,
const jsi::Value &worklet) override;
void unregisterEventHandler(
jsi::Runtime &rt,
const jsi::Value ®istrationId) override;
jsi::Value getViewProp(
jsi::Runtime &rt,
const jsi::Value &viewTag,
const jsi::Value &propName,
const jsi::Value &callback) override; | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h |
keep keep keep keep replace keep keep keep | <mask> virtual jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) = 0;
<mask> virtual void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) = 0;
<mask>
<mask> // views
<mask> virtual jsi::Value getViewProp(jsi::Runtime &rt, const jsi::Value &viewTag, const jsi::Value &propName, const jsi::Value &callback) = 0;
<mask> };
<mask>
<mask> } // namespace reanimated
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove virtual jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) = 0;
virtual void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) = 0;
</s> add virtual jsi::Value registerEventHandler(
jsi::Runtime &rt,
const jsi::Value &eventHash,
const jsi::Value &worklet) = 0;
virtual void unregisterEventHandler(
jsi::Runtime &rt,
const jsi::Value ®istrationId) = 0; </s> remove virtual jsi::Value startMapper(jsi::Runtime &rt, const jsi::Value &worklet, const jsi::Value &inputs, const jsi::Value &outputs) = 0;
</s> add virtual jsi::Value startMapper(
jsi::Runtime &rt,
const jsi::Value &worklet,
const jsi::Value &inputs,
const jsi::Value &outputs,
const jsi::Value &updater,
const jsi::Value &viewDescriptors) = 0; </s> remove virtual jsi::Value makeShareable(jsi::Runtime &rt, const jsi::Value &value) = 0;
</s> add virtual jsi::Value makeShareable(
jsi::Runtime &rt,
const jsi::Value &value) = 0; </s> remove virtual void installCoreFunctions(jsi::Runtime &rt, const jsi::Value &valueSetter) = 0;
</s> add virtual void installCoreFunctions(
jsi::Runtime &rt,
const jsi::Value &valueSetter) = 0; </s> remove jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) override;
void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) override;
</s> add jsi::Value registerEventHandler(
jsi::Runtime &rt,
const jsi::Value &eventHash,
const jsi::Value &worklet) override;
void unregisterEventHandler(
jsi::Runtime &rt,
const jsi::Value ®istrationId) override;
jsi::Value getViewProp(
jsi::Runtime &rt,
const jsi::Value &viewTag,
const jsi::Value &propName,
const jsi::Value &callback) override; </s> remove jsi::Value registerEventHandler(jsi::Runtime &rt, const jsi::Value &eventHash, const jsi::Value &worklet) override;
void unregisterEventHandler(jsi::Runtime &rt, const jsi::Value ®istrationId) override;
</s> add jsi::Value registerEventHandler(
jsi::Runtime &rt,
const jsi::Value &eventHash,
const jsi::Value &worklet) override;
void unregisterEventHandler(
jsi::Runtime &rt,
const jsi::Value ®istrationId) override;
jsi::Value getViewProp(
jsi::Runtime &rt,
const jsi::Value &viewTag,
const jsi::Value &propName,
const jsi::Value &callback) override; | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/NativeModules/NativeReanimatedModuleSpec.h |
keep keep replace keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include <vector>
<mask> #include <map>
<mask> #include <set>
<mask> #include <unordered_map>
<mask> #include <string>
<mask> #include <jsi/jsi.h>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include <memory>
#include <mutex> </s> remove #include <unordered_map>
</s> add </s> remove #include <jsi/jsi.h>
#include <mutex>
</s> add #include <unordered_map>
#include <vector> </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
#include "ValueWrapper.h"
</s> add #include <jsi/jsi.h>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector> </s> add #include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "RuntimeManager.h"
#include "SharedParent.h"
#include "WorkletsCache.h" </s> add #include <jsi/jsi.h> | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/EventHandlerRegistry.h |
keep add keep keep keep keep | <mask> #include <jsi/jsi.h>
<mask> #include <map>
<mask> #include <set>
<mask> #include <string>
<mask> #include <unordered_map>
<mask> #include <vector>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include <vector>
</s> add #include <jsi/jsi.h> </s> remove #include <unordered_map>
</s> add </s> remove #include <jsi/jsi.h>
#include <mutex>
</s> add #include <unordered_map>
#include <vector> </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
#include "ValueWrapper.h"
</s> add #include <jsi/jsi.h>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector> </s> add #include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "RuntimeManager.h"
#include "SharedParent.h"
#include "WorkletsCache.h" </s> add #include <memory> | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/EventHandlerRegistry.h |
keep keep keep replace keep replace replace keep keep | <mask> #include <vector>
<mask> #include <map>
<mask> #include <set>
<mask> #include <unordered_map>
<mask> #include <string>
<mask> #include <jsi/jsi.h>
<mask> #include <mutex>
<mask>
<mask> using namespace facebook;
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include <memory>
#include <mutex> </s> remove #include <vector>
</s> add #include <jsi/jsi.h> </s> add #include <unordered_map>
#include <vector> </s> remove #include <vector>
#include <unordered_map>
#include <jsi/jsi.h>
</s> add </s> remove #include <string>
#include <mutex>
#include <unordered_map>
#include <jsi/jsi.h>
</s> add #include "SharedParent.h"
#include "ValueWrapper.h"
#include "WorkletsCache.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/EventHandlerRegistry.h |
keep keep keep keep replace keep keep keep replace keep keep | <mask>
<mask> class WorkletEventHandler;
<mask>
<mask> class EventHandlerRegistry {
<mask> std::map<std::string, std::unordered_map<unsigned long, std::shared_ptr<WorkletEventHandler>>> eventMappings;
<mask> std::map<unsigned long, std::shared_ptr<WorkletEventHandler>> eventHandlers;
<mask> std::mutex instanceMutex;
<mask>
<mask> public:
<mask> void registerEventHandler(std::shared_ptr<WorkletEventHandler> eventHandler);
<mask> void unregisterEventHandler(unsigned long id);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove void processEvent(jsi::Runtime &rt, std::string eventName, std::string eventPayload);
</s> add void processEvent(
jsi::Runtime &rt,
std::string eventName,
std::string eventPayload); </s> add friend LayoutAnimationsProxy; </s> add friend LayoutAnimationsProxy; </s> remove private:
</s> add private: </s> remove public:
std::shared_ptr<jsi::Function> getFunction(jsi::Runtime & rt, std::shared_ptr<reanimated::FrozenObject> frozenObj);
</s> add public:
std::shared_ptr<jsi::Function> getFunction(
jsi::Runtime &rt,
std::shared_ptr<reanimated::FrozenObject> frozenObj); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/EventHandlerRegistry.h |
keep keep keep keep replace keep keep keep replace | <mask> public:
<mask> void registerEventHandler(std::shared_ptr<WorkletEventHandler> eventHandler);
<mask> void unregisterEventHandler(unsigned long id);
<mask>
<mask> void processEvent(jsi::Runtime &rt, std::string eventName, std::string eventPayload);
<mask> bool isAnyHandlerWaitingForEvent(std::string eventName);
<mask> };
<mask>
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove public:
</s> add public: </s> remove private:
</s> add UpdaterFunction updaterFunction;
private: </s> remove private:
</s> add UpdaterFunction updaterFunction;
private: </s> remove jsi::Value getViewProp(jsi::Runtime &rt, const jsi::Value &viewTag, const jsi::Value &propName, const jsi::Value &callback) override;
</s> add jsi::Value enableLayoutAnimations(jsi::Runtime &rt, const jsi::Value &config)
override; </s> remove jsi::Value getViewProp(jsi::Runtime &rt, const jsi::Value &viewTag, const jsi::Value &propName, const jsi::Value &callback) override;
</s> add jsi::Value enableLayoutAnimations(jsi::Runtime &rt, const jsi::Value &config)
override; | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/EventHandlerRegistry.h |
keep keep replace replace keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include <vector>
<mask> #include <unordered_map>
<mask> #include <jsi/jsi.h>
<mask>
<mask> using namespace facebook;
<mask>
<mask> namespace reanimated {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include <memory>
#include <unordered_map>
#include <vector> </s> add #include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "RuntimeManager.h"
#include "SharedParent.h"
#include "WorkletsCache.h" </s> add #include <stdio.h>
#include <memory>
#include <vector>
#include "NativeReanimatedModule.h"
#include "ShareableValue.h" </s> remove #include "SharedParent.h"
</s> add </s> remove #include "SharedParent.h"
</s> add </s> remove #include <jsi/jsi.h>
#include <mutex>
</s> add #include <unordered_map>
#include <vector> | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/MapperRegistry.h |
keep keep add keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include <jsi/jsi.h>
<mask>
<mask> using namespace facebook;
<mask>
<mask> namespace reanimated {
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/MapperRegistry.h |
keep keep keep keep replace keep keep keep keep keep | <mask> std::vector<std::shared_ptr<Mapper>> sortedMappers;
<mask> void updateOrder();
<mask> bool updatedSinceLastExecute = false;
<mask>
<mask> public:
<mask> void startMapper(std::shared_ptr<Mapper> mapper);
<mask> void stopMapper(unsigned long id);
<mask>
<mask> void execute(jsi::Runtime &rt);
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove public:
Mapper(NativeReanimatedModule *module,
unsigned long id,
std::shared_ptr<jsi::Function> mapper,
std::vector<std::shared_ptr<MutableValue>> inputs,
std::vector<std::shared_ptr<MutableValue>> outputs);
</s> add public:
Mapper(
NativeReanimatedModule *module,
unsigned long id,
std::shared_ptr<jsi::Function> mapper,
std::vector<std::shared_ptr<MutableValue>> inputs,
std::vector<std::shared_ptr<MutableValue>> outputs); </s> remove void processEvent(jsi::Runtime &rt, std::string eventName, std::string eventPayload);
</s> add void processEvent(
jsi::Runtime &rt,
std::string eventName,
std::string eventPayload); </s> remove public:
</s> add public: </s> remove }
</s> add } // namespace reanimated </s> remove for (auto & mapper : sortedMappers) {
</s> add for (auto &mapper : sortedMappers) { </s> remove public:
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/MapperRegistry.h |
keep keep keep keep replace | <mask>
<mask> bool needRunOnRender();
<mask> };
<mask>
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove }
</s> add } // namespace reanimated </s> remove }
</s> add } // namespace reanimated </s> remove inline bool ValueWrapper::asBoolean(const std::unique_ptr<ValueWrapper>& valueContainer) {
return static_cast<BooleanValueWrapper*>(valueContainer.get())->value;
};
inline double ValueWrapper::asNumber(const std::unique_ptr<ValueWrapper>& valueContainer) {
return static_cast<NumberValueWrapper*>(valueContainer.get())->value;
};
</s> add inline bool ValueWrapper::asBoolean(
const std::unique_ptr<ValueWrapper> &valueContainer) {
return static_cast<BooleanValueWrapper *>(valueContainer.get())->value;
} </s> remove bool NativeReanimatedModule::isAnyHandlerWaitingForEvent(std::string eventName) {
</s> add bool NativeReanimatedModule::isAnyHandlerWaitingForEvent(
std::string eventName) { </s> remove public:
bool raise() {
if (getError()->handled) {
return false;
}
this->getScheduler()->scheduleOnUI([this]() mutable {
this->raiseSpec();
});
return true;
</s> add public:
bool raise() {
if (getError()->handled) {
return false; </s> remove public:
BooleanValueWrapper(const bool _value)
: ValueWrapper(ValueType::BoolType), value(_value) {};
</s> add public:
explicit BooleanValueWrapper(const bool _value)
: ValueWrapper(ValueType::BoolType), value(_value) {} | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/MapperRegistry.h |
keep keep replace replace keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include <stdio.h>
<mask> #include <unordered_map>
<mask> #include <jsi/jsi.h>
<mask> #include <memory>
<mask>
<mask> namespace reanimated
<mask> {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include <jsi/jsi.h> </s> add #include <memory>
#include <unordered_map>
#include <vector> </s> add #include <stdio.h>
#include <memory>
#include <vector>
#include "NativeReanimatedModule.h"
#include "ShareableValue.h" </s> add #include <stdio.h> </s> add #include <ReactCommon/CallInvoker.h>
#include <jsi/jsi.h>
#include <memory> </s> add #include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "RuntimeManager.h"
#include "SharedParent.h"
#include "WorkletsCache.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/WorkletsCache.h |
keep add keep keep keep keep keep | <mask>
<mask> #include <jsi/jsi.h>
<mask> #include <memory>
<mask> #include <unordered_map>
<mask>
<mask> namespace reanimated {
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include <stdio.h>
#include <unordered_map>
</s> add </s> remove namespace reanimated
{
</s> add namespace reanimated { </s> add #include <memory>
#include <unordered_map>
#include <vector> </s> add #include <unordered_map>
#include <vector> </s> add #include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "RuntimeManager.h"
#include "SharedParent.h"
#include "WorkletsCache.h" </s> add #include <ReactCommon/CallInvoker.h>
#include <jsi/jsi.h>
#include <memory> | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/WorkletsCache.h |
keep add keep keep keep keep | <mask> #include <stdio.h>
<mask> #include <memory>
<mask>
<mask> namespace reanimated {
<mask>
<mask> using namespace facebook;
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include <unordered_map>
#include <vector> </s> add #include <stdio.h>
#include <memory>
#include <vector>
#include "NativeReanimatedModule.h"
#include "ShareableValue.h" </s> add #include <stdio.h>
#include <memory>
#include <vector>
#include "NativeReanimatedModule.h"
#include "ShareableValue.h" </s> remove #include "ShareableValue.h"
#include "NativeReanimatedModule.h"
#include <stdio.h>
</s> add </s> remove #include "ShareableValue.h"
#include "NativeReanimatedModule.h"
#include <stdio.h>
</s> add </s> remove namespace reanimated
{
</s> add namespace reanimated { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/WorkletsCache.h |
keep keep keep keep replace replace keep keep keep keep keep | <mask> #include <unordered_map>
<mask> #include <jsi/jsi.h>
<mask> #include <memory>
<mask>
<mask> namespace reanimated
<mask> {
<mask>
<mask> using namespace facebook;
<mask>
<mask> class FrozenObject;
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include <memory>
#include <unordered_map>
#include <vector> </s> add #include <unordered_map>
#include <vector> </s> add #include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "RuntimeManager.h"
#include "SharedParent.h"
#include "WorkletsCache.h" </s> add #include <unordered_map> </s> add #include <stdio.h>
#include <memory>
#include <vector>
#include "NativeReanimatedModule.h"
#include "ShareableValue.h" </s> remove #include <jsi/jsi.h>
#include <mutex>
</s> add #include <unordered_map>
#include <vector> | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/WorkletsCache.h |
keep keep keep keep replace keep keep keep keep keep keep keep keep replace replace keep | <mask>
<mask> class FrozenObject;
<mask>
<mask> class WorkletsCache {
<mask> private:
<mask> std::unordered_map<long long, std::shared_ptr<jsi::Function>> worklets;
<mask> public:
<mask> std::shared_ptr<jsi::Function> getFunction(jsi::Runtime & rt, std::shared_ptr<reanimated::FrozenObject> frozenObj);
<mask> };
<mask>
<mask> class WorkletsCache {
<mask> private:
<mask> std::unordered_map<long long, std::shared_ptr<jsi::Function>> worklets;
<mask> public:
<mask> std::shared_ptr<jsi::Function> getFunction(jsi::Runtime & rt, std::shared_ptr<reanimated::FrozenObject> frozenObj);
<mask> };
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove std::map<std::string, std::unordered_map<unsigned long, std::shared_ptr<WorkletEventHandler>>> eventMappings;
</s> add std::map<
std::string,
std::unordered_map<unsigned long, std::shared_ptr<WorkletEventHandler>>>
eventMappings; </s> remove public:
RemoteObjectWrapper(const std::shared_ptr<RemoteObject> & _value)
: ValueWrapper(ValueType::RemoteObjectType), value(_value) {};
</s> add public:
explicit RemoteObjectWrapper(const std::shared_ptr<RemoteObject> &_value)
: ValueWrapper(ValueType::RemoteObjectType), value(_value) {} </s> remove public:
FrozenObjectWrapper(const std::shared_ptr<FrozenObject> & _value)
: ValueWrapper(ValueType::FrozenObjectType), value(_value) {};
</s> add public:
explicit FrozenObjectWrapper(const std::shared_ptr<FrozenObject> &_value)
: ValueWrapper(ValueType::FrozenObjectType), value(_value) {} </s> remove public:
StringValueWrapper(const std::string & _value)
: ValueWrapper(ValueType::StringType), value(_value) {};
</s> add public:
explicit StringValueWrapper(const std::string &_value)
: ValueWrapper(ValueType::StringType), value(_value) {} </s> remove public:
HostFunctionWrapper(const std::shared_ptr<HostFunctionHandler> & _value)
: ValueWrapper(ValueType::HostFunctionType), value(_value) {};
</s> add public:
explicit HostFunctionWrapper(
const std::shared_ptr<HostFunctionHandler> &_value)
: ValueWrapper(ValueType::HostFunctionType), value(_value) {} | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/Registries/WorkletsCache.h |
keep keep replace replace replace keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include "WorkletsCache.h"
<mask> #include "SharedParent.h"
<mask> #include "RuntimeManager.h"
<mask> #include <jsi/jsi.h>
<mask>
<mask> using namespace facebook;
<mask>
<mask> namespace reanimated {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "RuntimeManager.h"
#include "SharedParent.h"
#include "WorkletsCache.h" </s> remove #include "SharedParent.h"
</s> add </s> remove #include "SharedParent.h"
</s> add </s> add #include <memory>
#include <utility>
#include "SharedParent.h" </s> add #include <memory>
#include <utility>
#include "SharedParent.h" </s> remove #include <string>
#include <mutex>
#include <unordered_map>
#include <jsi/jsi.h>
</s> add #include "SharedParent.h"
#include "ValueWrapper.h"
#include "WorkletsCache.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/FrozenObject.h |
keep keep add keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include <jsi/jsi.h>
<mask>
<mask> using namespace facebook;
<mask>
<mask> namespace reanimated {
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/FrozenObject.h |
keep keep keep keep replace replace replace keep replace keep keep keep keep | <mask> namespace reanimated {
<mask>
<mask> class FrozenObject : public jsi::HostObject {
<mask> friend WorkletsCache;
<mask> friend void extractMutables(jsi::Runtime &rt,
<mask> std::shared_ptr<ShareableValue> sv,
<mask> std::vector<std::shared_ptr<MutableValue>> &res);
<mask>
<mask> private:
<mask> std::unordered_map<std::string, std::shared_ptr<ShareableValue>> map;
<mask>
<mask> public:
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove class ShareableValue: public std::enable_shared_from_this<ShareableValue>, public StoreUser {
friend WorkletsCache;
friend FrozenObject;
friend void extractMutables(jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res);
private:
</s> add class ShareableValue : public std::enable_shared_from_this<ShareableValue>,
public StoreUser {
friend WorkletsCache;
friend FrozenObject;
friend LayoutAnimationsProxy;
friend void extractMutables(
jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res);
private: </s> add std::vector<std::string> namesOrder; </s> remove class MutableValueSetterProxy: public jsi::HostObject {
private:
</s> add class MutableValueSetterProxy : public jsi::HostObject {
private: </s> remove class MutableValueSetterProxy: public jsi::HostObject {
private:
</s> add class MutableValueSetterProxy : public jsi::HostObject {
private: </s> remove class MutableValue : public jsi::HostObject, public std::enable_shared_from_this<MutableValue>, public StoreUser {
private:
</s> add class MutableValue : public jsi::HostObject,
public std::enable_shared_from_this<MutableValue>,
public StoreUser {
private: | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/FrozenObject.h |
keep keep keep add keep keep keep keep keep keep | <mask> std::vector<std::shared_ptr<MutableValue>> &res);
<mask>
<mask> private:
<mask> std::unordered_map<std::string, std::shared_ptr<ShareableValue>> map;
<mask>
<mask> public:
<mask> FrozenObject(
<mask> jsi::Runtime &rt,
<mask> const jsi::Object &object,
<mask> RuntimeManager *runtimeManager);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove private:
</s> add private: </s> remove public:
FrozenObject(jsi::Runtime &rt, const jsi::Object &object, RuntimeManager *runtimeManager);
</s> add public:
FrozenObject(
jsi::Runtime &rt,
const jsi::Object &object,
RuntimeManager *runtimeManager); </s> remove friend void extractMutables(jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res);
</s> add friend void extractMutables(
jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res); </s> remove class ShareableValue: public std::enable_shared_from_this<ShareableValue>, public StoreUser {
friend WorkletsCache;
friend FrozenObject;
friend void extractMutables(jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res);
private:
</s> add class ShareableValue : public std::enable_shared_from_this<ShareableValue>,
public StoreUser {
friend WorkletsCache;
friend FrozenObject;
friend LayoutAnimationsProxy;
friend void extractMutables(
jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res);
private: </s> remove public:
</s> add public: </s> remove class RemoteObject: public jsi::HostObject, public StoreUser {
private:
</s> add class RemoteObject : public jsi::HostObject, public StoreUser {
private: | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/FrozenObject.h |
keep keep keep keep replace replace replace keep keep keep keep replace | <mask>
<mask> private:
<mask> std::unordered_map<std::string, std::shared_ptr<ShareableValue>> map;
<mask>
<mask> public:
<mask>
<mask> FrozenObject(jsi::Runtime &rt, const jsi::Object &object, RuntimeManager *runtimeManager);
<mask> jsi::Object shallowClone(jsi::Runtime &rt);
<mask> bool containsHostFunction = false;
<mask> };
<mask>
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove private:
</s> add private: </s> add std::vector<std::string> namesOrder; </s> remove RemoteObject(jsi::Runtime &rt, jsi::Object &object, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s):
StoreUser(s), initializer(std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add RemoteObject(
jsi::Runtime &rt,
const jsi::Object &object,
RuntimeManager *runtimeManager,
std::shared_ptr<Scheduler> s)
: StoreUser(s, *runtimeManager),
initializer(
std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove public:
</s> add public: </s> remove friend void extractMutables(jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res);
</s> add friend void extractMutables(
jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/FrozenObject.h |
keep keep add keep keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include <jsi/jsi.h>
<mask>
<mask> namespace reanimated {
<mask>
<mask> struct HostFunctionHandler : jsi::HostObject {
<mask> std::shared_ptr<jsi::Function> pureFunction;
<mask> std::string functionName;
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove jsi::HostObject a;
</s> add jsi::HostObject a;
</s> add #include "Scheduler.h" </s> remove #include "SharedParent.h"
</s> add </s> remove #include "SharedParent.h"
</s> add </s> remove #include <stdio.h>
#include <unordered_map>
</s> add </s> remove #include <vector>
#include <unordered_map>
</s> add | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/HostFunctionHandler.h |
keep keep keep keep replace replace keep keep keep keep keep | <mask> struct HostFunctionHandler : jsi::HostObject {
<mask> std::shared_ptr<jsi::Function> pureFunction;
<mask> std::string functionName;
<mask> jsi::Runtime *hostRuntime;
<mask> jsi::HostObject a;
<mask>
<mask> HostFunctionHandler(std::shared_ptr<jsi::Function> f, jsi::Runtime &rt) {
<mask> pureFunction = f;
<mask> functionName = f->getProperty(rt, "name").asString(rt).utf8(rt);
<mask> hostRuntime = &rt;
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include <memory>
#include <string>
using namespace facebook; </s> remove auto jsThis = std::make_shared<jsi::Object>(frozenObject->shallowClone(*runtimeManager->runtime));
std::shared_ptr<jsi::Function> funPtr(runtimeManager->workletsCache->getFunction(rt, frozenObject));
</s> add auto jsThis = std::make_shared<jsi::Object>(
frozenObject->shallowClone(*runtimeManager->runtime));
std::shared_ptr<jsi::Function> funPtr(
runtimeManager->workletsCache->getFunction(rt, frozenObject)); </s> remove auto jsThis = std::make_shared<jsi::Object>(frozenObject->shallowClone(*runtimeManager->runtime));
std::shared_ptr<jsi::Function> funPtr(runtimeManager->workletsCache->getFunction(rt, frozenObject));
</s> add auto jsThis = std::make_shared<jsi::Object>(
frozenObject->shallowClone(*runtimeManager->runtime));
std::shared_ptr<jsi::Function> funPtr(
runtimeManager->workletsCache->getFunction(rt, frozenObject)); </s> remove class MutableValueSetterProxy: public jsi::HostObject {
private:
</s> add class MutableValueSetterProxy : public jsi::HostObject {
private: </s> remove class MutableValueSetterProxy: public jsi::HostObject {
private:
</s> add class MutableValueSetterProxy : public jsi::HostObject {
private: </s> remove namespace reanimated
{
</s> add namespace reanimated { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/HostFunctionHandler.h |
keep keep keep keep replace | <mask> return pureFunction;
<mask> }
<mask> };
<mask>
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove jsi::HostObject a;
</s> add jsi::HostObject a;
</s> remove private static final Operator ADD = new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return x + y;
}
};
private static final Operator SUB = new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return x - y;
}
};
private static final Operator MULTIPLY= new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return x * y;
}
};
private static final Operator DIVIDE = new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return x / y;
}
};
private static final Operator POW = new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return Math.pow(x, y);
}
};
private static final Operator MODULO = new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return ((x % y) + y) % y;
}
};
private static final Operator SQRT = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.sqrt(x);
}
};
private static final Operator LOG = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.log(x);
}
};
private static final Operator SIN = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.sin(x);
}
};
private static final Operator COS = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.cos(x);
}
};
private static final Operator TAN = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.tan(x);
}
};
private static final Operator ACOS = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.acos(x);
}
};
private static final Operator ASIN = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.asin(x);
}
};
private static final Operator ATAN = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.atan(x);
}
};
private static final Operator EXP = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.exp(x);
}
};
private static final Operator ROUND = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.round(x);
}
};
private static final Operator ABS = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.abs(x);
}
};
private static final Operator FLOOR = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.floor(x);
}
};
private static final Operator CEIL = new SingleOperator() {
@Override
public double eval(Double x) {
return Math.ceil(x);
}
};
private static final Operator MIN = new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return Math.min(x, y);
}
};
private static final Operator MAX = new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return Math.max(x, y);
}
};
</s> add private static final Operator ADD =
new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return x + y;
}
};
private static final Operator SUB =
new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return x - y;
}
};
private static final Operator MULTIPLY =
new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return x * y;
}
};
private static final Operator DIVIDE =
new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return x / y;
}
};
private static final Operator POW =
new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return Math.pow(x, y);
}
};
private static final Operator MODULO =
new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return ((x % y) + y) % y;
}
};
private static final Operator SQRT =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.sqrt(x);
}
};
private static final Operator LOG =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.log(x);
}
};
private static final Operator SIN =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.sin(x);
}
};
private static final Operator COS =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.cos(x);
}
};
private static final Operator TAN =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.tan(x);
}
};
private static final Operator ACOS =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.acos(x);
}
};
private static final Operator ASIN =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.asin(x);
}
};
private static final Operator ATAN =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.atan(x);
}
};
private static final Operator EXP =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.exp(x);
}
};
private static final Operator ROUND =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.round(x);
}
};
private static final Operator ABS =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.abs(x);
}
};
private static final Operator FLOOR =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.floor(x);
}
};
private static final Operator CEIL =
new SingleOperator() {
@Override
public double eval(Double x) {
return Math.ceil(x);
}
};
private static final Operator MIN =
new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return Math.min(x, y);
}
};
private static final Operator MAX =
new ReduceOperator() {
@Override
public double reduce(Double x, Double y) {
return Math.max(x, y);
}
}; </s> remove inline const HostFunctionWrapper* ValueWrapper::asHostFunctionWrapper(const std::unique_ptr<ValueWrapper>& valueContainer) {
return static_cast<HostFunctionWrapper*>(valueContainer.get());
};
</s> add inline const std::shared_ptr<MutableValue> &ValueWrapper::asMutableValue(
const std::unique_ptr<ValueWrapper> &valueContainer) {
return static_cast<MutableValueWrapper *>(valueContainer.get())->value;
} </s> remove private static final Operator LESS_THAN = new CompOperator() {
@Override
public boolean eval(Double x, Double y) {
if (x == null || y == null) {
return false;
}
return x < y;
}
};
private static final Operator EQ = new CompOperator() {
@Override
public boolean eval(Double x, Double y) {
if (x == null || y == null) {
return x == y;
}
return x.doubleValue() == y.doubleValue();
}
};
private static final Operator GREATER_THAN = new CompOperator() {
@Override
public boolean eval(Double x, Double y) {
if (x == null || y == null) {
return false;
}
return x > y;
}
};
private static final Operator LESS_OR_EQ = new CompOperator() {
@Override
public boolean eval(Double x, Double y) {
return x <= y;
}
};
private static final Operator GREATER_OR_EQ = new CompOperator() {
@Override
public boolean eval(Double x, Double y) {
return x >= y;
}
};
private static final Operator NEQ = new CompOperator() {
@Override
public boolean eval(Double x, Double y) {
if (x == null || y == null) {
return x == y;
}
return x.doubleValue() != y.doubleValue();
}
};
</s> add private static final Operator LESS_THAN =
new CompOperator() {
@Override
public boolean eval(Double x, Double y) {
if (x == null || y == null) {
return false;
}
return x < y;
}
};
private static final Operator EQ =
new CompOperator() {
@Override
public boolean eval(Double x, Double y) {
if (x == null || y == null) {
return x == y;
}
return x.doubleValue() == y.doubleValue();
}
};
private static final Operator GREATER_THAN =
new CompOperator() {
@Override
public boolean eval(Double x, Double y) {
if (x == null || y == null) {
return false;
}
return x > y;
}
};
private static final Operator LESS_OR_EQ =
new CompOperator() {
@Override
public boolean eval(Double x, Double y) {
return x <= y;
}
};
private static final Operator GREATER_OR_EQ =
new CompOperator() {
@Override
public boolean eval(Double x, Double y) {
return x >= y;
}
};
private static final Operator NEQ =
new CompOperator() {
@Override
public boolean eval(Double x, Double y) {
if (x == null || y == null) {
return x == y;
}
return x.doubleValue() != y.doubleValue();
}
}; </s> remove return jsi::Function::createFromHostFunction(rt, jsi::PropNameID::forAscii(rt, "_workletFunction"), 0, clb);
</s> add return jsi::Function::createFromHostFunction(
rt, jsi::PropNameID::forAscii(rt, "_workletFunction"), 0, clb); </s> remove }
</s> add } // namespace reanimated | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/HostFunctionHandler.h |
keep keep replace replace replace keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include "SharedParent.h"
<mask> #include "MutableValueSetterProxy.h"
<mask> #include <mutex>
<mask> #include <jsi/jsi.h>
<mask> #include <map>
<mask> #include "JSIStoreValueUser.h"
<mask> #include "RuntimeManager.h"
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include <memory>
#include <mutex>
#include <vector> </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
#include "ValueWrapper.h"
</s> add #include <jsi/jsi.h>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector> </s> add #include "LayoutAnimationsProxy.h"
#include "MutableValueSetterProxy.h" </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
</s> add </s> remove #include <vector>
</s> add #include <jsi/jsi.h> </s> remove #include <string>
#include <mutex>
#include <unordered_map>
#include <jsi/jsi.h>
</s> add #include "SharedParent.h"
#include "ValueWrapper.h"
#include "WorkletsCache.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValue.h |
keep keep keep add keep keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include <jsi/jsi.h>
<mask> #include <map>
<mask> #include "JSIStoreValueUser.h"
<mask> #include "LayoutAnimationsProxy.h"
<mask> #include "MutableValueSetterProxy.h"
<mask> #include "RuntimeManager.h"
<mask> #include "SharedParent.h"
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include "SharedParent.h"
#include "MutableValueSetterProxy.h"
#include <mutex>
</s> add </s> add #include "LayoutAnimationsProxy.h"
#include "MutableValueSetterProxy.h" </s> add #include "SharedParent.h" </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
#include "ValueWrapper.h"
</s> add #include <jsi/jsi.h>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector> </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
</s> add </s> remove #include <vector>
</s> add #include <jsi/jsi.h> | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValue.h |
keep keep keep add keep keep keep keep | <mask> #include <memory>
<mask> #include <mutex>
<mask> #include <vector>
<mask> #include "JSIStoreValueUser.h"
<mask> #include "RuntimeManager.h"
<mask> #include "SharedParent.h"
<mask>
<mask> using namespace facebook;
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include "SharedParent.h"
</s> add #include <memory>
#include <vector>
</s> add #include <memory>
#include <mutex>
#include <vector> </s> remove #include <string>
#include <mutex>
#include <unordered_map>
#include <jsi/jsi.h>
</s> add #include "SharedParent.h"
#include "ValueWrapper.h"
#include "WorkletsCache.h" </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
#include "ValueWrapper.h"
</s> add #include <jsi/jsi.h>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector> </s> add #include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "RuntimeManager.h"
#include "SharedParent.h"
#include "WorkletsCache.h" </s> add #include <unordered_map>
#include <vector> | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValue.h |
keep keep keep add keep keep keep keep | <mask> #include "JSIStoreValueUser.h"
<mask> #include "LayoutAnimationsProxy.h"
<mask> #include "MutableValueSetterProxy.h"
<mask> #include "RuntimeManager.h"
<mask>
<mask> using namespace facebook;
<mask>
<mask> namespace reanimated {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include "LayoutAnimationsProxy.h"
#include "MutableValueSetterProxy.h" </s> remove #include <string>
#include <mutex>
#include <unordered_map>
#include <jsi/jsi.h>
</s> add #include "SharedParent.h"
#include "ValueWrapper.h"
#include "WorkletsCache.h" </s> remove #include "SharedParent.h"
#include "MutableValue.h"
</s> add </s> add #include "MutableValue.h"
#include "SharedParent.h" </s> remove #include "SharedParent.h"
#include "MutableValue.h"
</s> add </s> add #include "MutableValue.h"
#include "SharedParent.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValue.h |
keep keep keep keep replace replace keep keep keep keep keep | <mask> using namespace facebook;
<mask>
<mask> namespace reanimated {
<mask>
<mask> class MutableValue : public jsi::HostObject, public std::enable_shared_from_this<MutableValue>, public StoreUser {
<mask> private:
<mask> friend MutableValueSetterProxy;
<mask> RuntimeManager *runtimeManager;
<mask> std::mutex readWriteMutex;
<mask> std::shared_ptr<ShareableValue> value;
<mask> std::weak_ptr<jsi::Value> animation;
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add friend LayoutAnimationsProxy; </s> add friend LayoutAnimationsProxy; </s> remove class ShareableValue: public std::enable_shared_from_this<ShareableValue>, public StoreUser {
friend WorkletsCache;
friend FrozenObject;
friend void extractMutables(jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res);
private:
</s> add class ShareableValue : public std::enable_shared_from_this<ShareableValue>,
public StoreUser {
friend WorkletsCache;
friend FrozenObject;
friend LayoutAnimationsProxy;
friend void extractMutables(
jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res);
private: </s> remove class RemoteObject: public jsi::HostObject, public StoreUser {
private:
</s> add class RemoteObject : public jsi::HostObject, public StoreUser {
private: </s> remove class MutableValueSetterProxy: public jsi::HostObject {
private:
</s> add class MutableValueSetterProxy : public jsi::HostObject {
private: </s> remove class MutableValueSetterProxy: public jsi::HostObject {
private:
</s> add class MutableValueSetterProxy : public jsi::HostObject {
private: | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValue.h |
keep keep add keep keep keep keep keep | <mask> private:
<mask> friend MutableValueSetterProxy;
<mask> RuntimeManager *runtimeManager;
<mask> std::mutex readWriteMutex;
<mask> std::shared_ptr<ShareableValue> value;
<mask> std::weak_ptr<jsi::Value> animation;
<mask> std::map<unsigned long, std::function<void()>> listeners;
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add friend LayoutAnimationsProxy; </s> remove class MutableValue : public jsi::HostObject, public std::enable_shared_from_this<MutableValue>, public StoreUser {
private:
</s> add class MutableValue : public jsi::HostObject,
public std::enable_shared_from_this<MutableValue>,
public StoreUser {
private: </s> remove class ShareableValue: public std::enable_shared_from_this<ShareableValue>, public StoreUser {
friend WorkletsCache;
friend FrozenObject;
friend void extractMutables(jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res);
private:
</s> add class ShareableValue : public std::enable_shared_from_this<ShareableValue>,
public StoreUser {
friend WorkletsCache;
friend FrozenObject;
friend LayoutAnimationsProxy;
friend void extractMutables(
jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res);
private: </s> remove std::map<std::string, std::unordered_map<unsigned long, std::shared_ptr<WorkletEventHandler>>> eventMappings;
</s> add std::map<
std::string,
std::unordered_map<unsigned long, std::shared_ptr<WorkletEventHandler>>>
eventMappings; </s> remove private:
</s> add private: </s> remove public:
</s> add public: | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValue.h |
keep keep keep keep replace replace keep keep keep keep keep | <mask>
<mask> void setValue(jsi::Runtime &rt, const jsi::Value &newValue);
<mask> jsi::Value getValue(jsi::Runtime &rt);
<mask>
<mask> public:
<mask> MutableValue(jsi::Runtime &rt, const jsi::Value &initial, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s);
<mask>
<mask> public:
<mask> void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
<mask> jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &name);
<mask> std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove public:
MutableValue(jsi::Runtime &rt, const jsi::Value &initial, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s);
</s> add public:
MutableValue(
jsi::Runtime &rt,
const jsi::Value &initial,
RuntimeManager *runtimeManager,
std::shared_ptr<Scheduler> s); </s> remove public:
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove public:
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove RemoteObject(jsi::Runtime &rt, jsi::Object &object, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s):
StoreUser(s), initializer(std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add RemoteObject(
jsi::Runtime &rt,
const jsi::Object &object,
RuntimeManager *runtimeManager,
std::shared_ptr<Scheduler> s)
: StoreUser(s, *runtimeManager),
initializer(
std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove public:
</s> add public: </s> remove unsigned long addListener(unsigned long listenerId, std::function<void()> listener);
</s> add unsigned long addListener(
unsigned long listenerId,
std::function<void()> listener); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValue.h |
keep keep keep replace replace keep keep replace keep keep | <mask> public:
<mask> MutableValue(jsi::Runtime &rt, const jsi::Value &initial, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s);
<mask>
<mask> public:
<mask> void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
<mask> jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &name);
<mask> std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt);
<mask> unsigned long addListener(unsigned long listenerId, std::function<void()> listener);
<mask> void removeListener(unsigned long listenerId);
<mask> };
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove public:
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove unsigned long addListener(unsigned long listenerId, std::function<void()> listener);
</s> add unsigned long addListener(
unsigned long listenerId,
std::function<void()> listener); </s> remove public:
MutableValue(jsi::Runtime &rt, const jsi::Value &initial, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s);
</s> add public:
MutableValue(
jsi::Runtime &rt,
const jsi::Value &initial,
RuntimeManager *runtimeManager,
std::shared_ptr<Scheduler> s); </s> remove public:
MutableValue(jsi::Runtime &rt, const jsi::Value &initial, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s);
</s> add public:
MutableValue(
jsi::Runtime &rt,
const jsi::Value &initial,
RuntimeManager *runtimeManager,
std::shared_ptr<Scheduler> s); </s> remove RemoteObject(jsi::Runtime &rt, jsi::Object &object, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s):
StoreUser(s), initializer(std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add RemoteObject(
jsi::Runtime &rt,
const jsi::Object &object,
RuntimeManager *runtimeManager,
std::shared_ptr<Scheduler> s)
: StoreUser(s, *runtimeManager),
initializer(
std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValue.h |
keep keep keep keep replace | <mask> unsigned long addListener(unsigned long listenerId, std::function<void()> listener);
<mask> void removeListener(unsigned long listenerId);
<mask> };
<mask>
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove }
</s> add } // namespace reanimated </s> remove unsigned long addListener(unsigned long listenerId, std::function<void()> listener);
</s> add unsigned long addListener(
unsigned long listenerId,
std::function<void()> listener); </s> remove unsigned long addListener(unsigned long listenerId, std::function<void()> listener);
</s> add unsigned long addListener(
unsigned long listenerId,
std::function<void()> listener); </s> remove public:
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove public:
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove MutableValue::MutableValue(jsi::Runtime &rt, const jsi::Value &initial, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s):
StoreUser(s), runtimeManager(runtimeManager), value(ShareableValue::adapt(rt, initial, runtimeManager)) {
}
unsigned long int MutableValue::addListener(unsigned long id, std::function<void ()> listener) {
</s> add MutableValue::MutableValue(
jsi::Runtime &rt,
const jsi::Value &initial,
RuntimeManager *runtimeManager,
std::shared_ptr<Scheduler> s)
: StoreUser(s, *runtimeManager),
runtimeManager(runtimeManager),
value(ShareableValue::adapt(rt, initial, runtimeManager)) {}
unsigned long int MutableValue::addListener(
unsigned long id,
std::function<void()> listener) { | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValue.h |
keep keep replace keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include "SharedParent.h"
<mask> #include <jsi/jsi.h>
<mask>
<mask> using namespace facebook;
<mask>
<mask> namespace reanimated {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include "SharedParent.h"
</s> add </s> add #include <memory>
#include <utility>
#include "SharedParent.h" </s> add #include <memory>
#include <utility>
#include "SharedParent.h" </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
#include "RuntimeManager.h"
</s> add </s> add #include <memory>
#include <string>
#include <unordered_map>
#include <vector>
#include "RuntimeManager.h"
#include "SharedParent.h"
#include "WorkletsCache.h" </s> remove #include <vector>
#include <unordered_map>
</s> add | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValueSetterProxy.h |
keep keep add keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include <jsi/jsi.h>
<mask>
<mask> using namespace facebook;
<mask>
<mask> namespace reanimated {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include "SharedParent.h"
</s> add </s> remove #include "SharedParent.h"
</s> add </s> remove #include <vector>
#include <unordered_map>
</s> add </s> remove #include "ShareableValue.h"
#include "NativeReanimatedModule.h"
#include <stdio.h>
</s> add </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
#include "RuntimeManager.h"
</s> add </s> add #include <memory>
#include <utility>
#include "SharedParent.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValueSetterProxy.h |
keep keep keep replace replace keep keep replace replace replace | <mask>
<mask> namespace reanimated {
<mask>
<mask> class MutableValueSetterProxy: public jsi::HostObject {
<mask> private:
<mask> friend MutableValue;
<mask> std::shared_ptr<MutableValue> mutableValue;
<mask> public:
<mask> MutableValueSetterProxy(std::shared_ptr<MutableValue> mutableValue): mutableValue(std::move(mutableValue)) {}
<mask> void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove class MutableValueSetterProxy: public jsi::HostObject {
private:
</s> add class MutableValueSetterProxy : public jsi::HostObject {
private: </s> remove public:
</s> add public: </s> remove public:
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove public:
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove friend void extractMutables(jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res);
</s> add friend void extractMutables(
jsi::Runtime &rt,
std::shared_ptr<ShareableValue> sv,
std::vector<std::shared_ptr<MutableValue>> &res); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValueSetterProxy.h |
keep keep keep keep replace | <mask> void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
<mask> jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &name);
<mask> };
<mask>
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove public:
MutableValueSetterProxy(std::shared_ptr<MutableValue> mutableValue): mutableValue(std::move(mutableValue)) {}
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
explicit MutableValueSetterProxy(std::shared_ptr<MutableValue> mutableValue)
: mutableValue(std::move(mutableValue)) {}
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove public:
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove public:
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove RemoteObject(jsi::Runtime &rt, jsi::Object &object, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s):
StoreUser(s), initializer(std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add RemoteObject(
jsi::Runtime &rt,
const jsi::Object &object,
RuntimeManager *runtimeManager,
std::shared_ptr<Scheduler> s)
: StoreUser(s, *runtimeManager),
initializer(
std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove unsigned long addListener(unsigned long listenerId, std::function<void()> listener);
</s> add unsigned long addListener(
unsigned long listenerId,
std::function<void()> listener); </s> remove unsigned long addListener(unsigned long listenerId, std::function<void()> listener);
</s> add unsigned long addListener(
unsigned long listenerId,
std::function<void()> listener); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/MutableValueSetterProxy.h |
keep keep replace keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include "SharedParent.h"
<mask> #include "FrozenObject.h"
<mask> #include "JSIStoreValueUser.h"
<mask>
<mask> using namespace facebook;
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include "SharedParent.h" </s> remove #include "SharedParent.h"
</s> add </s> remove #include "SharedParent.h"
</s> add </s> add #include <memory>
#include <utility>
#include "SharedParent.h" </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
#include "RuntimeManager.h"
</s> add </s> add #include <memory>
#include <utility>
#include "SharedParent.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/RemoteObject.h |
keep keep add keep keep keep keep | <mask>
<mask> #include "FrozenObject.h"
<mask> #include "JSIStoreValueUser.h"
<mask>
<mask> using namespace facebook;
<mask>
<mask> namespace reanimated {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include "Mapper.h"
#include "MapperRegistry.h"
#include "ReanimatedHiddenHeaders.h"
#include "RuntimeDecorator.h"
#include "ShareableValue.h"
#include "WorkletEventHandler.h" </s> add #include "ShareableValue.h" </s> remove #include "SharedParent.h"
</s> add #include <memory>
#include <vector>
</s> remove #include <thread>
</s> add </s> add #include "SharedParent.h" </s> add #include "ShareableValue.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/RemoteObject.h |
keep replace replace keep keep replace keep keep keep keep | <mask>
<mask> class RemoteObject: public jsi::HostObject, public StoreUser {
<mask> private:
<mask> std::weak_ptr<jsi::Value> backing;
<mask> std::unique_ptr<FrozenObject> initializer;
<mask> public:
<mask> void maybeInitializeOnWorkletRuntime(jsi::Runtime &rt);
<mask> RemoteObject(jsi::Runtime &rt, jsi::Object &object, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s):
<mask> StoreUser(s), initializer(std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
<mask> void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove RemoteObject(jsi::Runtime &rt, jsi::Object &object, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s):
StoreUser(s), initializer(std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add RemoteObject(
jsi::Runtime &rt,
const jsi::Object &object,
RuntimeManager *runtimeManager,
std::shared_ptr<Scheduler> s)
: StoreUser(s, *runtimeManager),
initializer(
std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove public:
MutableValue(jsi::Runtime &rt, const jsi::Value &initial, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s);
</s> add public:
MutableValue(
jsi::Runtime &rt,
const jsi::Value &initial,
RuntimeManager *runtimeManager,
std::shared_ptr<Scheduler> s); </s> remove public:
MutableValue(jsi::Runtime &rt, const jsi::Value &initial, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s);
</s> add public:
MutableValue(
jsi::Runtime &rt,
const jsi::Value &initial,
RuntimeManager *runtimeManager,
std::shared_ptr<Scheduler> s); </s> remove public:
MutableValueSetterProxy(std::shared_ptr<MutableValue> mutableValue): mutableValue(std::move(mutableValue)) {}
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
explicit MutableValueSetterProxy(std::shared_ptr<MutableValue> mutableValue)
: mutableValue(std::move(mutableValue)) {}
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); </s> remove public:
void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
</s> add public:
void
set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value); | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/RemoteObject.h |
keep keep keep keep replace replace replace keep keep keep keep replace | <mask> std::weak_ptr<jsi::Value> backing;
<mask> std::unique_ptr<FrozenObject> initializer;
<mask> public:
<mask> void maybeInitializeOnWorkletRuntime(jsi::Runtime &rt);
<mask> RemoteObject(jsi::Runtime &rt, jsi::Object &object, RuntimeManager *runtimeManager, std::shared_ptr<Scheduler> s):
<mask> StoreUser(s), initializer(std::make_unique<FrozenObject>(rt, object, runtimeManager)) {}
<mask> void set(jsi::Runtime &rt, const jsi::PropNameID &name, const jsi::Value &value);
<mask> jsi::Value get(jsi::Runtime &rt, const jsi::PropNameID &name);
<mask> std::vector<jsi::PropNameID> getPropertyNames(jsi::Runtime &rt);
<mask> };
<mask>
<mask> }
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/RemoteObject.h |
keep keep replace keep keep keep keep keep | <mask> #pragma once
<mask>
<mask> #include "ShareableValue.h"
<mask> #include "ErrorHandler.h"
<mask> #include "Scheduler.h"
<mask> #include "WorkletsCache.h"
<mask> #include <jsi/jsi.h>
<mask> #include <memory>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include "JSIStoreValueUser.h"
#include "RuntimeDecorator.h" </s> remove #include <jsi/jsi.h>
#include <memory>
</s> add </s> remove #include "WorkletsCache.h"
#include "SharedParent.h"
#include "ValueWrapper.h"
</s> add #include <jsi/jsi.h>
#include <memory>
#include <mutex>
#include <string>
#include <unordered_map>
#include <vector> </s> remove #include "NativeReanimatedModuleSpec.h"
#include "Scheduler.h"
#include "ErrorHandler.h"
#include "RuntimeDecorator.h"
#include "PlatformDepMethodsHolder.h"
</s> add </s> remove #include "NativeReanimatedModuleSpec.h"
#include "Scheduler.h"
#include "ErrorHandler.h"
#include "RuntimeDecorator.h"
#include "PlatformDepMethodsHolder.h"
</s> add </s> add #include <jsi/jsi.h> | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/RuntimeManager.h |
keep keep keep add keep keep keep keep keep | <mask>
<mask> #include <jsi/jsi.h>
<mask> #include <memory>
<mask> #include "ErrorHandler.h"
<mask> #include "Scheduler.h"
<mask> #include "ShareableValue.h"
<mask> #include "WorkletsCache.h"
<mask>
<mask> namespace reanimated {
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> remove #include <jsi/jsi.h>
#include <memory>
</s> add </s> remove #include "ShareableValue.h"
</s> add #include <jsi/jsi.h>
#include <memory> </s> add #include "ShareableValue.h" </s> remove #include <string>
#include <mutex>
#include <unordered_map>
#include <jsi/jsi.h>
</s> add #include "SharedParent.h"
#include "ValueWrapper.h"
#include "WorkletsCache.h" </s> add #include <unordered_map>
#include <vector> </s> add #include <stdio.h>
#include <memory>
#include <vector>
#include "NativeReanimatedModule.h"
#include "ShareableValue.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/RuntimeManager.h |
keep keep keep add keep keep keep keep keep keep | <mask> #include "ErrorHandler.h"
<mask> #include "JSIStoreValueUser.h"
<mask> #include "RuntimeDecorator.h"
<mask> #include "Scheduler.h"
<mask> #include "WorkletsCache.h"
<mask>
<mask> namespace reanimated {
<mask>
<mask> using namespace facebook;
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include "JSIStoreValueUser.h"
#include "RuntimeDecorator.h" </s> remove #include <jsi/jsi.h>
#include <memory>
</s> add </s> remove #include <string>
#include <mutex>
#include <unordered_map>
#include <jsi/jsi.h>
</s> add #include "SharedParent.h"
#include "ValueWrapper.h"
#include "WorkletsCache.h" </s> add #include "Mapper.h"
#include "MapperRegistry.h"
#include "ReanimatedHiddenHeaders.h"
#include "RuntimeDecorator.h"
#include "ShareableValue.h"
#include "WorkletEventHandler.h" </s> add #include "ErrorHandler.h"
#include "LayoutAnimationsProxy.h"
#include "NativeReanimatedModuleSpec.h"
#include "PlatformDepMethodsHolder.h"
#include "RuntimeDecorator.h" </s> add #include "ErrorHandler.h"
#include "LayoutAnimationsProxy.h"
#include "NativeReanimatedModuleSpec.h"
#include "PlatformDepMethodsHolder.h"
#include "RuntimeDecorator.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/RuntimeManager.h |
keep keep keep keep replace replace keep keep keep keep keep | <mask> #include "ShareableValue.h"
<mask> #include "ErrorHandler.h"
<mask> #include "Scheduler.h"
<mask> #include "WorkletsCache.h"
<mask> #include <jsi/jsi.h>
<mask> #include <memory>
<mask>
<mask> namespace reanimated {
<mask>
<mask> using namespace facebook;
<mask>
</s> [android][ios] Upgrade react-native-reanimated to 2.3.0 (#15475) </s> add #include "ShareableValue.h" </s> add #include "JSIStoreValueUser.h"
#include "RuntimeDecorator.h" </s> remove #include "ShareableValue.h"
</s> add #include <jsi/jsi.h>
#include <memory> </s> add #include <unordered_map>
#include <vector> </s> add #include <stdio.h>
#include <memory>
#include <vector>
#include "NativeReanimatedModule.h"
#include "ShareableValue.h" </s> add #include <stdio.h>
#include <memory>
#include <vector>
#include "NativeReanimatedModule.h"
#include "ShareableValue.h" | https://github.com/expo/expo/commit/c7e4709da8f56cdd1d001e7557a61255a15e62ef | android/expoview/src/main/Common/cpp/headers/SharedItems/RuntimeManager.h |
Subsets and Splits