Update dex builder

This commit is contained in:
LoveSy 2022-03-09 21:04:39 +08:00
parent 724245f2e7
commit fd8e2e4c17
3 changed files with 3 additions and 5 deletions

View File

@ -242,14 +242,12 @@ public:
if (sdk_int <= __ANDROID_API_N__) {
kAccCompileDontBother = 0;
}
if (sdk_int <= __ANDROID_API_M__) {
if (sdk_int == __ANDROID_API_M__) [[unlikely]] {
if (!RETRIEVE_FUNC_SYMBOL(art_interpreter_to_compiled_code_bridge,
"artInterpreterToCompiledCodeBridge")) {
return false;
}
if (sdk_int == __ANDROID_API_M__) [[unlikely]] {
interpreter_entry_point_offset = entry_point_offset - 2 * kPointerSize;
}
}
return true;

@ -1 +1 @@
Subproject commit 8e1672aa6da3bbc151e2fda37c04e528dffae5aa
Subproject commit 77f48fdd795f5e178aeefb6858e3357505e5daba

View File

@ -348,7 +348,7 @@ std::tuple<jclass, jfieldID, jmethodID, jmethodID> BuildDex(JNIEnv *env, jobject
jclass target_class = nullptr;
if (in_memory_class_loader_init) [[unlikely]] {
if (in_memory_class_loader_init) [[likely]] {
auto dex_buffer = JNI_NewDirectByteBuffer(env, const_cast<void *>(image.ptr()),
static_cast<jlong>(image.size()));
auto my_cl = JNI_NewObject(env, in_memory_class_loader, in_memory_class_loader_init,