You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@weex.apache.org by zs...@apache.org on 2019/01/03 12:13:48 UTC
[incubator-weex] 01/02: merge code to master from merge_code_refine
branch
This is an automated email from the ASF dual-hosted git repository.
zshshr pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-weex.git
commit d8ed2804642a83f56953b78754dec056e9089101
Author: zshshr <zh...@gmail.com>
AuthorDate: Thu Jan 3 19:11:03 2019 +0800
merge code to master from merge_code_refine branch
---
WeexSDK.podspec | 4 +
android/sdk/assets/weex-main-jsfm.js | 2 +-
android/sdk/build.gradle | 24 +-
android/sdk/libs/armeabi-v7a/libJavaScriptCore.so | Bin 5534828 -> 5237308 bytes
android/sdk/libs/armeabi-v7a/libWTF.so | Bin 0 -> 472828 bytes
android/sdk/libs/armeabi-v7a/libweexjss.so | Bin 341580 -> 550504 bytes
android/sdk/libs/armeabi/libJavaScriptCore.so | Bin 5534828 -> 5237308 bytes
android/sdk/libs/armeabi/libWTF.so | Bin 0 -> 472828 bytes
android/sdk/libs/armeabi/libweexjss.so | Bin 341580 -> 550504 bytes
android/sdk/libs/x86/libJavaScriptCore.so | Bin 10159504 -> 13729888 bytes
android/sdk/libs/x86/libWTF.so | Bin 0 -> 805056 bytes
android/sdk/libs/x86/libweexjss.so | Bin 1244020 -> 972408 bytes
.../list/template/jni/NativeRenderObjectUtils.java | 2 +-
ios/playground/WeexDemo.xcodeproj/project.pbxproj | 36 +-
ios/playground/WeexDemo/AppDelegate.m | 1 -
ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm | 4 +-
weex_core/CMakeLists.txt | 18 -
weex_core/Source/CMakeLists.txt | 95 +-
weex_core/Source/IPC/Buffering/IPCBuffer.h | 35 -
weex_core/Source/IPC/IPCArguments.h | 52 -
weex_core/Source/IPC/IPCByteArray.h | 30 -
weex_core/Source/IPC/IPCCheck.cpp | 39 -
weex_core/Source/IPC/IPCCheck.h | 38 -
weex_core/Source/IPC/IPCCommunicator.cpp | 384 --
weex_core/Source/IPC/IPCCommunicator.h | 52 -
weex_core/Source/IPC/IPCException.cpp | 54 -
weex_core/Source/IPC/IPCException.h | 38 -
weex_core/Source/IPC/IPCFutexPageQueue.cpp | 213 -
weex_core/Source/IPC/IPCFutexPageQueue.h | 70 -
weex_core/Source/IPC/IPCHandler.cpp | 58 -
weex_core/Source/IPC/IPCHandler.h | 40 -
weex_core/Source/IPC/IPCListener.cpp | 83 -
weex_core/Source/IPC/IPCListener.h | 36 -
weex_core/Source/IPC/IPCLog.h | 34 -
weex_core/Source/IPC/IPCMessageJS.h | 151 -
weex_core/Source/IPC/IPCResult.cpp | 294 -
weex_core/Source/IPC/IPCResult.h | 54 -
weex_core/Source/IPC/IPCSender.cpp | 98 -
weex_core/Source/IPC/IPCSender.h | 37 -
weex_core/Source/IPC/IPCString.h | 29 -
weex_core/Source/IPC/IPCType.h | 51 -
weex_core/Source/IPC/Serializing/IPCSerializer.cpp | 228 -
weex_core/Source/IPC/Serializing/IPCSerializer.h | 48 -
weex_core/Source/IPC/ashmem.c | 100 -
weex_core/Source/IPC/ashmem.h | 59 -
weex_core/Source/IPC/futex.h | 109 -
weex_core/Source/android/base/base64/base64.cpp | 52 -
weex_core/Source/android/base/base64/base64.h | 29 -
.../android/base/base64/modp_base64/modp_b64.cc | 241 -
.../android/base/base64/modp_base64/modp_b64.h | 162 -
.../base/base64/modp_base64/modp_b64_data.h | 301 -
weex_core/Source/android/base/jni/android_jni.cpp | 120 -
weex_core/Source/android/base/jni/android_jni.h | 63 -
.../Source/android/base/jni/scoped_java_ref.cpp | 87 -
weex_core/Source/android/base/jni_type.cpp | 57 -
weex_core/Source/android/base/jni_type.h | 39 -
.../Source/android/base/string/scoped_jstring.h | 2 +-
.../android/base/string/scoped_jstring_utf8.h | 4 +-
.../Source/android/base/string/string_utils.h | 13 +-
.../bridge/multi_process_and_so_initializer.cpp | 20 +-
.../Source/android/bridge/multi_so_initializer.cpp | 8 +-
.../android/bridge/platform/android_bridge.cpp | 5 +-
.../platform/android_bridge_in_multi_process.cc | 21 +-
.../platform/android_bridge_in_multi_process.h | 4 +-
.../android/bridge/platform/android_side.cpp | 133 +-
.../Source/android/bridge/platform/android_side.h | 3 +-
.../bridge/platform/core_side_in_multi_process.cpp | 23 +-
.../bridge/platform/core_side_in_multi_so.cpp | 4 +-
.../bridge/script/script_side_in_multi_process.cpp | 18 +-
.../bridge/script/script_side_in_multi_so.cpp | 6 +-
.../bridge/script_bridge_in_multi_process.cpp | 31 +-
.../android/bridge/script_bridge_in_multi_so.cpp | 7 +-
.../Source/android/jniprebuild/jni_generator.py | 1488 -----
weex_core/Source/android/jniprebuild/jni_load.cc | 58 -
.../jniheader/ContentBoxMeasurement_jni.h | 164 -
.../jniheader/NativeRenderObjectUtils_jni.h | 207 -
.../jniprebuild/jniheader/RequestHandler_jni.h | 122 -
.../jniheader/SystemMessageHandler_jni.h | 155 -
.../android/jniprebuild/jniheader/WXBridge_jni.h | 1168 ----
.../jniprebuild/jniheader/WXDebugJsBridge_jni.h | 165 -
.../android/jniprebuild/jniheader/WXParams_jni.h | 351 --
weex_core/Source/android/jniprebuild/prebuild.sh | 32 -
weex_core/Source/android/jsengine/CMakeLists.txt | 183 +
.../bridge/platform/core_side_in_simple.cpp | 416 ++
.../jsengine/bridge/platform/core_side_in_simple.h | 106 +
.../platform/platform_bridge_in_multi_process.cpp | 749 +++
.../platform/platform_bridge_in_multi_process.h | 95 +
.../platform/platform_bridge_in_multi_so.cpp | 300 +
.../bridge/platform/platform_bridge_in_multi_so.h | 119 +
.../bridge/platform/platform_side_in_multi_so.cpp | 203 +
.../bridge/platform/platform_side_in_multi_so.h | 128 +
.../platform/platform_side_multi_process.cpp | 745 +++
.../bridge/platform/platform_side_multi_process.h | 127 +
.../bridge/script/core_side_in_multi_process.cpp | 602 ++
.../bridge/script/core_side_in_multi_process.h | 127 +
.../bridge/script/core_side_in_multi_so.cpp | 185 +
.../jsengine/bridge/script/core_side_in_multi_so.h | 102 +
.../jsengine/bridge/script/core_side_in_simple.cpp | 228 +
.../jsengine/bridge/script/core_side_in_simple.h | 89 +
.../script/script_bridge_in_multi_process.cpp | 480 ++
.../bridge/script/script_bridge_in_multi_process.h | 77 +
.../bridge/script/script_bridge_in_multi_so.cpp | 157 +
.../bridge/script/script_bridge_in_multi_so.h | 94 +
.../bridge/script/script_bridge_in_simple.cpp | 45 +
.../bridge/script/script_bridge_in_simple.h | 50 +
.../bridge/script/script_side_in_queue.cpp | 219 +
.../jsengine/bridge/script/script_side_in_queue.h | 94 +
.../bridge/script/script_side_in_simple.cpp | 141 +
.../jsengine/bridge/script/script_side_in_simple.h | 92 +
.../jsengine/dependence/OptionsCommon.cmake | 277 +
.../jsengine/dependence/OptionsJSCOnly.cmake | 75 +
.../android/jsengine/dependence/WeexCommon.cmake | 42 +
.../android/jsengine/dependence/WeexFS.cmake | 24 +
.../android/jsengine/dependence/WeexFeatures.cmake | 357 ++
.../android/jsengine/dependence/WeexHelpers.cmake | 114 +
.../android/jsengine/dependence/WeexMacros.cmake | 447 ++
.../jsengine/dependence/bmalloc/CMakeLists.txt | 38 +
.../android/jsengine/dependence/bmalloc/ChangeLog | 6450 ++++++++++++++++++++
.../bmalloc/Configurations/Base.xcconfig | 119 +
.../bmalloc/Configurations/DebugRelease.xcconfig | 43 +
.../bmalloc/Configurations/bmalloc.xcconfig | 30 +
.../bmalloc/Configurations/mbmalloc.xcconfig | 28 +
.../android/jsengine/dependence/bmalloc/Makefile | 1 +
.../bmalloc/bmalloc.xcodeproj/project.pbxproj | 562 ++
.../dependence/bmalloc/bmalloc/Algorithm.h | 121 +
.../dependence/bmalloc/bmalloc/Allocator.cpp | 195 +
.../dependence/bmalloc/bmalloc/Allocator.h | 88 +
.../dependence/bmalloc/bmalloc/AsyncTask.h | 137 +
.../dependence/bmalloc/bmalloc/AvailableMemory.cpp | 88 +
.../dependence/bmalloc/bmalloc/AvailableMemory.h | 29 +
.../jsengine/dependence/bmalloc/bmalloc/BAssert.h | 102 +
.../dependence/bmalloc/bmalloc/BPlatform.h | 192 +
.../dependence/bmalloc/bmalloc/BumpAllocator.h | 91 +
.../dependence/bmalloc/bmalloc/BumpRange.h | 37 +
.../jsengine/dependence/bmalloc/bmalloc/Cache.cpp | 77 +
.../jsengine/dependence/bmalloc/bmalloc/Cache.h | 110 +
.../jsengine/dependence/bmalloc/bmalloc/Chunk.h | 146 +
.../dependence/bmalloc/bmalloc/Deallocator.cpp | 94 +
.../dependence/bmalloc/bmalloc/Deallocator.h | 73 +
.../dependence/bmalloc/bmalloc/DebugHeap.cpp | 104 +
.../dependence/bmalloc/bmalloc/DebugHeap.h | 44 +
.../dependence/bmalloc/bmalloc/Environment.cpp | 119 +
.../dependence/bmalloc/bmalloc/Environment.h | 38 +
.../dependence/bmalloc/bmalloc/FixedVector.h | 112 +
.../jsengine/dependence/bmalloc/bmalloc/Heap.cpp | 487 ++
.../jsengine/dependence/bmalloc/bmalloc/Heap.h | 193 +
.../jsengine/dependence/bmalloc/bmalloc/Inline.h | 26 +
.../dependence/bmalloc/bmalloc/LargeMap.cpp | 72 +
.../jsengine/dependence/bmalloc/bmalloc/LargeMap.h | 40 +
.../dependence/bmalloc/bmalloc/LargeRange.h | 103 +
.../dependence/bmalloc/bmalloc/LineMetadata.h | 39 +
.../jsengine/dependence/bmalloc/bmalloc/List.h | 95 +
.../dependence/bmalloc/bmalloc/Logging.cpp | 58 +
.../jsengine/dependence/bmalloc/bmalloc/Logging.h | 31 +
.../jsengine/dependence/bmalloc/bmalloc/Map.h | 127 +
.../jsengine/dependence/bmalloc/bmalloc/Mutex.h | 41 +
.../jsengine/dependence/bmalloc/bmalloc/Object.h | 74 +
.../dependence/bmalloc/bmalloc/ObjectType.cpp | 42 +
.../dependence/bmalloc/bmalloc/ObjectType.h | 38 +
.../dependence/bmalloc/bmalloc/PerProcess.h | 103 +
.../dependence/bmalloc/bmalloc/PerThread.h | 141 +
.../jsengine/dependence/bmalloc/bmalloc/Range.h | 66 +
.../dependence/bmalloc/bmalloc/ScopeExit.h | 47 +
.../jsengine/dependence/bmalloc/bmalloc/Sizes.h | 126 +
.../dependence/bmalloc/bmalloc/SmallLine.h | 62 +
.../dependence/bmalloc/bmalloc/SmallPage.h | 80 +
.../dependence/bmalloc/bmalloc/StaticMutex.cpp | 46 +
.../dependence/bmalloc/bmalloc/StaticMutex.h | 96 +
.../jsengine/dependence/bmalloc/bmalloc/Syscall.h | 28 +
.../dependence/bmalloc/bmalloc/VMAllocate.h | 223 +
.../jsengine/dependence/bmalloc/bmalloc/VMHeap.cpp | 94 +
.../jsengine/dependence/bmalloc/bmalloc/VMHeap.h | 77 +
.../jsengine/dependence/bmalloc/bmalloc/Vector.h | 230 +
.../jsengine/dependence/bmalloc/bmalloc/Zone.cpp | 125 +
.../jsengine/dependence/bmalloc/bmalloc/Zone.h | 66 +
.../jsengine/dependence/bmalloc/bmalloc/bmalloc.h | 108 +
.../bmalloc/bmalloc/darwin/BSoftLinking.h | 60 +
.../dependence/bmalloc/bmalloc/mbmalloc.cpp | 56 +
.../Source/android/jsengine/dependence/icu/LICENSE | 25 +
.../Source/android/jsengine/dependence/icu/README | 4 +
.../jsengine/dependence/icu/unicode/localpointer.h | 322 +
.../jsengine/dependence/icu/unicode/parseerr.h | 110 +
.../jsengine/dependence/icu/unicode/platform.h | 773 +++
.../jsengine/dependence/icu/unicode/ptypes.h | 144 +
.../jsengine/dependence/icu/unicode/putil.h | 182 +
.../android/jsengine/dependence/icu/unicode/ucal.h | 1576 +++++
.../jsengine/dependence/icu/unicode/uchar.h | 3349 ++++++++++
.../android/jsengine/dependence/icu/unicode/ucnv.h | 2052 +++++++
.../jsengine/dependence/icu/unicode/ucnv_err.h | 481 ++
.../android/jsengine/dependence/icu/unicode/ucol.h | 1451 +++++
.../jsengine/dependence/icu/unicode/uconfig.h | 430 ++
.../jsengine/dependence/icu/unicode/ucurr.h | 378 ++
.../android/jsengine/dependence/icu/unicode/udat.h | 1444 +++++
.../jsengine/dependence/icu/unicode/udatpg.h | 606 ++
.../dependence/icu/unicode/udisplaycontext.h | 142 +
.../jsengine/dependence/icu/unicode/uenum.h | 224 +
.../jsengine/dependence/icu/unicode/uformattable.h | 301 +
.../jsengine/dependence/icu/unicode/uiter.h | 725 +++
.../android/jsengine/dependence/icu/unicode/uloc.h | 1153 ++++
.../jsengine/dependence/icu/unicode/umachine.h | 340 ++
.../jsengine/dependence/icu/unicode/umisc.h | 78 +
.../jsengine/dependence/icu/unicode/unorm.h | 579 ++
.../jsengine/dependence/icu/unicode/unorm2.h | 546 ++
.../android/jsengine/dependence/icu/unicode/unum.h | 1265 ++++
.../jsengine/dependence/icu/unicode/unumsys.h | 192 +
.../jsengine/dependence/icu/unicode/urename.h | 1843 ++++++
.../jsengine/dependence/icu/unicode/uscript.h | 630 ++
.../android/jsengine/dependence/icu/unicode/uset.h | 1142 ++++
.../jsengine/dependence/icu/unicode/ustring.h | 1721 ++++++
.../android/jsengine/dependence/icu/unicode/utf.h | 241 +
.../jsengine/dependence/icu/unicode/utf16.h | 641 ++
.../android/jsengine/dependence/icu/unicode/utf8.h | 848 +++
.../jsengine/dependence/icu/unicode/utf_old.h | 1187 ++++
.../jsengine/dependence/icu/unicode/utypes.h | 741 +++
.../jsengine/dependence/icu/unicode/uvernum.h | 185 +
.../jsengine/dependence/icu/unicode/uversion.h | 211 +
.../android/jsengine/multiprocess/ExtendJSApi.cpp | 60 -
.../android/jsengine/multiprocess/ExtendJSApi.h | 40 -
.../jsengine/multiprocess/WeexJSConnection.cpp | 597 --
weex_core/Source/android/jsengine/object/args.cpp | 36 +
weex_core/Source/android/jsengine/object/args.h | 89 +
.../android/jsengine/object/args/exe_js_args.cpp | 118 +
.../android/jsengine/object/args/exe_js_args.h | 51 +
.../jsengine/object/args/init_framework_args.cpp | 83 +
.../jsengine/object/args/init_framework_args.h | 44 +
.../jsengine/object/weex_console_object.cpp | 387 ++
.../android/jsengine/object/weex_console_object.h | 56 +
.../Source/android/jsengine/object/weex_env.cpp | 39 +
.../Source/android/jsengine/object/weex_env.h | 98 +
.../android/jsengine/object/weex_global_object.cpp | 857 +++
.../android/jsengine/object/weex_global_object.h | 137 +
.../android/jsengine/object/weex_object_holder.cpp | 114 +
.../android/jsengine/object/weex_object_holder.h | 54 +
.../android/jsengine/object/weex_simple_object.cpp | 26 +
.../android/jsengine/object/weex_simple_object.h | 75 +
.../task/impl/call_js_on_app_context_task.cpp | 45 +
.../task/impl/call_js_on_app_context_task.h | 51 +
.../jsengine/task/impl/create_app_context_task.cpp | 31 +
.../jsengine/task/impl/create_app_context_task.h | 41 +
.../jsengine/task/impl/create_instance_task.cpp | 41 +
.../jsengine/task/impl/create_instance_task.h | 45 +
.../jsengine/task/impl/ctime_callback_task.cpp | 29 +
.../jsengine/task/impl/ctime_callback_task.h | 42 +
.../task/impl/destory_app_context_task.cpp | 29 +
.../jsengine/task/impl/destory_app_context_task.h | 39 +
.../jsengine/task/impl/destory_instance_task.cpp | 29 +
.../jsengine/task/impl/destory_instance_task.h | 39 +
.../task/impl/exe_js_on_app_with_result.cpp | 35 +
.../jsengine/task/impl/exe_js_on_app_with_result.h | 43 +
.../jsengine/task/impl/exe_js_on_instance_task.cpp | 35 +
.../jsengine/task/impl/exe_js_on_instance_task.h | 41 +
.../jsengine/task/impl/exe_js_services_task.cpp | 31 +
.../jsengine/task/impl/exe_js_services_task.h | 42 +
.../android/jsengine/task/impl/exe_js_task.cpp | 71 +
.../android/jsengine/task/impl/exe_js_task.h | 55 +
.../jsengine/task/impl/init_framework_task.cpp | 57 +
.../jsengine/task/impl/init_framework_task.h | 58 +
.../jsengine/task/impl/native_timer_task.cpp | 37 +
.../android/jsengine/task/impl/native_timer_task.h | 43 +
.../jsengine/task/impl/take_heap_snapshot.cpp | 28 +
.../jsengine/task/impl/take_heap_snapshot.h | 38 +
.../task/impl/update_global_config_task.cpp | 31 +
.../jsengine/task/impl/update_global_config_task.h | 43 +
.../Source/android/jsengine/task/timer_queue.cpp | 183 +
.../Source/android/jsengine/task/timer_queue.h | 61 +
.../Source/android/jsengine/task/timer_task.cpp | 54 +
.../Source/android/jsengine/task/timer_task.h | 59 +
.../Source/android/jsengine/task/weex_task.cpp | 40 +
weex_core/Source/android/jsengine/task/weex_task.h | 87 +
.../android/jsengine/task/weex_task_queue.cpp | 171 +
.../Source/android/jsengine/task/weex_task_queue.h | 65 +
.../Source/android/jsengine/weex_ipc_client.cpp | 45 +
.../Source/android/jsengine/weex_ipc_client.h | 61 +
.../Source/android/jsengine/weex_ipc_server.cpp | 92 +
.../Source/android/jsengine/weex_ipc_server.h | 38 +
.../android/jsengine/weex_js_server_main_stub.cpp | 29 +
.../Source/android/jsengine/weex_jsc_utils.cpp | 612 ++
weex_core/Source/android/jsengine/weex_jsc_utils.h | 343 ++
weex_core/Source/android/jsengine/weex_runtime.cpp | 899 +++
weex_core/Source/android/jsengine/weex_runtime.h | 113 +
.../jsengine/weexjsserver_version_script.txt | 4 +
.../Source/android/jsengine/wson/wson_jsc.cpp | 602 ++
weex_core/Source/android/jsengine/wson/wson_jsc.h | 54 +
.../android/multiprocess/weex_js_connection.cpp | 604 ++
.../weex_js_connection.h} | 0
weex_core/Source/android/utils/IPCStringResult.cpp | 73 -
weex_core/Source/android/utils/cache_utils.cpp | 10 +-
weex_core/Source/android/utils/cache_utils.h | 4 +-
.../Source/android/utils/ipc_string_result.cpp | 74 +
.../{IPCStringResult.h => ipc_string_result.h} | 0
weex_core/Source/android/utils/jni_load.cc | 58 +
weex_core/Source/android/utils/params_utils.cpp | 36 +-
weex_core/Source/android/utils/so_utils.cpp | 8 +-
weex_core/Source/android/weex_extend_js_api.cpp | 60 +
weex_core/Source/android/weex_extend_js_api.h | 40 +
.../wrap/content_box_measurement_impl_android.cpp | 5 +-
.../wrap/content_box_measurement_impl_android.h | 2 +-
weex_core/Source/android/wrap/hash_set.cpp | 3 +-
weex_core/Source/android/wrap/hash_set.h | 2 +-
weex_core/Source/android/wrap/jni_object_wrap.h | 48 -
.../android/wrap/jsfunction_impl_android.cpp | 307 +
weex_core/Source/android/wrap/log_utils.cpp | 3 +-
.../native_render_object_utils_impl_android.cpp | 26 +-
weex_core/Source/android/wrap/wml_bridge.cpp | 11 +-
weex_core/Source/android/wrap/wml_bridge.h | 3 +-
weex_core/Source/android/wrap/wx_bridge.cpp | 58 +-
weex_core/Source/android/wrap/wx_bridge.h | 7 +-
.../Source/android/wrap/wx_debug_js_bridge.cpp | 27 +-
weex_core/Source/android/wrap/wx_js_object.cpp | 5 +-
weex_core/Source/android/wrap/wx_js_object.h | 4 +-
weex_core/Source/android/wrap/wx_map.cpp | 3 +-
weex_core/Source/android/wrap/wx_map.h | 4 +-
weex_core/Source/android/wrap/wx_params.cpp | 6 +-
weex_core/Source/android/wrap/wx_params.h | 2 +-
weex_core/Source/base/CMakeLists.txt | 83 +
weex_core/Source/base/ViewUtils.h | 152 -
weex_core/Source/base/android/call_stack.cpp | 79 +
weex_core/Source/base/android/call_stack.h | 48 +
weex_core/Source/base/android/jni/android_jni.cpp | 120 +
weex_core/Source/base/android/jni/android_jni.h | 63 +
.../base => base/android}/jni/jbytearray_ref.cpp | 0
.../base => base/android}/jni/jbytearray_ref.h | 0
.../Source/base/android/jni/jni_object_wrap.h | 48 +
.../Source/base/android/jni/scoped_java_ref.cpp | 88 +
.../base => base/android}/jni/scoped_java_ref.h | 0
weex_core/Source/base/android/jni_type.cpp | 58 +
weex_core/Source/base/android/jni_type.h | 39 +
.../android/jniprebuild/android_jar.classes | 0
.../{ => base}/android/jniprebuild/jni_files | 0
.../base/android/jniprebuild/jni_generator.py | 1488 +++++
.../jniheader/ContentBoxMeasurement_jni.h | 182 +
.../jniheader/NativeRenderObjectUtils_jni.h | 225 +
.../jniprebuild/jniheader/RequestHandler_jni.h | 140 +
.../jniheader/SystemMessageHandler_jni.h | 173 +
.../android/jniprebuild/jniheader/WXBridge_jni.h | 1186 ++++
.../jniprebuild/jniheader/WXDebugJsBridge_jni.h | 183 +
.../jniprebuild/jniheader/WXJsFunctions_jni.h | 194 +
.../android/jniprebuild/jniheader/WXParams_jni.h | 369 ++
.../Source/base/android/jniprebuild/prebuild.sh | 13 +
.../{android/base => base/android}/log_utils.h | 0
weex_core/Source/base/android/weex_log.cpp | 144 +
weex_core/Source/base/android/weex_log.h | 86 +
weex_core/Source/base/base64/base64.cpp | 51 +
weex_core/Source/base/base64/base64.h | 27 +
.../Source/base/base64/modp_base64/modp_b64.cc | 263 +
.../Source/base/base64/modp_base64/modp_b64.h | 185 +
.../Source/base/base64/modp_base64/modp_b64_data.h | 303 +
.../base/{CoreConstants.h => core_constants.h} | 0
weex_core/Source/base/crash/backtrace.h | 36 +
weex_core/Source/base/crash/backtrace_arm.c | 871 +++
weex_core/Source/base/crash/crash_handler.cpp | 416 ++
weex_core/Source/base/crash/crash_handler.h | 71 +
.../Source/base/{LogDefines.h => log_defines.h} | 0
weex_core/Source/base/message_loop/message_loop.cc | 4 +-
.../base/message_loop/message_pump_android.cc | 18 +-
.../base/message_loop/message_pump_android.h | 6 +-
weex_core/Source/base/thread/thread_impl_android.h | 2 +-
weex_core/Source/base/thread/thread_impl_darwin.cc | 9 +-
.../Source/base/{TimeUtils.h => time_utils.h} | 0
weex_core/Source/base/utils/Compatible.cpp | 137 +
weex_core/Source/base/utils/ThreadLocker.cpp | 71 +
weex_core/Source/base/utils/ThreadLocker.h | 61 +
weex_core/Source/base/utils/log_utils.cpp | 67 +
weex_core/Source/base/utils/log_utils.h | 64 +
.../core/bridge/platform/core_side_in_platform.cpp | 2 +-
.../core/bridge/script/core_side_in_script.cpp | 6 +-
weex_core/Source/core/bridge/script_bridge.h | 3 +-
weex_core/Source/core/common/view_utils.h | 151 +
weex_core/Source/core/config/core_environment.cpp | 13 +-
weex_core/Source/core/css/css_value_getter.cpp | 2 +-
weex_core/Source/core/data_render/binary_file.cc | 87 +
weex_core/Source/core/data_render/binary_file.h | 67 +
weex_core/Source/core/data_render/class_array.cc | 3 +-
weex_core/Source/core/data_render/class_console.cc | 3 +-
.../Source/core/data_render/class_function.cc | 3 +-
weex_core/Source/core/data_render/class_json.cc | 5 +-
weex_core/Source/core/data_render/class_object.cc | 6 +-
weex_core/Source/core/data_render/class_regex.cc | 6 +-
weex_core/Source/core/data_render/class_string.cc | 5 +-
.../Source/core/data_render/exec_state_binary.cc | 5 +-
.../Source/core/data_render/exec_state_section.cc | 5 +-
.../Source/core/data_render/js_common_function.cc | 2 +-
.../Source/core/data_render/monitor/vm_monitor.h | 2 +-
weex_core/Source/core/data_render/parser.cc | 1 +
weex_core/Source/core/data_render/rax_parser.cc | 8 +-
.../core/data_render/vnode/vnode_exec_env.cc | 5 +-
.../core/data_render/vnode/vnode_render_manager.cc | 4 +-
.../layout/measure_func_adapter_impl_android.h | 9 +-
weex_core/Source/core/layout/style.h | 2 +-
.../network/android/default_request_handler.cc | 6 +-
.../core/network/android/default_request_handler.h | 2 +-
weex_core/Source/core/parser/dom_wson.cpp | 2 +-
.../Source/core/render/manager/render_manager.cpp | 13 +-
.../core/render/node/factory/render_creator.cpp | 8 +-
.../Source/core/render/node/render_appbar.cpp | 2 +-
weex_core/Source/core/render/node/render_list.cpp | 4 +-
weex_core/Source/core/render/node/render_mask.cpp | 2 +-
.../Source/core/render/node/render_object.cpp | 5 +-
.../Source/core/render/node/render_scroller.cpp | 13 +-
weex_core/Source/core/render/page/render_page.cpp | 21 +-
.../JavaScriptCore/API/APICallbackFunction.h | 106 +
.../Source/include/JavaScriptCore/API/APICast.h | 164 +
.../Source/include/JavaScriptCore/API/APIUtils.h | 58 +
.../JavaScriptCore/API/JSAPIWrapperObject.h | 51 +
.../Source/include/JavaScriptCore/API/JSBase.h | 141 +
.../include/JavaScriptCore/API/JSBasePrivate.h | 47 +
.../JavaScriptCore/API/JSCTestRunnerUtils.h | 34 +
.../JavaScriptCore/API/JSCallbackConstructor.h | 67 +
.../JavaScriptCore/API/JSCallbackFunction.h | 56 +
.../include/JavaScriptCore/API/JSCallbackObject.h | 235 +
.../JavaScriptCore/API/JSCallbackObjectFunctions.h | 695 +++
.../Source/include/JavaScriptCore/API/JSClassRef.h | 120 +
.../Source/include/JavaScriptCore/API/JSContext.h | 231 +
.../include/JavaScriptCore/API/JSContextInternal.h | 73 +
.../include/JavaScriptCore/API/JSContextPrivate.h | 50 +
.../include/JavaScriptCore/API/JSContextRef.h | 151 +
.../API/JSContextRefInspectorSupport.h | 36 +
.../JavaScriptCore/API/JSContextRefInternal.h | 53 +
.../JavaScriptCore/API/JSContextRefPrivate.h | 128 +
.../Source/include/JavaScriptCore/API/JSExport.h | 139 +
.../include/JavaScriptCore/API/JSManagedValue.h | 74 +
.../JavaScriptCore/API/JSManagedValueInternal.h | 35 +
.../include/JavaScriptCore/API/JSObjectRef.h | 686 +++
.../JavaScriptCore/API/JSObjectRefPrivate.h | 67 +
.../include/JavaScriptCore/API/JSRemoteInspector.h | 42 +
.../include/JavaScriptCore/API/JSRetainPtr.h | 205 +
.../JavaScriptCore/API/JSScriptRefPrivate.h | 92 +
.../include/JavaScriptCore/API/JSStringRef.h | 141 +
.../include/JavaScriptCore/API/JSStringRefBSTR.h | 52 +
.../include/JavaScriptCore/API/JSStringRefCF.h | 53 +
.../JavaScriptCore/API/JSStringRefPrivate.h | 34 +
.../include/JavaScriptCore/API/JSTypedArray.h | 172 +
.../Source/include/JavaScriptCore/API/JSValue.h | 661 ++
.../include/JavaScriptCore/API/JSValueInternal.h | 51 +
.../Source/include/JavaScriptCore/API/JSValueRef.h | 352 ++
.../include/JavaScriptCore/API/JSVirtualMachine.h | 75 +
.../JavaScriptCore/API/JSVirtualMachineInternal.h | 51 +
.../API/JSWeakObjectMapRefInternal.h | 62 +
.../JavaScriptCore/API/JSWeakObjectMapRefPrivate.h | 85 +
.../include/JavaScriptCore/API/JSWrapperMap.h | 41 +
.../Source/include/JavaScriptCore/API/JavaScript.h | 29 +
.../include/JavaScriptCore/API/JavaScriptCore.h | 35 +
.../JavaScriptCore/API/ObjCCallbackFunction.h | 77 +
.../include/JavaScriptCore/API/ObjcRuntimeExtras.h | 235 +
.../include/JavaScriptCore/API/OpaqueJSString.h | 95 +
.../JavaScriptCore/API/WebKitAvailability.h | 76 +
.../ForwardingHeaders/JavaScriptCore/APICast.h | 19 +
.../ForwardingHeaders/JavaScriptCore/JSBase.h | 19 +
.../JavaScriptCore/JSCTestRunnerUtils.h | 19 +
.../JavaScriptCore/JSContextRef.h | 19 +
.../ForwardingHeaders/JavaScriptCore/JSObjectRef.h | 19 +
.../JavaScriptCore/JSObjectRefPrivate.h | 19 +
.../ForwardingHeaders/JavaScriptCore/JSRetainPtr.h | 19 +
.../ForwardingHeaders/JavaScriptCore/JSStringRef.h | 19 +
.../JavaScriptCore/JSStringRefCF.h | 19 +
.../JavaScriptCore/JSTypedArray.h | 19 +
.../ForwardingHeaders/JavaScriptCore/JSValueRef.h | 19 +
.../ForwardingHeaders/JavaScriptCore/JavaScript.h | 19 +
.../JavaScriptCore/JavaScriptCore.h | 19 +
.../JavaScriptCore/OpaqueJSString.h | 19 +
.../JavaScriptCore/WebKitAvailability.h | 19 +
.../JavaScriptCore/assembler/ARM64Assembler.h | 3731 +++++++++++
.../JavaScriptCore/assembler/ARMAssembler.h | 1219 ++++
.../JavaScriptCore/assembler/ARMv7Assembler.h | 3000 +++++++++
.../include/JavaScriptCore/assembler/AbortReason.h | 72 +
.../assembler/AbstractMacroAssembler.h | 1137 ++++
.../assembler/AllowMacroScratchRegisterUsage.h | 48 +
.../JavaScriptCore/assembler/AssemblerBuffer.h | 295 +
.../assembler/AssemblerBufferWithConstantPool.h | 325 +
.../JavaScriptCore/assembler/AssemblerCommon.h | 283 +
.../Source/include/JavaScriptCore/assembler/CPU.h | 87 +
.../JavaScriptCore/assembler/CodeLocation.h | 213 +
.../assembler/DisallowMacroScratchRegisterUsage.h | 48 +
.../include/JavaScriptCore/assembler/LinkBuffer.h | 343 ++
.../JavaScriptCore/assembler/MIPSAssembler.h | 1117 ++++
.../JavaScriptCore/assembler/MacroAssembler.h | 1815 ++++++
.../JavaScriptCore/assembler/MacroAssemblerARM.h | 1625 +++++
.../JavaScriptCore/assembler/MacroAssemblerARM64.h | 4402 +++++++++++++
.../JavaScriptCore/assembler/MacroAssemblerARMv7.h | 2150 +++++++
.../assembler/MacroAssemblerCodeRef.h | 413 ++
.../assembler/MacroAssemblerHelpers.h | 124 +
.../JavaScriptCore/assembler/MacroAssemblerMIPS.h | 3055 +++++++++
.../assembler/MacroAssemblerPrinter.h | 295 +
.../JavaScriptCore/assembler/MacroAssemblerSH4.h | 2662 ++++++++
.../JavaScriptCore/assembler/MacroAssemblerX86.h | 381 ++
.../assembler/MacroAssemblerX86Common.h | 4256 +++++++++++++
.../assembler/MacroAssemblerX86_64.h | 1932 ++++++
.../assembler/MaxFrameExtentForSlowPathCall.h | 72 +
.../JavaScriptCore/assembler/SH4Assembler.h | 2213 +++++++
.../JavaScriptCore/assembler/X86Assembler.h | 4573 ++++++++++++++
.../include/JavaScriptCore/bytecode/AccessCase.h | 226 +
.../AdaptiveInferredPropertyValueWatchpointBase.h | 65 +
.../include/JavaScriptCore/bytecode/ArithProfile.h | 234 +
.../bytecode/ArrayAllocationProfile.h | 70 +
.../include/JavaScriptCore/bytecode/ArrayProfile.h | 243 +
.../include/JavaScriptCore/bytecode/ByValInfo.h | 250 +
.../JavaScriptCore/bytecode/BytecodeBasicBlock.h | 95 +
.../JavaScriptCore/bytecode/BytecodeConventions.h | 25 +
.../JavaScriptCore/bytecode/BytecodeDumper.h | 87 +
.../bytecode/BytecodeGeneratorification.h | 29 +
.../JavaScriptCore/bytecode/BytecodeGraph.h | 117 +
.../bytecode/BytecodeIntrinsicRegistry.h | 100 +
.../JavaScriptCore/bytecode/BytecodeKills.h | 170 +
.../bytecode/BytecodeLivenessAnalysis.h | 79 +
.../bytecode/BytecodeLivenessAnalysisInlines.h | 194 +
.../JavaScriptCore/bytecode/BytecodeRewriter.h | 227 +
.../JavaScriptCore/bytecode/BytecodeUseDef.h | 484 ++
.../include/JavaScriptCore/bytecode/CallEdge.h | 60 +
.../include/JavaScriptCore/bytecode/CallLinkInfo.h | 356 ++
.../JavaScriptCore/bytecode/CallLinkStatus.h | 127 +
.../include/JavaScriptCore/bytecode/CallMode.h | 44 +
.../bytecode/CallReturnOffsetToBytecodeOffset.h | 47 +
.../include/JavaScriptCore/bytecode/CallVariant.h | 207 +
.../include/JavaScriptCore/bytecode/CodeBlock.h | 1076 ++++
.../JavaScriptCore/bytecode/CodeBlockHash.h | 71 +
.../bytecode/CodeBlockJettisoningWatchpoint.h | 41 +
.../JavaScriptCore/bytecode/CodeBlockWithJITType.h | 45 +
.../include/JavaScriptCore/bytecode/CodeOrigin.h | 150 +
.../include/JavaScriptCore/bytecode/CodeType.h | 32 +
.../JavaScriptCore/bytecode/ComplexGetStatus.h | 103 +
.../JavaScriptCore/bytecode/DFGExitProfile.h | 213 +
.../bytecode/DOMJITAccessCasePatchpointParams.h | 53 +
.../include/JavaScriptCore/bytecode/DataFormat.h | 123 +
.../bytecode/DeferredCompilationCallback.h | 48 +
.../JavaScriptCore/bytecode/DeferredSourceDump.h | 42 +
.../JavaScriptCore/bytecode/DirectEvalCodeCache.h | 104 +
.../JavaScriptCore/bytecode/EvalCodeBlock.h | 74 +
.../JavaScriptCore/bytecode/EvalCodeCache.h | 118 +
.../JavaScriptCore/bytecode/ExecutableInfo.h | 78 +
.../JavaScriptCore/bytecode/ExecutionCounter.h | 112 +
.../include/JavaScriptCore/bytecode/ExitKind.h | 64 +
.../JavaScriptCore/bytecode/ExitingJITType.h | 51 +
.../JavaScriptCore/bytecode/ExpressionRangeInfo.h | 101 +
.../JavaScriptCore/bytecode/FullBytecodeLiveness.h | 48 +
.../JavaScriptCore/bytecode/FullCodeOrigin.h | 44 +
.../JavaScriptCore/bytecode/FunctionCodeBlock.h | 69 +
.../JavaScriptCore/bytecode/GetByIdStatus.h | 136 +
.../JavaScriptCore/bytecode/GetByIdVariant.h | 84 +
.../bytecode/GetterSetterAccessCase.h | 77 +
.../JavaScriptCore/bytecode/GlobalCodeBlock.h | 43 +
.../include/JavaScriptCore/bytecode/HandlerInfo.h | 115 +
.../include/JavaScriptCore/bytecode/InlineAccess.h | 122 +
.../JavaScriptCore/bytecode/InlineCallFrame.h | 258 +
.../JavaScriptCore/bytecode/InlineCallFrameSet.h | 44 +
.../include/JavaScriptCore/bytecode/Instruction.h | 151 +
.../bytecode/InternalFunctionAllocationProfile.h | 57 +
.../bytecode/IntrinsicGetterAccessCase.h | 52 +
.../include/JavaScriptCore/bytecode/JumpTable.h | 108 +
.../JavaScriptCore/bytecode/LLIntCallLinkInfo.h | 55 +
...LLIntPrototypeLoadAdaptiveStructureWatchpoint.h | 41 +
.../bytecode/LazyOperandValueProfile.h | 176 +
.../bytecode/MethodOfGettingAValueProfile.h | 92 +
.../bytecode/ModuleNamespaceAccessCase.h | 57 +
.../bytecode/ModuleProgramCodeBlock.h | 69 +
.../bytecode/ObjectAllocationProfile.h | 149 +
.../bytecode/ObjectPropertyCondition.h | 262 +
.../bytecode/ObjectPropertyConditionSet.h | 174 +
.../include/JavaScriptCore/bytecode/Opcode.h | 192 +
.../include/JavaScriptCore/bytecode/Operands.h | 277 +
.../JavaScriptCore/bytecode/OperandsInlines.h | 58 +
.../JavaScriptCore/bytecode/PolymorphicAccess.h | 271 +
.../JavaScriptCore/bytecode/PreciseJumpTargets.h | 38 +
.../bytecode/PreciseJumpTargetsInlines.h | 75 +
.../JavaScriptCore/bytecode/ProgramCodeBlock.h | 69 +
.../JavaScriptCore/bytecode/PropertyCondition.h | 327 +
.../JavaScriptCore/bytecode/ProxyableAccessCase.h | 52 +
.../include/JavaScriptCore/bytecode/PutByIdFlags.h | 94 +
.../JavaScriptCore/bytecode/PutByIdStatus.h | 108 +
.../JavaScriptCore/bytecode/PutByIdVariant.h | 140 +
.../include/JavaScriptCore/bytecode/PutKind.h | 25 +
.../JavaScriptCore/bytecode/ReduceWhitespace.h | 28 +
.../JavaScriptCore/bytecode/SpecialPointer.h | 56 +
.../JavaScriptCore/bytecode/SpeculatedType.h | 485 ++
.../include/JavaScriptCore/bytecode/StructureSet.h | 61 +
.../bytecode/StructureStubClearingWatchpoint.h | 94 +
.../JavaScriptCore/bytecode/StructureStubInfo.h | 225 +
.../include/JavaScriptCore/bytecode/SuperSampler.h | 51 +
.../include/JavaScriptCore/bytecode/ToThisStatus.h | 39 +
.../JavaScriptCore/bytecode/TrackedReferences.h | 45 +
.../include/JavaScriptCore/bytecode/TypeLocation.h | 53 +
.../JavaScriptCore/bytecode/UnlinkedCodeBlock.h | 508 ++
.../bytecode/UnlinkedEvalCodeBlock.h | 64 +
.../bytecode/UnlinkedFunctionCodeBlock.h | 54 +
.../bytecode/UnlinkedFunctionExecutable.h | 192 +
.../bytecode/UnlinkedGlobalCodeBlock.h | 36 +
.../bytecode/UnlinkedInstructionStream.h | 142 +
.../bytecode/UnlinkedModuleProgramCodeBlock.h | 88 +
.../bytecode/UnlinkedProgramCodeBlock.h | 65 +
.../include/JavaScriptCore/bytecode/ValueProfile.h | 230 +
.../JavaScriptCore/bytecode/ValueRecovery.h | 419 ++
.../bytecode/VariableWriteFireDetail.h | 45 +
.../JavaScriptCore/bytecode/VirtualRegister.h | 120 +
.../include/JavaScriptCore/bytecode/Watchpoint.h | 427 ++
.../JavaScriptCore/bytecode/WebAssemblyCodeBlock.h | 67 +
weex_core/Source/include/JavaScriptCore/config.h | 60 +
.../include/JavaScriptCore/dfg/DFGAbstractHeap.h | 338 +
.../JavaScriptCore/dfg/DFGAbstractInterpreter.h | 200 +
.../dfg/DFGAbstractInterpreterInlines.h | 3216 ++++++++++
.../include/JavaScriptCore/dfg/DFGAbstractValue.h | 479 ++
.../DFGAdaptiveInferredPropertyValueWatchpoint.h | 40 +
.../dfg/DFGAdaptiveStructureWatchpoint.h | 46 +
.../include/JavaScriptCore/dfg/DFGAdjacencyList.h | 202 +
.../include/JavaScriptCore/dfg/DFGAllocator.h | 228 +
.../JavaScriptCore/dfg/DFGArgumentPosition.h | 135 +
.../dfg/DFGArgumentsEliminationPhase.h | 34 +
.../JavaScriptCore/dfg/DFGArgumentsUtilities.h | 36 +
.../include/JavaScriptCore/dfg/DFGArithMode.h | 145 +
.../include/JavaScriptCore/dfg/DFGArrayMode.h | 527 ++
.../dfg/DFGArrayifySlowPathGenerator.h | 144 +
.../JavaScriptCore/dfg/DFGAtTailAbstractState.h | 69 +
.../include/JavaScriptCore/dfg/DFGAvailability.h | 158 +
.../JavaScriptCore/dfg/DFGAvailabilityMap.h | 80 +
.../include/JavaScriptCore/dfg/DFGBackwardsCFG.h | 40 +
.../JavaScriptCore/dfg/DFGBackwardsDominators.h | 42 +
.../dfg/DFGBackwardsPropagationPhase.h | 36 +
.../include/JavaScriptCore/dfg/DFGBasicBlock.h | 289 +
.../JavaScriptCore/dfg/DFGBasicBlockInlines.h | 54 +
.../JavaScriptCore/dfg/DFGBlockInsertionSet.h | 50 +
.../include/JavaScriptCore/dfg/DFGBlockMap.h | 100 +
.../JavaScriptCore/dfg/DFGBlockMapInlines.h | 36 +
.../include/JavaScriptCore/dfg/DFGBlockSet.h | 141 +
.../JavaScriptCore/dfg/DFGBlockSetInlines.h | 35 +
.../include/JavaScriptCore/dfg/DFGBlockWorklist.h | 50 +
.../JavaScriptCore/dfg/DFGBranchDirection.h | 88 +
.../include/JavaScriptCore/dfg/DFGByteCodeParser.h | 31 +
.../include/JavaScriptCore/dfg/DFGCFAPhase.h | 36 +
.../Source/include/JavaScriptCore/dfg/DFGCFG.h | 69 +
.../JavaScriptCore/dfg/DFGCFGSimplificationPhase.h | 39 +
.../JavaScriptCore/dfg/DFGCPSRethreadingPhase.h | 37 +
.../include/JavaScriptCore/dfg/DFGCSEPhase.h | 46 +
.../dfg/DFGCallArrayAllocatorSlowPathGenerator.h | 161 +
...DFGCallCreateDirectArgumentsSlowPathGenerator.h | 73 +
.../include/JavaScriptCore/dfg/DFGCapabilities.h | 167 +
.../include/JavaScriptCore/dfg/DFGCleanUpPhase.h | 33 +
.../include/JavaScriptCore/dfg/DFGClobberSet.h | 114 +
.../include/JavaScriptCore/dfg/DFGClobberize.h | 1581 +++++
.../JavaScriptCore/dfg/DFGClobbersExitState.h | 58 +
.../JavaScriptCore/dfg/DFGCombinedLiveness.h | 47 +
.../Source/include/JavaScriptCore/dfg/DFGCommon.h | 368 ++
.../include/JavaScriptCore/dfg/DFGCommonData.h | 127 +
.../include/JavaScriptCore/dfg/DFGCompilationKey.h | 100 +
.../JavaScriptCore/dfg/DFGCompilationMode.h | 49 +
.../JavaScriptCore/dfg/DFGConstantFoldingPhase.h | 35 +
.../JavaScriptCore/dfg/DFGConstantHoistingPhase.h | 33 +
.../dfg/DFGControlEquivalenceAnalysis.h | 77 +
.../dfg/DFGCriticalEdgeBreakingPhase.h | 34 +
.../include/JavaScriptCore/dfg/DFGDCEPhase.h | 36 +
.../JavaScriptCore/dfg/DFGDOMJITPatchpointParams.h | 47 +
.../JavaScriptCore/dfg/DFGDesiredIdentifiers.h | 57 +
.../JavaScriptCore/dfg/DFGDesiredInferredType.h | 121 +
.../JavaScriptCore/dfg/DFGDesiredTransitions.h | 67 +
.../JavaScriptCore/dfg/DFGDesiredWatchpoints.h | 217 +
.../JavaScriptCore/dfg/DFGDesiredWeakReferences.h | 58 +
.../include/JavaScriptCore/dfg/DFGDisassembler.h | 97 +
.../Source/include/JavaScriptCore/dfg/DFGDoesGC.h | 32 +
.../include/JavaScriptCore/dfg/DFGDominators.h | 47 +
.../JavaScriptCore/dfg/DFGDoubleFormatState.h | 85 +
.../Source/include/JavaScriptCore/dfg/DFGDriver.h | 43 +
.../Source/include/JavaScriptCore/dfg/DFGEdge.h | 242 +
.../include/JavaScriptCore/dfg/DFGEdgeDominates.h | 67 +
.../JavaScriptCore/dfg/DFGEdgeUsesStructure.h | 54 +
.../Source/include/JavaScriptCore/dfg/DFGEpoch.h | 113 +
.../JavaScriptCore/dfg/DFGFailedFinalizer.h | 39 +
.../JavaScriptCore/dfg/DFGFiltrationResult.h | 44 +
.../include/JavaScriptCore/dfg/DFGFinalizer.h | 49 +
.../include/JavaScriptCore/dfg/DFGFixupPhase.h | 34 +
.../include/JavaScriptCore/dfg/DFGFlowIndexing.h | 105 +
.../Source/include/JavaScriptCore/dfg/DFGFlowMap.h | 132 +
.../include/JavaScriptCore/dfg/DFGFlushFormat.h | 164 +
.../include/JavaScriptCore/dfg/DFGFlushedAt.h | 83 +
.../include/JavaScriptCore/dfg/DFGForAllKills.h | 163 +
.../include/JavaScriptCore/dfg/DFGFrozenValue.h | 123 +
.../include/JavaScriptCore/dfg/DFGGenerationInfo.h | 446 ++
.../Source/include/JavaScriptCore/dfg/DFGGraph.h | 1019 ++++
.../include/JavaScriptCore/dfg/DFGGraphSafepoint.h | 40 +
.../include/JavaScriptCore/dfg/DFGHeapLocation.h | 152 +
.../JavaScriptCore/dfg/DFGInPlaceAbstractState.h | 144 +
.../JavaScriptCore/dfg/DFGInferredTypeCheck.h | 34 +
.../JavaScriptCore/dfg/DFGInlineCacheWrapper.h | 47 +
.../dfg/DFGInlineCacheWrapperInlines.h | 37 +
.../include/JavaScriptCore/dfg/DFGInsertionSet.h | 135 +
.../dfg/DFGIntegerCheckCombiningPhase.h | 33 +
.../dfg/DFGIntegerRangeOptimizationPhase.h | 36 +
.../dfg/DFGInvalidationPointInjectionPhase.h | 34 +
.../Source/include/JavaScriptCore/dfg/DFGJITCode.h | 169 +
.../include/JavaScriptCore/dfg/DFGJITCompiler.h | 364 ++
.../include/JavaScriptCore/dfg/DFGJITFinalizer.h | 49 +
.../JavaScriptCore/dfg/DFGJumpReplacement.h | 46 +
.../include/JavaScriptCore/dfg/DFGLICMPhase.h | 35 +
.../include/JavaScriptCore/dfg/DFGLazyJSValue.h | 124 +
.../include/JavaScriptCore/dfg/DFGLazyNode.h | 178 +
.../dfg/DFGLiveCatchVariablePreservationPhase.h | 42 +
.../JavaScriptCore/dfg/DFGLivenessAnalysisPhase.h | 35 +
.../include/JavaScriptCore/dfg/DFGLongLivedState.h | 42 +
.../dfg/DFGLoopPreHeaderCreationPhase.h | 48 +
.../dfg/DFGMaximalFlushInsertionPhase.h | 47 +
.../Source/include/JavaScriptCore/dfg/DFGMayExit.h | 85 +
.../include/JavaScriptCore/dfg/DFGMinifiedGraph.h | 59 +
.../include/JavaScriptCore/dfg/DFGMinifiedID.h | 96 +
.../include/JavaScriptCore/dfg/DFGMinifiedNode.h | 92 +
.../JavaScriptCore/dfg/DFGMovHintRemovalPhase.h | 34 +
.../JavaScriptCore/dfg/DFGMultiGetByOffsetData.h | 147 +
.../include/JavaScriptCore/dfg/DFGNaturalLoops.h | 165 +
.../Source/include/JavaScriptCore/dfg/DFGNode.h | 2698 ++++++++
.../JavaScriptCore/dfg/DFGNodeAbstractValuePair.h | 46 +
.../include/JavaScriptCore/dfg/DFGNodeAllocator.h | 38 +
.../include/JavaScriptCore/dfg/DFGNodeFlags.h | 171 +
.../JavaScriptCore/dfg/DFGNodeFlowProjection.h | 148 +
.../include/JavaScriptCore/dfg/DFGNodeOrigin.h | 129 +
.../include/JavaScriptCore/dfg/DFGNodeType.h | 439 ++
.../JavaScriptCore/dfg/DFGNullAbstractState.h | 55 +
.../dfg/DFGOSRAvailabilityAnalysisPhase.h | 55 +
.../include/JavaScriptCore/dfg/DFGOSREntry.h | 72 +
.../dfg/DFGOSREntrypointCreationPhase.h | 41 +
.../Source/include/JavaScriptCore/dfg/DFGOSRExit.h | 123 +
.../include/JavaScriptCore/dfg/DFGOSRExitBase.h | 79 +
.../JavaScriptCore/dfg/DFGOSRExitCompilationInfo.h | 37 +
.../JavaScriptCore/dfg/DFGOSRExitCompiler.h | 55 +
.../JavaScriptCore/dfg/DFGOSRExitCompilerCommon.h | 124 +
.../include/JavaScriptCore/dfg/DFGOSRExitFuzz.h | 41 +
.../JavaScriptCore/dfg/DFGOSRExitJumpPlaceholder.h | 58 +
.../JavaScriptCore/dfg/DFGOSRExitPreparation.h | 41 +
.../dfg/DFGObjectAllocationSinkingPhase.h | 36 +
.../dfg/DFGObjectMaterializationData.h | 40 +
.../Source/include/JavaScriptCore/dfg/DFGOpInfo.h | 56 +
.../include/JavaScriptCore/dfg/DFGOperations.h | 286 +
.../JavaScriptCore/dfg/DFGPhantomInsertionPhase.h | 33 +
.../Source/include/JavaScriptCore/dfg/DFGPhase.h | 97 +
.../include/JavaScriptCore/dfg/DFGPhiChildren.h | 82 +
.../Source/include/JavaScriptCore/dfg/DFGPlan.h | 128 +
.../include/JavaScriptCore/dfg/DFGPlanInlines.h | 46 +
.../JavaScriptCore/dfg/DFGPrePostNumbering.h | 98 +
.../JavaScriptCore/dfg/DFGPreciseLocalClobberize.h | 260 +
.../dfg/DFGPredictionInjectionPhase.h | 36 +
.../dfg/DFGPredictionPropagationPhase.h | 45 +
.../JavaScriptCore/dfg/DFGPromotedHeapLocation.h | 227 +
.../JavaScriptCore/dfg/DFGPropertyTypeKey.h | 118 +
.../include/JavaScriptCore/dfg/DFGPureValue.h | 134 +
.../JavaScriptCore/dfg/DFGPutStackSinkingPhase.h | 35 +
.../include/JavaScriptCore/dfg/DFGRegisterBank.h | 358 ++
.../JavaScriptCore/dfg/DFGRegisteredStructure.h | 71 +
.../JavaScriptCore/dfg/DFGRegisteredStructureSet.h | 77 +
.../include/JavaScriptCore/dfg/DFGSSACalculator.h | 252 +
.../JavaScriptCore/dfg/DFGSSAConversionPhase.h | 83 +
.../JavaScriptCore/dfg/DFGSSALoweringPhase.h | 34 +
.../include/JavaScriptCore/dfg/DFGSafeToExecute.h | 485 ++
.../include/JavaScriptCore/dfg/DFGSafepoint.h | 79 +
.../dfg/DFGSaneStringGetByValSlowPathGenerator.h | 85 +
.../include/JavaScriptCore/dfg/DFGScannable.h | 39 +
.../include/JavaScriptCore/dfg/DFGScoreBoard.h | 174 +
.../JavaScriptCore/dfg/DFGSilentRegisterSavePlan.h | 118 +
.../JavaScriptCore/dfg/DFGSlowPathGenerator.h | 262 +
.../include/JavaScriptCore/dfg/DFGSpeculativeJIT.h | 3914 ++++++++++++
.../JavaScriptCore/dfg/DFGStackLayoutPhase.h | 34 +
.../dfg/DFGStaticExecutionCountEstimationPhase.h | 38 +
.../dfg/DFGStoreBarrierClusteringPhase.h | 84 +
.../dfg/DFGStoreBarrierInsertionPhase.h | 39 +
.../JavaScriptCore/dfg/DFGStrengthReductionPhase.h | 34 +
.../JavaScriptCore/dfg/DFGStructureAbstractValue.h | 277 +
.../JavaScriptCore/dfg/DFGStructureClobberState.h | 63 +
.../dfg/DFGStructureRegistrationPhase.h | 43 +
.../include/JavaScriptCore/dfg/DFGThreadData.h | 49 +
.../Source/include/JavaScriptCore/dfg/DFGThunks.h | 36 +
.../dfg/DFGTierUpCheckInjectionPhase.h | 34 +
.../dfg/DFGToFTLDeferredCompilationCallback.h | 47 +
...FGToFTLForOSREntryDeferredCompilationCallback.h | 51 +
.../include/JavaScriptCore/dfg/DFGTransition.h | 54 +
.../JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.h | 37 +
.../JavaScriptCore/dfg/DFGUnificationPhase.h | 36 +
.../Source/include/JavaScriptCore/dfg/DFGUseKind.h | 287 +
.../include/JavaScriptCore/dfg/DFGValidate.h | 34 +
.../include/JavaScriptCore/dfg/DFGValueSource.h | 211 +
.../include/JavaScriptCore/dfg/DFGValueStrength.h | 59 +
.../JavaScriptCore/dfg/DFGVarargsForwardingPhase.h | 34 +
.../JavaScriptCore/dfg/DFGVariableAccessData.h | 220 +
.../JavaScriptCore/dfg/DFGVariableAccessDataDump.h | 43 +
.../include/JavaScriptCore/dfg/DFGVariableEvent.h | 277 +
.../JavaScriptCore/dfg/DFGVariableEventStream.h | 51 +
.../dfg/DFGVirtualRegisterAllocationPhase.h | 39 +
.../dfg/DFGWatchpointCollectionPhase.h | 33 +
.../include/JavaScriptCore/dfg/DFGWorklist.h | 142 +
.../JavaScriptCore/dfg/DFGWorklistInlines.h | 59 +
.../JavaScriptCore/disassembler/Disassembler.h | 51 +
.../disassembler/UDis86Disassembler.h | 35 +
.../JavaScriptCore/domjit/DOMJITAbstractHeap.h | 63 +
.../domjit/DOMJITCallDOMGetterPatchpoint.h | 50 +
.../include/JavaScriptCore/domjit/DOMJITEffect.h | 82 +
.../JavaScriptCore/domjit/DOMJITGetterSetter.h | 60 +
.../JavaScriptCore/domjit/DOMJITHeapRange.h | 123 +
.../JavaScriptCore/domjit/DOMJITPatchpoint.h | 67 +
.../JavaScriptCore/domjit/DOMJITPatchpointParams.h | 68 +
.../include/JavaScriptCore/domjit/DOMJITReg.h | 86 +
.../JavaScriptCore/domjit/DOMJITSignature.h | 67 +
.../JavaScriptCore/domjit/DOMJITSlowPathCalls.h | 28 +
.../include/JavaScriptCore/domjit/DOMJITValue.h | 64 +
.../include/JavaScriptCore/heap/AllocatingScope.h | 45 +
.../JavaScriptCore/heap/AllocatorAttributes.h | 44 +
.../include/JavaScriptCore/heap/CellContainer.h | 95 +
.../JavaScriptCore/heap/CellContainerInlines.h | 97 +
.../Source/include/JavaScriptCore/heap/CellState.h | 49 +
.../include/JavaScriptCore/heap/CodeBlockSet.h | 90 +
.../JavaScriptCore/heap/CodeBlockSetInlines.h | 85 +
.../include/JavaScriptCore/heap/CollectingScope.h | 45 +
.../include/JavaScriptCore/heap/CollectionScope.h | 36 +
.../include/JavaScriptCore/heap/CollectorPhase.h | 68 +
.../JavaScriptCore/heap/ConservativeRoots.h | 70 +
.../JavaScriptCore/heap/ConstraintVolatility.h | 66 +
.../Source/include/JavaScriptCore/heap/DeferGC.h | 100 +
.../JavaScriptCore/heap/DeleteAllCodeEffort.h | 29 +
.../include/JavaScriptCore/heap/DestructionMode.h | 36 +
.../JavaScriptCore/heap/EdenGCActivityCallback.h | 42 +
.../Source/include/JavaScriptCore/heap/FreeList.h | 84 +
.../JavaScriptCore/heap/FullGCActivityCallback.h | 47 +
.../JavaScriptCore/heap/GCActivityCallback.h | 96 +
.../include/JavaScriptCore/heap/GCAssertions.h | 52 +
.../include/JavaScriptCore/heap/GCConductor.h | 42 +
.../JavaScriptCore/heap/GCDeferralContext.h | 39 +
.../JavaScriptCore/heap/GCDeferralContextInlines.h | 42 +
.../JavaScriptCore/heap/GCIncomingRefCounted.h | 104 +
.../heap/GCIncomingRefCountedInlines.h | 119 +
.../JavaScriptCore/heap/GCIncomingRefCountedSet.h | 49 +
.../heap/GCIncomingRefCountedSetInlines.h | 82 +
.../Source/include/JavaScriptCore/heap/GCLogging.h | 49 +
.../include/JavaScriptCore/heap/GCSegmentedArray.h | 160 +
.../JavaScriptCore/heap/GCSegmentedArrayInlines.h | 220 +
.../Source/include/JavaScriptCore/heap/GCTypeMap.h | 57 +
.../Source/include/JavaScriptCore/heap/Handle.h | 177 +
.../include/JavaScriptCore/heap/HandleBlock.h | 66 +
.../JavaScriptCore/heap/HandleBlockInlines.h | 69 +
.../Source/include/JavaScriptCore/heap/HandleSet.h | 189 +
.../include/JavaScriptCore/heap/HandleStack.h | 117 +
.../include/JavaScriptCore/heap/HandleTypes.h | 42 +
.../Source/include/JavaScriptCore/heap/Heap.h | 677 ++
.../Source/include/JavaScriptCore/heap/HeapCell.h | 85 +
.../include/JavaScriptCore/heap/HeapCellInlines.h | 88 +
.../include/JavaScriptCore/heap/HeapHelperPool.h | 27 +
.../include/JavaScriptCore/heap/HeapInlines.h | 263 +
.../JavaScriptCore/heap/HeapIterationScope.h | 47 +
.../include/JavaScriptCore/heap/HeapObserver.h | 32 +
.../include/JavaScriptCore/heap/HeapProfiler.h | 50 +
.../include/JavaScriptCore/heap/HeapRootVisitor.h | 77 +
.../include/JavaScriptCore/heap/HeapSnapshot.h | 57 +
.../JavaScriptCore/heap/HeapSnapshotBuilder.h | 133 +
.../include/JavaScriptCore/heap/HeapStatistics.h | 46 +
.../Source/include/JavaScriptCore/heap/HeapTimer.h | 86 +
.../Source/include/JavaScriptCore/heap/HeapUtil.h | 182 +
.../include/JavaScriptCore/heap/HelpingGCScope.h | 45 +
.../JavaScriptCore/heap/IncrementalSweeper.h | 46 +
.../JavaScriptCore/heap/JITStubRoutineSet.h | 87 +
.../include/JavaScriptCore/heap/LargeAllocation.h | 157 +
.../include/JavaScriptCore/heap/ListableHandler.h | 115 +
.../include/JavaScriptCore/heap/LiveObjectData.h | 36 +
.../include/JavaScriptCore/heap/LiveObjectList.h | 46 +
.../Source/include/JavaScriptCore/heap/Local.h | 142 +
.../include/JavaScriptCore/heap/LocalScope.h | 68 +
.../JavaScriptCore/heap/LockDuringMarking.h | 40 +
.../JavaScriptCore/heap/MachineStackMarker.h | 150 +
.../Source/include/JavaScriptCore/heap/MarkStack.h | 37 +
.../include/JavaScriptCore/heap/MarkedAllocator.h | 266 +
.../JavaScriptCore/heap/MarkedAllocatorInlines.h | 78 +
.../include/JavaScriptCore/heap/MarkedBlock.h | 617 ++
.../JavaScriptCore/heap/MarkedBlockInlines.h | 387 ++
.../include/JavaScriptCore/heap/MarkedBlockSet.h | 76 +
.../include/JavaScriptCore/heap/MarkedSpace.h | 248 +
.../JavaScriptCore/heap/MarkedSpaceInlines.h | 64 +
.../JavaScriptCore/heap/MarkingConstraint.h | 89 +
.../JavaScriptCore/heap/MarkingConstraintSet.h | 80 +
.../include/JavaScriptCore/heap/MutatorScheduler.h | 69 +
.../include/JavaScriptCore/heap/MutatorState.h | 46 +
.../include/JavaScriptCore/heap/OpaqueRootSet.h | 84 +
.../JavaScriptCore/heap/PreventCollectionScope.h | 43 +
.../include/JavaScriptCore/heap/RegisterState.h | 151 +
.../JavaScriptCore/heap/ReleaseHeapAccessScope.h | 51 +
.../include/JavaScriptCore/heap/RunningScope.h | 45 +
.../include/JavaScriptCore/heap/SlotVisitor.h | 257 +
.../JavaScriptCore/heap/SlotVisitorInlines.h | 173 +
.../heap/SpaceTimeMutatorScheduler.h | 79 +
.../heap/StochasticSpaceTimeMutatorScheduler.h | 85 +
.../JavaScriptCore/heap/StopIfNecessaryTimer.h | 37 +
.../Source/include/JavaScriptCore/heap/Strong.h | 147 +
.../include/JavaScriptCore/heap/StrongInlines.h | 47 +
.../Source/include/JavaScriptCore/heap/Subspace.h | 115 +
.../include/JavaScriptCore/heap/SubspaceInlines.h | 69 +
.../include/JavaScriptCore/heap/SweepingScope.h | 45 +
.../heap/SynchronousStopTheWorldMutatorScheduler.h | 50 +
.../include/JavaScriptCore/heap/TinyBloomFilter.h | 69 +
.../JavaScriptCore/heap/UnconditionalFinalizer.h | 38 +
.../include/JavaScriptCore/heap/VisitRaceKey.h | 100 +
.../include/JavaScriptCore/heap/VisitingTimeout.h | 61 +
.../Source/include/JavaScriptCore/heap/Weak.h | 107 +
.../Source/include/JavaScriptCore/heap/WeakBlock.h | 137 +
.../include/JavaScriptCore/heap/WeakHandleOwner.h | 34 +
.../Source/include/JavaScriptCore/heap/WeakImpl.h | 107 +
.../include/JavaScriptCore/heap/WeakInlines.h | 144 +
.../JavaScriptCore/heap/WeakReferenceHarvester.h | 39 +
.../Source/include/JavaScriptCore/heap/WeakSet.h | 121 +
.../include/JavaScriptCore/heap/WeakSetInlines.h | 48 +
.../JavaScriptCore/heap/WriteBarrierBuffer.h | 58 +
.../JavaScriptCore/heap/WriteBarrierSupport.h | 88 +
.../JavaScriptCore/inspector/ScriptArguments.h | 60 +
.../inspector/ScriptCallStackFactory.h | 40 +
.../JavaScriptCore/interpreter/AbstractPC.h | 64 +
.../JavaScriptCore/interpreter/CLoopStack.h | 104 +
.../JavaScriptCore/interpreter/CLoopStackInlines.h | 74 +
.../JavaScriptCore/interpreter/CachedCall.h | 74 +
.../include/JavaScriptCore/interpreter/CallFrame.h | 296 +
.../JavaScriptCore/interpreter/CallFrameClosure.h | 46 +
.../JavaScriptCore/interpreter/FrameTracers.h | 100 +
.../JavaScriptCore/interpreter/Interpreter.h | 198 +
.../interpreter/InterpreterInlines.h | 37 +
.../JavaScriptCore/interpreter/ProtoCallFrame.h | 69 +
.../include/JavaScriptCore/interpreter/Register.h | 219 +
.../JavaScriptCore/interpreter/ShadowChicken.h | 218 +
.../interpreter/ShadowChickenInlines.h | 40 +
.../JavaScriptCore/interpreter/StackVisitor.h | 181 +
.../JavaScriptCore/interpreter/VMEntryRecord.h | 68 +
.../include/JavaScriptCore/jit/AssemblyHelpers.h | 1664 +++++
.../include/JavaScriptCore/jit/BinarySwitch.h | 136 +
.../include/JavaScriptCore/jit/CCallHelpers.h | 2598 ++++++++
.../include/JavaScriptCore/jit/CachedRecovery.h | 127 +
.../JavaScriptCore/jit/CallFrameShuffleData.h | 45 +
.../include/JavaScriptCore/jit/CallFrameShuffler.h | 797 +++
.../include/JavaScriptCore/jit/CompactJITCodeMap.h | 282 +
.../JavaScriptCore/jit/ExecutableAllocationFuzz.h | 40 +
.../JavaScriptCore/jit/ExecutableAllocator.h | 141 +
.../Source/include/JavaScriptCore/jit/FPRInfo.h | 360 ++
.../JavaScriptCore/jit/GCAwareJITStubRoutine.h | 127 +
.../Source/include/JavaScriptCore/jit/GPRInfo.h | 850 +++
.../JavaScriptCore/jit/HostCallReturnValue.h | 54 +
.../Source/include/JavaScriptCore/jit/ICStats.h | 188 +
weex_core/Source/include/JavaScriptCore/jit/JIT.h | 972 +++
.../include/JavaScriptCore/jit/JITAddGenerator.h | 72 +
.../JavaScriptCore/jit/JITBitAndGenerator.h | 39 +
.../JavaScriptCore/jit/JITBitBinaryOpGenerator.h | 61 +
.../include/JavaScriptCore/jit/JITBitOrGenerator.h | 39 +
.../JavaScriptCore/jit/JITBitXorGenerator.h | 39 +
.../Source/include/JavaScriptCore/jit/JITCode.h | 249 +
.../JavaScriptCore/jit/JITCompilationEffort.h | 28 +
.../include/JavaScriptCore/jit/JITDisassembler.h | 83 +
.../include/JavaScriptCore/jit/JITDivGenerator.h | 75 +
.../include/JavaScriptCore/jit/JITExceptions.h | 31 +
.../JavaScriptCore/jit/JITInlineCacheGenerator.h | 133 +
.../Source/include/JavaScriptCore/jit/JITInlines.h | 1390 +++++
.../JavaScriptCore/jit/JITLeftShiftGenerator.h | 39 +
.../Source/include/JavaScriptCore/jit/JITMathIC.h | 283 +
.../include/JavaScriptCore/jit/JITMathICForwards.h | 39 +
.../JavaScriptCore/jit/JITMathICInlineResult.h | 33 +
.../include/JavaScriptCore/jit/JITMulGenerator.h | 72 +
.../include/JavaScriptCore/jit/JITNegGenerator.h | 50 +
.../include/JavaScriptCore/jit/JITOperations.h | 471 ++
.../JavaScriptCore/jit/JITRightShiftGenerator.h | 53 +
.../include/JavaScriptCore/jit/JITStubRoutine.h | 135 +
.../include/JavaScriptCore/jit/JITSubGenerator.h | 69 +
.../Source/include/JavaScriptCore/jit/JITThunks.h | 106 +
.../jit/JITToDFGDeferredCompilationCallback.h | 44 +
.../include/JavaScriptCore/jit/JITWorklist.h | 76 +
.../include/JavaScriptCore/jit/JSInterfaceJIT.h | 251 +
.../include/JavaScriptCore/jit/PCToCodeOriginMap.h | 94 +
.../jit/PolymorphicCallStubRoutine.h | 104 +
weex_core/Source/include/JavaScriptCore/jit/Reg.h | 241 +
.../include/JavaScriptCore/jit/RegisterAtOffset.h | 70 +
.../JavaScriptCore/jit/RegisterAtOffsetList.h | 65 +
.../include/JavaScriptCore/jit/RegisterMap.h | 103 +
.../include/JavaScriptCore/jit/RegisterSet.h | 185 +
.../Source/include/JavaScriptCore/jit/Repatch.h | 55 +
.../JavaScriptCore/jit/ScratchRegisterAllocator.h | 102 +
.../include/JavaScriptCore/jit/SetupVarargsFrame.h | 36 +
.../include/JavaScriptCore/jit/SlowPathCall.h | 84 +
.../include/JavaScriptCore/jit/SnippetOperand.h | 97 +
.../JavaScriptCore/jit/SpecializedThunkJIT.h | 208 +
.../JavaScriptCore/jit/SpillRegistersMode.h | 25 +
.../include/JavaScriptCore/jit/TagRegistersMode.h | 35 +
.../include/JavaScriptCore/jit/TempRegisterSet.h | 212 +
.../include/JavaScriptCore/jit/ThunkGenerator.h | 31 +
.../include/JavaScriptCore/jit/ThunkGenerators.h | 66 +
.../include/JavaScriptCore/jit/UnusedPointer.h | 27 +
.../include/JavaScriptCore/parser/ASTBuilder.h | 1464 +++++
.../Source/include/JavaScriptCore/parser/Lexer.h | 399 ++
.../include/JavaScriptCore/parser/ModuleAnalyzer.h | 46 +
.../JavaScriptCore/parser/ModuleScopeData.h | 58 +
.../JavaScriptCore/parser/NodeConstructors.h | 1076 ++++
.../Source/include/JavaScriptCore/parser/Nodes.h | 2345 +++++++
.../Source/include/JavaScriptCore/parser/Parser.h | 1913 ++++++
.../include/JavaScriptCore/parser/ParserArena.h | 183 +
.../include/JavaScriptCore/parser/ParserError.h | 161 +
.../JavaScriptCore/parser/ParserFunctionInfo.h | 45 +
.../include/JavaScriptCore/parser/ParserModes.h | 244 +
.../include/JavaScriptCore/parser/ParserTokens.h | 256 +
.../include/JavaScriptCore/parser/ResultType.h | 185 +
.../include/JavaScriptCore/parser/SourceCode.h | 90 +
.../include/JavaScriptCore/parser/SourceCodeKey.h | 125 +
.../include/JavaScriptCore/parser/SourceProvider.h | 146 +
.../JavaScriptCore/parser/SourceProviderCache.h | 41 +
.../parser/SourceProviderCacheItem.h | 145 +
.../include/JavaScriptCore/parser/SyntaxChecker.h | 408 ++
.../JavaScriptCore/parser/UnlinkedSourceCode.h | 98 +
.../JavaScriptCore/parser/VariableEnvironment.h | 110 +
.../JavaScriptCore/profiler/ProfilerBytecode.h | 57 +
.../profiler/ProfilerBytecodeSequence.h | 54 +
.../JavaScriptCore/profiler/ProfilerBytecodes.h | 52 +
.../JavaScriptCore/profiler/ProfilerCompilation.h | 92 +
.../profiler/ProfilerCompilationKind.h | 38 +
.../profiler/ProfilerCompiledBytecode.h | 44 +
.../JavaScriptCore/profiler/ProfilerDatabase.h | 89 +
.../JavaScriptCore/profiler/ProfilerEvent.h | 67 +
.../profiler/ProfilerExecutionCounter.h | 39 +
.../profiler/ProfilerJettisonReason.h | 44 +
.../JavaScriptCore/profiler/ProfilerOSRExit.h | 50 +
.../JavaScriptCore/profiler/ProfilerOSRExitSite.h | 41 +
.../JavaScriptCore/profiler/ProfilerOrigin.h | 109 +
.../JavaScriptCore/profiler/ProfilerOriginStack.h | 91 +
.../profiler/ProfilerProfiledBytecodes.h | 40 +
.../include/JavaScriptCore/profiler/ProfilerUID.h | 103 +
.../JavaScriptCore/runtime/AbstractModuleRecord.h | 173 +
.../include/JavaScriptCore/runtime/ArgList.h | 176 +
.../include/JavaScriptCore/runtime/ArgumentsMode.h | 28 +
.../JavaScriptCore/runtime/ArityCheckMode.h | 28 +
.../include/JavaScriptCore/runtime/ArrayBuffer.h | 214 +
.../runtime/ArrayBufferNeuteringWatchpoint.h | 50 +
.../runtime/ArrayBufferSharingMode.h | 52 +
.../JavaScriptCore/runtime/ArrayBufferView.h | 216 +
.../JavaScriptCore/runtime/ArrayConstructor.h | 83 +
.../JavaScriptCore/runtime/ArrayConventions.h | 144 +
.../runtime/ArrayIteratorAdaptiveWatchpoint.h | 38 +
.../runtime/ArrayIteratorPrototype.h | 54 +
.../JavaScriptCore/runtime/ArrayPrototype.h | 71 +
.../include/JavaScriptCore/runtime/ArrayStorage.h | 158 +
.../runtime/AsyncFunctionConstructor.h | 52 +
.../runtime/AsyncFunctionPrototype.h | 50 +
.../include/JavaScriptCore/runtime/AtomicsObject.h | 43 +
.../JavaScriptCore/runtime/AuxiliaryBarrier.h | 55 +
.../runtime/AuxiliaryBarrierInlines.h | 44 +
.../JavaScriptCore/runtime/BasicBlockLocation.h | 62 +
.../runtime/BatchedTransitionOptimizer.h | 61 +
.../include/JavaScriptCore/runtime/BigInteger.h | 101 +
.../JavaScriptCore/runtime/BooleanConstructor.h | 57 +
.../include/JavaScriptCore/runtime/BooleanObject.h | 56 +
.../JavaScriptCore/runtime/BooleanPrototype.h | 51 +
.../include/JavaScriptCore/runtime/BundlePath.h | 28 +
.../include/JavaScriptCore/runtime/Butterfly.h | 167 +
.../JavaScriptCore/runtime/ButterflyInlines.h | 224 +
.../include/JavaScriptCore/runtime/CallData.h | 65 +
.../include/JavaScriptCore/runtime/CatchScope.h | 64 +
.../include/JavaScriptCore/runtime/ClassInfo.h | 207 +
.../JavaScriptCore/runtime/ClonedArguments.h | 73 +
.../include/JavaScriptCore/runtime/CodeCache.h | 254 +
.../runtime/CodeSpecializationKind.h | 42 +
.../JavaScriptCore/runtime/CommonIdentifiers.h | 431 ++
.../JavaScriptCore/runtime/CommonSlowPaths.h | 264 +
.../runtime/CommonSlowPathsExceptions.h | 31 +
.../JavaScriptCore/runtime/CompilationResult.h | 60 +
.../include/JavaScriptCore/runtime/Completion.h | 68 +
.../JavaScriptCore/runtime/ConcurrentJITLock.h | 135 +
.../JavaScriptCore/runtime/ConcurrentJSLock.h | 127 +
.../include/JavaScriptCore/runtime/ConfigFile.h | 51 +
.../include/JavaScriptCore/runtime/ConsoleClient.h | 64 +
.../include/JavaScriptCore/runtime/ConsoleObject.h | 50 +
.../include/JavaScriptCore/runtime/ConsoleTypes.h | 65 +
.../include/JavaScriptCore/runtime/ConstantMode.h | 38 +
.../JavaScriptCore/runtime/ConstructAbility.h | 28 +
.../include/JavaScriptCore/runtime/ConstructData.h | 66 +
.../JavaScriptCore/runtime/ControlFlowProfiler.h | 104 +
.../JavaScriptCore/runtime/CustomGetterSetter.h | 74 +
.../include/JavaScriptCore/runtime/DataView.h | 90 +
.../JavaScriptCore/runtime/DateConstructor.h | 60 +
.../JavaScriptCore/runtime/DateConversion.h | 37 +
.../include/JavaScriptCore/runtime/DateInstance.h | 88 +
.../JavaScriptCore/runtime/DateInstanceCache.h | 83 +
.../include/JavaScriptCore/runtime/DatePrototype.h | 55 +
.../runtime/DefinePropertyAttributes.h | 157 +
.../JavaScriptCore/runtime/DirectArguments.h | 163 +
.../JavaScriptCore/runtime/DirectArgumentsOffset.h | 42 +
.../JavaScriptCore/runtime/DirectEvalExecutable.h | 32 +
.../include/JavaScriptCore/runtime/DumpContext.h | 41 +
.../runtime/ECMAScriptSpecInternalFunctions.h | 27 +
.../JavaScriptCore/runtime/EnumerationMode.h | 70 +
.../Source/include/JavaScriptCore/runtime/Error.h | 164 +
.../JavaScriptCore/runtime/ErrorConstructor.h | 56 +
.../JavaScriptCore/runtime/ErrorHandlingScope.h | 34 +
.../include/JavaScriptCore/runtime/ErrorInstance.h | 73 +
.../JavaScriptCore/runtime/ErrorPrototype.h | 51 +
.../JavaScriptCore/runtime/EvalExecutable.h | 69 +
.../include/JavaScriptCore/runtime/Exception.h | 71 +
.../runtime/ExceptionEventLocation.h | 44 +
.../include/JavaScriptCore/runtime/ExceptionFuzz.h | 39 +
.../JavaScriptCore/runtime/ExceptionHelpers.h | 82 +
.../JavaScriptCore/runtime/ExceptionScope.h | 71 +
.../JavaScriptCore/runtime/ExecutableBase.h | 233 +
.../include/JavaScriptCore/runtime/Float32Array.h | 23 +
.../include/JavaScriptCore/runtime/Float64Array.h | 23 +
.../JavaScriptCore/runtime/FunctionConstructor.h | 70 +
.../JavaScriptCore/runtime/FunctionExecutable.h | 182 +
.../runtime/FunctionExecutableDump.h | 39 +
.../runtime/FunctionHasExecutedCache.h | 55 +
.../JavaScriptCore/runtime/FunctionPrototype.h | 55 +
.../JavaScriptCore/runtime/FunctionRareData.h | 122 +
.../runtime/GeneratorFunctionConstructor.h | 58 +
.../runtime/GeneratorFunctionPrototype.h | 52 +
.../JavaScriptCore/runtime/GeneratorPrototype.h | 54 +
.../JavaScriptCore/runtime/GenericArguments.h | 59 +
.../runtime/GenericArgumentsInlines.h | 306 +
.../include/JavaScriptCore/runtime/GenericOffset.h | 102 +
.../JavaScriptCore/runtime/GenericTypedArrayView.h | 107 +
.../runtime/GenericTypedArrayViewInlines.h | 103 +
.../include/JavaScriptCore/runtime/GetPutInfo.h | 227 +
.../include/JavaScriptCore/runtime/GetterSetter.h | 149 +
.../JavaScriptCore/runtime/HasOwnPropertyCache.h | 146 +
.../include/JavaScriptCore/runtime/HashMapImpl.h | 631 ++
.../include/JavaScriptCore/runtime/Identifier.h | 311 +
.../JavaScriptCore/runtime/IdentifierInlines.h | 144 +
.../JavaScriptCore/runtime/IndexingHeader.h | 128 +
.../JavaScriptCore/runtime/IndexingHeaderInlines.h | 53 +
.../include/JavaScriptCore/runtime/IndexingType.h | 180 +
.../runtime/IndirectEvalExecutable.h | 32 +
.../include/JavaScriptCore/runtime/InferredType.h | 282 +
.../JavaScriptCore/runtime/InferredTypeTable.h | 102 +
.../include/JavaScriptCore/runtime/InferredValue.h | 127 +
.../JavaScriptCore/runtime/InitializeThreading.h | 27 +
.../runtime/InspectorInstrumentationObject.h | 55 +
.../include/JavaScriptCore/runtime/Int16Array.h | 23 +
.../include/JavaScriptCore/runtime/Int32Array.h | 23 +
.../include/JavaScriptCore/runtime/Int8Array.h | 23 +
.../runtime/IntegralTypedArrayBase.h | 52 +
.../JavaScriptCore/runtime/InternalFunction.h | 65 +
.../include/JavaScriptCore/runtime/IntlCollator.h | 79 +
.../runtime/IntlCollatorConstructor.h | 56 +
.../JavaScriptCore/runtime/IntlCollatorPrototype.h | 47 +
.../JavaScriptCore/runtime/IntlDateTimeFormat.h | 101 +
.../runtime/IntlDateTimeFormatConstructor.h | 56 +
.../runtime/IntlDateTimeFormatPrototype.h | 47 +
.../JavaScriptCore/runtime/IntlNumberFormat.h | 83 +
.../runtime/IntlNumberFormatConstructor.h | 56 +
.../runtime/IntlNumberFormatPrototype.h | 47 +
.../include/JavaScriptCore/runtime/IntlObject.h | 66 +
.../JavaScriptCore/runtime/IntlObjectInlines.h | 58 +
.../include/JavaScriptCore/runtime/Intrinsic.h | 92 +
.../include/JavaScriptCore/runtime/IterationKind.h | 30 +
.../JavaScriptCore/runtime/IterationStatus.h | 28 +
.../JavaScriptCore/runtime/IteratorOperations.h | 65 +
.../JavaScriptCore/runtime/IteratorPrototype.h | 52 +
.../JavaScriptCore/runtime/JSAPIValueWrapper.h | 73 +
.../include/JavaScriptCore/runtime/JSArray.h | 338 +
.../include/JavaScriptCore/runtime/JSArrayBuffer.h | 79 +
.../runtime/JSArrayBufferConstructor.h | 54 +
.../runtime/JSArrayBufferPrototype.h | 45 +
.../JavaScriptCore/runtime/JSArrayBufferView.h | 197 +
.../runtime/JSArrayBufferViewInlines.h | 94 +
.../JavaScriptCore/runtime/JSArrayInlines.h | 100 +
.../JavaScriptCore/runtime/JSAsyncFunction.h | 57 +
.../JavaScriptCore/runtime/JSBoundFunction.h | 69 +
.../include/JavaScriptCore/runtime/JSCInlines.h | 47 +
.../include/JavaScriptCore/runtime/JSCJSValue.h | 597 ++
.../JavaScriptCore/runtime/JSCJSValueInlines.h | 1094 ++++
.../include/JavaScriptCore/runtime/JSCallee.h | 98 +
.../Source/include/JavaScriptCore/runtime/JSCell.h | 304 +
.../include/JavaScriptCore/runtime/JSCellInlines.h | 342 ++
.../runtime/JSCustomGetterSetterFunction.h | 64 +
.../include/JavaScriptCore/runtime/JSDataView.h | 78 +
.../JavaScriptCore/runtime/JSDataViewPrototype.h | 43 +
.../include/JavaScriptCore/runtime/JSDateMath.h | 34 +
.../JavaScriptCore/runtime/JSDestructibleObject.h | 55 +
.../runtime/JSDestructibleObjectSubspace.h | 35 +
.../JavaScriptCore/runtime/JSEnvironmentRecord.h | 104 +
.../JavaScriptCore/runtime/JSExportMacros.h | 57 +
.../include/JavaScriptCore/runtime/JSFixedArray.h | 133 +
.../JavaScriptCore/runtime/JSFloat32Array.h | 21 +
.../JavaScriptCore/runtime/JSFloat64Array.h | 21 +
.../include/JavaScriptCore/runtime/JSFunction.h | 202 +
.../JavaScriptCore/runtime/JSFunctionInlines.h | 103 +
.../JavaScriptCore/runtime/JSGeneratorFunction.h | 88 +
.../runtime/JSGenericTypedArrayView.h | 379 ++
.../runtime/JSGenericTypedArrayViewConstructor.h | 59 +
.../JSGenericTypedArrayViewConstructorInlines.h | 279 +
.../runtime/JSGenericTypedArrayViewInlines.h | 591 ++
.../runtime/JSGenericTypedArrayViewPrototype.h | 55 +
.../JSGenericTypedArrayViewPrototypeFunctions.h | 572 ++
.../JSGenericTypedArrayViewPrototypeInlines.h | 63 +
.../runtime/JSGlobalLexicalEnvironment.h | 67 +
.../JavaScriptCore/runtime/JSGlobalObject.h | 935 +++
.../runtime/JSGlobalObjectDebuggable.h | 64 +
.../runtime/JSGlobalObjectFunctions.h | 53 +
.../JavaScriptCore/runtime/JSGlobalObjectInlines.h | 62 +
.../include/JavaScriptCore/runtime/JSInt16Array.h | 21 +
.../include/JavaScriptCore/runtime/JSInt32Array.h | 21 +
.../include/JavaScriptCore/runtime/JSInt8Array.h | 21 +
.../JavaScriptCore/runtime/JSInternalPromise.h | 50 +
.../runtime/JSInternalPromiseConstructor.h | 44 +
.../runtime/JSInternalPromiseDeferred.h | 49 +
.../runtime/JSInternalPromisePrototype.h | 39 +
.../Source/include/JavaScriptCore/runtime/JSJob.h | 31 +
.../JavaScriptCore/runtime/JSLexicalEnvironment.h | 78 +
.../Source/include/JavaScriptCore/runtime/JSLock.h | 145 +
.../Source/include/JavaScriptCore/runtime/JSMap.h | 66 +
.../include/JavaScriptCore/runtime/JSMapIterator.h | 112 +
.../JavaScriptCore/runtime/JSModuleEnvironment.h | 90 +
.../JavaScriptCore/runtime/JSModuleLoader.h | 80 +
.../runtime/JSModuleNamespaceObject.h | 108 +
.../JavaScriptCore/runtime/JSModuleRecord.h | 64 +
.../JavaScriptCore/runtime/JSNativeStdFunction.h | 59 +
.../include/JavaScriptCore/runtime/JSONObject.h | 54 +
.../include/JavaScriptCore/runtime/JSObject.h | 1581 +++++
.../JavaScriptCore/runtime/JSObjectInlines.h | 358 ++
.../include/JavaScriptCore/runtime/JSPromise.h | 52 +
.../JavaScriptCore/runtime/JSPromiseConstructor.h | 50 +
.../JavaScriptCore/runtime/JSPromiseDeferred.h | 65 +
.../JavaScriptCore/runtime/JSPromisePrototype.h | 43 +
.../runtime/JSPropertyNameEnumerator.h | 138 +
.../runtime/JSPropertyNameIterator.h | 66 +
.../include/JavaScriptCore/runtime/JSProxy.h | 98 +
.../include/JavaScriptCore/runtime/JSScope.h | 150 +
.../JavaScriptCore/runtime/JSScriptFetcher.h | 70 +
.../runtime/JSSegmentedVariableObject.h | 103 +
.../runtime/JSSegmentedVariableObjectSubspace.h | 35 +
.../Source/include/JavaScriptCore/runtime/JSSet.h | 62 +
.../include/JavaScriptCore/runtime/JSSetIterator.h | 101 +
.../include/JavaScriptCore/runtime/JSSourceCode.h | 70 +
.../include/JavaScriptCore/runtime/JSString.h | 782 +++
.../JavaScriptCore/runtime/JSStringBuilder.h | 132 +
.../JavaScriptCore/runtime/JSStringInlines.h | 32 +
.../JavaScriptCore/runtime/JSStringIterator.h | 56 +
.../JavaScriptCore/runtime/JSStringJoiner.h | 145 +
.../JavaScriptCore/runtime/JSStringSubspace.h | 35 +
.../JavaScriptCore/runtime/JSSymbolTableObject.h | 219 +
.../JavaScriptCore/runtime/JSTemplateRegistryKey.h | 51 +
.../Source/include/JavaScriptCore/runtime/JSType.h | 105 +
.../include/JavaScriptCore/runtime/JSTypeInfo.h | 139 +
.../runtime/JSTypedArrayConstructors.h | 38 +
.../runtime/JSTypedArrayPrototypes.h | 37 +
.../runtime/JSTypedArrayViewConstructor.h | 52 +
.../runtime/JSTypedArrayViewPrototype.h | 47 +
.../include/JavaScriptCore/runtime/JSTypedArrays.h | 39 +
.../include/JavaScriptCore/runtime/JSUint16Array.h | 21 +
.../include/JavaScriptCore/runtime/JSUint32Array.h | 21 +
.../include/JavaScriptCore/runtime/JSUint8Array.h | 21 +
.../JavaScriptCore/runtime/JSUint8ClampedArray.h | 21 +
.../include/JavaScriptCore/runtime/JSWeakMap.h | 72 +
.../include/JavaScriptCore/runtime/JSWeakSet.h | 72 +
.../include/JavaScriptCore/runtime/JSWithScope.h | 45 +
.../JavaScriptCore/runtime/JSWrapperObject.h | 81 +
.../JavaScriptCore/runtime/LazyClassStructure.h | 118 +
.../runtime/LazyClassStructureInlines.h | 39 +
.../include/JavaScriptCore/runtime/LazyProperty.h | 111 +
.../JavaScriptCore/runtime/LazyPropertyInlines.h | 97 +
.../include/JavaScriptCore/runtime/LiteralParser.h | 198 +
.../Source/include/JavaScriptCore/runtime/Lookup.h | 394 ++
.../JavaScriptCore/runtime/MachineContext.h | 608 ++
.../include/JavaScriptCore/runtime/MapBase.h | 87 +
.../JavaScriptCore/runtime/MapConstructor.h | 56 +
.../JavaScriptCore/runtime/MapIteratorPrototype.h | 51 +
.../include/JavaScriptCore/runtime/MapPrototype.h | 56 +
.../include/JavaScriptCore/runtime/MatchResult.h | 76 +
.../include/JavaScriptCore/runtime/MathCommon.h | 155 +
.../include/JavaScriptCore/runtime/MathObject.h | 54 +
.../JavaScriptCore/runtime/MemoryStatistics.h | 34 +
.../include/JavaScriptCore/runtime/Microtask.h | 36 +
.../JavaScriptCore/runtime/ModuleLoaderPrototype.h | 49 +
.../runtime/ModuleProgramExecutable.h | 71 +
.../runtime/NativeErrorConstructor.h | 62 +
.../JavaScriptCore/runtime/NativeErrorPrototype.h | 45 +
.../JavaScriptCore/runtime/NativeExecutable.h | 89 +
.../JavaScriptCore/runtime/NativeStdFunctionCell.h | 51 +
.../JavaScriptCore/runtime/NullGetterFunction.h | 52 +
.../JavaScriptCore/runtime/NullSetterFunction.h | 52 +
.../JavaScriptCore/runtime/NumberConstructor.h | 56 +
.../include/JavaScriptCore/runtime/NumberObject.h | 50 +
.../JavaScriptCore/runtime/NumberPrototype.h | 53 +
.../JavaScriptCore/runtime/NumericStrings.h | 88 +
.../JavaScriptCore/runtime/ObjectConstructor.h | 126 +
.../JavaScriptCore/runtime/ObjectPrototype.h | 48 +
.../include/JavaScriptCore/runtime/Operations.h | 270 +
.../include/JavaScriptCore/runtime/Options.h | 678 ++
.../include/JavaScriptCore/runtime/ParseInt.h | 220 +
.../JavaScriptCore/runtime/PlatformThread.h | 71 +
.../include/JavaScriptCore/runtime/PrivateName.h | 59 +
.../JavaScriptCore/runtime/ProgramExecutable.h | 75 +
.../JavaScriptCore/runtime/PropertyDescriptor.h | 115 +
.../JavaScriptCore/runtime/PropertyMapHashTable.h | 558 ++
.../include/JavaScriptCore/runtime/PropertyName.h | 120 +
.../JavaScriptCore/runtime/PropertyNameArray.h | 150 +
.../JavaScriptCore/runtime/PropertyOffset.h | 137 +
.../include/JavaScriptCore/runtime/PropertySlot.h | 396 ++
.../JavaScriptCore/runtime/PropertyStorage.h | 28 +
.../include/JavaScriptCore/runtime/Protect.h | 60 +
.../include/JavaScriptCore/runtime/PrototypeMap.h | 57 +
.../JavaScriptCore/runtime/PrototypeMapInlines.h | 39 +
.../JavaScriptCore/runtime/ProxyConstructor.h | 49 +
.../include/JavaScriptCore/runtime/ProxyObject.h | 109 +
.../include/JavaScriptCore/runtime/ProxyRevoke.h | 53 +
.../include/JavaScriptCore/runtime/PureNaN.h | 88 +
.../JavaScriptCore/runtime/PutDirectIndexMode.h | 25 +
.../JavaScriptCore/runtime/PutPropertySlot.h | 137 +
.../include/JavaScriptCore/runtime/ReflectObject.h | 51 +
.../Source/include/JavaScriptCore/runtime/RegExp.h | 150 +
.../include/JavaScriptCore/runtime/RegExpCache.h | 56 +
.../JavaScriptCore/runtime/RegExpCachedResult.h | 85 +
.../JavaScriptCore/runtime/RegExpConstructor.h | 148 +
.../include/JavaScriptCore/runtime/RegExpInlines.h | 230 +
.../include/JavaScriptCore/runtime/RegExpKey.h | 103 +
.../JavaScriptCore/runtime/RegExpMatchesArray.h | 129 +
.../include/JavaScriptCore/runtime/RegExpObject.h | 129 +
.../JavaScriptCore/runtime/RegExpObjectInlines.h | 141 +
.../JavaScriptCore/runtime/RegExpPrototype.h | 63 +
.../include/JavaScriptCore/runtime/RuntimeFlags.h | 89 +
.../include/JavaScriptCore/runtime/RuntimeType.h | 51 +
.../JavaScriptCore/runtime/SamplingCounter.h | 163 +
.../JavaScriptCore/runtime/SamplingProfiler.h | 209 +
.../include/JavaScriptCore/runtime/ScopeOffset.h | 40 +
.../JavaScriptCore/runtime/ScopedArguments.h | 161 +
.../JavaScriptCore/runtime/ScopedArgumentsTable.h | 85 +
.../JavaScriptCore/runtime/ScriptExecutable.h | 136 +
.../include/JavaScriptCore/runtime/ScriptFetcher.h | 30 +
.../JavaScriptCore/runtime/SetConstructor.h | 56 +
.../JavaScriptCore/runtime/SetIteratorPrototype.h | 51 +
.../include/JavaScriptCore/runtime/SetPrototype.h | 56 +
.../runtime/SimpleTypedArrayController.h | 61 +
.../JavaScriptCore/runtime/SlowPathReturnType.h | 76 +
.../include/JavaScriptCore/runtime/SmallStrings.h | 136 +
.../include/JavaScriptCore/runtime/SourceOrigin.h | 51 +
.../JavaScriptCore/runtime/SparseArrayValueMap.h | 124 +
.../JavaScriptCore/runtime/StackAlignment.h | 53 +
.../include/JavaScriptCore/runtime/StackFrame.h | 65 +
.../JavaScriptCore/runtime/StrictEvalActivation.h | 51 +
.../JavaScriptCore/runtime/StringConstructor.h | 57 +
.../runtime/StringIteratorPrototype.h | 52 +
.../include/JavaScriptCore/runtime/StringObject.h | 110 +
.../JavaScriptCore/runtime/StringPrototype.h | 68 +
.../runtime/StringRecursionChecker.h | 93 +
.../include/JavaScriptCore/runtime/Structure.h | 788 +++
.../JavaScriptCore/runtime/StructureChain.h | 82 +
.../JavaScriptCore/runtime/StructureIDBlob.h | 85 +
.../JavaScriptCore/runtime/StructureIDTable.h | 128 +
.../JavaScriptCore/runtime/StructureInlines.h | 401 ++
.../JavaScriptCore/runtime/StructureRareData.h | 80 +
.../runtime/StructureRareDataInlines.h | 46 +
.../runtime/StructureTransitionTable.h | 219 +
.../Source/include/JavaScriptCore/runtime/Symbol.h | 78 +
.../JavaScriptCore/runtime/SymbolConstructor.h | 57 +
.../include/JavaScriptCore/runtime/SymbolObject.h | 63 +
.../JavaScriptCore/runtime/SymbolPrototype.h | 52 +
.../include/JavaScriptCore/runtime/SymbolTable.h | 711 +++
.../JavaScriptCore/runtime/TemplateRegistry.h | 40 +
.../JavaScriptCore/runtime/TemplateRegistryKey.h | 117 +
.../runtime/TemplateRegistryKeyTable.h | 52 +
.../JavaScriptCore/runtime/TestRunnerUtils.h | 50 +
.../include/JavaScriptCore/runtime/ThrowScope.h | 100 +
.../JavaScriptCore/runtime/ToNativeFromValue.h | 53 +
.../include/JavaScriptCore/runtime/TypeError.h | 33 +
.../JavaScriptCore/runtime/TypeLocationCache.h | 58 +
.../include/JavaScriptCore/runtime/TypeProfiler.h | 134 +
.../JavaScriptCore/runtime/TypeProfilerLog.h | 73 +
.../include/JavaScriptCore/runtime/TypeSet.h | 103 +
.../JavaScriptCore/runtime/TypedArrayAdaptors.h | 279 +
.../JavaScriptCore/runtime/TypedArrayBase.h | 142 +
.../JavaScriptCore/runtime/TypedArrayController.h | 40 +
.../JavaScriptCore/runtime/TypedArrayInlines.h | 25 +
.../JavaScriptCore/runtime/TypedArrayType.h | 194 +
.../include/JavaScriptCore/runtime/TypedArrays.h | 36 +
.../include/JavaScriptCore/runtime/TypeofType.h | 41 +
.../include/JavaScriptCore/runtime/Uint16Array.h | 23 +
.../JavaScriptCore/runtime/Uint16WithFraction.h | 259 +
.../include/JavaScriptCore/runtime/Uint32Array.h | 23 +
.../include/JavaScriptCore/runtime/Uint8Array.h | 23 +
.../JavaScriptCore/runtime/Uint8ClampedArray.h | 23 +
.../Source/include/JavaScriptCore/runtime/VM.h | 819 +++
.../include/JavaScriptCore/runtime/VMEntryScope.h | 46 +
.../include/JavaScriptCore/runtime/VMInlines.h | 56 +
.../include/JavaScriptCore/runtime/VMTraps.h | 173 +
.../include/JavaScriptCore/runtime/VarOffset.h | 236 +
.../include/JavaScriptCore/runtime/Watchdog.h | 73 +
.../include/JavaScriptCore/runtime/WeakGCMap.h | 97 +
.../JavaScriptCore/runtime/WeakGCMapInlines.h | 72 +
.../JavaScriptCore/runtime/WeakMapConstructor.h | 56 +
.../include/JavaScriptCore/runtime/WeakMapData.h | 85 +
.../JavaScriptCore/runtime/WeakMapPrototype.h | 51 +
.../JavaScriptCore/runtime/WeakSetConstructor.h | 56 +
.../JavaScriptCore/runtime/WeakSetPrototype.h | 51 +
.../JavaScriptCore/runtime/WebAssemblyExecutable.h | 68 +
.../include/JavaScriptCore/runtime/WriteBarrier.h | 218 +
.../JavaScriptCore/runtime/WriteBarrierInlines.h | 57 +
.../JavaScriptCore/yarr/RegularExpression.h | 52 +
.../Source/include/JavaScriptCore/yarr/Yarr.h | 57 +
.../include/JavaScriptCore/yarr/YarrCanonicalize.h | 136 +
.../include/JavaScriptCore/yarr/YarrInterpreter.h | 388 ++
.../Source/include/JavaScriptCore/yarr/YarrJIT.h | 166 +
.../include/JavaScriptCore/yarr/YarrParser.h | 950 +++
.../include/JavaScriptCore/yarr/YarrPattern.h | 470 ++
.../JavaScriptCore/yarr/YarrSyntaxChecker.h | 27 +
weex_core/Source/include/WeexApiHeader.h | 2 +-
weex_core/Source/include/wtf/ASCIICType.h | 263 +
weex_core/Source/include/wtf/Assertions.h | 460 ++
weex_core/Source/include/wtf/Atomics.h | 526 ++
weex_core/Source/include/wtf/AutodrainedPool.h | 51 +
weex_core/Source/include/wtf/AutomaticThread.h | 186 +
weex_core/Source/include/wtf/BackwardsGraph.h | 288 +
weex_core/Source/include/wtf/Bag.h | 138 +
weex_core/Source/include/wtf/BagToHashMap.h | 43 +
weex_core/Source/include/wtf/BitVector.h | 473 ++
weex_core/Source/include/wtf/Bitmap.h | 324 +
weex_core/Source/include/wtf/BlockObjCExceptions.h | 25 +
weex_core/Source/include/wtf/BlockPtr.h | 162 +
weex_core/Source/include/wtf/BlockStack.h | 89 +
weex_core/Source/include/wtf/BloomFilter.h | 260 +
weex_core/Source/include/wtf/Box.h | 74 +
weex_core/Source/include/wtf/Brigand.h | 2507 ++++++++
weex_core/Source/include/wtf/BubbleSort.h | 95 +
.../Source/include/wtf/BumpPointerAllocator.h | 245 +
weex_core/Source/include/wtf/ByteOrder.h | 83 +
weex_core/Source/include/wtf/CheckedArithmetic.h | 845 +++
weex_core/Source/include/wtf/CheckedBoolean.h | 63 +
weex_core/Source/include/wtf/ClockType.h | 37 +
weex_core/Source/include/wtf/CommaPrinter.h | 59 +
weex_core/Source/include/wtf/CompilationThread.h | 52 +
weex_core/Source/include/wtf/Compiler.h | 333 +
weex_core/Source/include/wtf/Condition.h | 186 +
weex_core/Source/include/wtf/CrossThreadCopier.h | 126 +
weex_core/Source/include/wtf/CrossThreadQueue.h | 89 +
weex_core/Source/include/wtf/CrossThreadTask.h | 95 +
.../Source/include/wtf/CryptographicUtilities.h | 31 +
.../include/wtf/CryptographicallyRandomNumber.h | 34 +
weex_core/Source/include/wtf/CurrentTime.h | 73 +
weex_core/Source/include/wtf/DataLog.h | 72 +
weex_core/Source/include/wtf/DateMath.h | 135 +
weex_core/Source/include/wtf/DecimalNumber.h | 101 +
.../Source/include/wtf/DeferrableRefCounted.h | 113 +
weex_core/Source/include/wtf/DeprecatedOptional.h | 44 +
weex_core/Source/include/wtf/Deque.h | 677 ++
weex_core/Source/include/wtf/DisallowCType.h | 73 +
weex_core/Source/include/wtf/Dominators.h | 745 +++
weex_core/Source/include/wtf/DoublyLinkedList.h | 213 +
weex_core/Source/include/wtf/EnumTraits.h | 57 +
weex_core/Source/include/wtf/Expected.h | 449 ++
weex_core/Source/include/wtf/ExportMacros.h | 110 +
weex_core/Source/include/wtf/FastBitVector.h | 573 ++
weex_core/Source/include/wtf/FastMalloc.h | 169 +
weex_core/Source/include/wtf/FastTLS.h | 89 +
weex_core/Source/include/wtf/FeatureDefines.h | 798 +++
weex_core/Source/include/wtf/FilePrintStream.h | 54 +
weex_core/Source/include/wtf/FlipBytes.h | 110 +
.../Source/include/wtf/ForbidHeapAllocation.h | 30 +
weex_core/Source/include/wtf/Forward.h | 77 +
weex_core/Source/include/wtf/Function.h | 93 +
weex_core/Source/include/wtf/FunctionDispatcher.h | 45 +
weex_core/Source/include/wtf/GetPtr.h | 80 +
weex_core/Source/include/wtf/GlobalVersion.h | 33 +
weex_core/Source/include/wtf/GraphNodeWorklist.h | 216 +
weex_core/Source/include/wtf/GregorianDateTime.h | 122 +
weex_core/Source/include/wtf/HashCountedSet.h | 323 +
weex_core/Source/include/wtf/HashFunctions.h | 272 +
weex_core/Source/include/wtf/HashIterators.h | 209 +
weex_core/Source/include/wtf/HashMap.h | 595 ++
weex_core/Source/include/wtf/HashMethod.h | 38 +
weex_core/Source/include/wtf/HashSet.h | 393 ++
weex_core/Source/include/wtf/HashTable.h | 1535 +++++
weex_core/Source/include/wtf/HashTraits.h | 376 ++
weex_core/Source/include/wtf/Hasher.h | 386 ++
weex_core/Source/include/wtf/HexNumber.h | 116 +
weex_core/Source/include/wtf/ICUCompatible.h | 22 +
weex_core/Source/include/wtf/Indenter.h | 60 +
weex_core/Source/include/wtf/IndexMap.h | 75 +
weex_core/Source/include/wtf/IndexSet.h | 156 +
weex_core/Source/include/wtf/IndexSparseSet.h | 140 +
.../Source/include/wtf/IndexedContainerIterator.h | 74 +
weex_core/Source/include/wtf/InlineASM.h | 91 +
weex_core/Source/include/wtf/Insertion.h | 78 +
weex_core/Source/include/wtf/IteratorAdaptors.h | 106 +
weex_core/Source/include/wtf/IteratorRange.h | 49 +
weex_core/Source/include/wtf/LEBDecoder.h | 100 +
weex_core/Source/include/wtf/ListDump.h | 180 +
weex_core/Source/include/wtf/ListHashSet.h | 711 +++
weex_core/Source/include/wtf/Lock.h | 146 +
weex_core/Source/include/wtf/LockAlgorithm.h | 242 +
weex_core/Source/include/wtf/LockedPrintStream.h | 51 +
weex_core/Source/include/wtf/Locker.h | 129 +
weex_core/Source/include/wtf/LoggingAccumulator.h | 31 +
weex_core/Source/include/wtf/LoggingHashID.h | 45 +
weex_core/Source/include/wtf/LoggingHashMap.h | 301 +
weex_core/Source/include/wtf/LoggingHashSet.h | 241 +
weex_core/Source/include/wtf/LoggingHashTraits.h | 44 +
weex_core/Source/include/wtf/MD5.h | 64 +
weex_core/Source/include/wtf/MainThread.h | 108 +
weex_core/Source/include/wtf/MallocPtr.h | 112 +
weex_core/Source/include/wtf/MathExtras.h | 476 ++
weex_core/Source/include/wtf/MediaTime.h | 160 +
weex_core/Source/include/wtf/MemoryFootprint.h | 30 +
.../Source/include/wtf/MemoryPressureHandler.h | 207 +
weex_core/Source/include/wtf/MessageQueue.h | 246 +
weex_core/Source/include/wtf/MetaAllocator.h | 196 +
weex_core/Source/include/wtf/MetaAllocatorHandle.h | 110 +
weex_core/Source/include/wtf/MonotonicTime.h | 156 +
weex_core/Source/include/wtf/NakedPtr.h | 112 +
weex_core/Source/include/wtf/NeverDestroyed.h | 125 +
weex_core/Source/include/wtf/NoLock.h | 41 +
weex_core/Source/include/wtf/Noncopyable.h | 27 +
weex_core/Source/include/wtf/NumberOfCores.h | 28 +
weex_core/Source/include/wtf/OSAllocator.h | 95 +
weex_core/Source/include/wtf/OSObjectPtr.h | 129 +
weex_core/Source/include/wtf/OSRandomSource.h | 31 +
weex_core/Source/include/wtf/ObjcRuntimeExtras.h | 43 +
weex_core/Source/include/wtf/OptionSet.h | 144 +
weex_core/Source/include/wtf/Optional.h | 1127 ++++
weex_core/Source/include/wtf/OrderMaker.h | 136 +
weex_core/Source/include/wtf/PackedIntVector.h | 120 +
weex_core/Source/include/wtf/PageAllocation.h | 112 +
weex_core/Source/include/wtf/PageBlock.h | 80 +
weex_core/Source/include/wtf/PageReservation.h | 135 +
weex_core/Source/include/wtf/ParallelHelperPool.h | 213 +
weex_core/Source/include/wtf/ParallelJobs.h | 96 +
weex_core/Source/include/wtf/ParallelJobsGeneric.h | 93 +
.../Source/include/wtf/ParallelJobsLibdispatch.h | 64 +
weex_core/Source/include/wtf/ParallelJobsOpenMP.h | 72 +
.../Source/include/wtf/ParallelVectorIterator.h | 75 +
weex_core/Source/include/wtf/ParkingLot.h | 175 +
weex_core/Source/include/wtf/PassRefPtr.h | 160 +
weex_core/Source/include/wtf/Platform.h | 1211 ++++
.../include/wtf/PlatformUserPreferredLanguages.h | 38 +
weex_core/Source/include/wtf/PointerComparison.h | 33 +
weex_core/Source/include/wtf/PrintStream.h | 343 ++
weex_core/Source/include/wtf/ProcessID.h | 46 +
weex_core/Source/include/wtf/RAMSize.h | 30 +
weex_core/Source/include/wtf/RandomNumber.h | 32 +
weex_core/Source/include/wtf/RandomNumberSeed.h | 56 +
weex_core/Source/include/wtf/RangeSet.h | 188 +
weex_core/Source/include/wtf/RawPointer.h | 51 +
.../Source/include/wtf/RecursiveLockAdapter.h | 86 +
weex_core/Source/include/wtf/RedBlackTree.h | 564 ++
weex_core/Source/include/wtf/Ref.h | 230 +
weex_core/Source/include/wtf/RefCounted.h | 155 +
weex_core/Source/include/wtf/RefCountedArray.h | 208 +
.../Source/include/wtf/RefCountedLeakCounter.h | 46 +
weex_core/Source/include/wtf/RefCounter.h | 125 +
weex_core/Source/include/wtf/RefPtr.h | 260 +
weex_core/Source/include/wtf/RetainPtr.h | 351 ++
weex_core/Source/include/wtf/RunLoop.h | 194 +
weex_core/Source/include/wtf/RunLoopTimer.h | 73 +
weex_core/Source/include/wtf/SHA1.h | 80 +
weex_core/Source/include/wtf/SaturatedArithmetic.h | 91 +
weex_core/Source/include/wtf/SchedulePair.h | 84 +
weex_core/Source/include/wtf/Scope.h | 72 +
weex_core/Source/include/wtf/ScopedLambda.h | 183 +
weex_core/Source/include/wtf/Seconds.h | 299 +
weex_core/Source/include/wtf/SegmentedVector.h | 267 +
weex_core/Source/include/wtf/SentinelLinkedList.h | 274 +
weex_core/Source/include/wtf/SetForScope.h | 63 +
weex_core/Source/include/wtf/SharedTask.h | 124 +
weex_core/Source/include/wtf/SimpleStats.h | 109 +
weex_core/Source/include/wtf/SinglyLinkedList.h | 65 +
weex_core/Source/include/wtf/SixCharacterHash.h | 41 +
weex_core/Source/include/wtf/SmallPtrSet.h | 246 +
weex_core/Source/include/wtf/Spectrum.h | 119 +
weex_core/Source/include/wtf/StackBounds.h | 152 +
weex_core/Source/include/wtf/StackStats.h | 141 +
weex_core/Source/include/wtf/StaticConstructors.h | 62 +
weex_core/Source/include/wtf/StdLibExtras.h | 493 ++
weex_core/Source/include/wtf/Stopwatch.h | 89 +
weex_core/Source/include/wtf/StreamBuffer.h | 134 +
weex_core/Source/include/wtf/StringBuilder.h | 374 ++
weex_core/Source/include/wtf/StringExtras.h | 62 +
.../Source/include/wtf/StringHashDumpContext.h | 115 +
weex_core/Source/include/wtf/StringPrintStream.h | 76 +
.../Source/include/wtf/SynchronizedFixedQueue.h | 114 +
weex_core/Source/include/wtf/SystemTracing.h | 112 +
.../Source/include/wtf/ThreadFunctionInvocation.h | 41 +
.../include/wtf/ThreadIdentifierDataPthreads.h | 66 +
.../Source/include/wtf/ThreadSafeRefCounted.h | 73 +
weex_core/Source/include/wtf/ThreadSpecific.h | 301 +
weex_core/Source/include/wtf/Threading.h | 90 +
weex_core/Source/include/wtf/ThreadingPrimitives.h | 112 +
.../Source/include/wtf/TimeWithDynamicClockType.h | 157 +
weex_core/Source/include/wtf/TinyLRUCache.h | 77 +
weex_core/Source/include/wtf/TinyPtrSet.h | 514 ++
weex_core/Source/include/wtf/Trace.h | 103 +
weex_core/Source/include/wtf/TriState.h | 43 +
weex_core/Source/include/wtf/TypeCasts.h | 105 +
weex_core/Source/include/wtf/UniStdExtras.h | 52 +
weex_core/Source/include/wtf/UnionFind.h | 105 +
weex_core/Source/include/wtf/UniqueRef.h | 72 +
weex_core/Source/include/wtf/VMTags.h | 61 +
weex_core/Source/include/wtf/ValueCheck.h | 46 +
weex_core/Source/include/wtf/Variant.h | 2097 +++++++
weex_core/Source/include/wtf/Vector.h | 1508 +++++
weex_core/Source/include/wtf/VectorTraits.h | 94 +
weex_core/Source/include/wtf/WTFThreadData.h | 142 +
weex_core/Source/include/wtf/WallTime.h | 155 +
weex_core/Source/include/wtf/WeakPtr.h | 167 +
weex_core/Source/include/wtf/WeakRandom.h | 101 +
weex_core/Source/include/wtf/WindowsExtras.h | 57 +
weex_core/Source/include/wtf/WordLock.h | 111 +
weex_core/Source/include/wtf/WorkQueue.h | 109 +
weex_core/Source/include/wtf/config.h | 56 +
weex_core/Source/include/wtf/dtoa.h | 84 +
weex_core/Source/include/wtf/icu/ICUCompatible.h | 22 +
.../Source/include/wtf/icu/unicode/bytestream.h | 275 +
.../Source/include/wtf/icu/unicode/localpointer.h | 322 +
.../Source/include/wtf/icu/unicode/parseerr.h | 110 +
.../Source/include/wtf/icu/unicode/platform.h | 773 +++
weex_core/Source/include/wtf/icu/unicode/ptypes.h | 144 +
weex_core/Source/include/wtf/icu/unicode/putil.h | 182 +
weex_core/Source/include/wtf/icu/unicode/rep.h | 279 +
.../Source/include/wtf/icu/unicode/std_string.h | 52 +
weex_core/Source/include/wtf/icu/unicode/strenum.h | 294 +
.../Source/include/wtf/icu/unicode/stringpiece.h | 242 +
weex_core/Source/include/wtf/icu/unicode/ubrk.h | 559 ++
weex_core/Source/include/wtf/icu/unicode/uchar.h | 3349 ++++++++++
weex_core/Source/include/wtf/icu/unicode/ucnv.h | 2052 +++++++
.../Source/include/wtf/icu/unicode/ucnv_err.h | 481 ++
weex_core/Source/include/wtf/icu/unicode/ucol.h | 1451 +++++
weex_core/Source/include/wtf/icu/unicode/uconfig.h | 430 ++
weex_core/Source/include/wtf/icu/unicode/ucurr.h | 378 ++
weex_core/Source/include/wtf/icu/unicode/uenum.h | 224 +
weex_core/Source/include/wtf/icu/unicode/uiter.h | 725 +++
weex_core/Source/include/wtf/icu/unicode/uloc.h | 1153 ++++
.../Source/include/wtf/icu/unicode/umachine.h | 340 ++
weex_core/Source/include/wtf/icu/unicode/unistr.h | 4488 ++++++++++++++
weex_core/Source/include/wtf/icu/unicode/unorm.h | 579 ++
weex_core/Source/include/wtf/icu/unicode/unorm2.h | 546 ++
weex_core/Source/include/wtf/icu/unicode/uobject.h | 338 +
weex_core/Source/include/wtf/icu/unicode/urename.h | 1843 ++++++
weex_core/Source/include/wtf/icu/unicode/uscript.h | 630 ++
weex_core/Source/include/wtf/icu/unicode/uset.h | 1142 ++++
weex_core/Source/include/wtf/icu/unicode/ustring.h | 1721 ++++++
weex_core/Source/include/wtf/icu/unicode/utext.h | 1618 +++++
weex_core/Source/include/wtf/icu/unicode/utf.h | 241 +
weex_core/Source/include/wtf/icu/unicode/utf16.h | 641 ++
weex_core/Source/include/wtf/icu/unicode/utf8.h | 848 +++
weex_core/Source/include/wtf/icu/unicode/utf_old.h | 1187 ++++
weex_core/Source/include/wtf/icu/unicode/utypes.h | 741 +++
weex_core/Source/include/wtf/icu/unicode/uvernum.h | 185 +
.../Source/include/wtf/icu/unicode/uversion.h | 211 +
weex_core/Source/include/wtf/text/ASCIIFastPath.h | 194 +
weex_core/Source/include/wtf/text/AtomicString.h | 381 ++
.../Source/include/wtf/text/AtomicStringHash.h | 61 +
.../Source/include/wtf/text/AtomicStringImpl.h | 132 +
.../Source/include/wtf/text/AtomicStringTable.h | 45 +
weex_core/Source/include/wtf/text/Base64.h | 217 +
weex_core/Source/include/wtf/text/CString.h | 107 +
weex_core/Source/include/wtf/text/ConversionMode.h | 38 +
.../include/wtf/text/IntegerToStringConversion.h | 131 +
weex_core/Source/include/wtf/text/LChar.h | 27 +
.../include/wtf/text/LineBreakIteratorPoolICU.h | 125 +
.../include/wtf/text/NullTextBreakIterator.h | 56 +
weex_core/Source/include/wtf/text/OrdinalNumber.h | 48 +
weex_core/Source/include/wtf/text/StringBuffer.h | 80 +
weex_core/Source/include/wtf/text/StringBuilder.h | 374 ++
weex_core/Source/include/wtf/text/StringCommon.h | 649 ++
.../Source/include/wtf/text/StringConcatenate.h | 356 ++
.../include/wtf/text/StringConcatenateNumbers.h | 168 +
weex_core/Source/include/wtf/text/StringHash.h | 182 +
weex_core/Source/include/wtf/text/StringImpl.h | 1142 ++++
.../Source/include/wtf/text/StringOperators.h | 165 +
weex_core/Source/include/wtf/text/StringView.h | 934 +++
weex_core/Source/include/wtf/text/SymbolImpl.h | 119 +
weex_core/Source/include/wtf/text/SymbolRegistry.h | 106 +
.../Source/include/wtf/text/TextBreakIterator.h | 352 ++
.../wtf/text/TextBreakIteratorInternalICU.h | 35 +
weex_core/Source/include/wtf/text/TextPosition.h | 48 +
.../Source/include/wtf/text/UniquedStringImpl.h | 58 +
weex_core/Source/include/wtf/text/WTFString.h | 749 +++
weex_core/Source/include/wtf/unicode/WTFUTF8.h | 80 +
.../Source/libs/armeabi-v7a/libJavaScriptCore.so | Bin 0 -> 5237308 bytes
weex_core/Source/libs/armeabi-v7a/libWTF.so | Bin 0 -> 472828 bytes
weex_core/Source/libs/armeabi/libJavaScriptCore.so | Bin 0 -> 5237308 bytes
weex_core/Source/libs/armeabi/libWTF.so | Bin 0 -> 472828 bytes
weex_core/Source/libs/x86/libJavaScriptCore.so | Bin 0 -> 13729888 bytes
weex_core/Source/libs/x86/libWTF.so | Bin 0 -> 805056 bytes
.../Source/third_party/IPC/Buffering/IPCBuffer.h | 37 +
.../Source/{ => third_party}/IPC/CMakeLists.txt | 0
weex_core/Source/third_party/IPC/IPCArguments.h | 54 +
weex_core/Source/third_party/IPC/IPCByteArray.h | 32 +
weex_core/Source/third_party/IPC/IPCCheck.cpp | 41 +
weex_core/Source/third_party/IPC/IPCCheck.h | 40 +
.../Source/third_party/IPC/IPCCommunicator.cpp | 386 ++
weex_core/Source/third_party/IPC/IPCCommunicator.h | 54 +
weex_core/Source/third_party/IPC/IPCException.cpp | 56 +
weex_core/Source/third_party/IPC/IPCException.h | 40 +
.../Source/third_party/IPC/IPCFutexPageQueue.cpp | 215 +
.../Source/third_party/IPC/IPCFutexPageQueue.h | 72 +
weex_core/Source/third_party/IPC/IPCHandler.cpp | 60 +
weex_core/Source/third_party/IPC/IPCHandler.h | 42 +
weex_core/Source/third_party/IPC/IPCListener.cpp | 85 +
weex_core/Source/third_party/IPC/IPCListener.h | 38 +
weex_core/Source/third_party/IPC/IPCLog.h | 36 +
weex_core/Source/third_party/IPC/IPCMessageJS.h | 153 +
weex_core/Source/third_party/IPC/IPCResult.cpp | 296 +
weex_core/Source/third_party/IPC/IPCResult.h | 56 +
weex_core/Source/third_party/IPC/IPCSender.cpp | 100 +
weex_core/Source/third_party/IPC/IPCSender.h | 39 +
weex_core/Source/third_party/IPC/IPCString.h | 31 +
weex_core/Source/third_party/IPC/IPCType.h | 53 +
.../third_party/IPC/Serializing/IPCSerializer.cpp | 230 +
.../third_party/IPC/Serializing/IPCSerializer.h | 50 +
weex_core/Source/third_party/IPC/ashmem.c | 102 +
weex_core/Source/third_party/IPC/ashmem.h | 61 +
weex_core/Source/third_party/IPC/futex.h | 100 +
weex_core/Source/third_party/json11/CMakeLists.txt | 19 -
weex_core/Source/weexjsc_version_script.txt | 20 +-
1695 files changed, 323514 insertions(+), 9049 deletions(-)
diff --git a/WeexSDK.podspec b/WeexSDK.podspec
index 2f47a80..70b1189 100644
--- a/WeexSDK.podspec
+++ b/WeexSDK.podspec
@@ -47,6 +47,10 @@ Pod::Spec.new do |s|
'weex_core/Source/third_party/**/*.{h,hpp,m,mm,c,cpp,cc}',
'weex_core/Source/include/**/*.{h,hpp,m,mm,c,cpp,cc}'
s.exclude_files = 'weex_core/Source/**/*android.{h,hpp,m,mm,c,cpp,cc}',
+ 'weex_core/Source/base/android',
+ 'weex_core/Source/base/crash',
+ 'weex_core/Source/base/utils',
+ 'weex_core/Source/third_party/IPC',
'weex_core/Source/core/network/android/'
s.private_header_files = 'ios/sdk/WeexSDK/Sources/Component/RecycleList/WXJSASTParser.h'
diff --git a/android/sdk/assets/weex-main-jsfm.js b/android/sdk/assets/weex-main-jsfm.js
index a603e0a..20d4176 100644
--- a/android/sdk/assets/weex-main-jsfm.js
+++ b/android/sdk/assets/weex-main-jsfm.js
@@ -1,2 +1,2 @@
-(this.nativeLog||function(e){console.log(e)})("Start JS Framework 0.29.1, Build at 2018-12-19 16:07. (Vue: 2.5.16-weex.5, Rax: 0.4.20)");var global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";var t,c,r,l;function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={ex [...]
+(this.nativeLog||function(e){console.log(e)})("Start JS Framework 0.29.0, Build at 2018-10-02 14:30. (Vue: 2.5.16-weex.5, Rax: 0.4.20)");var global=this,process={env:{}},setTimeout=global.setTimeout;!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?t():"function"==typeof define&&define.amd?define(t):t()}(0,function(){"use strict";var t,c,r,l;function e(e){return e&&e.__esModule&&Object.prototype.hasOwnProperty.call(e,"default")?e.default:e}function n(e,t){return e(t={ex [...]
//# sourceMappingURL=weex-js-framework.min.js.map
diff --git a/android/sdk/build.gradle b/android/sdk/build.gradle
index 1dc2c19..7dac402 100755
--- a/android/sdk/build.gradle
+++ b/android/sdk/build.gradle
@@ -65,10 +65,12 @@ checkstyle {
version = project.hasProperty('weexVersion')? project.getProperty('weexVersion') : "0.20.0.1"
android {
-
delete 'libs/armeabi/libweexcore.so'
delete 'libs/armeabi-v7a/libweexcore.so'
delete 'libs/x86/libweexcore.so'
+ delete 'libs/armeabi/libweexjss.so'
+ delete 'libs/armeabi-v7a/libweexjss.so'
+ delete 'libs/x86/libweexjss.so'
compileSdkVersion project.compileSdkVersion
buildToolsVersion project.buildToolsVersion
@@ -123,6 +125,15 @@ android {
def ARMEABI_Size = new File(projectDir,"libs/armeabi/libweexcore.so").length();
def ARMEABIV7_Size = new File(projectDir,"libs/armeabi-v7/libweexcore.so").length();
def X86_Size = new File(projectDir,"libs/x86/libweexcore.so").length();
+ def ndkversion = 16;
+ def api_level = "";
+ def compile_tool = "clang";
+ def cxx_stl = "c++_static";
+ if (ndkversion < 16) {
+ api_level = "android-14";
+ } else {
+ api_level = "android-19";
+ }
println "ARMEABI_Size: "+ARMEABI_Size;
println "ARMEABIV7_Size:" + ARMEABIV7_Size;
println "X86_Size:" + X86_Size;
@@ -146,10 +157,11 @@ android {
externalNativeBuild {
cmake {
- arguments '-DANDROID_PLATFORM=android-14',
- '-DANDROID_TOOLCHAIN=gcc',
- '-DANDROID_STL=gnustl_static',
- '-DCMAKE_BUILD_TYPE=Release'
+ arguments '-DANDROID_PLATFORM='+"${api_level}",
+ '-DANDROID_TOOLCHAIN='+"${compile_tool}",
+ '-DANDROID_STL='+"${cxx_stl}",
+ '-DCMAKE_BUILD_TYPE=Release',
+ '-DENABLE_ASAN=false'
}
}
}
@@ -358,4 +370,4 @@ bintray {
name = project.version
}
}
-}
\ No newline at end of file
+}
diff --git a/android/sdk/libs/armeabi-v7a/libJavaScriptCore.so b/android/sdk/libs/armeabi-v7a/libJavaScriptCore.so
index d530580..03deedb 100755
Binary files a/android/sdk/libs/armeabi-v7a/libJavaScriptCore.so and b/android/sdk/libs/armeabi-v7a/libJavaScriptCore.so differ
diff --git a/android/sdk/libs/armeabi-v7a/libWTF.so b/android/sdk/libs/armeabi-v7a/libWTF.so
new file mode 100755
index 0000000..790bef2
Binary files /dev/null and b/android/sdk/libs/armeabi-v7a/libWTF.so differ
diff --git a/android/sdk/libs/armeabi-v7a/libweexjss.so b/android/sdk/libs/armeabi-v7a/libweexjss.so
old mode 100755
new mode 100644
index 8bab6c1..9ca7221
Binary files a/android/sdk/libs/armeabi-v7a/libweexjss.so and b/android/sdk/libs/armeabi-v7a/libweexjss.so differ
diff --git a/android/sdk/libs/armeabi/libJavaScriptCore.so b/android/sdk/libs/armeabi/libJavaScriptCore.so
index d530580..03deedb 100755
Binary files a/android/sdk/libs/armeabi/libJavaScriptCore.so and b/android/sdk/libs/armeabi/libJavaScriptCore.so differ
diff --git a/android/sdk/libs/armeabi/libWTF.so b/android/sdk/libs/armeabi/libWTF.so
new file mode 100755
index 0000000..790bef2
Binary files /dev/null and b/android/sdk/libs/armeabi/libWTF.so differ
diff --git a/android/sdk/libs/armeabi/libweexjss.so b/android/sdk/libs/armeabi/libweexjss.so
old mode 100755
new mode 100644
index 8bab6c1..9853537
Binary files a/android/sdk/libs/armeabi/libweexjss.so and b/android/sdk/libs/armeabi/libweexjss.so differ
diff --git a/android/sdk/libs/x86/libJavaScriptCore.so b/android/sdk/libs/x86/libJavaScriptCore.so
old mode 100644
new mode 100755
index 0e0f9f5..b7abc27
Binary files a/android/sdk/libs/x86/libJavaScriptCore.so and b/android/sdk/libs/x86/libJavaScriptCore.so differ
diff --git a/android/sdk/libs/x86/libWTF.so b/android/sdk/libs/x86/libWTF.so
new file mode 100755
index 0000000..0f4c2df
Binary files /dev/null and b/android/sdk/libs/x86/libWTF.so differ
diff --git a/android/sdk/libs/x86/libweexjss.so b/android/sdk/libs/x86/libweexjss.so
index 67d6794..f960b90 100644
Binary files a/android/sdk/libs/x86/libweexjss.so and b/android/sdk/libs/x86/libweexjss.so differ
diff --git a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/jni/NativeRenderObjectUtils.java b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/jni/NativeRenderObjectUtils.java
index f665e8b..12f125a 100644
--- a/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/jni/NativeRenderObjectUtils.java
+++ b/android/sdk/src/main/java/com/taobao/weex/ui/component/list/template/jni/NativeRenderObjectUtils.java
@@ -63,7 +63,7 @@ public class NativeRenderObjectUtils {
public static native boolean nativeRenderObjectHasNewLayout(long ptr);
public static native int nativeRenderObjectChildCount(long ptr);
public static native long nativeRenderObjectGetChild(long ptr, int index);
- public static native long nativeRenderObjectUpdateComponent(long ptr, WXComponent component);
+ public static native void nativeRenderObjectUpdateComponent(long ptr, WXComponent component);
public static native void nativeRenderObjectChildWaste(long ptr, boolean waster);
diff --git a/ios/playground/WeexDemo.xcodeproj/project.pbxproj b/ios/playground/WeexDemo.xcodeproj/project.pbxproj
index 1dd2b43..0d64451 100644
--- a/ios/playground/WeexDemo.xcodeproj/project.pbxproj
+++ b/ios/playground/WeexDemo.xcodeproj/project.pbxproj
@@ -392,7 +392,6 @@
775BEE781C1E8ECC008D1629 /* Frameworks */,
775BEE791C1E8ECC008D1629 /* Resources */,
C715566148067A7FFAB7797D /* [CP] Copy Pods Resources */,
- ED72EE9F9A66E17E73D6C3BC /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -430,7 +429,6 @@
84361D3C1CA10F8E00F43825 /* Frameworks */,
84361D431CA10F8E00F43825 /* Resources */,
84361D6F1CA10F8E00F43825 /* [CP] Copy Pods Resources */,
- EC0A67104CF45CC2B03DF0BE /* [CP] Embed Pods Frameworks */,
);
buildRules = (
);
@@ -542,7 +540,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
84361D6F1CA10F8E00F43825 /* [CP] Copy Pods Resources */ = {
@@ -592,7 +590,7 @@
);
runOnlyForDeploymentPostprocessing = 0;
shellPath = /bin/sh;
- shellScript = "diff \"${PODS_ROOT}/../Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n";
+ shellScript = "diff \"${PODS_PODFILE_DIR_PATH}/Podfile.lock\" \"${PODS_ROOT}/Manifest.lock\" > /dev/null\nif [ $? != 0 ] ; then\n # print error to STDERR\n echo \"error: The sandbox is not in sync with the Podfile.lock. Run 'pod install' or update your CocoaPods installation.\" >&2\n exit 1\nfi\n# This output is used by Xcode 'outputs' to avoid re-running this script phase.\necho \"SUCCESS\" > \"${SCRIPT_OUTPUT_FILE_0}\"\n";
showEnvVarsInLog = 0;
};
C715566148067A7FFAB7797D /* [CP] Copy Pods Resources */ = {
@@ -627,36 +625,6 @@
shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WeexDemo/Pods-WeexDemo-resources.sh\"\n";
showEnvVarsInLog = 0;
};
- EC0A67104CF45CC2B03DF0BE /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "[CP] Embed Pods Frameworks";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WeexUITestDemo/Pods-WeexUITestDemo-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
- ED72EE9F9A66E17E73D6C3BC /* [CP] Embed Pods Frameworks */ = {
- isa = PBXShellScriptBuildPhase;
- buildActionMask = 2147483647;
- files = (
- );
- inputPaths = (
- );
- name = "[CP] Embed Pods Frameworks";
- outputPaths = (
- );
- runOnlyForDeploymentPostprocessing = 0;
- shellPath = /bin/sh;
- shellScript = "\"${SRCROOT}/Pods/Target Support Files/Pods-WeexDemo/Pods-WeexDemo-frameworks.sh\"\n";
- showEnvVarsInLog = 0;
- };
/* End PBXShellScriptBuildPhase section */
/* Begin PBXSourcesBuildPhase section */
diff --git a/ios/playground/WeexDemo/AppDelegate.m b/ios/playground/WeexDemo/AppDelegate.m
index 7a5bbcd..25a6b95 100644
--- a/ios/playground/WeexDemo/AppDelegate.m
+++ b/ios/playground/WeexDemo/AppDelegate.m
@@ -39,7 +39,6 @@
#import "WXWebSocketDefaultImpl.h"
#import <WeexPluginLoader/WeexPluginLoader.h>
-
#ifdef DEBUG
#import "DebugAnalyzer.h"
#endif
diff --git a/ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm b/ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
index c67f1bc..1e2c331 100644
--- a/ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
+++ b/ios/sdk/WeexSDK/Sources/Bridge/WXCoreBridge.mm
@@ -31,7 +31,8 @@
#import "WXSDKEngine.h"
#import "WXAppMonitorProtocol.h"
-#include "base/CoreConstants.h"
+#include "base/core_constants.h"
+#include "base/time_utils.h"
#include "core/manager/weex_core_manager.h"
#include "core/render/manager/render_manager.h"
#include "core/render/page/render_page.h"
@@ -43,7 +44,6 @@
#include "core/data_render/vnode/vnode_render_manager.h"
#include "core/bridge/platform/core_side_in_platform.h"
#include "core/bridge/script/core_side_in_script.h"
-#include "base/TimeUtils.h"
#include "core/network/http_module.h"
#import <objc/runtime.h>
diff --git a/weex_core/CMakeLists.txt b/weex_core/CMakeLists.txt
index b0dfca0..2894e59 100644
--- a/weex_core/CMakeLists.txt
+++ b/weex_core/CMakeLists.txt
@@ -1,21 +1,3 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
cmake_minimum_required(VERSION 3.4.1)
project(WeexCore)
add_subdirectory(Source)
diff --git a/weex_core/Source/CMakeLists.txt b/weex_core/Source/CMakeLists.txt
index f3e5019..c535fc7 100644
--- a/weex_core/Source/CMakeLists.txt
+++ b/weex_core/Source/CMakeLists.txt
@@ -1,23 +1,6 @@
-#
-# Licensed to the Apache Software Foundation (ASF) under one
-# or more contributor license agreements. See the NOTICE file
-# distributed with this work for additional information
-# regarding copyright ownership. The ASF licenses this file
-# to you under the Apache License, Version 2.0 (the
-# "License"); you may not use this file except in compliance
-# with the License. You may obtain a copy of the License at
-#
-# http://www.apache.org/licenses/LICENSE-2.0
-#
-# Unless required by applicable law or agreed to in writing,
-# software distributed under the License is distributed on an
-# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
-# KIND, either express or implied. See the License for the
-# specific language governing permissions and limitations
-# under the License.
-#
cmake_minimum_required(VERSION 3.4.1)
set(WEEXCORE_LIBRARY_NAME weexcore)
+set(WEEX_CORE_SOURCE_DIR ${CMAKE_CURRENT_SOURCE_DIR})
message("${ANDROID_STL} ")
if ("${ANDROID_STL}" STREQUAL "c++_static")
@@ -31,7 +14,6 @@ add_compile_options(-fexceptions)
add_definitions(-DGNU_SUPPORT=1)
add_definitions(-DJSONCPP_NO_LOCALE_SUPPORT=1)
add_definitions(-DDEBUG=1)
-add_definitions(-DOS_ANDROID=1)
add_definitions(-DRENDER_LOG=0)
add_definitions(-DPERFORMANCE_LOG=0)
@@ -39,14 +21,19 @@ add_definitions(-DLAYOUT_LOG=0)
add_definitions(-DJSAPI_LOG=0)
add_definitions(-DDOM_PARSER_LOG=0)
+set(LOCAL_LIBRARIES_DIR ${CMAKE_CURRENT_SOURCE_DIR}/libs/${ANDROID_ABI})
+
+if ("${ANDROID_ABI}" STREQUAL "x86")
+ # todo
+else ()
+ if ("${ENABLE_ASAN}" STREQUAL "true")
+ set(CMAKE_CXX_FLAGS "${CMAKE_CXX_FLAGS} -fsanitize=address -fno-omit-frame-pointer -g3 -fPIC")
+ endif ()
+endif ()
+
+add_compile_options(-fexceptions)
+
set(COMMON_SRCS
- ./base/time_point.cc
- ./base/thread/thread_impl_posix.cc
- ./base/thread/thread_impl_android.cc
- ./base/message_loop/message_loop.cc
- ./base/message_loop/message_pump_posix.cc
- ./base/message_loop/message_pump_android.cc
- ./base/third_party/icu/icu_utf.cpp
./core/render/manager/render_manager.cpp
./core/render/page/render_page.cpp
@@ -91,12 +78,7 @@ set(COMMON_SRCS
./core/data_render/class_array.cc
./core/data_render/class_json.cc
./core/data_render/class_string.cc
- ./core/data_render/class_regex.cc
- ./core/data_render/class_console.cc
- ./core/data_render/class_window.cc
- ./core/data_render/class_math.cc
./core/data_render/class_factory.cc
- ./core/data_render/class_function.cc
./core/data_render/class_object.cc
./core/data_render/code_generator.cc
./core/data_render/exec_state.cc
@@ -115,43 +97,48 @@ set(COMMON_SRCS
./core/data_render/table.cc
./core/data_render/token.cc
./core/data_render/tokenizer.cc
- ./core/data_render/op_code.cc
./core/data_render/vm.cc
+ ./core/data_render/binary_file.cc
+ ./core/data_render/class_console.cc
+ ./core/data_render/class_function.cc
+ ./core/data_render/class_math.cc
+ ./core/data_render/class_regex.cc
+ ./core/data_render/class_window.cc
./core/data_render/exec_state_binary.cc
./core/data_render/exec_state_section.cc
+ ./core/data_render/op_code.cc
./core/data_render/vnode/vnode.cc
./core/data_render/vnode/vcomponent.cc
./core/data_render/vnode/vnode_exec_env.cc
./core/data_render/vnode/vnode_render_manager.cc
./core/data_render/vnode/vnode_render_context.cc
-
./core/network/http_module.cc
)
+add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/base)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/wson)
include_directories(${CMAKE_CURRENT_SOURCE_DIR}/wson)
add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/json11)
+#link_directories(${LOCAL_LIBRARIES_DIR})
SET(FINAL_ADD_LIBRARY
${COMMON_SRCS}
)
SET(FINAL_TARGET_LINK_LIBRARIES wson json11)
-if (ANDROID)
+if(ANDROID)
+ add_definitions(-DOS_ANDROID=1)
## add_subdirectory for subdirectory has a CMakeLists.txt
- add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/IPC)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/third_party/IPC)
+ add_subdirectory(${CMAKE_CURRENT_SOURCE_DIR}/android/jsengine)
## include_directories for include head file
- include_directories(${CMAKE_CURRENT_SOURCE_DIR}/IPC)
+ include_directories(${CMAKE_CURRENT_SOURCE_DIR}/third_party/IPC)
set (ANDROID_SRCS
- ./android/jniprebuild/jni_load.cc
- ./android/base/jni/android_jni.cpp
- ./android/base/jni/jbytearray_ref.cpp
- ./android/base/jni/scoped_java_ref.cpp
- ./android/base/base64/base64.cpp
- ./android/base/base64/modp_base64/modp_b64.cc
- ./android/base/string/scoped_jstring.cpp
+ ./android/weex_extend_js_api.h
+ ./android/weex_extend_js_api.cpp
./android/base/string/scoped_jstring_utf8.cpp
./android/base/string/jstring_cache.cpp
+ ./android/base/string/scoped_jstring.cpp
./android/wrap/content_box_measurement_impl_android.cpp
./android/wrap/wx_debug_js_bridge.cpp
./android/wrap/native_render_object_utils_impl_android.cpp
@@ -168,23 +155,20 @@ if (ANDROID)
./android/utils/cache_utils.cpp
./android/utils/params_utils.cpp
./android/utils/so_utils.cpp
- ./android/utils/IPCStringResult.cpp
+ ./android/utils/ipc_string_result.cpp
./android/wrap/log_utils.cpp
./android/wrap/hash_set.cpp
./android/wrap/wx_map.cpp
./android/wrap/wx_js_object.cpp
./android/wrap/wx_bridge.cpp
./android/wrap/wx_params.cpp
- ./android/base/jni_type.cpp
+ ./android/multiprocess/weex_js_connection.cpp
+ ./android/utils/jni_load.cc
./core/data_render/vnode/android/vcomponent_lifecycle_listener.cc
./core/data_render/vnode/android/vnode_on_event_listener.cc
./core/data_render/vnode/android/conversion.cc
./core/network/android/default_request_handler.cc
-
- ./android/jsengine/multiprocess/WeexJSConnection.cpp
- ./android/jsengine/multiprocess/ExtendJSApi.cpp
-
)
SET(FINAL_ADD_LIBRARY
${FINAL_ADD_LIBRARY}
@@ -193,19 +177,20 @@ if (ANDROID)
SET(FINAL_TARGET_LINK_LIBRARIES
${FINAL_TARGET_LINK_LIBRARIES}
+ weexbase
wson
android
weexipc
+ #weexjss
log
+ c
z
)
+endif(ANDROID)
-endif (ANDROID)
-
-##if(iOS)
- add_definitions(-DTARGET_OS_IPHONE=1)
-
-##endif(iOS)
+#if(iOS)
+#add_definitions(-DTARGET_OS_IPHONE=1)
+#endif(iOS)
add_library(${WEEXCORE_LIBRARY_NAME} SHARED ${FINAL_ADD_LIBRARY})
diff --git a/weex_core/Source/IPC/Buffering/IPCBuffer.h b/weex_core/Source/IPC/Buffering/IPCBuffer.h
deleted file mode 100644
index 01ab27f..0000000
--- a/weex_core/Source/IPC/Buffering/IPCBuffer.h
+++ /dev/null
@@ -1,35 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCBUFFER_H
-#define IPCBUFFER_H
-#include <stddef.h>
-
-// A buffer starts with msg.
-class IPCBuffer {
-public:
- virtual ~IPCBuffer() = default;
- virtual const void* get() = 0;
- virtual size_t length() = 0;
-};
-
-#endif /* IPCBUFFER_H */
diff --git a/weex_core/Source/IPC/IPCArguments.h b/weex_core/Source/IPC/IPCArguments.h
deleted file mode 100644
index d25abea..0000000
--- a/weex_core/Source/IPC/IPCArguments.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCARGUMENTS_H
-#define IPCARGUMENTS_H
-#include "IPCType.h"
-
-struct IPCString;
-struct IPCByteArray;
-class IPCArguments {
-public:
- virtual ~IPCArguments() = default;
- template <typename T>
- T get(int index)
- {
- return *static_cast<const T*>(getData(index));
- }
-
- const IPCString* getString(int index)
- {
- return static_cast<const IPCString*>(getData(index));
- }
-
- const IPCByteArray* getByteArray(int index)
- {
- return static_cast<const IPCByteArray*>(getData(index));
- }
-
- virtual const void* getData(int index) = 0;
- virtual IPCType getType(int index) = 0;
- virtual size_t getCount() = 0;
-};
-#endif /* IPCARGUMENTS_H */
diff --git a/weex_core/Source/IPC/IPCByteArray.h b/weex_core/Source/IPC/IPCByteArray.h
deleted file mode 100644
index e38b403..0000000
--- a/weex_core/Source/IPC/IPCByteArray.h
+++ /dev/null
@@ -1,30 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCBYTEARRAY_H
-#define IPCBYTEARRAY_H
-#include <stddef.h>
-struct IPCByteArray {
- uint32_t length;
- char content[1];
-};
-#endif /* IPCBYTEARRAY_H */
diff --git a/weex_core/Source/IPC/IPCCheck.cpp b/weex_core/Source/IPC/IPCCheck.cpp
deleted file mode 100644
index d5d54f1..0000000
--- a/weex_core/Source/IPC/IPCCheck.cpp
+++ /dev/null
@@ -1,39 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#if !defined(NDEBUG)
-#include "IPCCheck.h"
-#include <android/log.h>
-#define TAG "linzj_IPC"
-
-void reportCheckFailed(const char* msg, const char* file, int line)
-{
- __android_log_print(ANDROID_LOG_ERROR, TAG, msg, file, line);
- __builtin_trap();
-}
-
-void reportUnreachable(const char* file, int line)
-{
- __android_log_print(ANDROID_LOG_ERROR, TAG, "unreachable statement reached %s %d", file, line);
- __builtin_trap();
-}
-#endif
diff --git a/weex_core/Source/IPC/IPCCheck.h b/weex_core/Source/IPC/IPCCheck.h
deleted file mode 100644
index 03d558c..0000000
--- a/weex_core/Source/IPC/IPCCheck.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCCHECK_H
-#define IPCCHECK_H
-#include <stdlib.h>
-#if defined(NDEBUG)
-#define IPC_DCHECK(b)
-#define IPC_UNREACHABLE() abort()
-#else
-void reportCheckFailed(const char* msg, const char* file, int line);
-void reportUnreachable(const char* file, int line);
-#define IPC_DCHECK(b) \
- if (!(b)) { \
- reportCheckFailed("CHECK FAILED: " #b " at line %s %d", __FILE__, __LINE__); \
- }
-#define IPC_UNREACHABLE() reportUnreachable(__FILE__, __LINE__);
-#endif
-#endif /* IPCCHECK_H */
diff --git a/weex_core/Source/IPC/IPCCommunicator.cpp b/weex_core/Source/IPC/IPCCommunicator.cpp
deleted file mode 100644
index ffba0fa..0000000
--- a/weex_core/Source/IPC/IPCCommunicator.cpp
+++ /dev/null
@@ -1,384 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#include "IPCCommunicator.h"
-#include "Buffering/IPCBuffer.h"
-#include "IPCArguments.h"
-#include "IPCByteArray.h"
-#include "IPCCheck.h"
-#include "IPCException.h"
-#include "IPCFutexPageQueue.h"
-#include "IPCLog.h"
-#include "IPCResult.h"
-#include "IPCString.h"
-#include "Serializing/IPCSerializer.h"
-#include "futex.h"
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <vector>
-
-namespace {
-class BufferAssembler
- : public IPCResult,
- public IPCArguments {
-public:
- void readFromBuffer(const char*);
- void readTypes(const char*&);
- void readData(const char*&);
- // IPCResult
- const void* getData() override;
- IPCType getType() override;
- const uint16_t* getStringContent() override;
- size_t getStringLength() override;
- const char* getByteArrayContent() override;
- size_t getByteArrayLength() override;
-
- // IPCArguments
- const void* getData(int index) override;
- IPCType getType(int index) override;
- size_t getCount() override;
-
-private:
- std::vector<uint32_t> m_types;
- std::vector<std::unique_ptr<char[]>> m_datas;
-};
-
-void BufferAssembler::readFromBuffer(const char* blob)
-{
- readTypes(blob);
- readData(blob);
-}
-
-void BufferAssembler::readTypes(const char*& blob)
-{
- while (true) {
- uint32_t type;
- type = *reinterpret_cast<const uint32_t*>(blob);
- blob += sizeof(uint32_t);
- if (type == static_cast<uint32_t>(IPCType::END))
- break;
- m_types.emplace_back(type);
- }
-}
-
-void BufferAssembler::readData(const char*& blob)
-{
- for (uint32_t type : m_types) {
- switch (static_cast<IPCType>(type)) {
- case IPCType::INT32: {
- int32_t n;
- memcpy(&n, blob, sizeof(n));
- blob += sizeof(n);
- std::unique_ptr<char[]> data(new char[sizeof(n)]);
- *reinterpret_cast<int32_t*>(data.get()) = n;
- m_datas.emplace_back(std::move(data));
- } break;
- case IPCType::INT64: {
- int64_t n;
- memcpy(&n, blob, sizeof(n));
- blob += sizeof(n);
- std::unique_ptr<char[]> data(new char[sizeof(n)]);
- *reinterpret_cast<int64_t*>(data.get()) = n;
- m_datas.emplace_back(std::move(data));
- } break;
- case IPCType::FLOAT: {
- float n;
- memcpy(&n, blob, sizeof(n));
- blob += sizeof(n);
- std::unique_ptr<char[]> data(new char[sizeof(n)]);
- *reinterpret_cast<float*>(data.get()) = n;
- m_datas.emplace_back(std::move(data));
- } break;
- case IPCType::DOUBLE: {
- double n;
- memcpy(&n, blob, sizeof(n));
- blob += sizeof(n);
- std::unique_ptr<char[]> data(new char[sizeof(n)]);
- *reinterpret_cast<double*>(data.get()) = n;
- m_datas.emplace_back(std::move(data));
- } break;
- case IPCType::JSONSTRING:
- case IPCType::STRING: {
- uint32_t n;
- memcpy(&n, blob, sizeof(n));
- blob += sizeof(n);
- size_t byteLength = n * sizeof(uint16_t);
- std::unique_ptr<char[]> data(new char[byteLength + sizeof(IPCString)]);
- IPCString* s = reinterpret_cast<IPCString*>(data.get());
- s->length = n;
- memcpy(s->content, blob, byteLength);
- blob += byteLength;
- m_datas.emplace_back(std::move(data));
- } break;
- case IPCType::BYTEARRAY: {
- uint32_t n;
- memcpy(&n, blob, sizeof(n));
- blob += sizeof(n);
- size_t byteLength = n;
- std::unique_ptr<char[]> data(new char[byteLength + sizeof(IPCByteArray)]);
- IPCByteArray* s = reinterpret_cast<IPCByteArray*>(data.get());
- s->length = n;
- memcpy(s->content, blob, byteLength);
- blob += byteLength;
- s->content[byteLength] = '\0';
- m_datas.emplace_back(std::move(data));
- } break;
- case IPCType::JSUNDEFINED:
- case IPCType::VOID:
- m_datas.emplace_back();
- break;
- case IPCType::END:
- default:
- IPC_UNREACHABLE();
- }
- }
-}
-
-// IPCResult
-const void* BufferAssembler::getData()
-{
- return getData(0);
-}
-
-IPCType BufferAssembler::getType()
-{
- return getType(0);
-}
-
-const uint16_t* BufferAssembler::getStringContent()
-{
- IPC_DCHECK((getType(0) == IPCType::STRING) || (getType(0) == IPCType::JSONSTRING));
- const IPCString* s = reinterpret_cast<const IPCString*>(getData(0));
- return s->content;
-}
-
-size_t BufferAssembler::getStringLength()
-{
- IPC_DCHECK((getType(0) == IPCType::STRING) || (getType(0) == IPCType::JSONSTRING));
- const IPCString* s = reinterpret_cast<const IPCString*>(getData(0));
- return s->length;
-}
-
-const char* BufferAssembler::getByteArrayContent()
-{
- IPC_DCHECK(getType(0) == IPCType::BYTEARRAY);
- const IPCByteArray* s = reinterpret_cast<const IPCByteArray*>(getData(0));
- return s->content;
-}
-
-size_t BufferAssembler::getByteArrayLength()
-{
- IPC_DCHECK(getType(0) == IPCType::BYTEARRAY);
- const IPCByteArray* s = reinterpret_cast<const IPCByteArray*>(getData(0));
- return s->length;
-}
-
-// IPCArguments
-const void* BufferAssembler::getData(int index)
-{
- return m_datas.at(index).get();
-}
-
-IPCType BufferAssembler::getType(int index)
-{
- return static_cast<IPCType>(m_types.at(index));
-}
-
-size_t BufferAssembler::getCount()
-{
- return m_types.size();
-}
-}
-
-IPCCommunicator::IPCCommunicator(IPCFutexPageQueue* futexPageQueue)
- : m_futexPageQueue(futexPageQueue)
-{
-}
-
-IPCCommunicator::~IPCCommunicator()
-{
-}
-
-std::unique_ptr<IPCResult> IPCCommunicator::assembleResult()
-{
- std::unique_ptr<BufferAssembler> bufferAssembler(new BufferAssembler());
- bufferAssembler->readFromBuffer(getBlob());
- return std::unique_ptr<IPCResult>(bufferAssembler.release());
-}
-
-std::unique_ptr<IPCArguments> IPCCommunicator::assembleArguments()
-{
- std::unique_ptr<BufferAssembler> bufferAssembler(new BufferAssembler());
- bufferAssembler->readFromBuffer(getBlob());
- return std::unique_ptr<IPCArguments>(bufferAssembler.release());
-}
-
-std::unique_ptr<IPCBuffer> IPCCommunicator::generateResultBuffer(IPCResult* result)
-{
- std::unique_ptr<IPCSerializer> serializer = createIPCSerializer();
- serializer->setMsg(MSG_END);
- switch (result->getType()) {
- case IPCType::INT32:
- serializer->add(result->get<int32_t>());
- break;
- case IPCType::INT64:
- serializer->add(result->get<int64_t>());
- break;
- case IPCType::FLOAT:
- serializer->add(result->get<float>());
- break;
- case IPCType::DOUBLE:
- serializer->add(result->get<double>());
- break;
- case IPCType::BYTEARRAY:
- serializer->add(result->getByteArrayContent(), result->getByteArrayLength());
- break;
- case IPCType::CHARARRAY:
- serializer->add(static_cast<const char*>(result->getData()), result->getStringLength());
- break;
- case IPCType::JSONSTRING:
- serializer->addJSON(result->getStringContent(), result->getStringLength());
- break;
- case IPCType::STRING:
- serializer->add(result->getStringContent(), result->getStringLength());
- break;
- case IPCType::JSUNDEFINED:
- serializer->addJSUndefined();
- break;
- case IPCType::VOID:
- serializer->addVoid();
- break;
- default:
- IPC_UNREACHABLE();
- }
- return serializer->finish();
-}
-
-void IPCCommunicator::doSendBufferOnly(IPCBuffer* buffer)
-{
- const char* data = static_cast<const char*>(buffer->get());
- uint32_t length = buffer->length();
- doSendBufferOnly(data, length);
-}
-
-uint32_t IPCCommunicator::doReadPackage()
-{
- uint32_t msg;
- uint32_t length;
- m_futexPageQueue->lockReadPage();
- void* sharedMemory = m_futexPageQueue->getCurrentReadPage();
- length = static_cast<uint32_t*>(sharedMemory)[0];
- uint32_t availableSize = m_futexPageQueue->getPageSize() - sizeof(uint32_t);
- if (length < 2 * sizeof(uint32_t)) {
- releaseBlob();
- throw IPCException("Not a vaild msg");
- }
- if (length > availableSize) {
- m_package.reset(new char[length]);
- doRecvBufferOnly(m_package.get(), length);
- return *reinterpret_cast<uint32_t*>(m_package.get());
- }
- return static_cast<uint32_t*>(sharedMemory)[1];
-}
-
-void IPCCommunicator::doSendBufferOnly(const void* _data, size_t length)
-{
- const char* data = static_cast<const char*>(_data);
- size_t pageSize = m_futexPageQueue->getPageSize();
- ssize_t byteTransfered;
- uint32_t* dstLength = static_cast<uint32_t*>(m_futexPageQueue->getCurrentWritePage());
- // special handle the first part, which need a size
- // as header.
- dstLength[0] = length;
-
- IPC_LOGD("send bytes: length: %zu", length);
- byteTransfered = std::min(length, pageSize - sizeof(uint32_t));
- memcpy(dstLength + 1, data, byteTransfered);
- m_futexPageQueue->stepWrite();
- // multiple page package
- if (length > byteTransfered) {
- data += byteTransfered;
- length -= byteTransfered;
- IPC_LOGD("sent bytes: remaining length: %zu, transfered: %zu", length, byteTransfered);
-
- while (length > 0) {
- byteTransfered = doSendBufferPage(data, length, pageSize);
- data += byteTransfered;
- length -= byteTransfered;
- IPC_LOGD("sent bytes: remaining length: %zu, transfered: %zu", length, byteTransfered);
- }
- }
-}
-
-void IPCCommunicator::doRecvBufferOnly(void* _data, size_t length)
-{
- char* data = static_cast<char*>(_data);
- size_t pageSize = m_futexPageQueue->getPageSize();
- bool firstRun = true;
- IPC_LOGD("recv bytes: length: %zu", length);
- while (true) {
- ssize_t byteTransfered;
- byteTransfered = std::min(length, pageSize);
- const void* src = m_futexPageQueue->getCurrentReadPage();
- // skip the package size.
- // package starts with msg.
- if (firstRun) {
- src = static_cast<const char*>(src) + sizeof(uint32_t);
- byteTransfered -= sizeof(uint32_t);
- }
- memcpy(data, src, byteTransfered);
- data += byteTransfered;
- length -= byteTransfered;
- IPC_LOGD("recv bytes: remaining length: %zu, transfered: %zu", length, byteTransfered);
- if (length > 0) {
- firstRun = false;
- m_futexPageQueue->unlockReadPageAndStep();
- m_futexPageQueue->lockReadPage();
- } else {
- break;
- }
- }
-}
-
-const char* IPCCommunicator::getBlob()
-{
- if (m_package.get())
- return m_package.get() + sizeof(uint32_t);
- return static_cast<const char*>(m_futexPageQueue->getCurrentReadPage()) + sizeof(uint32_t) * 2;
-}
-
-void IPCCommunicator::releaseBlob()
-{
- m_package.reset();
- m_futexPageQueue->unlockReadPageAndStep();
-}
-
-size_t IPCCommunicator::doSendBufferPage(const void* data, size_t length, size_t pageSize)
-{
- ssize_t byteTransfered;
- byteTransfered = std::min(length, pageSize);
- void* dst = m_futexPageQueue->getCurrentWritePage();
- memcpy(dst, data, byteTransfered);
- m_futexPageQueue->stepWrite();
- return byteTransfered;
-}
diff --git a/weex_core/Source/IPC/IPCCommunicator.h b/weex_core/Source/IPC/IPCCommunicator.h
deleted file mode 100644
index 9468137..0000000
--- a/weex_core/Source/IPC/IPCCommunicator.h
+++ /dev/null
@@ -1,52 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCCOMMUNICATOR_H
-#define IPCCOMMUNICATOR_H
-#include <memory>
-
-class IPCResult;
-class IPCArguments;
-class IPCBuffer;
-class IPCFutexPageQueue;
-class IPCCommunicator {
-protected:
- explicit IPCCommunicator(IPCFutexPageQueue* futexPageQueue);
- virtual ~IPCCommunicator();
-
- std::unique_ptr<IPCResult> assembleResult();
- std::unique_ptr<IPCArguments> assembleArguments();
- std::unique_ptr<IPCBuffer> generateResultBuffer(IPCResult*);
- void doSendBufferOnly(IPCBuffer* buffer);
- uint32_t doReadPackage();
- const char* getBlob();
- void releaseBlob();
-
-private:
- void doSendBufferOnly(const void* data, size_t s);
- size_t doSendBufferPage(const void* data, size_t s, size_t pageSize);
- void doRecvBufferOnly(void* data, size_t s);
- std::unique_ptr<char[]> m_package;
- // weakref to a IPCFutexPageQueue object.
- IPCFutexPageQueue* m_futexPageQueue;
-};
-#endif /* IPCCOMMUNICATOR_H */
diff --git a/weex_core/Source/IPC/IPCException.cpp b/weex_core/Source/IPC/IPCException.cpp
deleted file mode 100644
index 22b5790..0000000
--- a/weex_core/Source/IPC/IPCException.cpp
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#include "IPCException.h"
-#include <stdarg.h>
-#include <string>
-
-struct IPCException::IPCExceptionImpl {
- std::string str;
-};
-
-IPCException::IPCException(const char* fmt, ...)
- : m_impl(new IPCExceptionImpl)
-{
- va_list ap;
- char buffer[256];
- va_start(ap, fmt);
- vsnprintf(buffer, 256, fmt, ap);
- va_end(ap);
- m_impl->str.assign(buffer);
-}
-
-IPCException::~IPCException()
-{
-}
-
-IPCException::IPCException(IPCException&& ex)
-{
- m_impl = std::move(ex.m_impl);
-}
-
-const char* IPCException::msg() const
-{
- return m_impl->str.c_str();
-}
diff --git a/weex_core/Source/IPC/IPCException.h b/weex_core/Source/IPC/IPCException.h
deleted file mode 100644
index a53312e..0000000
--- a/weex_core/Source/IPC/IPCException.h
+++ /dev/null
@@ -1,38 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCEXCEPTION_H
-#define IPCEXCEPTION_H
-#include <memory>
-
-class IPCException {
-public:
- IPCException(const char* fmt, ...);
- ~IPCException();
- IPCException(IPCException&& ex);
- const char* msg() const;
-
-private:
- struct IPCExceptionImpl;
- std::unique_ptr<IPCExceptionImpl> m_impl;
-};
-#endif /* IPCEXCEPTION_H */
diff --git a/weex_core/Source/IPC/IPCFutexPageQueue.cpp b/weex_core/Source/IPC/IPCFutexPageQueue.cpp
deleted file mode 100644
index 8207f3e..0000000
--- a/weex_core/Source/IPC/IPCFutexPageQueue.cpp
+++ /dev/null
@@ -1,213 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#include "IPCFutexPageQueue.h"
-#include "IPCCheck.h"
-#include "IPCException.h"
-#include "IPCLog.h"
-#include "IPCType.h"
-#include "futex.h"
-#include <errno.h>
-#include <sched.h>
-#include <string.h>
-#include <sys/mman.h>
-#include <time.h>
-#include <unistd.h>
-
-IPCFutexPageQueue::IPCFutexPageQueue(void* sharedMemory, size_t s, size_t id)
- : m_currentWrite(id)
- , m_currentRead(id ^ 1)
- , m_pageSize(s / m_pagesCount)
- , m_sharedMemory(sharedMemory)
- , m_tid(gettid())
-{
- IPC_DCHECK(s == ipc_size);
- IPC_LOGD("id: %zu", id);
- for (int i = m_currentWrite; i < m_pagesCount; i += 2) {
- uint32_t* data = static_cast<uint32_t*>(getPage(i));
- data[1] |= m_finishTag;
- }
- lock(m_currentWrite, true);
-}
-
-IPCFutexPageQueue::~IPCFutexPageQueue()
-{
- // build a terminate msg.
- uint32_t* data = static_cast<uint32_t*>(getPage(m_currentWrite));
- data[1] = sizeof(uint32_t) * 2;
- data[2] = MSG_TERMINATE;
- data[3] = static_cast<uint32_t>(IPCType::END);
- try {
- unlock(m_currentWrite);
- } catch (IPCException& e) {
- IPC_LOGE("%s", e.msg());
- }
- munmap(m_sharedMemory, m_pageSize << 2);
-}
-
-void IPCFutexPageQueue::stepWrite()
-{
- IPC_LOGD("stepWrite");
- clearFinishedTag();
- size_t current = m_currentWrite;
- m_currentWrite = step(m_currentWrite);
- lock(m_currentWrite, true);
- unlock(current);
-}
-
-void IPCFutexPageQueue::unlock(size_t id)
-{
- IPC_LOGD("unlock: %zu", id);
- volatile uint32_t* pageStart = static_cast<volatile uint32_t*>(getPage(id));
-
- uint32_t l = m_tid;
- if (__atomic_compare_exchange_n(pageStart, &l, 0,
- false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
- return;
- }
- if ((l & FUTEX_WAITERS) != 0) {
- int futexReturn = __futex(pageStart, FUTEX_UNLOCK_PI, 0, nullptr);
- if (futexReturn == -1) {
- throw IPCException("failed to futex unlock %s", strerror(errno));
- }
- return;
- } else if ((l & FUTEX_TID_MASK) != m_tid) {
- throw IPCException("l is not equal to tid: %d %d", l, m_tid);
- }
- throw IPCException("expected lock value");
-}
-
-void IPCFutexPageQueue::lock(size_t id, bool checkFinish)
-{
- volatile uint32_t* pageStart = static_cast<volatile uint32_t*>(getPage(id));
- uint32_t l = m_tid;
- uint32_t expected = 0;
- IPC_LOGD("lock: %zu", id);
- // wait for the finished tag;
- if (checkFinish) {
- while (true) {
- uint32_t finishedTag = pageStart[1];
- if (finishedTag == m_finishTag) {
- break;
- }
- struct timespec waitTime = { m_timeoutSec, 0 };
- int futexReturn = __futex(pageStart + 1, FUTEX_WAIT, 0, &waitTime);
- if (futexReturn == -1) {
- int myerrno = errno;
- if (myerrno == EINTR)
- continue;
- else if (myerrno == ETIMEDOUT) {
- throw IPCException("IPCFutexPageQueue::lock timeout when waiting for finished");
- } else if (myerrno == EAGAIN) {
- // become m_finishTag when enter the linux kernel.
- break;
- } else {
- throw IPCException("IPCException::lock waiting for finished tag %u: %s", pageStart[1], strerror(myerrno));
- }
- }
- break;
- }
- }
- if (__atomic_compare_exchange_n(pageStart, &expected, l,
- false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
- return;
- }
- errno = 0;
- while (true) {
- int futexReturn = __futex(pageStart, FUTEX_LOCK_PI, 1, nullptr);
- if (futexReturn == -1 && errno != EINTR) {
-
- volatile uint32_t* pageStart0 = static_cast<volatile uint32_t*>(getPage(0));
- volatile uint32_t* pageStart1 = static_cast<volatile uint32_t*>(getPage(1));
- volatile uint32_t* pageStart2 = static_cast<volatile uint32_t*>(getPage(2));
- volatile uint32_t* pageStart3 = static_cast<volatile uint32_t*>(getPage(3));
- throw IPCException("futex lock pi failed: %s, %x %d (%x %x %x %x)", strerror(errno), *pageStart, m_tid, *pageStart0, *pageStart1, *pageStart2, *pageStart3);
- }
- if (futexReturn == -1)
- continue;
- break;
- }
- l = *pageStart;
- if ((l & FUTEX_OWNER_DIED)) {
- unlock(id);
- throw IPCException("original owner has die");
- }
-}
-
-void* IPCFutexPageQueue::getPage(size_t id)
-{
- size_t offset = id * m_pageSize;
- return static_cast<char*>(m_sharedMemory) + offset;
-}
-
-void IPCFutexPageQueue::lockReadPage()
-{
- IPC_LOGD("lockReadPage");
- uint32_t* pageStart = static_cast<uint32_t*>(getPage(m_currentRead));
- if (!*pageStart) {
- // this page should be locked.
- }
- lock(m_currentRead, false);
-}
-
-void IPCFutexPageQueue::unlockReadPageAndStep()
-{
- IPC_LOGD("unlockReadPageAndStep");
- setFinishedTag();
- unlock(m_currentRead);
- m_currentRead = step(m_currentRead);
-}
-
-void IPCFutexPageQueue::spinWaitPeer()
-{
- volatile uint32_t* pageStart = static_cast<volatile uint32_t*>(getPage(m_currentRead));
- struct timespec start;
- clock_gettime(CLOCK_MONOTONIC, &start);
- while (!*pageStart) {
- sched_yield();
- struct timespec now;
- clock_gettime(CLOCK_MONOTONIC, &now);
- if ((now.tv_sec - start.tv_sec) > m_timeoutSec)
- throw IPCException("spinWaitPeer timeout");
- }
-}
-
-void IPCFutexPageQueue::setFinishedTag()
-{
- uint32_t* pageStart = static_cast<uint32_t*>(getPage(m_currentRead));
- uint32_t expected = 0;
- if (__atomic_compare_exchange_n(pageStart + 1, &expected, m_finishTag,
- false, __ATOMIC_SEQ_CST, __ATOMIC_SEQ_CST)) {
- IPC_LOGD("setFinishedTag:waking writer");
- __futex(pageStart + 1, FUTEX_WAKE, 1, nullptr);
- return;
- } else {
- IPC_LOGD("setFinishedTag unexpected value: %u", expected);
- }
-}
-
-void IPCFutexPageQueue::clearFinishedTag()
-{
- uint32_t* pageRead = static_cast<uint32_t*>(getPage(m_currentWrite));
- pageRead[1] = 0;
- __atomic_thread_fence(__ATOMIC_SEQ_CST);
-}
diff --git a/weex_core/Source/IPC/IPCFutexPageQueue.h b/weex_core/Source/IPC/IPCFutexPageQueue.h
deleted file mode 100644
index 6bc255c..0000000
--- a/weex_core/Source/IPC/IPCFutexPageQueue.h
+++ /dev/null
@@ -1,70 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCFUTEXPAGEQUEUE_H
-#define IPCFUTEXPAGEQUEUE_H
-
-#include <stdint.h>
-
-// shared memory page layout:
-// futex uint32_t
-// state word uint32_t
-// package size uint32_t
-// msg type uint32_t
-// types[] uint32_t[]
-//
-// data whatever types indicate
-// A page queue is composed of m_pagesCount pages
-// and will use repeatedly.
-class IPCFutexPageQueue {
-public:
- IPCFutexPageQueue(void* sharedMemory, size_t s, size_t id);
- ~IPCFutexPageQueue();
- void stepWrite();
- void lockReadPage();
- void unlockReadPageAndStep();
- void spinWaitPeer();
- inline void* getCurrentReadPage() { return sizeof(uint32_t) * 2 + static_cast<char*>(getPage(m_currentRead)); }
- inline void* getCurrentWritePage() { return sizeof(uint32_t) * 2 + static_cast<char*>(getPage(m_currentWrite)); }
- inline size_t getPageSize() const { return m_pageSize - sizeof(uint32_t) * 2; }
-
- static const size_t ipc_size = 2 * 1024 * 1024;
-
-private:
- void unlock(size_t id);
- void lock(size_t id, bool checkFinish);
- void* getPage(size_t id);
- inline size_t step(size_t s) { return (s + 2) & (m_pagesCount - 1); }
- void setFinishedTag();
- void clearFinishedTag();
-
- size_t m_currentWrite;
- size_t m_currentRead;
- size_t m_pageSize;
- void* m_sharedMemory;
- int m_tid;
- static const uint32_t m_finishTag = static_cast<uint32_t>(1);
- static const size_t m_pagesCount = 16;
- static const int m_timeoutSec = 32;
-};
-
-#endif /* IPCFUTEXPAGEQUEUE_H */
diff --git a/weex_core/Source/IPC/IPCHandler.cpp b/weex_core/Source/IPC/IPCHandler.cpp
deleted file mode 100644
index 27f90d3..0000000
--- a/weex_core/Source/IPC/IPCHandler.cpp
+++ /dev/null
@@ -1,58 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#include "IPCHandler.h"
-#include "IPCLog.h"
-#include "IPCResult.h"
-#include <unordered_map>
-
-namespace {
-class IPCHandlerImpl : public IPCHandler {
-public:
- std::unique_ptr<IPCResult> handle(uint32_t msg, IPCArguments*) override;
- void registerHandler(int msg, const std::function<std::unique_ptr<IPCResult>(IPCArguments*)>& handler) override;
-
-private:
- typedef std::unordered_map<int, std::function<std::unique_ptr<IPCResult>(IPCArguments*)>> MapType;
- MapType m_map;
-};
-
-std::unique_ptr<IPCResult> IPCHandlerImpl::handle(uint32_t msg, IPCArguments* arguments)
-{
- auto it = m_map.find(msg);
- if (it == m_map.end()) {
- IPC_LOGE("unable to find msg: %d", msg);
- return createVoidResult();
- }
- return it->second(arguments);
-}
-
-void IPCHandlerImpl::registerHandler(int msg, const std::function<std::unique_ptr<IPCResult>(IPCArguments*)>& handler)
-{
- m_map.insert(MapType::value_type(msg, handler));
-}
-}
-
-std::unique_ptr<IPCHandler> createIPCHandler()
-{
- return std::unique_ptr<IPCHandler>(new IPCHandlerImpl);
-}
diff --git a/weex_core/Source/IPC/IPCHandler.h b/weex_core/Source/IPC/IPCHandler.h
deleted file mode 100644
index 8fab6b1..0000000
--- a/weex_core/Source/IPC/IPCHandler.h
+++ /dev/null
@@ -1,40 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCHANDLER_H
-#define IPCHANDLER_H
-#include <functional>
-#include <memory>
-#include <stdint.h>
-
-class IPCResult;
-class IPCArguments;
-
-class IPCHandler {
-public:
- virtual ~IPCHandler() = default;
- virtual std::unique_ptr<IPCResult> handle(uint32_t msg, IPCArguments*) = 0;
- virtual void registerHandler(int msg, const std::function<std::unique_ptr<IPCResult>(IPCArguments*)>& handler) = 0;
-};
-
-std::unique_ptr<IPCHandler> createIPCHandler();
-#endif /* IPCHANDLER_H */
diff --git a/weex_core/Source/IPC/IPCListener.cpp b/weex_core/Source/IPC/IPCListener.cpp
deleted file mode 100644
index fca06ad..0000000
--- a/weex_core/Source/IPC/IPCListener.cpp
+++ /dev/null
@@ -1,83 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#include "IPCListener.h"
-#include "Buffering/IPCBuffer.h"
-#include "IPCArguments.h"
-#include "IPCCommunicator.h"
-#include "IPCException.h"
-#include "IPCHandler.h"
-#include "IPCResult.h"
-#include "IPCType.h"
-#include <unistd.h>
-
-namespace {
-class IPCListenerImpl : public IPCCommunicator,
- public IPCListener {
-public:
- IPCListenerImpl(IPCFutexPageQueue* futexPageQueue, IPCHandler* handler);
- ~IPCListenerImpl() override;
- void listen() override;
-
-private:
- int m_fd;
- IPCHandler* m_handler;
-};
-
-IPCListenerImpl::IPCListenerImpl(IPCFutexPageQueue* futexPageQueue, IPCHandler* handler)
- : IPCCommunicator(futexPageQueue)
- , m_handler(handler)
-{
-}
-
-IPCListenerImpl::~IPCListenerImpl()
-{
-}
-
-void IPCListenerImpl::listen()
-{
- while (true) {
- uint32_t msg = doReadPackage();
- bool isAsync = !!(msg & MSG_FLAG_ASYNC);
- msg &= MSG_MASK;
- if (msg == MSG_END)
- throw IPCException("unexpected MSG_END");
- else if (msg == MSG_TERMINATE) {
- releaseBlob();
- throw IPCException("peer terminates");
- }
- std::unique_ptr<IPCArguments> arguments = assembleArguments();
- releaseBlob();
- IPCArguments* pArguments = arguments.get();
- std::unique_ptr<IPCResult> sendBack = m_handler->handle(msg, pArguments);
- if (!isAsync) {
- std::unique_ptr<IPCBuffer> resultBuffer = generateResultBuffer(sendBack.get());
- doSendBufferOnly(resultBuffer.get());
- }
- }
-}
-}
-
-std::unique_ptr<IPCListener> createIPCListener(IPCFutexPageQueue* futexPageQueue, IPCHandler* handler)
-{
- return std::unique_ptr<IPCListener>(new IPCListenerImpl(futexPageQueue, handler));
-}
diff --git a/weex_core/Source/IPC/IPCListener.h b/weex_core/Source/IPC/IPCListener.h
deleted file mode 100644
index de5f1a4..0000000
--- a/weex_core/Source/IPC/IPCListener.h
+++ /dev/null
@@ -1,36 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCLISTENER_H
-#define IPCLISTENER_H
-#include <memory>
-class IPCHandler;
-class IPCFutexPageQueue;
-
-class IPCListener {
-public:
- virtual ~IPCListener() = default;
- virtual void listen() = 0;
-};
-
-std::unique_ptr<IPCListener> createIPCListener(IPCFutexPageQueue*, IPCHandler* handler);
-#endif /* IPCLISTENER_H */
diff --git a/weex_core/Source/IPC/IPCLog.h b/weex_core/Source/IPC/IPCLog.h
deleted file mode 100644
index 94b0b5a..0000000
--- a/weex_core/Source/IPC/IPCLog.h
+++ /dev/null
@@ -1,34 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCLOG_H
-#define IPCLOG_H
-#include <android/log.h>
-#define TAG "linzj_IPC"
-#define IPC_LOGE(...) __android_log_print(ANDROID_LOG_ERROR, TAG, __VA_ARGS__)
-
-#if defined(ENABLE_IPC_DEBUG_LOG) && ENABLE_IPC_DEBUG_LOG
-#define IPC_LOGD(...) __android_log_print(ANDROID_LOG_DEBUG, TAG, __VA_ARGS__)
-#else
-#define IPC_LOGD(...)
-#endif
-#endif /* IPCLOG_H */
diff --git a/weex_core/Source/IPC/IPCMessageJS.h b/weex_core/Source/IPC/IPCMessageJS.h
deleted file mode 100644
index 94f698c..0000000
--- a/weex_core/Source/IPC/IPCMessageJS.h
+++ /dev/null
@@ -1,151 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCMESSAGEJS_H
-#define IPCMESSAGEJS_H
-
-// Message from Platform to Script in ScriptBridge
-enum class IPCJSMsg {
- INITFRAMEWORK,
- EXECJSSERVICE,
- TAKEHEAPSNAPSHOT,
- EXECJS,
- CREATEINSTANCE,
- DESTORYINSTANCE,
- EXECJSONINSTANCE,
- EXECJSWITHRESULT,
- EXECJSWITHCALLBACK,
- UPDATEGLOBALCONFIG,
- EXECTIMERCALLBACK,
- INITAPPFRAMEWORK,
- CREATEAPPCONTEXT,
- EXECJSONAPPWITHRESULT,
- CALLJSONAPPCONTEXT,
- DESTORYAPPCONTEXT,
-};
-
-// Message from Script to Core in ScriptBridge
-enum class IPCProxyMsg {
- SETJSFVERSION,
- REPORTEXCEPTION,
- CALLNATIVE,
- CALLNATIVEMODULE,
- CALLNATIVECOMPONENT,
- CALLADDELEMENT,
- SETTIMEOUT,
- NATIVELOG,
- CALLCREATEBODY,
- CALLUPDATEFINISH,
- CALLCREATEFINISH,
- CALLREFRESHFINISH,
- CALLUPDATEATTRS,
- CALLUPDATESTYLE,
- CALLREMOVEELEMENT,
- CALLMOVEELEMENT,
- CALLADDEVENT,
- CALLREMOVEEVENT,
- CALLGCANVASLINK,
- CALLT3DLINK,
- SETINTERVAL,
- CLEARINTERVAL,
- POSTMESSAGE,
- DISPATCHMESSAGE,
- DISPATCHMESSAGESYNC,
- ONRECEIVEDRESULT,
- UPDATECOMPONENTDATA,
-};
-// Message from Script to Core in ScriptBridge
-
-// Message from Core to Platform in PlatformBridge
-enum class IPCMsgFromCoreToPlatform {
- INVOKE_MEASURE_FUNCTION = 100,
- INVOKE_LAYOUT_BEFORE,
- INVOKE_LAYOUT_AFTER,
- SET_JS_VERSION,
- REPORT_EXCEPTION,
- CALL_NATIVE,
- CALL_NATIVE_MODULE,
- CALL_NATIVE_COMPONENT,
- SET_TIMEOUT,
- NATIVE_LOG,
- UPDATE_FINISH,
- REFRESH_FINISH,
- ADD_EVENT,
- REMOVE_EVENT,
- CREATE_BODY,
- ADD_ELEMENT,
- LAYOUT,
- UPDATE_STYLE,
- UPDATE_ATTR,
- CREATE_FINISH,
- RENDER_SUCCESS,
- REMOVE_ELEMENT,
- MOVE_ELEMENT,
- APPEND_TREE_CREATE_FINISH,
- HAS_TRANSITION_PROS,
- POST_MESSAGE,
- DISPATCH_MESSAGE
-};
-
-// Message from Platform to Core in PlatformBridge
-enum class IPCMsgFromPlatformToCore {
- SET_DEFAULT_HEIGHT_AND_WIDTH_INTO_ROOT_DOM = 100,
- ON_INSTANCE_CLOSE,
- SET_STYLE_WIDTH,
- SET_STYLE_HEIGHT,
- SET_MARGIN,
- SET_PADDING,
- SET_POSITION,
- MARK_DIRTY,
- SET_VIEWPORT_WIDTH,
- FORCE_LAYOUT,
- NOTIFY_LAYOUT,
- GET_FIRST_SCREEN_RENDER_TIME,
- GET_RENDER_FINISH_TIME,
- SET_RENDER_CONTAINER_WRAP_CONTENT,
- BIND_MEASUREMENT_TO_RENDER_OBJECT,
- REGISTER_CORE_ENV,
- GET_RENDER_OBJECT,
- UPDATE_RENDER_OBJECT_STYLE,
- UPDATE_RENDER_OBJECT_ATTR,
- COPY_RENDER_OBJECT,
- SET_MEASURE_FUNCTION_ADAPTER,
- SET_PLATFORM,
- SET_DEVICE_WIDTH_AND_HEIGHT,
- ADD_OPTION,
-
- INIT_FRAMEWORK,
- INIT_APP_FRAMEWORK,
- CREATE_APP_CONTEXT,
- EXEC_JS_ON_APP_WITH_RESULT,
- CALL_JS_ON_APP_CONTEXT,
- DESTROY_APP_CONTEXT,
- EXEC_JS_SERVICE,
- EXEC_TIME_CALLBACK,
- EXEC_JS,
- EXEC_JS_WITH_RESULT,
- CREATE_INSTANCE,
- EXEC_JS_ON_INSTANCE,
- DESTROY_INSTANCE,
- UPDATE_GLOBAL_CONFIG
-};
-#endif /* IPCMESSAGEJS_H */
diff --git a/weex_core/Source/IPC/IPCResult.cpp b/weex_core/Source/IPC/IPCResult.cpp
deleted file mode 100644
index f86c6c5..0000000
--- a/weex_core/Source/IPC/IPCResult.cpp
+++ /dev/null
@@ -1,294 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#include "IPCResult.h"
-#include <cstdlib>
-
-namespace {
-class VoidResult : public IPCResult {
-public:
- const void* getData() override;
- IPCType getType() override;
- const uint16_t* getStringContent() override;
- size_t getStringLength() override;
- const char* getByteArrayContent() override;
- size_t getByteArrayLength() override;
-};
-
-template <typename T>
-struct TypeTrait {
-};
-
-template <>
-struct TypeTrait<int32_t> {
- static const IPCType s_type = IPCType::INT32;
-};
-
-template <>
-struct TypeTrait<int64_t> {
- static const IPCType s_type = IPCType::INT64;
-};
-
-template <>
-struct TypeTrait<double> {
- static const IPCType s_type = IPCType::DOUBLE;
-};
-
-template <typename T>
-class ValueResult : public IPCResult {
-public:
- explicit ValueResult(T val);
- const void* getData() override;
- IPCType getType() override;
- const uint16_t* getStringContent() override;
- size_t getStringLength() override;
- const char* getByteArrayContent() override;
- size_t getByteArrayLength() override;
-
-private:
- typedef T value_type;
- typedef TypeTrait<value_type> trait_type;
-
- value_type m_value;
- static const IPCType s_type = trait_type::s_type;
-};
-
-class ByteArrayResult: public IPCResult{
-public:
- ByteArrayResult(const char* data, size_t length);
- ~ByteArrayResult();
-
- const void* getData() override;
- IPCType getType() override;
- const uint16_t* getStringContent() override;
- size_t getStringLength() override;
- const char* getByteArrayContent() override;
- size_t getByteArrayLength() override;
-private:
- char* m_data;
- size_t m_length;
-};
-
-const void*
-VoidResult::getData()
-{
- return nullptr;
-}
-
-IPCType VoidResult::getType()
-{
- return IPCType::VOID;
-}
-
-const uint16_t* VoidResult::getStringContent()
-{
- return nullptr;
-}
-
-size_t VoidResult::getStringLength()
-{
- return 0U;
-}
-
-const char* VoidResult::getByteArrayContent()
-{
- return nullptr;
-}
-
-size_t VoidResult::getByteArrayLength()
-{
- return 0U;
-}
-
-template <typename T>
-ValueResult<T>::ValueResult(T val)
- : m_value(val)
-{
-}
-
-template <typename T>
-const void* ValueResult<T>::getData()
-{
- return &m_value;
-}
-
-template <typename T>
-IPCType ValueResult<T>::getType()
-{
- return s_type;
-}
-
-template <typename T>
-const uint16_t* ValueResult<T>::getStringContent()
-{
- return nullptr;
-}
-
-template <typename T>
-size_t ValueResult<T>::getStringLength()
-{
- return 0U;
-}
-
-template <typename T>
-const char* ValueResult<T>::getByteArrayContent()
-{
- return nullptr;
-}
-
-template <typename T>
-size_t ValueResult<T>::getByteArrayLength()
-{
- return 0U;
-}
-
-ByteArrayResult::ByteArrayResult(const char* data, size_t length):m_length(length)
-{
- if(length > 0){
- m_data = (char*)malloc(length*sizeof(char));
- memcpy(m_data, data, length);
- }else{
- m_data = nullptr;
- }
-}
-IPCType ByteArrayResult::getType()
-{
- return IPCType::BYTEARRAY;
-}
-
-const void* ByteArrayResult::getData()
-{
- return nullptr;
-}
-
-const uint16_t* ByteArrayResult::getStringContent(){
- return nullptr;
-}
-
-size_t ByteArrayResult::getStringLength(){
- return 0l;
-}
-
-const char* ByteArrayResult::getByteArrayContent(){
- return m_data;
-}
-
-size_t ByteArrayResult::getByteArrayLength(){
- return m_length;
-}
-ByteArrayResult::~ByteArrayResult()
-{
- if (m_data){
- free(m_data);
- m_data= NULL;
- }
- m_length = 0;
-}
-
-}
-
-
-
-
-std::unique_ptr<IPCResult> createVoidResult()
-{
- return std::unique_ptr<IPCResult>(new VoidResult);
-}
-
-std::unique_ptr<IPCResult> createInt32Result(int32_t val)
-{
- return std::unique_ptr<IPCResult>(new ValueResult<int32_t>(val));
-}
-
-std::unique_ptr<IPCResult> createInt64Result(int64_t val)
-{
- return std::unique_ptr<IPCResult>(new ValueResult<int64_t>(val));
-}
-
-std::unique_ptr<IPCResult> createDoubleResult(double val)
-{
- return std::unique_ptr<IPCResult>(new ValueResult<double>(val));
-}
-
-std::unique_ptr<IPCResult> createByteArrayResult(const char* data, size_t length){
- return std::unique_ptr<IPCResult>(new ByteArrayResult(data, length));
-}
-
-class CharArrayResult : public IPCResult {
-public:
- CharArrayResult(char* chars);
- // ByteArrayResult(const char* data);
- ~CharArrayResult();
-
- const void* getData() override;
- IPCType getType() override;
- const uint16_t* getStringContent() override;
- size_t getStringLength() override;
- const char* getByteArrayContent() override;
- size_t getByteArrayLength() override;
-
-private:
- char* m_char;
- size_t m_length{ 0U };
-};
-
-CharArrayResult::CharArrayResult(char* chars)
- : m_char(chars) {
- m_length = strlen(m_char);
-}
-
-CharArrayResult::~CharArrayResult() {
- delete[] m_char;
-}
-
-const void* CharArrayResult::getData()
-{
- return m_char;
-}
-
-IPCType CharArrayResult::getType()
-{
- return IPCType::CHARARRAY;
-}
-
-const uint16_t* CharArrayResult::getStringContent()
-{
- return nullptr;
-}
-
-size_t CharArrayResult::getStringLength()
-{
- return m_length;
-}
-
-const char* CharArrayResult::getByteArrayContent() {
- return nullptr;
-}
-
-size_t CharArrayResult::getByteArrayLength() {
-
- return 0U;
-}
-
-std::unique_ptr<IPCResult> createCharArrayResult(char* bytes) {
- return std::unique_ptr<IPCResult>(new CharArrayResult(bytes));
-}
diff --git a/weex_core/Source/IPC/IPCResult.h b/weex_core/Source/IPC/IPCResult.h
deleted file mode 100644
index 841d755..0000000
--- a/weex_core/Source/IPC/IPCResult.h
+++ /dev/null
@@ -1,54 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCRESULT_H
-#define IPCRESULT_H
-#include "IPCType.h"
-#include <memory>
-#include "IPCByteArray.h"
-
-struct IPCString;
-class IPCResult {
-public:
- virtual ~IPCResult() = default;
- template <typename T>
- T get()
- {
- return *static_cast<const T*>(getData());
- }
-
- virtual const void* getData() = 0;
- virtual IPCType getType() = 0;
- virtual const uint16_t* getStringContent() = 0;
- virtual size_t getStringLength() = 0;
- virtual const char* getByteArrayContent() = 0;
- virtual size_t getByteArrayLength() = 0;
-};
-
-std::unique_ptr<IPCResult> createVoidResult();
-std::unique_ptr<IPCResult> createInt32Result(int32_t val);
-std::unique_ptr<IPCResult> createInt64Result(int64_t val);
-std::unique_ptr<IPCResult> createDoubleResult(double val);
-std::unique_ptr<IPCResult> createCharArrayResult(char* bytes);
-std::unique_ptr<IPCResult> createByteArrayResult(const char* data, size_t length);
-
-#endif /* IPCRESULT_H */
diff --git a/weex_core/Source/IPC/IPCSender.cpp b/weex_core/Source/IPC/IPCSender.cpp
deleted file mode 100644
index 58ca62d..0000000
--- a/weex_core/Source/IPC/IPCSender.cpp
+++ /dev/null
@@ -1,98 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#include "IPCSender.h"
-#include "Buffering/IPCBuffer.h"
-#include "IPCArguments.h"
-#include "IPCByteArray.h"
-#include "IPCCheck.h"
-#include "IPCCommunicator.h"
-#include "IPCException.h"
-#include "IPCHandler.h"
-#include "IPCResult.h"
-#include "IPCString.h"
-#include "Serializing/IPCSerializer.h"
-#include <errno.h>
-#include <string.h>
-#include <unistd.h>
-#include <vector>
-
-namespace {
-class IPCSenderImpl : public IPCCommunicator, public IPCSender {
-public:
- IPCSenderImpl(IPCFutexPageQueue*, IPCHandler* handler);
- ~IPCSenderImpl();
- std::unique_ptr<IPCResult> send(IPCBuffer*) override;
-
-private:
- bool checkBufferAsync(IPCBuffer* buffer);
- IPCHandler* m_handler;
-};
-
-IPCSenderImpl::IPCSenderImpl(IPCFutexPageQueue* futexPageQueue, IPCHandler* handler)
- : IPCCommunicator(futexPageQueue)
- , m_handler(handler)
-{
-}
-
-IPCSenderImpl::~IPCSenderImpl()
-{
-}
-
-std::unique_ptr<IPCResult> IPCSenderImpl::send(IPCBuffer* buffer)
-{
- doSendBufferOnly(buffer);
- if (checkBufferAsync(buffer))
- return createVoidResult();
- while (true) {
- uint32_t msg = doReadPackage();
- bool isAsync = !!(msg & MSG_FLAG_ASYNC);
- msg &= MSG_MASK;
- if (msg == MSG_END) {
- std::unique_ptr<IPCResult> result = assembleResult();
- releaseBlob();
- return result;
- } else if (msg == MSG_TERMINATE) {
- releaseBlob();
- throw IPCException("peer terminates");
- }
- std::unique_ptr<IPCArguments> arguments = assembleArguments();
- releaseBlob();
- std::unique_ptr<IPCResult> sendBack = m_handler->handle(msg, arguments.get());
- if (!isAsync) {
- std::unique_ptr<IPCBuffer> resultBuffer = generateResultBuffer(sendBack.get());
- doSendBufferOnly(resultBuffer.get());
- }
- }
-}
-
-bool IPCSenderImpl::checkBufferAsync(IPCBuffer* buffer)
-{
- uint32_t msg = *static_cast<const uint32_t*>(buffer->get());
- return !!(msg & MSG_FLAG_ASYNC);
-}
-}
-
-std::unique_ptr<IPCSender> createIPCSender(IPCFutexPageQueue* futexPageQueue, IPCHandler* handler)
-{
- return std::unique_ptr<IPCSender>(new IPCSenderImpl(futexPageQueue, handler));
-}
diff --git a/weex_core/Source/IPC/IPCSender.h b/weex_core/Source/IPC/IPCSender.h
deleted file mode 100644
index 3c70aec..0000000
--- a/weex_core/Source/IPC/IPCSender.h
+++ /dev/null
@@ -1,37 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCSENDER_H
-#define IPCSENDER_H
-#include <memory>
-class IPCBuffer;
-class IPCResult;
-class IPCHandler;
-class IPCFutexPageQueue;
-
-class IPCSender {
-public:
- virtual ~IPCSender() = default;
- virtual std::unique_ptr<IPCResult> send(IPCBuffer* buffer) = 0;
-};
-std::unique_ptr<IPCSender> createIPCSender(IPCFutexPageQueue*, IPCHandler* handler);
-#endif /* IPCSENDER_H */
diff --git a/weex_core/Source/IPC/IPCString.h b/weex_core/Source/IPC/IPCString.h
deleted file mode 100644
index f103827..0000000
--- a/weex_core/Source/IPC/IPCString.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCSTRING_H
-#define IPCSTRING_H
-struct IPCString {
- uint32_t length;
- uint16_t content[1];
-};
-#endif /* IPCSTRING_H */
diff --git a/weex_core/Source/IPC/IPCType.h b/weex_core/Source/IPC/IPCType.h
deleted file mode 100644
index c0ad949..0000000
--- a/weex_core/Source/IPC/IPCType.h
+++ /dev/null
@@ -1,51 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCTYPE_H
-#define IPCTYPE_H
-#include <stdint.h>
-struct IPCPackage {
- uint32_t packageSize;
- uint32_t msg;
- uint32_t type[1];
-};
-
-enum class IPCType {
- INT32,
- INT64,
- FLOAT,
- DOUBLE,
- JSONSTRING,
- STRING,
- BYTEARRAY, /* terminated with zero. */
- CHARARRAY,
- VOID,
- JSUNDEFINED,
- END,
-};
-
-static const uint32_t MSG_MASK = (1U << 31) - 1;
-static const uint32_t MSG_END = static_cast<uint32_t>(-1) & MSG_MASK;
-static const uint32_t MSG_TERMINATE = static_cast<uint32_t>(-2) & MSG_MASK;
-static const uint32_t MSG_NOT_SET = static_cast<uint32_t>(-3) & MSG_MASK;
-static const uint32_t MSG_FLAG_ASYNC = 1U << 31;
-#endif /* IPCTYPE_H */
diff --git a/weex_core/Source/IPC/Serializing/IPCSerializer.cpp b/weex_core/Source/IPC/Serializing/IPCSerializer.cpp
deleted file mode 100644
index 63b7a8c..0000000
--- a/weex_core/Source/IPC/Serializing/IPCSerializer.cpp
+++ /dev/null
@@ -1,228 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#include "IPCSerializer.h"
-#include "../Buffering/IPCBuffer.h"
-#include "../IPCByteArray.h"
-#include "../IPCCheck.h"
-#include "../IPCString.h"
-#include "../IPCType.h"
-#include <sstream>
-#include <stdlib.h>
-#include <string>
-#include <vector>
-
-namespace {
-class IPCSerializerImpl : public IPCSerializer {
-public:
- void setMsg(uint32_t msg) override;
- void add(int32_t) override;
- void add(int64_t) override;
- void add(float) override;
- void add(double) override;
- void add(const uint16_t* data, size_t len) override;
- void addJSON(const uint16_t* data, size_t len) override;
- void add(const char* data, size_t len) override;
- void add(const IPCByteArray* bytes) override;
- void addJSUndefined() override;
- void addVoid() override;
- std::unique_ptr<IPCBuffer> finish() override;
-
-private:
- uint32_t m_msg{ MSG_END };
- std::vector<uint32_t> m_types;
- std::vector<std::unique_ptr<char[]>> m_datas;
-};
-
-class StringBasedIPCBufferImpl : public IPCBuffer {
-public:
- explicit StringBasedIPCBufferImpl(std::string&& s);
- const void* get() override;
- size_t length() override;
-
-private:
- std::string m_str;
-};
-
-void IPCSerializerImpl::setMsg(uint32_t msg)
-{
- m_msg = msg;
-}
-
-void IPCSerializerImpl::add(int32_t n)
-{
- std::unique_ptr<char[]> buffer(new char[sizeof(n)]);
- *reinterpret_cast<int32_t*>(buffer.get()) = n;
- m_types.emplace_back(static_cast<uint32_t>(IPCType::INT32));
- m_datas.emplace_back(std::move(buffer));
-}
-
-void IPCSerializerImpl::add(int64_t n)
-{
- std::unique_ptr<char[]> buffer(new char[sizeof(n)]);
- *reinterpret_cast<int64_t*>(buffer.get()) = n;
- m_types.emplace_back(static_cast<uint32_t>(IPCType::INT64));
- m_datas.emplace_back(std::move(buffer));
-}
-
-void IPCSerializerImpl::add(float n)
-{
- std::unique_ptr<char[]> buffer(new char[sizeof(n)]);
- *reinterpret_cast<float*>(buffer.get()) = n;
- m_types.emplace_back(static_cast<uint32_t>(IPCType::FLOAT));
- m_datas.emplace_back(std::move(buffer));
-}
-
-void IPCSerializerImpl::add(double n)
-{
- std::unique_ptr<char[]> buffer(new char[sizeof(n)]);
- *reinterpret_cast<double*>(buffer.get()) = n;
- m_types.emplace_back(static_cast<uint32_t>(IPCType::DOUBLE));
- m_datas.emplace_back(std::move(buffer));
-}
-
-void IPCSerializerImpl::add(const uint16_t* data, size_t len)
-{
- size_t byteLength = len * sizeof(uint16_t);
- std::unique_ptr<char[]> buffer(new char[byteLength + sizeof(IPCString)]);
- IPCString* s = reinterpret_cast<IPCString*>(buffer.get());
- s->length = len;
- memcpy(s->content, data, byteLength);
- m_types.emplace_back(static_cast<uint32_t>(IPCType::STRING));
- m_datas.emplace_back(std::move(buffer));
-}
-
-void IPCSerializerImpl::addJSON(const uint16_t* data, size_t len)
-{
- size_t byteLength = len * sizeof(uint16_t);
- std::unique_ptr<char[]> buffer(new char[byteLength + sizeof(IPCString)]);
- IPCString* s = reinterpret_cast<IPCString*>(buffer.get());
- s->length = len;
- memcpy(s->content, data, byteLength);
- m_types.emplace_back(static_cast<uint32_t>(IPCType::JSONSTRING));
- m_datas.emplace_back(std::move(buffer));
-}
-
-void IPCSerializerImpl::add(const char* data, size_t len)
-{
- size_t byteLength = len;
- std::unique_ptr<char[]> buffer(new char[byteLength + sizeof(IPCByteArray)]);
- IPCByteArray* s = reinterpret_cast<IPCByteArray*>(buffer.get());
- s->length = len;
- memcpy(s->content, data, byteLength);
- s->content[byteLength] = '\0';
- m_types.emplace_back(static_cast<uint32_t>(IPCType::BYTEARRAY));
- m_datas.emplace_back(std::move(buffer));
-}
-
-void IPCSerializerImpl::add(const IPCByteArray* bytes) {
- m_types.emplace_back(static_cast<uint32_t>(IPCType::BYTEARRAY));
- // m_datas.emplace_back(std::move((std::unique_ptr<char[]>)bytes));
-}
-
-void IPCSerializerImpl::addJSUndefined()
-{
- m_types.emplace_back(static_cast<uint32_t>(IPCType::JSUNDEFINED));
- m_datas.emplace_back();
-}
-
-void IPCSerializerImpl::addVoid()
-{
- m_types.emplace_back(static_cast<uint32_t>(IPCType::VOID));
- m_datas.emplace_back();
-}
-
-std::unique_ptr<IPCBuffer> IPCSerializerImpl::finish()
-{
- IPC_DCHECK(m_types.size() > 0);
- IPC_DCHECK(m_msg != MSG_NOT_SET);
- std::ostringstream oss;
- oss.write(reinterpret_cast<const char*>(&m_msg), sizeof(m_msg));
- for (auto& type : m_types) {
- oss.write(reinterpret_cast<const char*>(&type), sizeof(type));
- }
- uint32_t endOfType = static_cast<uint32_t>(IPCType::END);
- oss.write(reinterpret_cast<const char*>(&endOfType), sizeof(endOfType));
-
- int i = 0;
- for (auto& data : m_datas) {
- switch (static_cast<IPCType>(m_types[i])) {
- case IPCType::INT32: {
- oss.write(data.get(), sizeof(int32_t));
- } break;
- case IPCType::INT64: {
- oss.write(data.get(), sizeof(int64_t));
- } break;
- case IPCType::FLOAT: {
- oss.write(data.get(), sizeof(float));
- } break;
- case IPCType::DOUBLE: {
- oss.write(data.get(), sizeof(double));
- } break;
- case IPCType::BYTEARRAY: {
- IPCByteArray* a = reinterpret_cast<IPCByteArray*>(data.get());
- size_t byteLength = a->length;
- oss.write(reinterpret_cast<const char*>(&a->length), sizeof(a->length));
- oss.write(reinterpret_cast<const char*>(a->content), byteLength);
- } break;
- case IPCType::JSONSTRING:
- case IPCType::STRING: {
- IPCString* s = reinterpret_cast<IPCString*>(data.get());
- size_t byteLength = s->length * sizeof(uint16_t);
- oss.write(reinterpret_cast<const char*>(&s->length), sizeof(s->length));
- oss.write(reinterpret_cast<const char*>(s->content), byteLength);
- } break;
- case IPCType::JSUNDEFINED:
- case IPCType::VOID:
- break;
- default:
- IPC_UNREACHABLE();
- }
- ++i;
- }
- m_types.clear();
- m_datas.clear();
- m_msg = MSG_NOT_SET;
- std::unique_ptr<StringBasedIPCBufferImpl> bufferReturn(new StringBasedIPCBufferImpl(std::move(oss.str())));
- return std::unique_ptr<IPCBuffer>(bufferReturn.release());
-}
-
-StringBasedIPCBufferImpl::StringBasedIPCBufferImpl(std::string&& s)
- : m_str(std::move(s))
-{
-}
-
-const void* StringBasedIPCBufferImpl::get()
-{
- return m_str.data();
-}
-
-size_t StringBasedIPCBufferImpl::length()
-{
- return m_str.length();
-}
-}
-
-std::unique_ptr<IPCSerializer> createIPCSerializer()
-{
- return std::unique_ptr<IPCSerializer>(new IPCSerializerImpl);
-}
diff --git a/weex_core/Source/IPC/Serializing/IPCSerializer.h b/weex_core/Source/IPC/Serializing/IPCSerializer.h
deleted file mode 100644
index a3d8771..0000000
--- a/weex_core/Source/IPC/Serializing/IPCSerializer.h
+++ /dev/null
@@ -1,48 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef IPCSERIALIZER_H
-#define IPCSERIALIZER_H
-#include <memory>
-#include <stdint.h>
-#include "IPCByteArray.h"
-
-class IPCBuffer;
-class IPCSerializer {
-public:
- virtual ~IPCSerializer() = default;
- virtual void setMsg(uint32_t msg) = 0;
- virtual void add(int32_t) = 0;
- virtual void add(int64_t) = 0;
- virtual void add(float) = 0;
- virtual void add(double) = 0;
- virtual void add(const uint16_t* data, size_t len) = 0;
- virtual void addJSON(const uint16_t* data, size_t len) = 0;
- virtual void add(const char* data, size_t len) = 0;
- virtual void add(const IPCByteArray* bytes) = 0;
- virtual void addJSUndefined() = 0;
- virtual void addVoid() = 0;
- virtual std::unique_ptr<IPCBuffer> finish() = 0;
-};
-
-std::unique_ptr<IPCSerializer> createIPCSerializer();
-#endif /* IPCSERIALIZER_H */
diff --git a/weex_core/Source/IPC/ashmem.c b/weex_core/Source/IPC/ashmem.c
deleted file mode 100644
index e01a5db..0000000
--- a/weex_core/Source/IPC/ashmem.c
+++ /dev/null
@@ -1,100 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#include <fcntl.h>
-#include <string.h>
-#include <sys/ioctl.h>
-#include <sys/stat.h>
-#include <sys/types.h>
-#include <unistd.h>
-
-#include "ashmem.h"
-#include <linux/ashmem.h>
-
-#define ASHMEM_DEVICE "/dev/ashmem"
-
-/*
- * ashmem_create_region - creates a new ashmem region and returns the file
- * descriptor, or <0 on error
- *
- * `name' is an optional label to give the region (visible in /proc/pid/maps)
- * `size' is the size of the region, in page-aligned bytes
- */
-int ashmem_create_region(const char* name, size_t size)
-{
- int fd, ret;
-
- fd = open(ASHMEM_DEVICE, O_RDWR);
- if (fd < 0)
- return fd;
-
- if (name) {
- char buf[ASHMEM_NAME_LEN];
-
- strlcpy(buf, name, sizeof(buf));
- ret = ioctl(fd, ASHMEM_SET_NAME, buf);
- if (ret < 0)
- goto error;
- }
-
- ret = ioctl(fd, ASHMEM_SET_SIZE, size);
- if (ret < 0)
- goto error;
-
- return fd;
-
-error:
- close(fd);
- return ret;
-}
-
-int ashmem_set_prot_region(int fd, int prot)
-{
- return ioctl(fd, ASHMEM_SET_PROT_MASK, prot);
-}
-
-int ashmem_pin_region(int fd, size_t offset, size_t len)
-{
- struct ashmem_pin pin = { offset, len };
- return ioctl(fd, ASHMEM_PIN, &pin);
-}
-
-int ashmem_unpin_region(int fd, size_t offset, size_t len)
-{
- struct ashmem_pin pin = { offset, len };
- return ioctl(fd, ASHMEM_UNPIN, &pin);
-}
-
-int ashmem_get_size_region(int fd)
-{
- return ioctl(fd, ASHMEM_GET_SIZE, NULL);
-}
-
-int ashmem_purge_all(void)
-{
- const int fd = open(ASHMEM_DEVICE, O_RDWR);
- if (fd < 0)
- return fd;
- const int ret = ioctl(fd, ASHMEM_PURGE_ALL_CACHES, 0);
- close(fd);
- return ret;
-}
diff --git a/weex_core/Source/IPC/ashmem.h b/weex_core/Source/IPC/ashmem.h
deleted file mode 100644
index 9527705..0000000
--- a/weex_core/Source/IPC/ashmem.h
+++ /dev/null
@@ -1,59 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- *
- * Licensed under the Apache License, Version 2.0 (the "License");
- * you may not use this file except in compliance with the License.
- * You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing, software
- * distributed under the License is distributed on an "AS IS" BASIS,
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
- * See the License for the specific language governing permissions and
- * limitations under the License.
- */
-
-/*
- * Implementation of the user-space ashmem API for devices, which have our
- * ashmem-enabled kernel. See ashmem-sim.c for the "fake" tmp-based version,
- * used by the simulator.
- */
-
-#ifndef _THIRD_PARTY_ASHMEM_H
-#define _THIRD_PARTY_ASHMEM_H
-
-#include <stddef.h>
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-int ashmem_create_region(const char* name, size_t size);
-int ashmem_set_prot_region(int fd, int prot);
-int ashmem_pin_region(int fd, size_t offset, size_t len);
-int ashmem_unpin_region(int fd, size_t offset, size_t len);
-int ashmem_get_size_region(int fd);
-int ashmem_purge_all(void);
-
-#ifdef __cplusplus
-}
-#endif
-
-#ifndef __ASHMEMIOC /* in case someone included <linux/ashmem.h> too */
-
-#define ASHMEM_NAME_LEN 256
-
-#define ASHMEM_NAME_DEF "dev/ashmem"
-
-/* Return values from ASHMEM_PIN: Was the mapping purged while unpinned? */
-#define ASHMEM_NOT_PURGED 0
-#define ASHMEM_WAS_PURGED 1
-
-/* Return values from ASHMEM_UNPIN: Is the mapping now pinned or unpinned? */
-#define ASHMEM_IS_UNPINNED 0
-#define ASHMEM_IS_PINNED 1
-
-#endif /* ! __ASHMEMIOC */
-
-#endif /* _THIRD_PARTY_ASHMEM_H */
diff --git a/weex_core/Source/IPC/futex.h b/weex_core/Source/IPC/futex.h
deleted file mode 100644
index f6bb4ee..0000000
--- a/weex_core/Source/IPC/futex.h
+++ /dev/null
@@ -1,109 +0,0 @@
-/*
- * Copyright (C) 2008 The Android Open Source Project
- * All rights reserved.
- *
- * Redistribution and use in source and binary forms, with or without
- * modification, are permitted provided that the following conditions
- * are met:
- * * Redistributions of source code must retain the above copyright
- * notice, this list of conditions and the following disclaimer.
- * * Redistributions in binary form must reproduce the above copyright
- * notice, this list of conditions and the following disclaimer in
- * the documentation and/or other materials provided with the
- * distribution.
- *
- * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS
- * "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT
- * LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS
- * FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE
- * COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT,
- * INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING,
- * BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS
- * OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED
- * AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
- * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT
- * OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
- * SUCH DAMAGE.
- */
-#ifndef _BIONIC_FUTEX_H
-#define _BIONIC_FUTEX_H
-
-#include <errno.h>
-#include <stdbool.h>
-#include <stddef.h>
-#include <sys/cdefs.h>
-#include <sys/syscall.h>
-#include <unistd.h>
-
-#define FUTEX_WAIT 0
-#define FUTEX_WAKE 1
-#define FUTEX_FD 2
-#define FUTEX_REQUEUE 3
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
-#define FUTEX_CMP_REQUEUE 4
-#define FUTEX_WAKE_OP 5
-#define FUTEX_LOCK_PI 6
-#define FUTEX_UNLOCK_PI 7
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
-#define FUTEX_TRYLOCK_PI 8
-#define FUTEX_WAIT_BITSET 9
-#define FUTEX_WAKE_BITSET 10
-#define FUTEX_WAIT_REQUEUE_PI 11
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
-#define FUTEX_CMP_REQUEUE_PI 12
-#define FUTEX_PRIVATE_FLAG 128
-#define FUTEX_CLOCK_REALTIME 256
-#define FUTEX_CMD_MASK ~(FUTEX_PRIVATE_FLAG | FUTEX_CLOCK_REALTIME)
-#define FUTEX_TID_MASK 0x3fffffff
-#define FUTEX_OWNER_DIED 0x40000000
-#define FUTEX_WAITERS 0x80000000
-
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
-#define FUTEX_WAIT_PRIVATE (FUTEX_WAIT | FUTEX_PRIVATE_FLAG)
-#define FUTEX_WAKE_PRIVATE (FUTEX_WAKE | FUTEX_PRIVATE_FLAG)
-#define FUTEX_REQUEUE_PRIVATE (FUTEX_REQUEUE | FUTEX_PRIVATE_FLAG)
-#define FUTEX_CMP_REQUEUE_PRIVATE (FUTEX_CMP_REQUEUE | FUTEX_PRIVATE_FLAG)
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
-#define FUTEX_WAKE_OP_PRIVATE (FUTEX_WAKE_OP | FUTEX_PRIVATE_FLAG)
-#define FUTEX_LOCK_PI_PRIVATE (FUTEX_LOCK_PI | FUTEX_PRIVATE_FLAG)
-#define FUTEX_UNLOCK_PI_PRIVATE (FUTEX_UNLOCK_PI | FUTEX_PRIVATE_FLAG)
-#define FUTEX_TRYLOCK_PI_PRIVATE (FUTEX_TRYLOCK_PI | FUTEX_PRIVATE_FLAG)
-/* WARNING: DO NOT EDIT, AUTO-GENERATED CODE - SEE TOP FOR INSTRUCTIONS */
-#define FUTEX_WAIT_BITSET_PRIVATE (FUTEX_WAIT_BITSET | FUTEX_PRIVATE_FLAG)
-#define FUTEX_WAKE_BITSET_PRIVATE (FUTEX_WAKE_BITSET | FUTEX_PRIVATE_FLAG)
-#define FUTEX_WAIT_REQUEUE_PI_PRIVATE (FUTEX_WAIT_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
-#define FUTEX_CMP_REQUEUE_PI_PRIVATE (FUTEX_CMP_REQUEUE_PI | FUTEX_PRIVATE_FLAG)
-#ifndef __predict_false
-#define __predict_false(exp) __builtin_expect((exp) != 0, 0)
-#endif // __predict_false
-
-struct timespec;
-
-static inline __always_inline int __futex(volatile void* ftx, int op, int value, const struct timespec* timeout)
-{
- // Our generated syscall assembler sets errno, but our callers (pthread functions) don't want to.
- int result = syscall(__NR_futex, ftx, op, value, timeout);
- return result;
-}
-
-static inline int __futex_wake(volatile void* ftx, int count)
-{
- return __futex(ftx, FUTEX_WAKE, count, NULL);
-}
-
-static inline int __futex_wake_ex(volatile void* ftx, bool shared, int count)
-{
- return __futex(ftx, shared ? FUTEX_WAKE : FUTEX_WAKE_PRIVATE, count, NULL);
-}
-
-static inline int __futex_wait(volatile void* ftx, int value, const struct timespec* timeout)
-{
- return __futex(ftx, FUTEX_WAIT, value, timeout);
-}
-
-static inline int __futex_wait_ex(volatile void* ftx, bool shared, int value, const struct timespec* timeout)
-{
- return __futex(ftx, shared ? FUTEX_WAIT : FUTEX_WAIT_PRIVATE, value, timeout);
-}
-
-#endif /* _BIONIC_FUTEX_H */
diff --git a/weex_core/Source/android/base/base64/base64.cpp b/weex_core/Source/android/base/base64/base64.cpp
deleted file mode 100644
index c70d2c4..0000000
--- a/weex_core/Source/android/base/base64/base64.cpp
+++ /dev/null
@@ -1,52 +0,0 @@
-/**
- * \file
- * <PRE>
- * High performance base64 encoder / decoder
- * Version 1.3 -- 17-Mar-2006
- *
- * Copyright © 2005, 2006, Nick Galbreath -- nickg [at] modp [dot] com
- * All rights reserved.
- *
- * http://modp.com/release/base64
- *
- * Released under bsd license. See modp_b64.c for details.
- * </pre>
- *
- * The default implementation is the standard b64 encoding with padding.
- * It's easy to change this to use "URL safe" characters and to remove
- * padding. See the modp_b64.c source code for details.
- *
- */
-
-#include "./base64.h"
-#include <string.h>
-
-bool Base64Encode(const std::string &input, std::string *output) {
- std::string temp;
- temp.resize(modp_b64_encode_len(input.size())); // makes room for null byte
-
- // null terminates result since result is base64 text!
- int input_size = static_cast<int>(input.size());
- int output_size = modp_b64_encode(&(temp[0]), input.data(), input_size);
- if (output_size < 0)
- return false;
-
- temp.resize(output_size); // strips off null byte
- output->swap(temp);
- return true;
-}
-
-bool Base64Decode(const std::string &input, std::string *output) {
- std::string temp;
- temp.resize(modp_b64_decode_len(input.size()));
-
- // does not null terminate result since result is binary data!
- int input_size = static_cast<int>(input.size());
- int output_size = modp_b64_decode(&(temp[0]), input.data(), input_size);
- if (output_size < 0)
- return false;
-
- temp.resize(output_size);
- output->swap(temp);
- return true;
-}
\ No newline at end of file
diff --git a/weex_core/Source/android/base/base64/base64.h b/weex_core/Source/android/base/base64/base64.h
deleted file mode 100644
index 1380dd1..0000000
--- a/weex_core/Source/android/base/base64/base64.h
+++ /dev/null
@@ -1,29 +0,0 @@
-/**
- * \file
- * <PRE>
- * High performance base64 encoder / decoder
- * Version 1.3 -- 17-Mar-2006
- *
- * Copyright © 2005, 2006, Nick Galbreath -- nickg [at] modp [dot] com
- * All rights reserved.
- *
- * http://modp.com/release/base64
- *
- * Released under bsd license. See modp_b64.c for details.
- * </pre>
- *
- * The default implementation is the standard b64 encoding with padding.
- * It's easy to change this to use "URL safe" characters and to remove
- * padding. See the modp_b64.c source code for details.
- *
- */
-
-#include "./modp_base64/modp_b64.h"
-
-// Encodes the input string in base64. Returns true if successful and false
-// otherwise. The output string is only modified if successful.
-bool Base64Encode(const std::string &input, std::string *output);
-
-// Decodes the base64 input string. Returns true if successful and false
-// otherwise. The output string is only modified if successful.
-bool Base64Decode(const std::string &input, std::string *output);
diff --git a/weex_core/Source/android/base/base64/modp_base64/modp_b64.cc b/weex_core/Source/android/base/base64/modp_base64/modp_b64.cc
deleted file mode 100644
index 03cf6ea..0000000
--- a/weex_core/Source/android/base/base64/modp_base64/modp_b64.cc
+++ /dev/null
@@ -1,241 +0,0 @@
-/**
- * \file
- * <PRE>
- * High performance base64 encoder / decoder
- * Version 1.3 -- 17-Mar-2006
- *
- * Copyright © 2005, 2006, Nick Galbreath -- nickg [at] modp [dot] com
- * All rights reserved.
- *
- * http://modp.com/release/base64
- *
- * Released under bsd license. See modp_b64.c for details.
- * </pre>
- *
- * The default implementation is the standard b64 encoding with padding.
- * It's easy to change this to use "URL safe" characters and to remove
- * padding. See the modp_b64.c source code for details.
- *
- */
-
-/* public header */
-#include "modp_b64.h"
-
-/*
- * If you are ripping this out of the library, comment out the next
- * line and uncomment the next lines as approrpiate
- */
-//#include "config.h"
-
-/* if on motoral, sun, ibm; uncomment this */
-/* #define WORDS_BIGENDIAN 1 */
-/* else for Intel, Amd; uncomment this */
-/* #undef WORDS_BIGENDIAN */
-
-#include "modp_b64_data.h"
-
-#define BADCHAR 0x01FFFFFF
-
-/**
- * you can control if we use padding by commenting out this
- * next line. However, I highly recommend you use padding and not
- * using it should only be for compatability with a 3rd party.
- * Also, 'no padding' is not tested!
- */
-#define DOPAD 1
-
-/*
- * if we aren't doing padding
- * set the pad character to NULL
- */
-#ifndef DOPAD
-#undef CHARPAD
-#define CHARPAD '\0'
-#endif
-
-int modp_b64_encode(char *dest, const char *str, int len) {
- int i;
- uint8_t *p = (uint8_t *) dest;
-
- /* unsigned here is important! */
- uint8_t t1, t2, t3;
-
- for (i = 0; i < len - 2; i += 3) {
- t1 = str[i];
- t2 = str[i + 1];
- t3 = str[i + 2];
- *p++ = e0[t1];
- *p++ = e1[((t1 & 0x03) << 4) | ((t2 >> 4) & 0x0F)];
- *p++ = e1[((t2 & 0x0F) << 2) | ((t3 >> 6) & 0x03)];
- *p++ = e2[t3];
- }
-
- switch (len - i) {
- case 0:
- break;
- case 1:
- t1 = str[i];
- *p++ = e0[t1];
- *p++ = e1[(t1 & 0x03) << 4];
- *p++ = CHARPAD;
- *p++ = CHARPAD;
- break;
- default: /* case 2 */
- t1 = str[i];
- t2 = str[i + 1];
- *p++ = e0[t1];
- *p++ = e1[((t1 & 0x03) << 4) | ((t2 >> 4) & 0x0F)];
- *p++ = e2[(t2 & 0x0F) << 2];
- *p++ = CHARPAD;
- }
-
- *p = '\0';
- return p - (uint8_t *) dest;
-}
-
-#ifdef WORDS_BIGENDIAN /* BIG ENDIAN -- SUN / IBM / MOTOROLA */
-int modp_b64_decode(char* dest, const char* src, int len)
-{
- if (len == 0) return 0;
-
-#ifdef DOPAD
- /* if padding is used, then the message must be at least
- 4 chars and be a multiple of 4.
- there can be at most 2 pad chars at the end */
- if (len < 4 || (len % 4 != 0)) return -1;
- if (src[len-1] == CHARPAD) {
- len--;
- if (src[len -1] == CHARPAD) {
- len--;
- }
- }
-#endif /* DOPAD */
-
- int i;
- int leftover = len % 4;
- int chunks = (leftover == 0) ? len / 4 - 1 : len /4;
-
- uint8_t* p = (uint8_t*) dest;
- uint32_t x = 0;
- uint32_t* destInt = (uint32_t*) p;
- uint32_t* srcInt = (uint32_t*) src;
- uint32_t y = *srcInt++;
- for (i = 0; i < chunks; ++i) {
- x = d0[y >> 24 & 0xff] | d1[y >> 16 & 0xff] |
- d2[y >> 8 & 0xff] | d3[y & 0xff];
-
- if (x >= BADCHAR) return -1;
- *destInt = x << 8;
- p += 3;
- destInt = (uint32_t*)p;
- y = *srcInt++;
- }
-
- switch (leftover) {
- case 0:
- x = d0[y >> 24 & 0xff] | d1[y >> 16 & 0xff] |
- d2[y >> 8 & 0xff] | d3[y & 0xff];
- if (x >= BADCHAR) return -1;
- *p++ = ((uint8_t*)&x)[1];
- *p++ = ((uint8_t*)&x)[2];
- *p = ((uint8_t*)&x)[3];
- return (chunks+1)*3;
- case 1:
- x = d3[y >> 24];
- *p = (uint8_t)x;
- break;
- case 2:
- x = d3[y >> 24] *64 + d3[(y >> 16) & 0xff];
- *p = (uint8_t)(x >> 4);
- break;
- default: /* case 3 */
- x = (d3[y >> 24] *64 + d3[(y >> 16) & 0xff])*64 +
- d3[(y >> 8) & 0xff];
- *p++ = (uint8_t) (x >> 10);
- *p = (uint8_t) (x >> 2);
- break;
- }
-
- if (x >= BADCHAR) return -1;
- return 3*chunks + (6*leftover)/8;
-}
-
-#else /* LITTLE ENDIAN -- INTEL AND FRIENDS */
-
-int modp_b64_decode(char *dest, const char *src, int len) {
- if (len == 0) return 0;
-
-#ifdef DOPAD
- /*
- * if padding is used, then the message must be at least
- * 4 chars and be a multiple of 4
- */
- if (len < 4 || (len % 4 != 0)) return -1; /* error */
- /* there can be at most 2 pad chars at the end */
- if (src[len - 1] == CHARPAD) {
- len--;
- if (src[len - 1] == CHARPAD) {
- len--;
- }
- }
-#endif
-
- int i;
- int leftover = len % 4;
- int chunks = (leftover == 0) ? len / 4 - 1 : len / 4;
-
- uint8_t *p = (uint8_t *) dest;
- uint32_t x = 0;
- uint32_t *destInt = (uint32_t *) p;
- uint32_t *srcInt = (uint32_t *) src;
- uint32_t y = *srcInt++;
- for (i = 0; i < chunks; ++i) {
- x = d0[y & 0xff] |
- d1[(y >> 8) & 0xff] |
- d2[(y >> 16) & 0xff] |
- d3[(y >> 24) & 0xff];
-
- if (x >= BADCHAR) return -1;
- *destInt = x;
- p += 3;
- destInt = (uint32_t *) p;
- y = *srcInt++;
- }
-
-
- switch (leftover) {
- case 0:
- x = d0[y & 0xff] |
- d1[(y >> 8) & 0xff] |
- d2[(y >> 16) & 0xff] |
- d3[(y >> 24) & 0xff];
-
- if (x >= BADCHAR) return -1;
- *p++ = ((uint8_t *) (&x))[0];
- *p++ = ((uint8_t *) (&x))[1];
- *p = ((uint8_t *) (&x))[2];
- return (chunks + 1) * 3;
- break;
- case 1: /* with padding this is an impossible case */
- x = d0[y & 0xff];
- *p = *((uint8_t *) (&x)); // i.e. first char/byte in int
- break;
- case 2: // * case 2, 1 output byte */
- x = d0[y & 0xff] | d1[y >> 8 & 0xff];
- *p = *((uint8_t *) (&x)); // i.e. first char
- break;
- default: /* case 3, 2 output bytes */
- x = d0[y & 0xff] |
- d1[y >> 8 & 0xff] |
- d2[y >> 16 & 0xff]; /* 0x3c */
- *p++ = ((uint8_t *) (&x))[0];
- *p = ((uint8_t *) (&x))[1];
- break;
- }
-
- if (x >= BADCHAR) return -1;
-
- return 3 * chunks + (6 * leftover) / 8;
-}
-
-#endif /* if bigendian / else / endif */
diff --git a/weex_core/Source/android/base/base64/modp_base64/modp_b64.h b/weex_core/Source/android/base/base64/modp_base64/modp_b64.h
deleted file mode 100644
index cde3c9d..0000000
--- a/weex_core/Source/android/base/base64/modp_base64/modp_b64.h
+++ /dev/null
@@ -1,162 +0,0 @@
-/**
- * \file
- * <PRE>
- * High performance base64 encoder / decoder
- * Version 1.3 -- 17-Mar-2006
- *
- * Copyright © 2005, 2006, Nick Galbreath -- nickg [at] modp [dot] com
- * All rights reserved.
- *
- * http://modp.com/release/base64
- *
- * Released under bsd license. See modp_b64.c for details.
- * </pre>
- *
- * The default implementation is the standard b64 encoding with padding.
- * It's easy to change this to use "URL safe" characters and to remove
- * padding. See the modp_b64.c source code for details.
- *
- */
-
-#ifndef MODP_B64
-#define MODP_B64
-
-#ifdef __cplusplus
-extern "C" {
-#endif
-
-/**
- * Encode a raw binary string into base 64.
- * src contains the bytes
- * len contains the number of bytes in the src
- * dest should be allocated by the caller to contain
- * at least modp_b64_encode_len(len) bytes (see below)
- * This will contain the null-terminated b64 encoded result
- * returns length of the destination string plus the ending null byte
- * i.e. the result will be equal to strlen(dest) + 1
- *
- * Example
- *
- * \code
- * char* src = ...;
- * int srclen = ...; //the length of number of bytes in src
- * char* dest = (char*) malloc(modp_b64_encode_len);
- * int len = modp_b64_encode(dest, src, sourcelen);
- * if (len == -1) {
- * printf("Error\n");
- * } else {
- * printf("b64 = %s\n", dest);
- * }
- * \endcode
- *
- */
-int modp_b64_encode(char *dest, const char *str, int len);
-
-/**
- * Decode a base64 encoded string
- *
- * src should contain exactly len bytes of b64 characters.
- * if src contains -any- non-base characters (such as white
- * space, -1 is returned.
- *
- * dest should be allocated by the caller to contain at least
- * len * 3 / 4 bytes.
- *
- * Returns the length (strlen) of the output, or -1 if unable to
- * decode
- *
- * \code
- * char* src = ...;
- * int srclen = ...; // or if you don't know use strlen(src)
- * char* dest = (char*) malloc(modp_b64_decode_len(srclen));
- * int len = modp_b64_decode(dest, src, sourcelen);
- * if (len == -1) { error }
- * \endcode
- */
-int modp_b64_decode(char *dest, const char *src, int len);
-
-/**
- * Given a source string of length len, this returns the amount of
- * memory the destination string should have.
- *
- * remember, this is integer math
- * 3 bytes turn into 4 chars
- * ceiling[len / 3] * 4 + 1
- *
- * +1 is for any extra null.
- */
-#define modp_b64_encode_len(A) ((A+2)/3 * 4 + 1)
-
-/**
- * Given a base64 string of length len,
- * this returns the amount of memory required for output string
- * It maybe be more than the actual number of bytes written.
- * NOTE: remember this is integer math
- * this allocates a bit more memory than traditional versions of b64
- * decode 4 chars turn into 3 bytes
- * floor[len * 3/4] + 2
- */
-#define modp_b64_decode_len(A) (A / 4 * 3 + 2)
-
-/**
- * Will return the strlen of the output from encoding.
- * This may be less than the required number of bytes allocated.
- *
- * This allows you to 'deserialized' a struct
- * \code
- * char* b64encoded = "...";
- * int len = strlen(b64encoded);
- *
- * struct datastuff foo;
- * if (modp_b64_encode_strlen(sizeof(struct datastuff)) != len) {
- * // wrong size
- * return false;
- * } else {
- * // safe to do;
- * if (modp_b64_decode((char*) &foo, b64encoded, len) == -1) {
- * // bad characters
- * return false;
- * }
- * }
- * // foo is filled out now
- * \endcode
- */
-#define modp_b64_encode_strlen(A) ((A + 2)/ 3 * 4)
-
-#ifdef __cplusplus
-}
-
-#include <string>
-
-inline std::string &modp_b64_encode(std::string &s) {
- std::string x(modp_b64_encode_len(s.size()), '\0');
- int d = modp_b64_encode(const_cast<char *>(x.data()), s.data(), s.size());
- x.erase(d, std::string::npos);
- s.swap(x);
- return s;
-}
-
-/**
- * base 64 decode a string (self-modifing)
- * On failure, the string is empty.
- *
- * This function is for C++ only (duh)
- *
- * \param[in,out] s the string to be decoded
- * \return a reference to the input string
- */
-inline std::string &modp_b64_decode(std::string &s) {
- std::string x(modp_b64_decode_len(s.size()), '\0');
- int d = modp_b64_decode(const_cast<char *>(x.data()), s.data(), s.size());
- if (d < 0) {
- x.clear();
- } else {
- x.erase(d, std::string::npos);
- }
- s.swap(x);
- return s;
-}
-
-#endif /* __cplusplus */
-
-#endif /* MODP_B64 */
diff --git a/weex_core/Source/android/base/base64/modp_base64/modp_b64_data.h b/weex_core/Source/android/base/base64/modp_base64/modp_b64_data.h
deleted file mode 100644
index 339c59a..0000000
--- a/weex_core/Source/android/base/base64/modp_base64/modp_b64_data.h
+++ /dev/null
@@ -1,301 +0,0 @@
-/**
- * \file
- * <PRE>
- * High performance base64 encoder / decoder
- * Version 1.3 -- 17-Mar-2006
- *
- * Copyright © 2005, 2006, Nick Galbreath -- nickg [at] modp [dot] com
- * All rights reserved.
- *
- * http://modp.com/release/base64
- *
- * Released under bsd license. See modp_b64.c for details.
- * </pre>
- *
- * The default implementation is the standard b64 encoding with padding.
- * It's easy to change this to use "URL safe" characters and to remove
- * padding. See the modp_b64.c source code for details.
- *
- */
-typedef unsigned char uint8_t;
-typedef unsigned int uint32_t;
-
-#define CHAR62 '+'
-#define CHAR63 '/'
-#define CHARPAD '='
-static const char e0[256] = {
- 'A', 'A', 'A', 'A', 'B', 'B', 'B', 'B', 'C', 'C',
- 'C', 'C', 'D', 'D', 'D', 'D', 'E', 'E', 'E', 'E',
- 'F', 'F', 'F', 'F', 'G', 'G', 'G', 'G', 'H', 'H',
- 'H', 'H', 'I', 'I', 'I', 'I', 'J', 'J', 'J', 'J',
- 'K', 'K', 'K', 'K', 'L', 'L', 'L', 'L', 'M', 'M',
- 'M', 'M', 'N', 'N', 'N', 'N', 'O', 'O', 'O', 'O',
- 'P', 'P', 'P', 'P', 'Q', 'Q', 'Q', 'Q', 'R', 'R',
- 'R', 'R', 'S', 'S', 'S', 'S', 'T', 'T', 'T', 'T',
- 'U', 'U', 'U', 'U', 'V', 'V', 'V', 'V', 'W', 'W',
- 'W', 'W', 'X', 'X', 'X', 'X', 'Y', 'Y', 'Y', 'Y',
- 'Z', 'Z', 'Z', 'Z', 'a', 'a', 'a', 'a', 'b', 'b',
- 'b', 'b', 'c', 'c', 'c', 'c', 'd', 'd', 'd', 'd',
- 'e', 'e', 'e', 'e', 'f', 'f', 'f', 'f', 'g', 'g',
- 'g', 'g', 'h', 'h', 'h', 'h', 'i', 'i', 'i', 'i',
- 'j', 'j', 'j', 'j', 'k', 'k', 'k', 'k', 'l', 'l',
- 'l', 'l', 'm', 'm', 'm', 'm', 'n', 'n', 'n', 'n',
- 'o', 'o', 'o', 'o', 'p', 'p', 'p', 'p', 'q', 'q',
- 'q', 'q', 'r', 'r', 'r', 'r', 's', 's', 's', 's',
- 't', 't', 't', 't', 'u', 'u', 'u', 'u', 'v', 'v',
- 'v', 'v', 'w', 'w', 'w', 'w', 'x', 'x', 'x', 'x',
- 'y', 'y', 'y', 'y', 'z', 'z', 'z', 'z', '0', '0',
- '0', '0', '1', '1', '1', '1', '2', '2', '2', '2',
- '3', '3', '3', '3', '4', '4', '4', '4', '5', '5',
- '5', '5', '6', '6', '6', '6', '7', '7', '7', '7',
- '8', '8', '8', '8', '9', '9', '9', '9', '+', '+',
- '+', '+', '/', '/', '/', '/'
-};
-
-static const char e1[256] = {
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
- 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
- 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd',
- 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
- 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
- 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', '+', '/', 'A', 'B', 'C', 'D', 'E', 'F',
- 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
- 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
- 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
- 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3',
- '4', '5', '6', '7', '8', '9', '+', '/', 'A', 'B',
- 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
- 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
- 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
- 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
- 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
- '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
- 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
- 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b',
- 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
- 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
- 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5',
- '6', '7', '8', '9', '+', '/'
-};
-
-static const char e2[256] = {
- 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J',
- 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T',
- 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd',
- 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n',
- 'o', 'p', 'q', 'r', 's', 't', 'u', 'v', 'w', 'x',
- 'y', 'z', '0', '1', '2', '3', '4', '5', '6', '7',
- '8', '9', '+', '/', 'A', 'B', 'C', 'D', 'E', 'F',
- 'G', 'H', 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P',
- 'Q', 'R', 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z',
- 'a', 'b', 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j',
- 'k', 'l', 'm', 'n', 'o', 'p', 'q', 'r', 's', 't',
- 'u', 'v', 'w', 'x', 'y', 'z', '0', '1', '2', '3',
- '4', '5', '6', '7', '8', '9', '+', '/', 'A', 'B',
- 'C', 'D', 'E', 'F', 'G', 'H', 'I', 'J', 'K', 'L',
- 'M', 'N', 'O', 'P', 'Q', 'R', 'S', 'T', 'U', 'V',
- 'W', 'X', 'Y', 'Z', 'a', 'b', 'c', 'd', 'e', 'f',
- 'g', 'h', 'i', 'j', 'k', 'l', 'm', 'n', 'o', 'p',
- 'q', 'r', 's', 't', 'u', 'v', 'w', 'x', 'y', 'z',
- '0', '1', '2', '3', '4', '5', '6', '7', '8', '9',
- '+', '/', 'A', 'B', 'C', 'D', 'E', 'F', 'G', 'H',
- 'I', 'J', 'K', 'L', 'M', 'N', 'O', 'P', 'Q', 'R',
- 'S', 'T', 'U', 'V', 'W', 'X', 'Y', 'Z', 'a', 'b',
- 'c', 'd', 'e', 'f', 'g', 'h', 'i', 'j', 'k', 'l',
- 'm', 'n', 'o', 'p', 'q', 'r', 's', 't', 'u', 'v',
- 'w', 'x', 'y', 'z', '0', '1', '2', '3', '4', '5',
- '6', '7', '8', '9', '+', '/'
-};
-
-
-/* SPECIAL DECODE TABLES FOR LITTLE ENDIAN (INTEL) CPUS */
-
-static const uint32_t d0[256] = {
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x000000f8, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x000000fc,
-0x000000d0, 0x000000d4, 0x000000d8, 0x000000dc, 0x000000e0, 0x000000e4,
-0x000000e8, 0x000000ec, 0x000000f0, 0x000000f4, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000,
-0x00000004, 0x00000008, 0x0000000c, 0x00000010, 0x00000014, 0x00000018,
-0x0000001c, 0x00000020, 0x00000024, 0x00000028, 0x0000002c, 0x00000030,
-0x00000034, 0x00000038, 0x0000003c, 0x00000040, 0x00000044, 0x00000048,
-0x0000004c, 0x00000050, 0x00000054, 0x00000058, 0x0000005c, 0x00000060,
-0x00000064, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x00000068, 0x0000006c, 0x00000070, 0x00000074, 0x00000078,
-0x0000007c, 0x00000080, 0x00000084, 0x00000088, 0x0000008c, 0x00000090,
-0x00000094, 0x00000098, 0x0000009c, 0x000000a0, 0x000000a4, 0x000000a8,
-0x000000ac, 0x000000b0, 0x000000b4, 0x000000b8, 0x000000bc, 0x000000c0,
-0x000000c4, 0x000000c8, 0x000000cc, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff
-};
-
-
-static const uint32_t d1[256] = {
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x0000e003, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x0000f003,
-0x00004003, 0x00005003, 0x00006003, 0x00007003, 0x00008003, 0x00009003,
-0x0000a003, 0x0000b003, 0x0000c003, 0x0000d003, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000,
-0x00001000, 0x00002000, 0x00003000, 0x00004000, 0x00005000, 0x00006000,
-0x00007000, 0x00008000, 0x00009000, 0x0000a000, 0x0000b000, 0x0000c000,
-0x0000d000, 0x0000e000, 0x0000f000, 0x00000001, 0x00001001, 0x00002001,
-0x00003001, 0x00004001, 0x00005001, 0x00006001, 0x00007001, 0x00008001,
-0x00009001, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x0000a001, 0x0000b001, 0x0000c001, 0x0000d001, 0x0000e001,
-0x0000f001, 0x00000002, 0x00001002, 0x00002002, 0x00003002, 0x00004002,
-0x00005002, 0x00006002, 0x00007002, 0x00008002, 0x00009002, 0x0000a002,
-0x0000b002, 0x0000c002, 0x0000d002, 0x0000e002, 0x0000f002, 0x00000003,
-0x00001003, 0x00002003, 0x00003003, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff
-};
-
-
-static const uint32_t d2[256] = {
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x00800f00, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00c00f00,
-0x00000d00, 0x00400d00, 0x00800d00, 0x00c00d00, 0x00000e00, 0x00400e00,
-0x00800e00, 0x00c00e00, 0x00000f00, 0x00400f00, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000,
-0x00400000, 0x00800000, 0x00c00000, 0x00000100, 0x00400100, 0x00800100,
-0x00c00100, 0x00000200, 0x00400200, 0x00800200, 0x00c00200, 0x00000300,
-0x00400300, 0x00800300, 0x00c00300, 0x00000400, 0x00400400, 0x00800400,
-0x00c00400, 0x00000500, 0x00400500, 0x00800500, 0x00c00500, 0x00000600,
-0x00400600, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x00800600, 0x00c00600, 0x00000700, 0x00400700, 0x00800700,
-0x00c00700, 0x00000800, 0x00400800, 0x00800800, 0x00c00800, 0x00000900,
-0x00400900, 0x00800900, 0x00c00900, 0x00000a00, 0x00400a00, 0x00800a00,
-0x00c00a00, 0x00000b00, 0x00400b00, 0x00800b00, 0x00c00b00, 0x00000c00,
-0x00400c00, 0x00800c00, 0x00c00c00, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff
-};
-
-
-static const uint32_t d3[256] = {
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x003e0000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x003f0000,
-0x00340000, 0x00350000, 0x00360000, 0x00370000, 0x00380000, 0x00390000,
-0x003a0000, 0x003b0000, 0x003c0000, 0x003d0000, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x00000000,
-0x00010000, 0x00020000, 0x00030000, 0x00040000, 0x00050000, 0x00060000,
-0x00070000, 0x00080000, 0x00090000, 0x000a0000, 0x000b0000, 0x000c0000,
-0x000d0000, 0x000e0000, 0x000f0000, 0x00100000, 0x00110000, 0x00120000,
-0x00130000, 0x00140000, 0x00150000, 0x00160000, 0x00170000, 0x00180000,
-0x00190000, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x001a0000, 0x001b0000, 0x001c0000, 0x001d0000, 0x001e0000,
-0x001f0000, 0x00200000, 0x00210000, 0x00220000, 0x00230000, 0x00240000,
-0x00250000, 0x00260000, 0x00270000, 0x00280000, 0x00290000, 0x002a0000,
-0x002b0000, 0x002c0000, 0x002d0000, 0x002e0000, 0x002f0000, 0x00300000,
-0x00310000, 0x00320000, 0x00330000, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff,
-0x01ffffff, 0x01ffffff, 0x01ffffff, 0x01ffffff
-};
\ No newline at end of file
diff --git a/weex_core/Source/android/base/jni/android_jni.cpp b/weex_core/Source/android/base/jni/android_jni.cpp
deleted file mode 100644
index ab5f096..0000000
--- a/weex_core/Source/android/base/jni/android_jni.cpp
+++ /dev/null
@@ -1,120 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <android/base/log_utils.h>
-#include "android_jni.h"
-
-namespace {
-JavaVM *g_jvm = nullptr;
-}
-
-namespace base {
-namespace android {
-
-void InitVM(JavaVM *vm) {
- g_jvm = vm;
-}
-
-JNIEnv *AttachCurrentThread() {
- JNIEnv *env = nullptr;
-
- JavaVMAttachArgs args;
- args.version = JNI_VERSION_1_4;
- args.name = "weex_sdk_runtime";
- args.group = nullptr;
-
- jint ret = g_jvm->AttachCurrentThread(&env, &args);
- if(ret != JNI_OK) {
- LOGE("weex AttachCurrentThread failed");
- env = nullptr;
- }
- return env;
-}
-
-void DetachFromVM() {
- if (g_jvm) {
- g_jvm->DetachCurrentThread();
- }
-}
-
-ScopedLocalJavaRef<jclass> GetClass(JNIEnv *env, const char *class_name) {
- jclass clazz;
- clazz = env->FindClass(class_name);
- return ScopedLocalJavaRef<jclass>(env, clazz);
-}
-
-jclass GetClass(JNIEnv *env, const char *class_name, intptr_t *class_id) {
- if (*class_id) {
- return reinterpret_cast<jclass>(*class_id);
- }
- ScopedGlobalJavaRef<jclass> clazz;
- clazz.Reset(env, GetClass(env, class_name));
- *class_id = reinterpret_cast<intptr_t>(clazz.Release());
- return reinterpret_cast<jclass>(*class_id);
-}
-
-jmethodID GetMethod(JNIEnv *env, jclass clazz, MethodType type,
- const char *method_name, const char *jni_signature) {
- if (type == STATIC_METHOD) {
- return env->GetStaticMethodID(clazz, method_name, jni_signature);
- } else if (type == INSTANCE_METHOD) {
- return env->GetMethodID(clazz, method_name, jni_signature);
- }
- return 0;
-}
-
-jmethodID GetMethod(JNIEnv *env, jclass clazz, MethodType type,
- const char *method_name, const char *jni_signature, intptr_t *method_id) {
- if (*method_id) {
- return reinterpret_cast<jmethodID>(*method_id);
- }
- *method_id = reinterpret_cast<intptr_t>(GetMethod(env,
- clazz, type, method_name, jni_signature));
- return reinterpret_cast<jmethodID>(*method_id);
-}
-
-bool HasException(JNIEnv *env) {
- return env->ExceptionCheck() != JNI_FALSE;
-}
-
-bool ClearException(JNIEnv *env) {
- if (!HasException(env))
- return false;
- env->ExceptionDescribe();
- env->ExceptionClear();
- return true;
-}
-
-void CheckException(JNIEnv *env) {
- if (!HasException(env))
- return;
-
- // Exception has been found, might as well tell breakpad about it.
- jthrowable java_throwable = env->ExceptionOccurred();
- if (java_throwable) {
- // Clear the pending exception, since a local reference is now held.
- env->ExceptionDescribe();
- env->ExceptionClear();
- }
-
- // Now, feel good about it and die.
- // CHECK(false) << "Please include Java exception stack in crash report";
-}
-} // namespace android
-} // namespace base
diff --git a/weex_core/Source/android/base/jni/android_jni.h b/weex_core/Source/android/base/jni/android_jni.h
deleted file mode 100644
index 94adcc7..0000000
--- a/weex_core/Source/android/base/jni/android_jni.h
+++ /dev/null
@@ -1,63 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-
-#ifndef WEEXCORE_BASE_ANDROID_ANDROID_JNI_H_
-#define WEEXCORE_BASE_ANDROID_ANDROID_JNI_H_
-
-#include <cstdint>
-#include <jni.h>
-
-#include "scoped_java_ref.h"
-
-namespace base {
-namespace android {
-
-void InitVM(JavaVM *vm);
-
-JNIEnv *AttachCurrentThread();
-
-void DetachFromVM();
-
-ScopedLocalJavaRef<jclass> GetClass(JNIEnv *env, const char *class_name);
-
-jclass GetClass(JNIEnv *env, const char *class_name, intptr_t *class_id);
-
-enum MethodType {
- STATIC_METHOD,
- INSTANCE_METHOD,
-};
-
-jmethodID GetMethod(JNIEnv *env, jclass clazz,
- MethodType type, const char *method_name, const char *jni_signature);
-
-jmethodID GetMethod(JNIEnv *env, jclass clazz,
- MethodType type, const char *method_name,
- const char *jni_signature, intptr_t *method_id);
-
-bool HasException(JNIEnv *env);
-
-bool ClearException(JNIEnv *env);
-
-void CheckException(JNIEnv *env);
-} // namespace android
-} // namespace base
-
-
-#endif // WEEXCORE_BASE_ANDROID_ANDROID_JNI_H_
diff --git a/weex_core/Source/android/base/jni/scoped_java_ref.cpp b/weex_core/Source/android/base/jni/scoped_java_ref.cpp
deleted file mode 100644
index 099fc63..0000000
--- a/weex_core/Source/android/base/jni/scoped_java_ref.cpp
+++ /dev/null
@@ -1,87 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-// Copyright 2017 The Weex Authors. All rights reserved.
-
-#include "android_jni.h"
-#include "scoped_java_ref.h"
-
-namespace base {
-namespace android {
-
-JavaRef::JavaRef() : obj_(nullptr) {}
-
-JavaRef::JavaRef(JNIEnv *env, jobject obj) : obj_(obj) {}
-
-void JavaRef::ResetNewLocalRef(JNIEnv *env, jobject obj) {
- if (!env) {
- env = AttachCurrentThread();
- }
- if(env == nullptr) {
- return;
- }
- if (obj) {
- obj = env->NewLocalRef(obj);
- }
-
- if (obj_)
- env->DeleteLocalRef(obj_);
- obj_ = obj;
-}
-
-void JavaRef::ReleaseLocalRef(JNIEnv *env) {
- if (!env) {
- env = AttachCurrentThread();
- }
- if(env == nullptr) {
- return;
- }
- env->DeleteLocalRef(obj_);
-}
-
-void JavaRef::ResetNewGlobalRef(JNIEnv *env, jobject obj) {
- if (!env) {
- env = AttachCurrentThread();
- }
- if(env == nullptr) {
- return;
- }
- if (obj)
- obj = env->NewGlobalRef(obj);
- if (obj_)
- env->DeleteGlobalRef(obj_);
- obj_ = obj;
-}
-
-void JavaRef::ReleaseGlobalRef(JNIEnv *env) {
- if (!env) {
- env = AttachCurrentThread();
- }
- if(env == nullptr) {
- return;
- }
- env->DeleteGlobalRef(obj_);
-}
-
-jobject JavaRef::Release() {
- jobject obj = obj_;
- obj_ = nullptr;
- return obj;
-}
-} // namespace android
-} // namespace base
diff --git a/weex_core/Source/android/base/jni_type.cpp b/weex_core/Source/android/base/jni_type.cpp
deleted file mode 100644
index 464f0e7..0000000
--- a/weex_core/Source/android/base/jni_type.cpp
+++ /dev/null
@@ -1,57 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include "android/base/jni_type.h"
-#include "android/base/jni/android_jni.h"
-
-namespace base {
-namespace android {
-
-const char kDoubleClassPath[] = "java/lang/Double";
-jclass g_Double_clazz = nullptr;
-
-static intptr_t g_Double_doubleValue = 0;
-static jdouble Java_Double_doubleValue(JNIEnv* env, jobject obj) {
- jmethodID method_id = base::android::GetMethod(
- env, g_Double_clazz, base::android::INSTANCE_METHOD, "doubleValue", "()D",
- &g_Double_doubleValue);
- auto result = env->CallDoubleMethod(obj, method_id);
- base::android::CheckException(env);
- return result;
-}
-
-jdouble JNIType::DoubleValue(JNIEnv* env, jobject value) {
- return Java_Double_doubleValue(env, value);
-}
-
-ScopedLocalJavaRef<jfloatArray> JNIType::NewFloatArray(JNIEnv* env, int length,
- float* array) {
- jfloatArray jni_array = env->NewFloatArray(length);
- env->SetFloatArrayRegion(jni_array, 0, length, array);
- return ScopedLocalJavaRef<jfloatArray>(env, jni_array);
-}
-
-bool JNIType::RegisterJNIUtils(JNIEnv* env) {
- g_Double_clazz = reinterpret_cast<jclass>(
- env->NewGlobalRef(base::android::GetClass(env, kDoubleClassPath).Get()));
- return true;
-}
-
-} // namespace android
-} // namespace base
diff --git a/weex_core/Source/android/base/jni_type.h b/weex_core/Source/android/base/jni_type.h
deleted file mode 100644
index 0659151..0000000
--- a/weex_core/Source/android/base/jni_type.h
+++ /dev/null
@@ -1,39 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#ifndef WEEX_PROJECT_JNI_TYPE_H
-#define WEEX_PROJECT_JNI_TYPE_H
-
-#include <jni.h>
-#include "android/base/jni/scoped_java_ref.h"
-
-namespace base {
-namespace android {
-class JNIType {
- public:
- static jdouble DoubleValue(JNIEnv* env, jobject value);
- static ScopedLocalJavaRef<jfloatArray> NewFloatArray(JNIEnv* env, int length,
- float* array = nullptr);
-
- static bool RegisterJNIUtils(JNIEnv* env);
-};
-} // namespace android
-} // namespace base
-
-#endif // WEEX_PROJECT_JNI_TYPE_H
diff --git a/weex_core/Source/android/base/string/scoped_jstring.h b/weex_core/Source/android/base/string/scoped_jstring.h
index e2a5fd4..1204a11 100644
--- a/weex_core/Source/android/base/string/scoped_jstring.h
+++ b/weex_core/Source/android/base/string/scoped_jstring.h
@@ -19,8 +19,8 @@
#ifndef _SCOPED_JSTRING_H_
#define _SCOPED_JSTRING_H_
-#include "../base64/base64.h"
#include <jni.h>
+#include "base/base64/base64.h"
namespace WeexCore {
diff --git a/weex_core/Source/android/base/string/scoped_jstring_utf8.h b/weex_core/Source/android/base/string/scoped_jstring_utf8.h
index fa739ba..6790124 100644
--- a/weex_core/Source/android/base/string/scoped_jstring_utf8.h
+++ b/weex_core/Source/android/base/string/scoped_jstring_utf8.h
@@ -19,14 +19,14 @@
#ifndef _SCOPED_JSTRING_UTF_8_H_
#define _SCOPED_JSTRING_UTF_8_H_
-#include <math.h>
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <type_traits>
-#include "../base64/base64.h"
#include <jni.h>
+#include "base/base64/base64.h"
+
namespace WeexCore {
class ScopedJStringUTF8 {
diff --git a/weex_core/Source/android/base/string/string_utils.h b/weex_core/Source/android/base/string/string_utils.h
index 6b42bae..b4fd777 100644
--- a/weex_core/Source/android/base/string/string_utils.h
+++ b/weex_core/Source/android/base/string/string_utils.h
@@ -20,17 +20,18 @@
#define _STRING_UTILS_H_
#include <jni.h>
-#include <IPC/IPCArguments.h>
-#include <IPC/Serializing/IPCSerializer.h>
-#include <IPC/IPCString.h>
-#include <IPC/IPCByteArray.h>
#include <malloc.h>
-#include "scoped_jstring.h"
-#include "scoped_jstring_utf8.h"
#include <iostream>
#include <sstream>
#include <string>
+#include "scoped_jstring.h"
+#include "scoped_jstring_utf8.h"
+#include "third_party/IPC/IPCArguments.h"
+#include "third_party/IPC/Serializing/IPCSerializer.h"
+#include "third_party/IPC/IPCString.h"
+#include "third_party/IPC/IPCByteArray.h"
+
namespace WeexCore {
static inline std::string jString2Str(JNIEnv *env, const jstring &jstr) {
diff --git a/weex_core/Source/android/bridge/multi_process_and_so_initializer.cpp b/weex_core/Source/android/bridge/multi_process_and_so_initializer.cpp
index 51a09ec..a16e31c 100644
--- a/weex_core/Source/android/bridge/multi_process_and_so_initializer.cpp
+++ b/weex_core/Source/android/bridge/multi_process_and_so_initializer.cpp
@@ -18,14 +18,16 @@
*/
#include "multi_process_and_so_initializer.h"
-#include <Buffering/IPCBuffer.h>
-#include <IPCException.h>
-#include <IPCHandler.h>
-#include <IPCResult.h>
-#include <Serializing/IPCSerializer.h>
-#include <android/base/log_utils.h>
-#include <android/jsengine/multiprocess/ExtendJSApi.h>
-#include <android/jsengine/multiprocess/WeexJSConnection.h>
+
+#include "android/weex_extend_js_api.h"
+#include "android/multiprocess/weex_js_connection.h"
+#include "base/android/log_utils.h"
+#include "third_party/IPC/Buffering/IPCBuffer.h"
+#include "third_party/IPC/IPCException.h"
+#include "third_party/IPC/IPCHandler.h"
+#include "third_party/IPC/IPCResult.h"
+#include "third_party/IPC/Serializing/IPCSerializer.h"
+
namespace WeexCore {
@@ -65,4 +67,4 @@ startInitFrameWork:
}
return true;
}
-} // namespace WeexCore
\ No newline at end of file
+} // namespace WeexCore
diff --git a/weex_core/Source/android/bridge/multi_so_initializer.cpp b/weex_core/Source/android/bridge/multi_so_initializer.cpp
index fe70dd3..7014f3d 100644
--- a/weex_core/Source/android/bridge/multi_so_initializer.cpp
+++ b/weex_core/Source/android/bridge/multi_so_initializer.cpp
@@ -18,10 +18,12 @@
*/
#include "multi_so_initializer.h"
-#include <android/base/log_utils.h>
-#include <android/utils/so_utils.h>
+
#include <dlfcn.h>
+#include "android/utils/so_utils.h"
+#include "base/android/log_utils.h"
+
namespace WeexCore {
bool MultiSoInitializer::Init(
@@ -66,4 +68,4 @@ bool MultiSoInitializer::Init(
}
return true;
}
-} // namespace WeexCore
\ No newline at end of file
+} // namespace WeexCore
diff --git a/weex_core/Source/android/bridge/platform/android_bridge.cpp b/weex_core/Source/android/bridge/platform/android_bridge.cpp
index 0236e80..979cd0d 100644
--- a/weex_core/Source/android/bridge/platform/android_bridge.cpp
+++ b/weex_core/Source/android/bridge/platform/android_bridge.cpp
@@ -17,9 +17,10 @@
* under the License.
*/
-#include <base/LogDefines.h>
#include "android_bridge.h"
+
#include "android/bridge/platform/android_side.h"
+#include "base/log_defines.h"
#include "core/bridge/platform/core_side_in_platform.h"
namespace WeexCore {
@@ -33,4 +34,4 @@ AndroidBridgeInSimple::~AndroidBridgeInSimple() {
LOGE("~AndroidBridgeInSimple");
}
-} // namespace WeexCore
\ No newline at end of file
+} // namespace WeexCore
diff --git a/weex_core/Source/android/bridge/platform/android_bridge_in_multi_process.cc b/weex_core/Source/android/bridge/platform/android_bridge_in_multi_process.cc
index 6923bfb..9ccf0cd 100644
--- a/weex_core/Source/android/bridge/platform/android_bridge_in_multi_process.cc
+++ b/weex_core/Source/android/bridge/platform/android_bridge_in_multi_process.cc
@@ -18,21 +18,22 @@
*/
#include "android_bridge_in_multi_process.h"
-#include "IPC/IPCArguments.h"
-#include "IPC/IPCHandler.h"
-#include "IPC/IPCMessageJS.h"
-#include "IPC/IPCResult.h"
-#include "IPC/IPCSender.h"
-#include "IPC/Serializing/IPCSerializer.h"
+
#include "android/base/string/string_utils.h"
+#include "android/jsengine/bridge/script/core_side_in_multi_process.h"
#include "android/bridge/platform/android_side.h"
-#include "android/utils/IPCStringResult.h"
+#include "android/bridge/multi_process_and_so_initializer.h"
+#include "android/utils/ipc_string_result.h"
#include "core/layout/layout.h"
#include "core/manager/weex_core_manager.h"
#include "core/render/manager/render_manager.h"
-#include "core_side_in_multi_process.h"
#include "include/WeexApiHeader.h"
-#include "android/bridge/multi_process_and_so_initializer.h"
+#include "third_party/IPC/IPCArguments.h"
+#include "third_party/IPC/IPCHandler.h"
+#include "third_party/IPC/IPCMessageJS.h"
+#include "third_party/IPC/IPCResult.h"
+#include "third_party/IPC/IPCSender.h"
+#include "third_party/IPC/Serializing/IPCSerializer.h"
#include "wson/wson_parser.h"
namespace WeexCore {
@@ -832,4 +833,4 @@ std::unique_ptr<IPCResult> AndroidBridgeInMultiProcess::DispatchMessage(
return createVoidResult();
}
-} // namespace WeexCore
\ No newline at end of file
+} // namespace WeexCore
diff --git a/weex_core/Source/android/bridge/platform/android_bridge_in_multi_process.h b/weex_core/Source/android/bridge/platform/android_bridge_in_multi_process.h
index 8df6ed9..5670438 100644
--- a/weex_core/Source/android/bridge/platform/android_bridge_in_multi_process.h
+++ b/weex_core/Source/android/bridge/platform/android_bridge_in_multi_process.h
@@ -20,9 +20,9 @@
#ifndef WEEX_PROJECT_IPC_BRIDGE_IMPL_H
#define WEEX_PROJECT_IPC_BRIDGE_IMPL_H
-#include "IPC/IPCHandler.h"
-#include "android/jsengine/multiprocess/WeexJSConnection.h"
+#include "android/multiprocess/weex_js_connection.h"
#include "core/bridge/platform_bridge.h"
+#include "third_party/IPC/IPCHandler.h"
class IPCArguments;
class IPCResult;
diff --git a/weex_core/Source/android/bridge/platform/android_side.cpp b/weex_core/Source/android/bridge/platform/android_side.cpp
index 8d55dbe..e9b3451 100644
--- a/weex_core/Source/android/bridge/platform/android_side.cpp
+++ b/weex_core/Source/android/bridge/platform/android_side.cpp
@@ -18,12 +18,9 @@
*/
#include "android/bridge/platform/android_side.h"
-#include "IPC/IPCResult.h"
-#include "android/base/jni/android_jni.h"
-#include "android/base/jni/jbytearray_ref.h"
-#include "android/base/jni_type.h"
+
#include "android/base/string/string_utils.h"
-#include "android/utils/IPCStringResult.h"
+#include "android/utils/ipc_string_result.h"
#include "android/utils/cache_utils.h"
#include "android/utils/params_utils.h"
#include "android/wrap/hash_set.h"
@@ -31,10 +28,14 @@
#include "android/wrap/wml_bridge.h"
#include "android/wrap/wx_js_object.h"
#include "android/wrap/wx_map.h"
-#include "base/LogDefines.h"
+#include "base/android/jni/android_jni.h"
+#include "base/android/jni/jbytearray_ref.h"
+#include "base/android/jni_type.h"
+#include "base/log_defines.h"
#include "core/layout/layout.h"
#include "core/layout/measure_func_adapter.h"
#include "core/manager/weex_core_manager.h"
+#include "third_party/IPC/IPCResult.h"
namespace WeexCore {
@@ -73,26 +74,26 @@ void AndroidSide::InvokeLayoutAfter(const char *page_id, long render_ptr,
void AndroidSide::SetJSVersion(const char *version) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return;
- }
+
wx_bridge_->SetJSFrmVersion(env, version);
}
void AndroidSide::ReportException(const char *page_id, const char *func,
const char *exception_string) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return;
- }
+
wx_bridge_->ReportException(env, page_id, func, exception_string);
}
void AndroidSide::ReportServerCrash(const char *instance_id) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return;
- }
+
std::string crash_file;
crash_file.assign("/crash_dump.log");
wx_bridge_->ReportServerCrash(env, instance_id, crash_file.c_str());
@@ -101,18 +102,18 @@ void AndroidSide::ReportServerCrash(const char *instance_id) {
void AndroidSide::ReportNativeInitStatus(const char *status_code,
const char *error_msg) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return;
- }
+
wx_bridge_->ReportNativeInitStatus(env, status_code, error_msg);
}
int AndroidSide::CallNative(const char *page_id, const char *task,
const char *callback) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag = wx_bridge_->CallNative(env, page_id, task, callback);
if (flag == -1) {
LOGE("instance destroy JFM must stop callNative");
@@ -126,14 +127,13 @@ std::unique_ptr<ValueWithType> AndroidSide::CallNativeModule(
int options_length) {
std::unique_ptr<ValueWithType> ipc_result(new ValueWithType());
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return ipc_result;
- }
+
auto result =
wx_bridge_->CallNativeModule(env, page_id, module, method, arguments,
arguments_length, options, options_length);
-
ipc_result->type = ParamsType::INT32;
ipc_result->value.int32Value = -1;
if (result.IsNull()) {
@@ -177,26 +177,26 @@ void AndroidSide::CallNativeComponent(const char *page_id, const char *ref,
int arguments_length, const char *options,
int options_length) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return;
- }
+
wx_bridge_->CallNativeComponent(env, page_id, ref, method, arguments,
arguments_length, options, options_length);
}
void AndroidSide::SetTimeout(const char *callback_id, const char *time) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return;
- }
+
wx_bridge_->SetTimeout(env, callback_id, time);
}
void AndroidSide::NativeLog(const char *str_array) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return;
- }
+
LogUtils::NativeLog(env, str_array);
}
@@ -204,9 +204,9 @@ int AndroidSide::UpdateFinish(const char *page_id, const char *task,
int taskLen, const char *callback,
int callbackLen) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag = wx_bridge_->UpdateFinish(env, page_id, task, callback);
if (flag == -1) {
LOGE("instance destroy JFM must stop callUpdateFinish");
@@ -217,9 +217,9 @@ int AndroidSide::UpdateFinish(const char *page_id, const char *task,
int AndroidSide::RefreshFinish(const char *page_id, const char *task,
const char *callback) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag = wx_bridge_->RefreshFinish(env, page_id, task, callback);
if (flag == -1) {
@@ -231,9 +231,9 @@ int AndroidSide::RefreshFinish(const char *page_id, const char *task,
int AndroidSide::AddEvent(const char *page_id, const char *ref,
const char *event) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag = wx_bridge_->AddEvent(env, page_id, ref, event);
if (flag == -1) {
LOGE("instance destroy JFM must stop callAddEvent");
@@ -244,9 +244,9 @@ int AndroidSide::AddEvent(const char *page_id, const char *ref,
int AndroidSide::RemoveEvent(const char *page_id, const char *ref,
const char *event) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag = wx_bridge_->RemoveEvent(env, page_id, ref, event);
if (flag == -1) {
LOGE("instance destroy JFM must stop callRemoveElement");
@@ -263,9 +263,9 @@ int AndroidSide::CreateBody(const char *page_id, const char *component_type,
const WXCorePadding &paddings,
const WXCoreBorderWidth &borders) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag =
wx_bridge_->CreateBody(env, page_id, component_type, ref, styles,
attributes, events, margins, paddings, borders);
@@ -284,9 +284,9 @@ int AndroidSide::AddElement(const char *page_id, const char *component_type,
const WXCorePadding &paddings,
const WXCoreBorderWidth &borders, bool willLayout) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag = wx_bridge_->AddElement(env, page_id, component_type, ref, index,
parentRef, styles, attributes, events,
margins, paddings, borders, willLayout);
@@ -301,12 +301,12 @@ int AndroidSide::Layout(const char *page_id, const char *ref, float top,
float bottom, float left, float right, float height,
float width, bool isRTL, int index) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag = 0;
- wx_bridge_->Layout(env, page_id, ref, top, bottom, left, right, height, width, isRTL,
- index);
+ wx_bridge_->Layout(env, page_id, ref, top, bottom, left, right,
+ height, width, isRTL, index);
if (flag == -1) {
LOGE("instance destroy JFM must stop callLayout");
@@ -321,9 +321,9 @@ int AndroidSide::UpdateStyle(
std::vector<std::pair<std::string, std::string>> *padding,
std::vector<std::pair<std::string, std::string>> *border) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag = wx_bridge_->UpdateStyle(env, page_id, ref, style, margin, padding,
border);
if (flag == -1) {
@@ -336,9 +336,9 @@ int AndroidSide::UpdateAttr(
const char *page_id, const char *ref,
std::vector<std::pair<std::string, std::string>> *attrs) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag = 0;
flag = wx_bridge_->UpdateAttr(env, page_id, ref, attrs);
if (flag == -1) {
@@ -349,9 +349,9 @@ int AndroidSide::UpdateAttr(
int AndroidSide::CreateFinish(const char *page_id) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag = wx_bridge_->CreateFinish(env, page_id);
if (flag == -1) {
@@ -362,9 +362,9 @@ int AndroidSide::CreateFinish(const char *page_id) {
int AndroidSide::RenderSuccess(const char *page_id) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag = wx_bridge_->RenderSuccess(env, page_id);
if (flag == -1) {
@@ -375,6 +375,9 @@ int AndroidSide::RenderSuccess(const char *page_id) {
int AndroidSide::RemoveElement(const char *page_id, const char *ref) {
JNIEnv *env = base::android::AttachCurrentThread();
+ if (env == nullptr)
+ return -1;
+
int flag = wx_bridge_->RemoveElement(env, page_id, ref);
if (flag == -1) {
LOGE("instance destroy JFM must stop callRemoveElement");
@@ -385,9 +388,9 @@ int AndroidSide::RemoveElement(const char *page_id, const char *ref) {
int AndroidSide::MoveElement(const char *page_id, const char *ref,
const char *parent_ref, int index) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
int flag = wx_bridge_->MoveElement(env, page_id, ref, parent_ref, index);
if (flag == -1) {
LOGE("instance destroy JFM must stop callRemoveElement");
@@ -397,9 +400,6 @@ int AndroidSide::MoveElement(const char *page_id, const char *ref,
int AndroidSide::AppendTreeCreateFinish(const char *page_id, const char *ref) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
- return -1;
- }
int flag = wx_bridge_->AppendTreeCreateFinish(env, page_id, ref);
if (flag == -1) {
LOGE("instance destroy JFM must stop callAppendTreeCreateFinish");
@@ -411,9 +411,9 @@ int AndroidSide::HasTransitionPros(
const char *page_id, const char *ref,
std::vector<std::pair<std::string, std::string>> *style) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return -1;
- }
+
if (style == nullptr) {
return wx_bridge_->HasTransitionPros(env, page_id, ref, *style);
} else {
@@ -424,18 +424,18 @@ int AndroidSide::HasTransitionPros(
void AndroidSide::PostMessage(const char *vm_id, const char *data, int dataLength) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return;
- }
+
wml_bridge_->PostMessage(env, vm_id, data, dataLength);
}
void AndroidSide::DispatchMessage(const char *client_id,
const char *data, int dataLength, const char *callback, const char *vm_id) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return;
- }
+
wml_bridge_->DispatchMessage(env, client_id, data, dataLength, callback, vm_id);
}
@@ -443,6 +443,9 @@ std::unique_ptr<WeexJSResult> AndroidSide::DispatchMessageSync(
const char *client_id, const char *data, int dataLength,
const char *vm_id) {
JNIEnv *env = base::android::AttachCurrentThread();
+ if (env == nullptr)
+ return std::unique_ptr<WeexJSResult>();
+
auto jni_result =
wml_bridge_->DispatchMessageSync(env, client_id, data, dataLength, vm_id);
JByteArrayRef byte_array(env, jni_result.Get());
@@ -457,17 +460,17 @@ std::unique_ptr<WeexJSResult> AndroidSide::DispatchMessageSync(
void AndroidSide::OnReceivedResult(long callback_id, std::unique_ptr<WeexJSResult>& result) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return;
- }
+
wx_bridge_->OnReceivedResult(env, callback_id, result);
}
jobject AndroidSide::getMeasureFunc(const char *pageId, jlong renderObjectPtr) {
JNIEnv *env = base::android::AttachCurrentThread();
- if(env == nullptr) {
+ if (env == nullptr)
return nullptr;
- }
+
return wx_bridge_->GetMeasureFunc(env, pageId, renderObjectPtr).Release();
}
-} // namespace WeexCore
\ No newline at end of file
+} // namespace WeexCore
diff --git a/weex_core/Source/android/bridge/platform/android_side.h b/weex_core/Source/android/bridge/platform/android_side.h
index f912992..1593e90 100644
--- a/weex_core/Source/android/bridge/platform/android_side.h
+++ b/weex_core/Source/android/bridge/platform/android_side.h
@@ -80,7 +80,8 @@ class AndroidSide : public PlatformBridge::PlatformSide {
const WXCorePadding& paddings,
const WXCoreBorderWidth& borders, bool willLayout) override;
int Layout(const char* page_id, const char* ref, float top, float bottom,
- float left, float right, float height, float width, bool isRTL, int index) override;
+ float left, float right, float height, float width, bool isRTL,
+ int index) override;
int UpdateStyle(
const char* pageId, const char* ref,
diff --git a/weex_core/Source/android/bridge/platform/core_side_in_multi_process.cpp b/weex_core/Source/android/bridge/platform/core_side_in_multi_process.cpp
index dbd668c..ef0655d 100644
--- a/weex_core/Source/android/bridge/platform/core_side_in_multi_process.cpp
+++ b/weex_core/Source/android/bridge/platform/core_side_in_multi_process.cpp
@@ -16,17 +16,18 @@
* specific language governing permissions and limitations
* under the License.
*/
+#include "core_side_in_multi_process.h"
-#include "IPC/Serializing/IPCSerializer.h"
-#include "IPC/IPCMessageJS.h"
-#include "IPC/IPCSender.h"
-#include "IPC/IPCResult.h"
-#include "IPC/Buffering/IPCBuffer.h"
-#include "IPC/IPCException.h"
#include "android/base/log_utils.h"
+#include "android/utils/params_utils.h"
#include "core_side_in_multi_process.h"
-#include "../../../include/WeexApiHeader.h"
-#include "../../utils/params_utils.h"
+#include "include/WeexApiHeader.h"
+#include "third_party/IPC/Serializing/IPCSerializer.h"
+#include "third_party/IPC/IPCMessageJS.h"
+#include "third_party/IPC/IPCSender.h"
+#include "third_party/IPC/IPCResult.h"
+#include "third_party/IPC/Buffering/IPCBuffer.h"
+#include "third_party/IPC/IPCException.h"
namespace WeexCore {
@@ -571,7 +572,8 @@ namespace WeexCore {
int CoreSideInMultiProcess::CreateInstance(const char *instanceId, const char *func,
const char *script, const char *opts,
- const char *initData, const char *extendsApi, std::vector<INIT_FRAMEWORK_PARAMS*>& params,
+ const char *initData, const char *extendsApi,
+ std::vector<INIT_FRAMEWORK_PARAMS*>& params,
const char* render_strategy) {
try {
std::unique_ptr<IPCSerializer> serializer(createIPCSerializer());
@@ -586,6 +588,7 @@ namespace WeexCore {
serializer->add((*it)->type->content, (*it)->type->length);
serializer->add((*it)->value->content, (*it)->value->length);
}
+
std::unique_ptr<IPCBuffer> buffer = serializer->finish();
std::unique_ptr<IPCResult> result = sender_->send(buffer.get());
if (result->getType() != IPCType::INT32) {
@@ -667,4 +670,4 @@ namespace WeexCore {
}
return true;
}
-}
\ No newline at end of file
+}
diff --git a/weex_core/Source/android/bridge/platform/core_side_in_multi_so.cpp b/weex_core/Source/android/bridge/platform/core_side_in_multi_so.cpp
index a627a93..0cff338 100644
--- a/weex_core/Source/android/bridge/platform/core_side_in_multi_so.cpp
+++ b/weex_core/Source/android/bridge/platform/core_side_in_multi_so.cpp
@@ -207,7 +207,7 @@ int CoreSideInMultiSo::CreateInstance(const char *instanceId, const char *func,
const char *initData,
const char *extendsApi, std::vector<INIT_FRAMEWORK_PARAMS*>& params, const char* render_strategy) {
return core_side_functions_->create_instance(instanceId, func, script, opts,
- initData, extendsApi,params);
+ initData, extendsApi, params);
}
std::unique_ptr<WeexJSResult> CoreSideInMultiSo::ExecJSOnInstance(const char *instanceId,
@@ -222,4 +222,4 @@ int CoreSideInMultiSo::DestroyInstance(const char *instanceId) {
int CoreSideInMultiSo::UpdateGlobalConfig(const char *config) {
return core_side_functions_->update_global_config(config);
}
-} // namespace WeexCore
\ No newline at end of file
+} // namespace WeexCore
diff --git a/weex_core/Source/android/bridge/script/script_side_in_multi_process.cpp b/weex_core/Source/android/bridge/script/script_side_in_multi_process.cpp
index 9217f78..df05700 100644
--- a/weex_core/Source/android/bridge/script/script_side_in_multi_process.cpp
+++ b/weex_core/Source/android/bridge/script/script_side_in_multi_process.cpp
@@ -19,14 +19,15 @@
#include <android/utils/params_utils.h>
#include "script_side_in_multi_process.h"
-#include "IPC/Buffering/IPCBuffer.h"
-#include "IPC/IPCException.h"
-#include "IPC/IPCMessageJS.h"
-#include "IPC/IPCSender.h"
-#include "IPC/Serializing/IPCSerializer.h"
-#include "android/base/log_utils.h"
+
#include "android/bridge/multi_process_and_so_initializer.h"
+#include "base/android/log_utils.h"
#include "core/manager/weex_core_manager.h"
+#include "third_party/IPC/Buffering/IPCBuffer.h"
+#include "third_party/IPC/IPCException.h"
+#include "third_party/IPC/IPCMessageJS.h"
+#include "third_party/IPC/IPCSender.h"
+#include "third_party/IPC/Serializing/IPCSerializer.h"
namespace WeexCore {
namespace bridge {
@@ -42,8 +43,6 @@ int ScriptSideInMultiProcess::InitFramework(
LOGE("InitFramework sender is null");
return false;
}
-
-
std::unique_ptr<IPCSerializer> serializer(createIPCSerializer());
serializer->setMsg(static_cast<uint32_t>(IPCJSMsg::INITFRAMEWORK));
serializer->add(script, strlen(script));
@@ -453,6 +452,7 @@ int ScriptSideInMultiProcess::CreateInstance(
serializer->add((*it)->type->content, (*it)->type->length);
serializer->add((*it)->value->content, (*it)->value->length);
}
+
std::unique_ptr<IPCBuffer> buffer = serializer->finish();
std::unique_ptr<IPCResult> result = sender_->send(buffer.get());
if (result->getType() != IPCType::INT32) {
@@ -553,4 +553,4 @@ int ScriptSideInMultiProcess::UpdateGlobalConfig(const char *config) {
}
} // namespace script
} // namespace bridge
-} // namespace WeexCore
\ No newline at end of file
+} // namespace WeexCore
diff --git a/weex_core/Source/android/bridge/script/script_side_in_multi_so.cpp b/weex_core/Source/android/bridge/script/script_side_in_multi_so.cpp
index c43ea28..2072c80 100644
--- a/weex_core/Source/android/bridge/script/script_side_in_multi_so.cpp
+++ b/weex_core/Source/android/bridge/script/script_side_in_multi_so.cpp
@@ -18,7 +18,7 @@
*/
#include "script_side_in_multi_so.h"
-#include <android/base/log_utils.h>
+#include "base/android/log_utils.h"
namespace WeexCore {
namespace bridge {
@@ -146,7 +146,7 @@ int ScriptSideInMultiSo::CreateInstance(const char *instanceId,
return false;
}
return script_side_functions_->funcCreateInstance(instanceId, func, script,
- opts, initData, extendsApi,params);
+ opts, initData, extendsApi, params);
}
std::unique_ptr<WeexJSResult> ScriptSideInMultiSo::ExecJSOnInstance(const char *instanceId,
@@ -176,4 +176,4 @@ int ScriptSideInMultiSo::UpdateGlobalConfig(const char *config) {
}
} // namespace script
} // namespace bridge
-} // namespace WeexCore
\ No newline at end of file
+} // namespace WeexCore
diff --git a/weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp b/weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp
index 9a5e4eb..29deee1 100644
--- a/weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp
+++ b/weex_core/Source/android/bridge/script_bridge_in_multi_process.cpp
@@ -17,23 +17,24 @@
* under the License.
*/
#include "script_bridge_in_multi_process.h"
-#include <android/utils/params_utils.h>
-#include <base/make_copyable.h>
-#include <base/message_loop/message_loop.h>
-#include <base/thread/waitable_event.h>
-#include "IPC/IPCArguments.h"
-#include "IPC/IPCHandler.h"
-#include "IPC/IPCMessageJS.h"
-#include "IPC/IPCResult.h"
-#include "android/base/jni/android_jni.h"
-#include "android/base/log_utils.h"
+
+#include "android/utils/params_utils.h"
#include "android/base/string/string_utils.h"
#include "android/bridge/multi_process_and_so_initializer.h"
#include "android/bridge/script/script_side_in_multi_process.h"
-#include "android/jsengine/multiprocess/WeexJSConnection.h"
-#include "android/utils/IPCStringResult.h"
+#include "android/multiprocess/weex_js_connection.h"
+#include "android/utils/ipc_string_result.h"
+#include "base/android/log_utils.h"
+#include "base/make_copyable.h"
+#include "base/message_loop/message_loop.h"
+#include "base/thread/waitable_event.h"
+#include "base/android/jni/android_jni.h"
#include "core/bridge/script/core_side_in_script.h"
#include "core/manager/weex_core_manager.h"
+#include "third_party/IPC/IPCArguments.h"
+#include "third_party/IPC/IPCHandler.h"
+#include "third_party/IPC/IPCMessageJS.h"
+#include "third_party/IPC/IPCResult.h"
namespace WeexCore {
@@ -70,6 +71,8 @@ static std::unique_ptr<IPCResult> HandleReportException(
}
LOGE(" ReportException : %s", exceptionInfo);
+ WeexCoreManager::Instance()->script_bridge()->core_side()->ReportException(
+ pageId, func, exceptionInfo);
WeexCoreManager::Instance()->script_thread()->message_loop()->PostTask(
weex::base::MakeCopyable([pageId = std::string(pageId),
@@ -986,7 +989,7 @@ ScriptBridgeInMultiProcess::ScriptBridgeInMultiProcess() {
connection_ = std::move(connection);
handler_ = std::move(handler);
server_handler_ = std::move(server_handler);
- LOGE("ScriptBridgeInMultiProcess finish %x %x", server_handler_.get(),
+ LOGE("ScriptBridgeInMultiProcess finish %p %p", server_handler_.get(),
server_handler.get());
return true;
},
@@ -1005,10 +1008,8 @@ ScriptBridgeInMultiProcess::~ScriptBridgeInMultiProcess() {
}
void ScriptBridgeInMultiProcess::RegisterIPCCallback(IPCHandler *handler) {
- LOGE("RegisterIPCCallback is running");
handler->registerHandler(static_cast<uint32_t>(IPCProxyMsg::SETJSFVERSION),
HandleSetJSVersion);
- LOGE("RegisterIPCCallback is running2");
handler->registerHandler(static_cast<uint32_t>(IPCProxyMsg::REPORTEXCEPTION),
HandleReportException);
handler->registerHandler(static_cast<uint32_t>(IPCProxyMsg::CALLNATIVE),
diff --git a/weex_core/Source/android/bridge/script_bridge_in_multi_so.cpp b/weex_core/Source/android/bridge/script_bridge_in_multi_so.cpp
index 32f06e5..706686f 100644
--- a/weex_core/Source/android/bridge/script_bridge_in_multi_so.cpp
+++ b/weex_core/Source/android/bridge/script_bridge_in_multi_so.cpp
@@ -18,15 +18,16 @@
*/
#include "script_bridge_in_multi_so.h"
-#include <base/thread/waitable_event.h>
#include <dlfcn.h>
#include <malloc.h>
-#include "android/base/log_utils.h"
+
#include "android/bridge/multi_so_initializer.h"
#include "android/bridge/script/script_side_in_multi_so.h"
-#include "android/utils/IPCStringResult.h"
+#include "android/utils/ipc_string_result.h"
#include "android/utils/params_utils.h"
+#include "base/android/log_utils.h"
#include "base/make_copyable.h"
+#include "base/thread/waitable_event.h"
#include "core/bridge/script/core_side_in_script.h"
#include "core/manager/weex_core_manager.h"
diff --git a/weex_core/Source/android/jniprebuild/jni_generator.py b/weex_core/Source/android/jniprebuild/jni_generator.py
deleted file mode 100755
index cca64e1..0000000
--- a/weex_core/Source/android/jniprebuild/jni_generator.py
+++ /dev/null
@@ -1,1488 +0,0 @@
-# !/usr/bin/env python
-# Copyright (c) 2012 The Chromium Authors. All rights reserved.
-# Use of this source code is governed by a BSD-style license that can be
-# found in the LICENSE file.
-
-"""Extracts native methods from a Java file and generates the JNI bindings.
-If you change this, please run and update the tests."""
-
-import collections
-import errno
-import optparse
-import os
-import re
-import string
-from string import Template
-import subprocess
-import sys
-import textwrap
-import zipfile
-
-def _StripGenerics(value):
- """Strips Java generics from a string."""
- nest_level = 0 # How deeply we are nested inside the generics.
- start_index = 0 # Starting index of the last non-generic region.
- out = []
- for i, c in enumerate(value):
- if c == '<':
- if nest_level == 0:
- out.append(value[start_index:i])
- nest_level += 1
- elif c == '>':
- start_index = i + 1
- nest_level -= 1
- out.append(value[start_index:])
- return ''.join(out)
-
-class ParseError(Exception):
- """Exception thrown when we can't parse the input file."""
-
- def __init__(self, description, *context_lines):
- Exception.__init__(self)
- self.description = description
- self.context_lines = context_lines
-
- def __str__(self):
- context = '\n'.join(self.context_lines)
- return '***\nERROR: %s\n\n%s\n***' % (self.description, context)
-
-
-class Param(object):
- """Describes a param for a method, either java or native."""
-
- def __init__(self, **kwargs):
- self.datatype = kwargs['datatype']
- self.name = kwargs['name']
-
-
-class NativeMethod(object):
- """Describes a C/C++ method that is called by Java code"""
-
- def __init__(self, **kwargs):
- self.static = kwargs['static']
- self.java_class_name = kwargs['java_class_name']
- self.return_type = kwargs['return_type']
- self.name = kwargs['name']
- self.params = kwargs['params']
- if self.params:
- assert type(self.params) is list
- assert type(self.params[0]) is Param
- if (self.params and
- self.params[0].datatype == kwargs.get('ptr_type', 'int') and
- self.params[0].name.startswith('native')):
- self.type = 'method'
- self.p0_type = self.params[0].name[len('native'):]
- if kwargs.get('native_class_name'):
- self.p0_type = kwargs['native_class_name']
- else:
- self.type = 'function'
- self.method_id_var_name = kwargs.get('method_id_var_name', None)
-
-
-class CalledByNative(object):
- """Describes a java method exported to c/c++"""
-
- def __init__(self, **kwargs):
- self.system_class = kwargs['system_class']
- self.unchecked = kwargs['unchecked']
- self.static = kwargs['static']
- self.java_class_name = kwargs['java_class_name']
- self.return_type = kwargs['return_type']
- self.name = kwargs['name']
- self.params = kwargs['params']
- self.method_id_var_name = kwargs.get('method_id_var_name', None)
- self.signature = kwargs.get('signature')
- self.is_constructor = kwargs.get('is_constructor', False)
- self.env_call = GetEnvCall(self.is_constructor, self.static,
- self.return_type)
- self.static_cast = GetStaticCastForReturnType(self.return_type)
-
-
-class ConstantField(object):
- def __init__(self, **kwargs):
- self.name = kwargs['name']
- self.value = kwargs['value']
-
-
-def JavaDataTypeToC(java_type):
- """Returns a C datatype for the given java type."""
- java_pod_type_map = {
- 'int': 'jint',
- 'byte': 'jbyte',
- 'char': 'jchar',
- 'short': 'jshort',
- 'boolean': 'jboolean',
- 'long': 'jlong',
- 'double': 'jdouble',
- 'float': 'jfloat',
- }
- java_type_map = {
- 'void': 'void',
- 'String': 'jstring',
- 'java/lang/String': 'jstring',
- 'java/lang/Class': 'jclass',
- }
-
- if java_type in java_pod_type_map:
- return java_pod_type_map[java_type]
- elif java_type in java_type_map:
- return java_type_map[java_type]
- elif java_type.endswith('[]'):
- if java_type[:-2] in java_pod_type_map:
- return java_pod_type_map[java_type[:-2]] + 'Array'
- return 'jobjectArray'
- elif java_type.startswith('Class'):
-# Checking just the start of the name, rather than a direct comparison,
- # in order to handle generics.
- return 'jclass'
- else:
- return 'jobject'
-
-
-def JavaDataTypeToCForCalledByNativeParam(java_type):
- """Returns a C datatype to be when calling from native."""
- if java_type == 'int':
- return 'int'
- else:
- return JavaDataTypeToC(java_type)
-
-
-def JavaReturnValueToC(java_type):
- """Returns a valid C return value for the given java type."""
- java_pod_type_map = {
- 'int': '0',
- 'byte': '0',
- 'char': '0',
- 'short': '0',
- 'boolean': 'false',
- 'long': '0',
- 'double': '0',
- 'float': '0',
- 'void': ''
- }
- return java_pod_type_map.get(java_type, 'NULL')
-
-
-class JniParams(object):
- _imports = []
- _fully_qualified_class = ''
- _package = ''
- _inner_classes = []
- _remappings = []
- _implicit_imports = []
-
- @staticmethod
- def SetFullyQualifiedClass(fully_qualified_class):
- JniParams._fully_qualified_class = 'L' + fully_qualified_class
- JniParams._package = '/'.join(fully_qualified_class.split('/')[:-1])
-
- @staticmethod
- def AddAdditionalImport(class_name):
- assert class_name.endswith('.class')
- raw_class_name = class_name[:-len('.class')]
- if '.' in raw_class_name:
- raise SyntaxError('%s cannot be used in @JNIAdditionalImport. '
- 'Only import unqualified outer classes.' % class_name)
- new_import = 'L%s/%s' % (JniParams._package, raw_class_name)
- if new_import in JniParams._imports:
- raise SyntaxError('Do not use JNIAdditionalImport on an already '
- 'imported class: %s' % (new_import.replace('/', '.')))
- JniParams._imports += [new_import]
-
- @staticmethod
- def ExtractImportsAndInnerClasses(contents):
- if not JniParams._package:
- raise RuntimeError('SetFullyQualifiedClass must be called before '
- 'ExtractImportsAndInnerClasses')
- contents = contents.replace('\n', '')
- re_import = re.compile(r'import.*?(?P<class>\S*?);')
- for match in re.finditer(re_import, contents):
- JniParams._imports += ['L' + match.group('class').replace('.', '/')]
-
- re_inner = re.compile(r'(class|interface)\s+?(?P<name>\w+?)\W')
- for match in re.finditer(re_inner, contents):
- inner = match.group('name')
- if not JniParams._fully_qualified_class.endswith(inner):
- JniParams._inner_classes += [JniParams._fully_qualified_class + '$' +
- inner]
-
- re_additional_imports = re.compile(
- r'@JNIAdditionalImport\(\s*{?(?P<class_names>.*?)}?\s*\)')
- for match in re.finditer(re_additional_imports, contents):
- for class_name in match.group('class_names').split(','):
- JniParams.AddAdditionalImport(class_name.strip())
-
- @staticmethod
- def ParseJavaPSignature(signature_line):
- prefix = 'Signature: '
- index = signature_line.find(prefix)
- if index == -1:
- prefix = 'descriptor: '
- index = signature_line.index(prefix)
- return '"%s"' % signature_line[index + len(prefix):]
-
- @staticmethod
- def JavaToJni(param):
- """Converts a java param into a JNI signature type."""
- pod_param_map = {
- 'int': 'I',
- 'boolean': 'Z',
- 'char': 'C',
- 'short': 'S',
- 'long': 'J',
- 'double': 'D',
- 'float': 'F',
- 'byte': 'B',
- 'void': 'V',
- }
- object_param_list = [
- 'Ljava/lang/Boolean',
- 'Ljava/lang/Integer',
- 'Ljava/lang/Long',
- 'Ljava/lang/Object',
- 'Ljava/lang/String',
- 'Ljava/lang/Class',
- ]
-
- prefix = ''
- # Array?
- while param[-2:] == '[]':
- prefix += '['
- param = param[:-2]
- # Generic?
- if '<' in param:
- param = param[:param.index('<')]
- if param in pod_param_map:
- return prefix + pod_param_map[param]
- if '/' in param:
- # Coming from javap, use the fully qualified param directly.
- return prefix + 'L' + JniParams.RemapClassName(param) + ';'
-
- for qualified_name in (object_param_list +
- [JniParams._fully_qualified_class] +
- JniParams._inner_classes):
- if (qualified_name.endswith('/' + param) or
- qualified_name.endswith('$' + param.replace('.', '$')) or
- qualified_name == 'L' + param):
- return prefix + JniParams.RemapClassName(qualified_name) + ';'
-
- # Is it from an import? (e.g. referecing Class from import pkg.Class;
- # note that referencing an inner class Inner from import pkg.Class.Inner
- # is not supported).
- for qualified_name in JniParams._imports:
- if qualified_name.endswith('/' + param):
- # Ensure it's not an inner class.
- components = qualified_name.split('/')
- if len(components) > 2 and components[-2][0].isupper():
- raise SyntaxError('Inner class (%s) can not be imported '
- 'and used by JNI (%s). Please import the outer '
- 'class and use Outer.Inner instead.' %
- (qualified_name, param))
- return prefix + JniParams.RemapClassName(qualified_name) + ';'
-
- # Is it an inner class from an outer class import? (e.g. referencing
- # Class.Inner from import pkg.Class).
- if '.' in param:
- components = param.split('.')
- outer = '/'.join(components[:-1])
- inner = components[-1]
- for qualified_name in JniParams._imports:
- if qualified_name.endswith('/' + outer):
- return (prefix + JniParams.RemapClassName(qualified_name) +
- '$' + inner + ';')
- raise SyntaxError('Inner class (%s) can not be '
- 'used directly by JNI. Please import the outer '
- 'class, probably:\n'
- 'import %s.%s;' %
- (param, JniParams._package.replace('/', '.'),
- outer.replace('/', '.')))
-
- JniParams._CheckImplicitImports(param)
-
- # Type not found, falling back to same package as this class.
- return (prefix + 'L' +
- JniParams.RemapClassName(JniParams._package + '/' + param) + ';')
-
- @staticmethod
- def _CheckImplicitImports(param):
- # Ensure implicit imports, such as java.lang.*, are not being treated
- # as being in the same package.
- if not JniParams._implicit_imports:
- # This file was generated from android.jar and lists
- # all classes that are implicitly imported.
- with file(os.path.join(os.path.dirname(sys.argv[0]),
- 'android_jar.classes'), 'r') as f:
- JniParams._implicit_imports = f.readlines()
- for implicit_import in JniParams._implicit_imports:
- implicit_import = implicit_import.strip().replace('.class', '')
- implicit_import = implicit_import.replace('/', '.')
- if implicit_import.endswith('.' + param):
- raise SyntaxError('Ambiguous class (%s) can not be used directly '
- 'by JNI.\nPlease import it, probably:\n\n'
- 'import %s;' %
- (param, implicit_import))
-
-
- @staticmethod
- def Signature(params, returns, wrap):
- """Returns the JNI signature for the given datatypes."""
- items = ['(']
- items += [JniParams.JavaToJni(param.datatype) for param in params]
- items += [')']
- items += [JniParams.JavaToJni(returns)]
- if wrap:
- return '\n' + '\n'.join(['"' + item + '"' for item in items])
- else:
- return '"' + ''.join(items) + '"'
-
- @staticmethod
- def Parse(params):
- """Parses the params into a list of Param objects."""
- if not params:
- return []
- ret = []
- params = _StripGenerics(params)
- for p in params.split(','):
- items = p.split()
- # Remove @Annotations from parameters.
- while items[0].startswith('@'):
- del items[0]
- if 'final' in items:
- items.remove('final')
- param = Param(
- datatype=items[0],
- name=(items[1] if len(items) > 1 else 'p%s' % len(ret)),
- )
- ret += [param]
- return ret
-
- @staticmethod
- def RemapClassName(class_name):
- """Remaps class names using the jarjar mapping table."""
- for old, new in JniParams._remappings:
- if old.endswith('**') and old[:-2] in class_name:
- return class_name.replace(old[:-2], new, 1)
- if '*' not in old and class_name.endswith(old):
- return class_name.replace(old, new, 1)
-
- return class_name
-
- @staticmethod
- def SetJarJarMappings(mappings):
- """Parse jarjar mappings from a string."""
- JniParams._remappings = []
- for line in mappings.splitlines():
- rule = line.split()
- if rule[0] != 'rule':
- continue
- _, src, dest = rule
- src = src.replace('.', '/')
- dest = dest.replace('.', '/')
- if src.endswith('**'):
- src_real_name = src[:-2]
- else:
- assert not '*' in src
- src_real_name = src
-
- if dest.endswith('@0'):
- JniParams._remappings.append((src, dest[:-2] + src_real_name))
- elif dest.endswith('@1'):
- assert '**' in src
- JniParams._remappings.append((src, dest[:-2]))
- else:
- assert not '@' in dest
- JniParams._remappings.append((src, dest))
-
-
-def ExtractJNINamespace(contents):
- re_jni_namespace = re.compile('.*?@JNINamespace\("(.*?)"\)')
- m = re.findall(re_jni_namespace, contents)
- if not m:
- return ''
- return m[0]
-
-
-def ExtractFullyQualifiedJavaClassName(java_file_name, contents):
- re_package = re.compile('.*?package (.*?);')
- matches = re.findall(re_package, contents)
- if not matches:
- raise SyntaxError('Unable to find "package" line in %s' % java_file_name)
- return (matches[0].replace('.', '/') + '/' +
- os.path.splitext(os.path.basename(java_file_name))[0])
-
-
-def ExtractNatives(contents, ptr_type):
- """Returns a list of dict containing information about a native method."""
- contents = contents.replace('\n', '')
- natives = []
- re_native = re.compile(r'(@NativeClassQualifiedName'
- '\(\"(?P<native_class_name>.*?)\"\)\s+)?'
- '(@NativeCall(\(\"(?P<java_class_name>.*?)\"\))\s+)?'
- '(?P<qualifiers>\w+\s\w+|\w+|\s+)\s*native '
- '(?P<return_type>\S*) '
- '(?P<name>native\w+)\((?P<params>.*?)\);')
- for match in re.finditer(re_native, contents):
- native = NativeMethod(
- static='static' in match.group('qualifiers'),
- java_class_name=match.group('java_class_name'),
- native_class_name=match.group('native_class_name'),
- return_type=match.group('return_type'),
- name=match.group('name').replace('native', ''),
- params=JniParams.Parse(match.group('params')),
- ptr_type=ptr_type)
- natives += [native]
- return natives
-
-
-def GetStaticCastForReturnType(return_type):
- type_map = { 'String' : 'jstring',
- 'java/lang/String' : 'jstring',
- 'boolean[]': 'jbooleanArray',
- 'byte[]': 'jbyteArray',
- 'char[]': 'jcharArray',
- 'short[]': 'jshortArray',
- 'int[]': 'jintArray',
- 'long[]': 'jlongArray',
- 'float[]': 'jfloatArray',
- 'double[]': 'jdoubleArray' }
- ret = type_map.get(return_type, None)
- if ret:
- return ret
- if return_type.endswith('[]'):
- return 'jobjectArray'
- return None
-
-
-def GetEnvCall(is_constructor, is_static, return_type):
- """Maps the types availabe via env->Call__Method."""
- if is_constructor:
- return 'NewObject'
- env_call_map = {'boolean': 'Boolean',
- 'byte': 'Byte',
- 'char': 'Char',
- 'short': 'Short',
- 'int': 'Int',
- 'long': 'Long',
- 'float': 'Float',
- 'void': 'Void',
- 'double': 'Double',
- 'Object': 'Object',
- }
- call = env_call_map.get(return_type, 'Object')
- if is_static:
- call = 'Static' + call
- return 'Call' + call + 'Method'
-
-
-def GetMangledParam(datatype):
- """Returns a mangled identifier for the datatype."""
- if len(datatype) <= 2:
- return datatype.replace('[', 'A')
- ret = ''
- for i in range(1, len(datatype)):
- c = datatype[i]
- if c == '[':
- ret += 'A'
- elif c.isupper() or datatype[i - 1] in ['/', 'L']:
- ret += c.upper()
- return ret
-
-
-def GetMangledMethodName(name, params, return_type):
- """Returns a mangled method name for the given signature.
-
- The returned name can be used as a C identifier and will be unique for all
- valid overloads of the same method.
-
- Args:
- name: string.
- params: list of Param.
- return_type: string.
-
- Returns:
- A mangled name.
- """
- mangled_items = []
- for datatype in [return_type] + [x.datatype for x in params]:
- mangled_items += [GetMangledParam(JniParams.JavaToJni(datatype))]
- mangled_name = name + '_'.join(mangled_items)
- assert re.match(r'[0-9a-zA-Z_]+', mangled_name)
- return mangled_name
-
-
-def MangleCalledByNatives(called_by_natives):
- """Mangles all the overloads from the call_by_natives list."""
- method_counts = collections.defaultdict(
- lambda: collections.defaultdict(lambda: 0))
- for called_by_native in called_by_natives:
- java_class_name = called_by_native.java_class_name
- name = called_by_native.name
- method_counts[java_class_name][name] += 1
- for called_by_native in called_by_natives:
- java_class_name = called_by_native.java_class_name
- method_name = called_by_native.name
- method_id_var_name = method_name
- if method_counts[java_class_name][method_name] > 1:
- method_id_var_name = GetMangledMethodName(method_name,
- called_by_native.params,
- called_by_native.return_type)
- called_by_native.method_id_var_name = method_id_var_name
- return called_by_natives
-
-
-# Regex to match the JNI return types that should be included in a
-# ScopedLocalJavaRef.
-RE_SCOPED_JNI_RETURN_TYPES = re.compile('jobject|jclass|jstring|.*Array')
-
-# Regex to match a string like "@CalledByNative public void foo(int bar)".
-RE_CALLED_BY_NATIVE = re.compile(
- '@CalledByNative(?P<Unchecked>(Unchecked)*?)(?:\("(?P<annotation>.*)"\))?'
- '\s+(?P<prefix>[\w ]*?)'
- '\s*(?P<return_type>\S+?)'
- '\s+(?P<name>\w+)'
- '\s*\((?P<params>[^\)]*)\)')
-
-
-def ExtractCalledByNatives(contents):
- """Parses all methods annotated with @CalledByNative.
-
- Args:
- contents: the contents of the java file.
-
- Returns:
- A list of dict with information about the annotated methods.
- TODO(bulach): return a CalledByNative object.
-
- Raises:
- ParseError: if unable to parse.
- """
- called_by_natives = []
- for match in re.finditer(RE_CALLED_BY_NATIVE, contents):
- called_by_natives += [CalledByNative(
- system_class=False,
- unchecked='Unchecked' in match.group('Unchecked'),
- static='static' in match.group('prefix'),
- java_class_name=match.group('annotation') or '',
- return_type=match.group('return_type'),
- name=match.group('name'),
- params=JniParams.Parse(match.group('params')))]
- # Check for any @CalledByNative occurrences that weren't matched.
- unmatched_lines = re.sub(RE_CALLED_BY_NATIVE, '', contents).split('\n')
- for line1, line2 in zip(unmatched_lines, unmatched_lines[1:]):
- if '@CalledByNative' in line1:
- raise ParseError('could not parse @CalledByNative method signature',
- line1, line2)
- return MangleCalledByNatives(called_by_natives)
-
-
-class JNIFromJavaP(object):
- """Uses 'javap' to parse a .class file and generate the JNI header file."""
-
- def __init__(self, contents, options):
- self.contents = contents
- self.namespace = options.namespace
- for line in contents:
- class_name = re.match(
- '.*?(public).*?(class|interface) (?P<class_name>\S+?)( |\Z)',
- line)
- if class_name:
- self.fully_qualified_class = class_name.group('class_name')
- break
- self.fully_qualified_class = self.fully_qualified_class.replace('.', '/')
- # Java 7's javap includes type parameters in output, like HashSet<T>. Strip
- # away the <...> and use the raw class name that Java 6 would've given us.
- self.fully_qualified_class = self.fully_qualified_class.split('<', 1)[0]
- JniParams.SetFullyQualifiedClass(self.fully_qualified_class)
- self.java_class_name = self.fully_qualified_class.split('/')[-1]
- if not self.namespace:
- self.namespace = 'JNI_' + self.java_class_name
- re_method = re.compile('(?P<prefix>.*?)(?P<return_type>\S+?) (?P<name>\w+?)'
- '\((?P<params>.*?)\)')
- self.called_by_natives = []
- for lineno, content in enumerate(contents[2:], 2):
- match = re.match(re_method, content)
- if not match:
- continue
- self.called_by_natives += [CalledByNative(
- system_class=True,
- unchecked=False,
- static='static' in match.group('prefix'),
- java_class_name='',
- return_type=match.group('return_type').replace('.', '/'),
- name=match.group('name'),
- params=JniParams.Parse(match.group('params').replace('.', '/')),
- signature=JniParams.ParseJavaPSignature(contents[lineno + 1]))]
- re_constructor = re.compile('(.*?)public ' +
- self.fully_qualified_class.replace('/', '.') +
- '\((?P<params>.*?)\)')
- for lineno, content in enumerate(contents[2:], 2):
- match = re.match(re_constructor, content)
- if not match:
- continue
- self.called_by_natives += [CalledByNative(
- system_class=True,
- unchecked=False,
- static=False,
- java_class_name='',
- return_type=self.fully_qualified_class,
- name='Constructor',
- params=JniParams.Parse(match.group('params').replace('.', '/')),
- signature=JniParams.ParseJavaPSignature(contents[lineno + 1]),
- is_constructor=True)]
- self.called_by_natives = MangleCalledByNatives(self.called_by_natives)
-
- self.constant_fields = []
- re_constant_field = re.compile('.*?public static final int (?P<name>.*?);')
- re_constant_field_value = re.compile(
- '.*?Constant(Value| value): int (?P<value>(-*[0-9]+)?)')
- for lineno, content in enumerate(contents[2:], 2):
- match = re.match(re_constant_field, content)
- if not match:
- continue
- value = re.match(re_constant_field_value, contents[lineno + 2])
- if not value:
- value = re.match(re_constant_field_value, contents[lineno + 3])
- if value:
- self.constant_fields.append(
- ConstantField(name=match.group('name'),
- value=value.group('value')))
-
- self.inl_header_file_generator = InlHeaderFileGenerator(
- self.namespace, self.fully_qualified_class, [],
- self.called_by_natives, self.constant_fields, options)
-
- def GetContent(self):
- return self.inl_header_file_generator.GetContent()
-
- @staticmethod
- def CreateFromClass(class_file, options):
- class_name = os.path.splitext(os.path.basename(class_file))[0]
- p = subprocess.Popen(args=[options.javap, '-c', '-verbose',
- '-s', class_name],
- cwd=os.path.dirname(class_file),
- stdout=subprocess.PIPE,
- stderr=subprocess.PIPE)
- stdout, _ = p.communicate()
- jni_from_javap = JNIFromJavaP(stdout.split('\n'), options)
- return jni_from_javap
-
-
-class JNIFromJavaSource(object):
- """Uses the given java source file to generate the JNI header file."""
-
- # Match single line comments, multiline comments, character literals, and
- # double-quoted strings.
- _comment_remover_regex = re.compile(
- r'//.*?$|/\*.*?\*/|\'(?:\\.|[^\\\'])*\'|"(?:\\.|[^\\"])*"',
- re.DOTALL | re.MULTILINE)
-
- def __init__(self, contents, fully_qualified_class, options):
- contents = self._RemoveComments(contents)
- JniParams.SetFullyQualifiedClass(fully_qualified_class)
- JniParams.ExtractImportsAndInnerClasses(contents)
- jni_namespace = ExtractJNINamespace(contents) or options.namespace
- natives = ExtractNatives(contents, options.ptr_type)
- called_by_natives = ExtractCalledByNatives(contents)
- if len(natives) == 0 and len(called_by_natives) == 0:
- raise SyntaxError('Unable to find any JNI methods for %s.' %
- fully_qualified_class)
- inl_header_file_generator = InlHeaderFileGenerator(
- jni_namespace, fully_qualified_class, natives, called_by_natives,
- [], options)
- self.content = inl_header_file_generator.GetContent()
-
- @classmethod
- def _RemoveComments(cls, contents):
- # We need to support both inline and block comments, and we need to handle
- # strings that contain '//' or '/*'.
- # TODO(bulach): This is a bit hacky. It would be cleaner to use a real Java
- # parser. Maybe we could ditch JNIFromJavaSource and just always use
- # JNIFromJavaP; or maybe we could rewrite this script in Java and use APT.
- # http://code.google.com/p/chromium/issues/detail?id=138941
- def replacer(match):
- # Replace matches that are comments with nothing; return literals/strings
- # unchanged.
- s = match.group(0)
- if s.startswith('/'):
- return ''
- else:
- return s
- return cls._comment_remover_regex.sub(replacer, contents)
-
- def GetContent(self):
- return self.content
-
- @staticmethod
- def CreateFromFile(java_file_name, options):
- contents = file(java_file_name).read()
- fully_qualified_class = ExtractFullyQualifiedJavaClassName(java_file_name,
- contents)
- return JNIFromJavaSource(contents, fully_qualified_class, options)
-
-
-class InlHeaderFileGenerator(object):
- """Generates an inline header file for JNI integration."""
-
- def __init__(self, namespace, fully_qualified_class, natives,
- called_by_natives, constant_fields, options):
- self.namespace = namespace
- self.fully_qualified_class = fully_qualified_class
- self.class_name = self.fully_qualified_class.split('/')[-1]
- self.natives = natives
- self.called_by_natives = called_by_natives
- self.header_guard = fully_qualified_class.replace('/', '_') + '_JNI'
- self.constant_fields = constant_fields
- self.options = options
- self.init_native = self.ExtractInitNative(options)
-
- def ExtractInitNative(self, options):
- for native in self.natives:
- if options.jni_init_native_name == 'native' + native.name:
- self.natives.remove(native)
- return native
- return None
-
- def GetContent(self):
- """Returns the content of the JNI binding file."""
- template = Template("""\
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-
-// This file is autogenerated by
-// ${SCRIPT_NAME}
-// For
-// ${FULLY_QUALIFIED_CLASS}
-
-#ifndef ${HEADER_GUARD}
-#define ${HEADER_GUARD}
-
-#include <jni.h>
-
-${INCLUDES}
-
-//#include "base/android/jni_int_wrapper.h"
-
-// Step 1: forward declarations.
-namespace {
-$CLASS_PATH_DEFINITIONS
-$METHOD_ID_DEFINITIONS
-} // namespace
-
-$OPEN_NAMESPACE
-$FORWARD_DECLARATIONS
-
-$CONSTANT_FIELDS
-
-// Step 2: method stubs.
-$METHOD_STUBS
-
-// Step 3: RegisterNatives.
-$JNI_NATIVE_METHODS
-$REGISTER_NATIVES
-$CLOSE_NAMESPACE
-$JNI_REGISTER_NATIVES
-#endif // ${HEADER_GUARD}
-""")
- values = {
- 'SCRIPT_NAME': self.options.script_name,
- 'FULLY_QUALIFIED_CLASS': self.fully_qualified_class,
- 'CLASS_PATH_DEFINITIONS': self.GetClassPathDefinitionsString(),
- 'METHOD_ID_DEFINITIONS': self.GetMethodIDDefinitionsString(),
- 'FORWARD_DECLARATIONS': self.GetForwardDeclarationsString(),
- 'CONSTANT_FIELDS': self.GetConstantFieldsString(),
- 'METHOD_STUBS': self.GetMethodStubsString(),
- 'OPEN_NAMESPACE': self.GetOpenNamespaceString(),
- 'JNI_NATIVE_METHODS': self.GetJNINativeMethodsString(),
- 'REGISTER_NATIVES': self.GetRegisterNativesString(),
- 'CLOSE_NAMESPACE': self.GetCloseNamespaceString(),
- 'HEADER_GUARD': self.header_guard,
- 'INCLUDES': self.GetIncludesString(),
- 'JNI_REGISTER_NATIVES': self.GetJNIRegisterNativesString()
- }
- return WrapOutput(template.substitute(values))
-
- def GetClassPathDefinitionsString(self):
- ret = []
- ret += [self.GetClassPathDefinitions()]
- return '\n'.join(ret)
-
- def GetMethodIDDefinitionsString(self):
- """Returns the definition of method ids for the called by native methods."""
- if not self.options.eager_called_by_natives:
- return ''
- template = Template("""\
-jmethodID g_${JAVA_CLASS}_${METHOD_ID_VAR_NAME} = NULL;""")
- ret = []
- for called_by_native in self.called_by_natives:
- values = {
- 'JAVA_CLASS': called_by_native.java_class_name or self.class_name,
- 'METHOD_ID_VAR_NAME': called_by_native.method_id_var_name,
- }
- ret += [template.substitute(values)]
- return '\n'.join(ret)
-
- def GetForwardDeclarationsString(self):
- ret = []
- for native in self.natives:
- if native.type != 'method':
- ret += [self.GetForwardDeclaration(native)]
- if self.options.native_exports and ret:
- return '\nextern "C" {\n' + "\n".join(ret) + '\n}; // extern "C"'
- return '\n'.join(ret)
-
- def GetConstantFieldsString(self):
- if not self.constant_fields:
- return ''
- ret = ['enum Java_%s_constant_fields {' % self.class_name]
- for c in self.constant_fields:
- ret += [' %s = %s,' % (c.name, c.value)]
- ret += ['};']
- return '\n'.join(ret)
-
- def GetMethodStubsString(self):
- """Returns the code corresponding to method stubs."""
- ret = []
- for native in self.natives:
- if native.type == 'method':
- ret += [self.GetNativeMethodStubString(native)]
- if self.options.eager_called_by_natives:
- ret += self.GetEagerCalledByNativeMethodStubs()
- else:
- ret += self.GetLazyCalledByNativeMethodStubs()
-
- if self.options.native_exports and ret:
- return '\nextern "C" {\n' + "\n".join(ret) + '\n}; // extern "C"'
- return '\n'.join(ret)
-
- def GetLazyCalledByNativeMethodStubs(self):
- return [self.GetLazyCalledByNativeMethodStub(called_by_native)
- for called_by_native in self.called_by_natives]
-
- def GetEagerCalledByNativeMethodStubs(self):
- ret = []
- if self.called_by_natives:
- ret += ['namespace {']
- for called_by_native in self.called_by_natives:
- ret += [self.GetEagerCalledByNativeMethodStub(called_by_native)]
- ret += ['} // namespace']
- return ret
-
- def GetIncludesString(self):
- if not self.options.includes:
- return ''
- includes = self.options.includes.split(',')
- return '\n'.join('#include "%s"' % x for x in includes)
-
- def GetKMethodsString(self, clazz):
- ret = []
- for native in self.natives:
- if (native.java_class_name == clazz or
- (not native.java_class_name and clazz == self.class_name)):
- ret += [self.GetKMethodArrayEntry(native)]
- return '\n'.join(ret)
-
- def SubstituteNativeMethods(self, template):
- """Substitutes JAVA_CLASS and KMETHODS in the provided template."""
- ret = []
- all_classes = self.GetUniqueClasses(self.natives)
- all_classes[self.class_name] = self.fully_qualified_class
- for clazz in all_classes:
- kmethods = self.GetKMethodsString(clazz)
- if kmethods:
- values = {'JAVA_CLASS': clazz,
- 'KMETHODS': kmethods}
- ret += [template.substitute(values)]
- if not ret: return ''
- return '\n' + '\n'.join(ret)
-
- def GetJNINativeMethodsString(self):
- """Returns the implementation of the array of native methods."""
- if self.options.native_exports and not self.options.native_exports_optional:
- return ''
- template = Template("""\
-static const JNINativeMethod kMethods${JAVA_CLASS}[] = {
-${KMETHODS}
-};
-""")
- return self.SubstituteNativeMethods(template)
-
- def GetRegisterCalledByNativesImplString(self):
- """Returns the code for registering the called by native methods."""
- if not self.options.eager_called_by_natives:
- return ''
- template = Template("""\
- g_${JAVA_CLASS}_${METHOD_ID_VAR_NAME} = ${GET_METHOD_ID_IMPL}
- if (g_${JAVA_CLASS}_${METHOD_ID_VAR_NAME} == NULL) {
- return false;
- }
- """)
- ret = []
- for called_by_native in self.called_by_natives:
- values = {
- 'JAVA_CLASS': called_by_native.java_class_name or self.class_name,
- 'METHOD_ID_VAR_NAME': called_by_native.method_id_var_name,
- 'GET_METHOD_ID_IMPL': self.GetMethodIDImpl(called_by_native),
- }
- ret += [template.substitute(values)]
- return '\n'.join(ret)
-
- def GetRegisterNativesString(self):
- """Returns the code for RegisterNatives."""
- template = Template("""\
-${REGISTER_NATIVES_SIGNATURE} {
-${EARLY_EXIT}
-${CLASSES}
-${NATIVES}
-${CALLED_BY_NATIVES}
- return true;
-}
-""")
- signature = 'static bool RegisterNativesImpl(JNIEnv* env'
- if self.init_native:
- signature += ', jclass clazz)'
- else:
- signature += ')'
-
- early_exit = ''
- if self.options.native_exports_optional:
- early_exit = """\
- if (base::android::IsManualJniRegistrationDisabled()) return true;
-"""
-
- natives = self.GetRegisterNativesImplString()
- called_by_natives = self.GetRegisterCalledByNativesImplString()
- values = {'REGISTER_NATIVES_SIGNATURE': signature,
- 'EARLY_EXIT': early_exit,
- 'CLASSES': self.GetFindClasses(),
- 'NATIVES': natives,
- 'CALLED_BY_NATIVES': called_by_natives,
- }
- return template.substitute(values)
-
- def GetRegisterNativesImplString(self):
- """Returns the shared implementation for RegisterNatives."""
- if self.options.native_exports and not self.options.native_exports_optional:
- return ''
-
- template = Template("""\
- const int kMethods${JAVA_CLASS}Size = sizeof(kMethods${JAVA_CLASS})/sizeof(kMethods${JAVA_CLASS}[0]);
-
- if (env->RegisterNatives(${JAVA_CLASS}_clazz(env),
- kMethods${JAVA_CLASS},
- kMethods${JAVA_CLASS}Size) < 0) {
- //jni_generator::HandleRegistrationError(
- // env, ${JAVA_CLASS}_clazz(env), __FILE__);
- return false;
- }
-""")
- return self.SubstituteNativeMethods(template)
-
- def GetJNIRegisterNativesString(self):
- """Returns the implementation for the JNI registration of native methods."""
- if not self.init_native:
- return ''
-
- template = Template("""\
-extern "C" JNIEXPORT bool JNICALL
-Java_${FULLY_QUALIFIED_CLASS}_${INIT_NATIVE_NAME}(JNIEnv* env, jclass clazz) {
- return ${NAMESPACE}RegisterNativesImpl(env, clazz);
-}
-""")
-
- if self.options.native_exports:
- java_name = JniParams.RemapClassName(self.fully_qualified_class)
- java_name = java_name.replace('_', '_1').replace('/', '_')
- else:
- java_name = self.fully_qualified_class.replace('/', '_')
-
- namespace = ''
- if self.namespace:
- namespace = self.namespace + '::'
- values = {'FULLY_QUALIFIED_CLASS': java_name,
- 'INIT_NATIVE_NAME': 'native' + self.init_native.name,
- 'NAMESPACE': namespace,
- 'REGISTER_NATIVES_IMPL': self.GetRegisterNativesImplString()
- }
- return template.substitute(values)
-
- def GetOpenNamespaceString(self):
- if self.namespace:
- all_namespaces = ['namespace %s {' % ns
- for ns in self.namespace.split('::')]
- return '\n'.join(all_namespaces)
- return ''
-
- def GetCloseNamespaceString(self):
- if self.namespace:
- all_namespaces = ['} // namespace %s' % ns
- for ns in self.namespace.split('::')]
- all_namespaces.reverse()
- return '\n'.join(all_namespaces) + '\n'
- return ''
-
- def GetJNIFirstParam(self, native):
- ret = []
- if native.type == 'method':
- ret = ['jobject jcaller']
- elif native.type == 'function':
- if native.static:
- ret = ['jclass jcaller']
- else:
- ret = ['jobject jcaller']
- return ret
-
- def GetParamsInDeclaration(self, native):
- """Returns the params for the stub declaration.
-
- Args:
- native: the native dictionary describing the method.
-
- Returns:
- A string containing the params.
- """
- return ',\n '.join(self.GetJNIFirstParam(native) +
- [JavaDataTypeToC(param.datatype) + ' ' +
- param.name
- for param in native.params])
-
- def GetCalledByNativeParamsInDeclaration(self, called_by_native):
- return ',\n '.join([
- JavaDataTypeToCForCalledByNativeParam(param.datatype) + ' ' +
- param.name
- for param in called_by_native.params])
-
- def GetStubName(self, native):
- """Return the name of the stub function for this native method.
-
- Args:
- native: the native dictionary describing the method.
-
- Returns:
- A string with the stub function name. For native exports mode this is the
- Java_* symbol name required by the JVM; otherwise it is just the name of
- the native method itself.
- """
- if self.options.native_exports:
- template = Template("Java_${JAVA_NAME}_native${NAME}")
-
- java_name = JniParams.RemapClassName(self.fully_qualified_class)
- java_name = java_name.replace('_', '_1').replace('/', '_')
- if native.java_class_name:
- java_name += '_00024' + native.java_class_name
-
- values = {'NAME': native.name,
- 'JAVA_NAME': java_name}
- return template.substitute(values)
- else:
- return native.name
-
- def GetForwardDeclaration(self, native):
- template_str = """
-static ${RETURN} ${NAME}(JNIEnv* env, ${PARAMS});
-"""
- if self.options.native_exports:
- template_str += """
-__attribute__((visibility("default")))
-${RETURN} ${STUB_NAME}(JNIEnv* env, ${PARAMS}) {
- return ${NAME}(${PARAMS_IN_CALL});
-}
-"""
- template = Template(template_str)
- params_in_call = []
- if not self.options.pure_native_methods:
- params_in_call = ['env', 'jcaller']
- params_in_call = ', '.join(params_in_call + [p.name for p in native.params])
-
- values = {'RETURN': JavaDataTypeToC(native.return_type),
- 'NAME': native.name,
- 'PARAMS': self.GetParamsInDeclaration(native),
- 'PARAMS_IN_CALL': params_in_call,
- 'STUB_NAME': self.GetStubName(native)}
- return template.substitute(values)
-
- def GetNativeMethodStubString(self, native):
- """Returns stubs for native methods."""
- if self.options.native_exports:
- template_str = """\
-__attribute__((visibility("default")))
-${RETURN} ${STUB_NAME}(JNIEnv* env,
- ${PARAMS_IN_DECLARATION}) {"""
- else:
- template_str = """\
-static ${RETURN} ${STUB_NAME}(JNIEnv* env, ${PARAMS_IN_DECLARATION}) {"""
- template_str += """
- ${P0_TYPE}* native = reinterpret_cast<${P0_TYPE}*>(${PARAM0_NAME});
- CHECK_NATIVE_PTR(env, jcaller, native, "${NAME}"${OPTIONAL_ERROR_RETURN});
- return native->${NAME}(${PARAMS_IN_CALL})${POST_CALL};
-}
-"""
-
- template = Template(template_str)
- params = []
- if not self.options.pure_native_methods:
- params = ['env', 'jcaller']
- params_in_call = ', '.join(params + [p.name for p in native.params[1:]])
-
- return_type = JavaDataTypeToC(native.return_type)
- optional_error_return = JavaReturnValueToC(native.return_type)
- if optional_error_return:
- optional_error_return = ', ' + optional_error_return
- post_call = ''
- if re.match(RE_SCOPED_JNI_RETURN_TYPES, return_type):
- post_call = '.Get()'
-
- values = {
- 'RETURN': return_type,
- 'OPTIONAL_ERROR_RETURN': optional_error_return,
- 'NAME': native.name,
- 'PARAMS_IN_DECLARATION': self.GetParamsInDeclaration(native),
- 'PARAM0_NAME': native.params[0].name,
- 'P0_TYPE': native.p0_type,
- 'PARAMS_IN_CALL': params_in_call,
- 'POST_CALL': post_call,
- 'STUB_NAME': self.GetStubName(native),
- }
- return template.substitute(values)
-
- def GetArgument(self, param):
- return ('int(' + param.name + ')'
- if param.datatype == 'int' else param.name)
-
- def GetArgumentsInCall(self, params):
- """Return a string of arguments to call from native into Java"""
- return [self.GetArgument(p) for p in params]
-
- def GetCalledByNativeValues(self, called_by_native):
- """Fills in necessary values for the CalledByNative methods."""
- java_class = called_by_native.java_class_name or self.class_name
- if called_by_native.static or called_by_native.is_constructor:
- first_param_in_declaration = ''
- first_param_in_call = ('%s_clazz(env)' % java_class)
- else:
- first_param_in_declaration = ', jobject obj'
- first_param_in_call = 'obj'
- params_in_declaration = self.GetCalledByNativeParamsInDeclaration(
- called_by_native)
- if params_in_declaration:
- params_in_declaration = ', ' + params_in_declaration
- params_in_call = ', '.join(self.GetArgumentsInCall(called_by_native.params))
- if params_in_call:
- params_in_call = ', ' + params_in_call
- pre_call = ''
- post_call = ''
- if called_by_native.static_cast:
- pre_call = 'static_cast<%s>(' % called_by_native.static_cast
- post_call = ')'
- check_exception = ''
- if not called_by_native.unchecked:
- check_exception = 'base::android::CheckException(env);'
- return_type = JavaDataTypeToC(called_by_native.return_type)
- optional_error_return = JavaReturnValueToC(called_by_native.return_type)
- if optional_error_return:
- optional_error_return = ', ' + optional_error_return
- return_declaration = ''
- return_clause = ''
- if return_type != 'void':
- pre_call = ' ' + pre_call
- return_declaration = return_type + ' ret ='
- if re.match(RE_SCOPED_JNI_RETURN_TYPES, return_type):
- return_type = 'base::android::ScopedLocalJavaRef<' + return_type + '>'
- return_clause = 'return ' + return_type + '(env, ret);'
- else:
- return_clause = 'return ret;'
- return {
- 'JAVA_CLASS': java_class,
- 'RETURN_TYPE': return_type,
- 'OPTIONAL_ERROR_RETURN': optional_error_return,
- 'RETURN_DECLARATION': return_declaration,
- 'RETURN_CLAUSE': return_clause,
- 'FIRST_PARAM_IN_DECLARATION': first_param_in_declaration,
- 'PARAMS_IN_DECLARATION': params_in_declaration,
- 'PRE_CALL': pre_call,
- 'POST_CALL': post_call,
- 'ENV_CALL': called_by_native.env_call,
- 'FIRST_PARAM_IN_CALL': first_param_in_call,
- 'PARAMS_IN_CALL': params_in_call,
- 'METHOD_ID_VAR_NAME': called_by_native.method_id_var_name,
- 'CHECK_EXCEPTION': check_exception,
- 'GET_METHOD_ID_IMPL': self.GetMethodIDImpl(called_by_native)
- }
-
- def GetEagerCalledByNativeMethodStub(self, called_by_native):
- """Returns the implementation of the called by native method."""
- template = Template("""
-static ${RETURN_TYPE} ${METHOD_ID_VAR_NAME}(\
-JNIEnv* env${FIRST_PARAM_IN_DECLARATION}${PARAMS_IN_DECLARATION}) {
- ${RETURN_DECLARATION}${PRE_CALL}env->${ENV_CALL}(${FIRST_PARAM_IN_CALL},
- g_${JAVA_CLASS}_${METHOD_ID_VAR_NAME}${PARAMS_IN_CALL})${POST_CALL};
- ${RETURN_CLAUSE}
-}""")
- values = self.GetCalledByNativeValues(called_by_native)
- return template.substitute(values)
-
- def GetLazyCalledByNativeMethodStub(self, called_by_native):
- """Returns a string."""
- function_signature_template = Template("""\
-static ${RETURN_TYPE} Java_${JAVA_CLASS}_${METHOD_ID_VAR_NAME}(\
-JNIEnv* env${FIRST_PARAM_IN_DECLARATION}${PARAMS_IN_DECLARATION})""")
- function_header_template = Template("""\
-${FUNCTION_SIGNATURE} {""")
- function_header_with_unused_template = Template("""\
-${FUNCTION_SIGNATURE} __attribute__ ((unused));
-${FUNCTION_SIGNATURE} {""")
- template = Template("""
-static intptr_t g_${JAVA_CLASS}_${METHOD_ID_VAR_NAME} = 0;
-${FUNCTION_HEADER}
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, ${FIRST_PARAM_IN_CALL},
- // ${JAVA_CLASS}_clazz(env)${OPTIONAL_ERROR_RETURN});
- jmethodID method_id =
- ${GET_METHOD_ID_IMPL}
- ${RETURN_DECLARATION}
- ${PRE_CALL}env->${ENV_CALL}(${FIRST_PARAM_IN_CALL},
- method_id${PARAMS_IN_CALL})${POST_CALL};
- ${CHECK_EXCEPTION}
- ${RETURN_CLAUSE}
-}""")
- values = self.GetCalledByNativeValues(called_by_native)
- values['FUNCTION_SIGNATURE'] = (
- function_signature_template.substitute(values))
- if called_by_native.system_class:
- values['FUNCTION_HEADER'] = (
- function_header_with_unused_template.substitute(values))
- else:
- values['FUNCTION_HEADER'] = function_header_template.substitute(values)
- return template.substitute(values)
-
- def GetKMethodArrayEntry(self, native):
- template = Template(' { "native${NAME}", ${JNI_SIGNATURE}, ' +
- 'reinterpret_cast<void*>(${STUB_NAME}) },')
- values = {'NAME': native.name,
- 'JNI_SIGNATURE': JniParams.Signature(native.params,
- native.return_type,
- True),
- 'STUB_NAME': self.GetStubName(native)}
- return template.substitute(values)
-
- def GetUniqueClasses(self, origin):
- ret = {self.class_name: self.fully_qualified_class}
- for entry in origin:
- class_name = self.class_name
- jni_class_path = self.fully_qualified_class
- if entry.java_class_name:
- class_name = entry.java_class_name
- jni_class_path = self.fully_qualified_class + '$' + class_name
- ret[class_name] = jni_class_path
- return ret
-
- def GetClassPathDefinitions(self):
- """Returns the ClassPath constants."""
- ret = []
- template = Template("""\
-const char k${JAVA_CLASS}ClassPath[] = "${JNI_CLASS_PATH}";""")
- native_classes = self.GetUniqueClasses(self.natives)
- called_by_native_classes = self.GetUniqueClasses(self.called_by_natives)
- if self.options.native_exports:
- all_classes = called_by_native_classes
- else:
- all_classes = native_classes
- all_classes.update(called_by_native_classes)
-
- for clazz in all_classes:
- values = {
- 'JAVA_CLASS': clazz,
- 'JNI_CLASS_PATH': JniParams.RemapClassName(all_classes[clazz]),
- }
- ret += [template.substitute(values)]
- ret += ''
-
- class_getter_methods = []
- if self.options.native_exports:
- template = Template("""\
-// Leaking this jclass as we cannot use LazyInstance from some threads.
-base::subtle::AtomicWord g_${JAVA_CLASS}_clazz __attribute__((unused)) = 0;
-#define ${JAVA_CLASS}_clazz(env) \
-base::android::LazyGetClass(env, k${JAVA_CLASS}ClassPath, \
-&g_${JAVA_CLASS}_clazz)""")
- else:
- template = Template("""\
-// Leaking this jclass as we cannot use LazyInstance from some threads.
-jclass g_${JAVA_CLASS}_clazz = NULL;
-#define ${JAVA_CLASS}_clazz(env) g_${JAVA_CLASS}_clazz""")
-
- for clazz in called_by_native_classes:
- values = {
- 'JAVA_CLASS': clazz,
- }
- ret += [template.substitute(values)]
-
- return '\n'.join(ret)
-
- def GetFindClasses(self):
- """Returns the imlementation of FindClass for all known classes."""
- if self.init_native:
- if self.options.native_exports:
- template = Template("""\
- base::subtle::Release_Store(&g_${JAVA_CLASS}_clazz,
- static_cast<base::subtle::AtomicWord>(env->NewWeakGlobalRef(clazz));""")
- else:
- template = Template("""\
- g_${JAVA_CLASS}_clazz = static_cast<jclass>(env->NewWeakGlobalRef(clazz));""")
- else:
- if self.options.native_exports:
- return '\n'
- template = Template("""\
- g_${JAVA_CLASS}_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
- base::android::GetClass(env, k${JAVA_CLASS}ClassPath).Get()));""")
- ret = []
- for clazz in self.GetUniqueClasses(self.called_by_natives):
- values = {'JAVA_CLASS': clazz}
- ret += [template.substitute(values)]
- return '\n'.join(ret)
-
- def GetMethodIDImpl(self, called_by_native):
- """Returns the implementation of GetMethodID."""
- if self.options.eager_called_by_natives:
- template = Template("""\
-env->Get${STATIC_METHOD_PART}MethodID(
- ${JAVA_CLASS}_clazz(env),
- "${JNI_NAME}", ${JNI_SIGNATURE});""")
- else:
- template = Template("""\
- base::android::GetMethod(
- env, ${JAVA_CLASS}_clazz(env),
- base::android::${STATIC}_METHOD,
- "${JNI_NAME}",
- ${JNI_SIGNATURE},
- &g_${JAVA_CLASS}_${METHOD_ID_VAR_NAME});
-""")
- jni_name = called_by_native.name
- jni_return_type = called_by_native.return_type
- if called_by_native.is_constructor:
- jni_name = '<init>'
- jni_return_type = 'void'
- if called_by_native.signature:
- signature = called_by_native.signature
- else:
- signature = JniParams.Signature(called_by_native.params,
- jni_return_type,
- True)
- values = {
- 'JAVA_CLASS': called_by_native.java_class_name or self.class_name,
- 'JNI_NAME': jni_name,
- 'METHOD_ID_VAR_NAME': called_by_native.method_id_var_name,
- 'STATIC': 'STATIC' if called_by_native.static else 'INSTANCE',
- 'STATIC_METHOD_PART': 'Static' if called_by_native.static else '',
- 'JNI_SIGNATURE': signature,
- }
- return template.substitute(values)
-
-
-def WrapOutput(output):
- ret = []
- for line in output.splitlines():
- # Do not wrap lines under 80 characters or preprocessor directives.
- if len(line) < 80 or line.lstrip()[:1] == '#':
- stripped = line.rstrip()
- if len(ret) == 0 or len(ret[-1]) or len(stripped):
- ret.append(stripped)
- else:
- first_line_indent = ' ' * (len(line) - len(line.lstrip()))
- subsequent_indent = first_line_indent + ' ' * 4
- if line.startswith('//'):
- subsequent_indent = '//' + subsequent_indent
- wrapper = textwrap.TextWrapper(width=80,
- subsequent_indent=subsequent_indent,
- break_long_words=False)
- ret += [wrapped.rstrip() for wrapped in wrapper.wrap(line)]
- ret += ['']
- return '\n'.join(ret)
-
-
-def ExtractJarInputFile(jar_file, input_file, out_dir):
- """Extracts input file from jar and returns the filename.
-
- The input file is extracted to the same directory that the generated jni
- headers will be placed in. This is passed as an argument to script.
-
- Args:
- jar_file: the jar file containing the input files to extract.
- input_files: the list of files to extract from the jar file.
- out_dir: the name of the directories to extract to.
-
- Returns:
- the name of extracted input file.
- """
- jar_file = zipfile.ZipFile(jar_file)
-
- out_dir = os.path.join(out_dir, os.path.dirname(input_file))
- try:
- os.makedirs(out_dir)
- except OSError as e:
- if e.errno != errno.EEXIST:
- raise
- extracted_file_name = os.path.join(out_dir, os.path.basename(input_file))
- with open(extracted_file_name, 'w') as outfile:
- outfile.write(jar_file.read(input_file))
-
- return extracted_file_name
-
-
-def GenerateJNIHeader(input_file, output_file, options):
- try:
- if os.path.splitext(input_file)[1] == '.class':
- jni_from_javap = JNIFromJavaP.CreateFromClass(input_file, options)
- content = jni_from_javap.GetContent()
- else:
- jni_from_java_source = JNIFromJavaSource.CreateFromFile(
- input_file, options)
- content = jni_from_java_source.GetContent()
- except ParseError, e:
- print e
- sys.exit(1)
- if output_file:
- if not os.path.exists(os.path.dirname(os.path.abspath(output_file))):
- os.makedirs(os.path.dirname(os.path.abspath(output_file)))
- if options.optimize_generation and os.path.exists(output_file):
- with file(output_file, 'r') as f:
- existing_content = f.read()
- if existing_content == content:
- return
- with file(output_file, 'w') as f:
- f.write(content)
- else:
- print output
-
-
-def GetScriptName():
- script_components = os.path.abspath(sys.argv[0]).split(os.path.sep)
- base_index = 0
- for idx, value in enumerate(script_components):
- if value == 'base' or value == 'third_party':
- base_index = idx
- break
- return os.sep.join(script_components[base_index:])
-
-
-
-class Opitions(object):
-
- def __init__(self):
- self.ptr_type = 'int'
- self.jni_init_native_name = ''
- self.script_name = GetScriptName()
- self.native_exports = ''
- self.eager_called_by_natives = ''
- self.pure_native_methods = ''
- self.native_exports_optional = ''
- self.includes = ''
- self.optimize_generation = ''
- self.namespace = ''
-
-if __name__ == '__main__':
- """sys.exit(main(sys.argv))"""
- if(len(sys.argv) == 3):
- options = Opitions()
- GenerateJNIHeader(sys.argv[1], sys.argv[2], options)
diff --git a/weex_core/Source/android/jniprebuild/jni_load.cc b/weex_core/Source/android/jniprebuild/jni_load.cc
deleted file mode 100644
index fba2c63..0000000
--- a/weex_core/Source/android/jniprebuild/jni_load.cc
+++ /dev/null
@@ -1,58 +0,0 @@
-/**
- * Licensed to the Apache Software Foundation (ASF) under one
- * or more contributor license agreements. See the NOTICE file
- * distributed with this work for additional information
- * regarding copyright ownership. The ASF licenses this file
- * to you under the Apache License, Version 2.0 (the
- * "License"); you may not use this file except in compliance
- * with the License. You may obtain a copy of the License at
- *
- * http://www.apache.org/licenses/LICENSE-2.0
- *
- * Unless required by applicable law or agreed to in writing,
- * software distributed under the License is distributed on an
- * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
- * KIND, either express or implied. See the License for the
- * specific language governing permissions and limitations
- * under the License.
- */
-
-#include <jni.h>
-#include "android/base/jni/android_jni.h"
-#include "android/base/jni_type.h"
-#include "android/utils/so_utils.h"
-#include "android/wrap/content_box_measurement_impl_android.h"
-#include "android/wrap/hash_set.h"
-#include "android/wrap/wx_debug_js_bridge.h"
-#include "android/wrap/log_utils.h"
-#include "android/wrap/native_render_object_utils_impl_android.h"
-#include "android/wrap/wml_bridge.h"
-#include "android/wrap/wx_bridge.h"
-#include "android/wrap/wx_js_object.h"
-#include "android/wrap/wx_map.h"
-#include "base/message_loop/message_pump_android.h"
-#include "core/network/android/default_request_handler.h"
-
-jint JNI_OnLoad(JavaVM *vm, void *reserved) {
- base::android::InitVM(vm);
- JNIEnv *env = base::android::AttachCurrentThread();
- bool result = WeexCore::RegisterJNIContentBoxMeasurement(env) &&
- WeexCore::RegisterWXDebugJsBridge(env) &&
- WeexCore::RegisterJNINativeRenderObjectUtils(env) &&
- weex::base::MessagePumpAndroid::RegisterJNIUtils(env) &&
- WeexCore::WXBridge::RegisterJNIUtils(env) &&
- base::android::JNIType::RegisterJNIUtils(env) &&
- WeexCore::WXJSObject::RegisterJNIUtils(env) &&
- WeexCore::LogUtils::RegisterJNIUtils(env) &&
- WeexCore::WXMap::RegisterJNIUtils(env) &&
- WeexCore::HashSet::RegisterJNIUtils(env) &&
- weex::core::network::DefaultRequestHandler::RegisterJNIUtils(env);
- if (result) {
- WeexCore::SoUtils::Init(env);
- WeexCore::WMLBridge::RegisterJNIUtils(env);
- }
-
- return result ? JNI_VERSION_1_4 : JNI_FALSE;
-}
-
-void JNI_OnUnload(JavaVM *vm, void *reserved) {}
diff --git a/weex_core/Source/android/jniprebuild/jniheader/ContentBoxMeasurement_jni.h b/weex_core/Source/android/jniprebuild/jniheader/ContentBoxMeasurement_jni.h
deleted file mode 100644
index 05c62f7..0000000
--- a/weex_core/Source/android/jniprebuild/jniheader/ContentBoxMeasurement_jni.h
+++ /dev/null
@@ -1,164 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file is autogenerated by
-// weex-core2/weex_core/Source/android/jniprebuild/jni_generator.py
-// For
-// com/taobao/weex/layout/ContentBoxMeasurement
-
-#ifndef com_taobao_weex_layout_ContentBoxMeasurement_JNI
-#define com_taobao_weex_layout_ContentBoxMeasurement_JNI
-
-#include <jni.h>
-
-//#include "base/android/jni_int_wrapper.h"
-
-// Step 1: forward declarations.
-namespace {
-const char kContentBoxMeasurementClassPath[] =
- "com/taobao/weex/layout/ContentBoxMeasurement";
-// Leaking this jclass as we cannot use LazyInstance from some threads.
-jclass g_ContentBoxMeasurement_clazz = NULL;
-#define ContentBoxMeasurement_clazz(env) g_ContentBoxMeasurement_clazz
-
-} // namespace
-
-// Step 2: method stubs.
-
-static intptr_t g_ContentBoxMeasurement_measure = 0;
-static void Java_ContentBoxMeasurement_measure(JNIEnv* env, jobject obj, jfloat
- width,
- jfloat height,
- int widthMeasureMode,
- int heightMeasureMode) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // ContentBoxMeasurement_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, ContentBoxMeasurement_clazz(env),
- base::android::INSTANCE_METHOD,
- "measure",
-
-"("
-"F"
-"F"
-"I"
-"I"
-")"
-"V",
- &g_ContentBoxMeasurement_measure);
-
- env->CallVoidMethod(obj,
- method_id, width, height, int(widthMeasureMode),
- int(heightMeasureMode));
- base::android::CheckException(env);
-
-}
-
-static intptr_t g_ContentBoxMeasurement_layoutBefore = 0;
-static void Java_ContentBoxMeasurement_layoutBefore(JNIEnv* env, jobject obj) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // ContentBoxMeasurement_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, ContentBoxMeasurement_clazz(env),
- base::android::INSTANCE_METHOD,
- "layoutBefore",
-
-"("
-")"
-"V",
- &g_ContentBoxMeasurement_layoutBefore);
-
- env->CallVoidMethod(obj,
- method_id);
- base::android::CheckException(env);
-
-}
-
-static intptr_t g_ContentBoxMeasurement_layoutAfter = 0;
-static void Java_ContentBoxMeasurement_layoutAfter(JNIEnv* env, jobject obj,
- jfloat computedWidth,
- jfloat computedHeight) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // ContentBoxMeasurement_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, ContentBoxMeasurement_clazz(env),
- base::android::INSTANCE_METHOD,
- "layoutAfter",
-
-"("
-"F"
-"F"
-")"
-"V",
- &g_ContentBoxMeasurement_layoutAfter);
-
- env->CallVoidMethod(obj,
- method_id, computedWidth, computedHeight);
- base::android::CheckException(env);
-
-}
-
-static intptr_t g_ContentBoxMeasurement_getWidth = 0;
-static jfloat Java_ContentBoxMeasurement_getWidth(JNIEnv* env, jobject obj) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // ContentBoxMeasurement_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, ContentBoxMeasurement_clazz(env),
- base::android::INSTANCE_METHOD,
- "getWidth",
-
-"("
-")"
-"F",
- &g_ContentBoxMeasurement_getWidth);
-
- jfloat ret =
- env->CallFloatMethod(obj,
- method_id);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_ContentBoxMeasurement_getHeight = 0;
-static jfloat Java_ContentBoxMeasurement_getHeight(JNIEnv* env, jobject obj) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // ContentBoxMeasurement_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, ContentBoxMeasurement_clazz(env),
- base::android::INSTANCE_METHOD,
- "getHeight",
-
-"("
-")"
-"F",
- &g_ContentBoxMeasurement_getHeight);
-
- jfloat ret =
- env->CallFloatMethod(obj,
- method_id);
- base::android::CheckException(env);
- return ret;
-}
-
-// Step 3: RegisterNatives.
-
-static bool RegisterNativesImpl(JNIEnv* env) {
-
- g_ContentBoxMeasurement_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
- base::android::GetClass(env, kContentBoxMeasurementClassPath).Get()));
-
- return true;
-}
-
-#endif // com_taobao_weex_layout_ContentBoxMeasurement_JNI
diff --git a/weex_core/Source/android/jniprebuild/jniheader/NativeRenderObjectUtils_jni.h b/weex_core/Source/android/jniprebuild/jniheader/NativeRenderObjectUtils_jni.h
deleted file mode 100644
index 78c51c7..0000000
--- a/weex_core/Source/android/jniprebuild/jniheader/NativeRenderObjectUtils_jni.h
+++ /dev/null
@@ -1,207 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file is autogenerated by
-// incubator-weex/weex_core/Source/android/jniprebuild/jni_generator.py
-// For
-// com/taobao/weex/ui/component/list/template/jni/NativeRenderObjectUtils
-
-#ifndef com_taobao_weex_ui_component_list_template_jni_NativeRenderObjectUtils_JNI
-#define com_taobao_weex_ui_component_list_template_jni_NativeRenderObjectUtils_JNI
-
-#include <jni.h>
-
-//#include "base/android/jni_int_wrapper.h"
-
-// Step 1: forward declarations.
-namespace {
-const char kNativeRenderObjectUtilsClassPath[] =
- "com/taobao/weex/ui/component/list/template/jni/NativeRenderObjectUtils";
-// Leaking this jclass as we cannot use LazyInstance from some threads.
-jclass g_NativeRenderObjectUtils_clazz = NULL;
-#define NativeRenderObjectUtils_clazz(env) g_NativeRenderObjectUtils_clazz
-
-} // namespace
-
-static jlong GetRenderObject(JNIEnv* env, jclass jcaller,
- jstring instanceId,
- jstring ref);
-
-static void UpdateRenderObjectStyle(JNIEnv* env, jclass jcaller,
- jlong ptr,
- jstring key,
- jstring value);
-
-static void UpdateRenderObjectAttr(JNIEnv* env, jclass jcaller,
- jlong ptr,
- jstring key,
- jstring value);
-
-static jlong CopyRenderObject(JNIEnv* env, jclass jcaller,
- jlong ptr);
-
-static jint LayoutRenderObject(JNIEnv* env, jclass jcaller,
- jlong ptr,
- jfloat width,
- jfloat height);
-
-static void AddChildRenderObject(JNIEnv* env, jclass jcaller,
- jlong parent,
- jlong child);
-
-static jint RenderObjectGetLayoutDirectionFromPathNode(JNIEnv* env, jclass jcaller,
- jlong ptr);
-
-static jboolean RenderObjectHasNewLayout(JNIEnv* env, jclass jcaller,
- jlong ptr);
-
-static jint RenderObjectChildCount(JNIEnv* env, jclass jcaller,
- jlong ptr);
-
-static jlong RenderObjectGetChild(JNIEnv* env, jclass jcaller,
- jlong ptr,
- jint index);
-
-static jlong RenderObjectUpdateComponent(JNIEnv* env, jclass jcaller,
- jlong ptr,
- jobject component);
-
-static void RenderObjectChildWaste(JNIEnv* env, jclass jcaller,
- jlong ptr,
- jboolean waster);
-
-// Step 2: method stubs.
-
-static intptr_t g_NativeRenderObjectUtils_updateComponentSize = 0;
-static void Java_NativeRenderObjectUtils_updateComponentSize(JNIEnv* env,
- jobject component,
- jfloat top,
- jfloat bottom,
- jfloat left,
- jfloat right,
- jfloat height,
- jfloat width) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, NativeRenderObjectUtils_clazz(env),
- // NativeRenderObjectUtils_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, NativeRenderObjectUtils_clazz(env),
- base::android::STATIC_METHOD,
- "updateComponentSize",
-
-"("
-"Lcom/taobao/weex/ui/component/WXComponent;"
-"F"
-"F"
-"F"
-"F"
-"F"
-"F"
-")"
-"V",
- &g_NativeRenderObjectUtils_updateComponentSize);
-
- env->CallStaticVoidMethod(NativeRenderObjectUtils_clazz(env),
- method_id, component, top, bottom, left, right, height, width);
- base::android::CheckException(env);
-
-}
-
-// Step 3: RegisterNatives.
-
-static const JNINativeMethod kMethodsNativeRenderObjectUtils[] = {
- { "nativeGetRenderObject",
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-")"
-"J", reinterpret_cast<void*>(GetRenderObject) },
- { "nativeUpdateRenderObjectStyle",
-"("
-"J"
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-")"
-"V", reinterpret_cast<void*>(UpdateRenderObjectStyle) },
- { "nativeUpdateRenderObjectAttr",
-"("
-"J"
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-")"
-"V", reinterpret_cast<void*>(UpdateRenderObjectAttr) },
- { "nativeCopyRenderObject",
-"("
-"J"
-")"
-"J", reinterpret_cast<void*>(CopyRenderObject) },
- { "nativeLayoutRenderObject",
-"("
-"J"
-"F"
-"F"
-")"
-"I", reinterpret_cast<void*>(LayoutRenderObject) },
- { "nativeAddChildRenderObject",
-"("
-"J"
-"J"
-")"
-"V", reinterpret_cast<void*>(AddChildRenderObject) },
- { "nativeRenderObjectGetLayoutDirectionFromPathNode",
-"("
-"J"
-")"
-"I", reinterpret_cast<void*>(RenderObjectGetLayoutDirectionFromPathNode) },
- { "nativeRenderObjectHasNewLayout",
-"("
-"J"
-")"
-"Z", reinterpret_cast<void*>(RenderObjectHasNewLayout) },
- { "nativeRenderObjectChildCount",
-"("
-"J"
-")"
-"I", reinterpret_cast<void*>(RenderObjectChildCount) },
- { "nativeRenderObjectGetChild",
-"("
-"J"
-"I"
-")"
-"J", reinterpret_cast<void*>(RenderObjectGetChild) },
- { "nativeRenderObjectUpdateComponent",
-"("
-"J"
-"Lcom/taobao/weex/ui/component/WXComponent;"
-")"
-"J", reinterpret_cast<void*>(RenderObjectUpdateComponent) },
- { "nativeRenderObjectChildWaste",
-"("
-"J"
-"Z"
-")"
-"V", reinterpret_cast<void*>(RenderObjectChildWaste) },
-};
-
-static bool RegisterNativesImpl(JNIEnv* env) {
-
- g_NativeRenderObjectUtils_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
- base::android::GetClass(env, kNativeRenderObjectUtilsClassPath).Get()));
-
- const int kMethodsNativeRenderObjectUtilsSize =
- sizeof(kMethodsNativeRenderObjectUtils)/sizeof(kMethodsNativeRenderObjectUtils[0]);
-
- if (env->RegisterNatives(NativeRenderObjectUtils_clazz(env),
- kMethodsNativeRenderObjectUtils,
- kMethodsNativeRenderObjectUtilsSize) < 0) {
- //jni_generator::HandleRegistrationError(
- // env, NativeRenderObjectUtils_clazz(env), __FILE__);
- return false;
- }
-
- return true;
-}
-
-#endif // com_taobao_weex_ui_component_list_template_jni_NativeRenderObjectUtils_JNI
diff --git a/weex_core/Source/android/jniprebuild/jniheader/RequestHandler_jni.h b/weex_core/Source/android/jniprebuild/jniheader/RequestHandler_jni.h
deleted file mode 100644
index f83ad37..0000000
--- a/weex_core/Source/android/jniprebuild/jniheader/RequestHandler_jni.h
+++ /dev/null
@@ -1,122 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file is autogenerated by
-// weex/weex_core/Source/android/jniprebuild/jni_generator.py
-// For
-// com/taobao/weex/bridge/RequestHandler
-
-#ifndef com_taobao_weex_bridge_RequestHandler_JNI
-#define com_taobao_weex_bridge_RequestHandler_JNI
-
-#include <jni.h>
-
-//#include "base/android/jni_int_wrapper.h"
-
-// Step 1: forward declarations.
-namespace {
-const char kRequestHandlerClassPath[] = "com/taobao/weex/bridge/RequestHandler";
-// Leaking this jclass as we cannot use LazyInstance from some threads.
-jclass g_RequestHandler_clazz = NULL;
-#define RequestHandler_clazz(env) g_RequestHandler_clazz
-
-} // namespace
-
-static void InvokeOnSuccess(JNIEnv* env, jobject jcaller,
- jlong callback,
- jstring result);
-
-static void InvokeOnFailed(JNIEnv* env, jobject jcaller,
- jlong callback);
-
-// Step 2: method stubs.
-
-static intptr_t g_RequestHandler_create = 0;
-static base::android::ScopedLocalJavaRef<jobject>
- Java_RequestHandler_create(JNIEnv* env) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, RequestHandler_clazz(env),
- // RequestHandler_clazz(env), NULL);
- jmethodID method_id =
- base::android::GetMethod(
- env, RequestHandler_clazz(env),
- base::android::STATIC_METHOD,
- "create",
-
-"("
-")"
-"Lcom/taobao/weex/bridge/RequestHandler;",
- &g_RequestHandler_create);
-
- jobject ret =
- env->CallStaticObjectMethod(RequestHandler_clazz(env),
- method_id);
- base::android::CheckException(env);
- return base::android::ScopedLocalJavaRef<jobject>(env, ret);
-}
-
-static intptr_t g_RequestHandler_send = 0;
-static void Java_RequestHandler_send(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring url,
- jlong nativeCallback) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // RequestHandler_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, RequestHandler_clazz(env),
- base::android::INSTANCE_METHOD,
- "send",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"J"
-")"
-"V",
- &g_RequestHandler_send);
-
- env->CallVoidMethod(obj,
- method_id, instanceId, url, nativeCallback);
- base::android::CheckException(env);
-
-}
-
-// Step 3: RegisterNatives.
-
-static const JNINativeMethod kMethodsRequestHandler[] = {
- { "nativeInvokeOnSuccess",
-"("
-"J"
-"Ljava/lang/String;"
-")"
-"V", reinterpret_cast<void*>(InvokeOnSuccess) },
- { "nativeInvokeOnFailed",
-"("
-"J"
-")"
-"V", reinterpret_cast<void*>(InvokeOnFailed) },
-};
-
-static bool RegisterNativesImpl(JNIEnv* env) {
-
- g_RequestHandler_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
- base::android::GetClass(env, kRequestHandlerClassPath).Get()));
-
- const int kMethodsRequestHandlerSize =
- sizeof(kMethodsRequestHandler)/sizeof(kMethodsRequestHandler[0]);
-
- if (env->RegisterNatives(RequestHandler_clazz(env),
- kMethodsRequestHandler,
- kMethodsRequestHandlerSize) < 0) {
- //jni_generator::HandleRegistrationError(
- // env, RequestHandler_clazz(env), __FILE__);
- return false;
- }
-
- return true;
-}
-
-#endif // com_taobao_weex_bridge_RequestHandler_JNI
diff --git a/weex_core/Source/android/jniprebuild/jniheader/SystemMessageHandler_jni.h b/weex_core/Source/android/jniprebuild/jniheader/SystemMessageHandler_jni.h
deleted file mode 100644
index 50b59af..0000000
--- a/weex_core/Source/android/jniprebuild/jniheader/SystemMessageHandler_jni.h
+++ /dev/null
@@ -1,155 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file is autogenerated by
-// incubator-weex/weex_core/Source/android/jniprebuild/jni_generator.py
-// For
-// com/taobao/weex/base/SystemMessageHandler
-
-#ifndef com_taobao_weex_base_SystemMessageHandler_JNI
-#define com_taobao_weex_base_SystemMessageHandler_JNI
-
-#include <jni.h>
-
-//#include "base/android/jni_int_wrapper.h"
-
-// Step 1: forward declarations.
-namespace {
-const char kSystemMessageHandlerClassPath[] =
- "com/taobao/weex/base/SystemMessageHandler";
-// Leaking this jclass as we cannot use LazyInstance from some threads.
-jclass g_SystemMessageHandler_clazz = NULL;
-#define SystemMessageHandler_clazz(env) g_SystemMessageHandler_clazz
-
-} // namespace
-
-static void RunWork(JNIEnv* env, jobject jcaller,
- jlong delegateNative);
-
-// Step 2: method stubs.
-
-static intptr_t g_SystemMessageHandler_create = 0;
-static base::android::ScopedLocalJavaRef<jobject>
- Java_SystemMessageHandler_create(JNIEnv* env, jlong
- messagePumpDelegateNative) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, SystemMessageHandler_clazz(env),
- // SystemMessageHandler_clazz(env), NULL);
- jmethodID method_id =
- base::android::GetMethod(
- env, SystemMessageHandler_clazz(env),
- base::android::STATIC_METHOD,
- "create",
-
-"("
-"J"
-")"
-"Lcom/taobao/weex/base/SystemMessageHandler;",
- &g_SystemMessageHandler_create);
-
- jobject ret =
- env->CallStaticObjectMethod(SystemMessageHandler_clazz(env),
- method_id, messagePumpDelegateNative);
- base::android::CheckException(env);
- return base::android::ScopedLocalJavaRef<jobject>(env, ret);
-}
-
-static intptr_t g_SystemMessageHandler_scheduleWork = 0;
-static void Java_SystemMessageHandler_scheduleWork(JNIEnv* env, jobject obj) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // SystemMessageHandler_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, SystemMessageHandler_clazz(env),
- base::android::INSTANCE_METHOD,
- "scheduleWork",
-
-"("
-")"
-"V",
- &g_SystemMessageHandler_scheduleWork);
-
- env->CallVoidMethod(obj,
- method_id);
- base::android::CheckException(env);
-
-}
-
-static intptr_t g_SystemMessageHandler_scheduleDelayedWork = 0;
-static void Java_SystemMessageHandler_scheduleDelayedWork(JNIEnv* env, jobject
- obj, jlong delayMillis) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // SystemMessageHandler_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, SystemMessageHandler_clazz(env),
- base::android::INSTANCE_METHOD,
- "scheduleDelayedWork",
-
-"("
-"J"
-")"
-"V",
- &g_SystemMessageHandler_scheduleDelayedWork);
-
- env->CallVoidMethod(obj,
- method_id, delayMillis);
- base::android::CheckException(env);
-
-}
-
-static intptr_t g_SystemMessageHandler_stop = 0;
-static void Java_SystemMessageHandler_stop(JNIEnv* env, jobject obj) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // SystemMessageHandler_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, SystemMessageHandler_clazz(env),
- base::android::INSTANCE_METHOD,
- "stop",
-
-"("
-")"
-"V",
- &g_SystemMessageHandler_stop);
-
- env->CallVoidMethod(obj,
- method_id);
- base::android::CheckException(env);
-
-}
-
-// Step 3: RegisterNatives.
-
-static const JNINativeMethod kMethodsSystemMessageHandler[] = {
- { "nativeRunWork",
-"("
-"J"
-")"
-"V", reinterpret_cast<void*>(RunWork) },
-};
-
-static bool RegisterNativesImpl(JNIEnv* env) {
-
- g_SystemMessageHandler_clazz = reinterpret_cast<jclass>(env->NewGlobalRef(
- base::android::GetClass(env, kSystemMessageHandlerClassPath).Get()));
-
- const int kMethodsSystemMessageHandlerSize =
- sizeof(kMethodsSystemMessageHandler)/sizeof(kMethodsSystemMessageHandler[0]);
-
- if (env->RegisterNatives(SystemMessageHandler_clazz(env),
- kMethodsSystemMessageHandler,
- kMethodsSystemMessageHandlerSize) < 0) {
- //jni_generator::HandleRegistrationError(
- // env, SystemMessageHandler_clazz(env), __FILE__);
- return false;
- }
-
- return true;
-}
-
-#endif // com_taobao_weex_base_SystemMessageHandler_JNI
diff --git a/weex_core/Source/android/jniprebuild/jniheader/WXBridge_jni.h b/weex_core/Source/android/jniprebuild/jniheader/WXBridge_jni.h
deleted file mode 100644
index b431c4e..0000000
--- a/weex_core/Source/android/jniprebuild/jniheader/WXBridge_jni.h
+++ /dev/null
@@ -1,1168 +0,0 @@
-// Copyright 2014 The Chromium Authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-// This file is autogenerated by
-// incubator-weex/weex_core/Source/android/jniprebuild/jni_generator.py
-// For
-// com/taobao/weex/bridge/WXBridge
-
-#ifndef com_taobao_weex_bridge_WXBridge_JNI
-#define com_taobao_weex_bridge_WXBridge_JNI
-
-#include <jni.h>
-#include <android/base/jni/android_jni.h>
-
-//#include "base/android/jni_int_wrapper.h"
-
-// Step 1: forward declarations.
-namespace {
-const char kWXBridgeClassPath[] = "com/taobao/weex/bridge/WXBridge";
-// Leaking this jclass as we cannot use LazyInstance from some threads.
-jclass g_WXBridge_clazz = NULL;
-#define WXBridge_clazz(env) g_WXBridge_clazz
-
-} // namespace
-
-static jint InitFrameworkEnv(JNIEnv* env, jobject jcaller,
- jstring framework,
- jobject params,
- jstring cacheDir,
- jboolean pieSupport);
-
-static jint InitFramework(JNIEnv* env, jobject jcaller,
- jstring framework,
- jobject params);
-
-static void RefreshInstance(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring _namespace,
- jstring function,
- jobjectArray args);
-
-static jint ExecJS(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring name,
- jstring function,
- jobjectArray args);
-
-static jint ExecJSService(JNIEnv* env, jobject jcaller,
- jstring javascript);
-
-static void ExecJSWithCallback(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring _namespace,
- jstring _function,
- jobjectArray args,
- jlong callbackId);
-
-static jint CreateInstanceContext(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring name,
- jstring function,
- jobjectArray args);
-
-static jint DestoryInstance(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring name,
- jstring function,
- jobjectArray args);
-
-static jstring ExecJSOnInstance(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring script,
- jint type);
-
-static void FireEventOnDataRenderNode(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring ref,
- jstring type,
- jstring data,
- jstring domChanges);
-
-static void RegisterModuleOnDataRenderNode(JNIEnv* env, jobject jcaller,
- jstring data);
-
-static void TakeHeapSnapshot(JNIEnv* env, jobject jcaller,
- jstring filename);
-
-static void BindMeasurementToRenderObject(JNIEnv* env, jobject jcaller,
- jlong ptr);
-
-static void SetRenderContainerWrapContent(JNIEnv* env, jobject jcaller,
- jboolean wrap,
- jstring instanceId);
-
-static jlongArray GetFirstScreenRenderTime(JNIEnv* env, jobject jcaller,
- jstring instanceId);
-
-static jlongArray GetRenderFinishTime(JNIEnv* env, jobject jcaller,
- jstring instanceId);
-
-static void SetDefaultHeightAndWidthIntoRootDom(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jfloat defaultWidth,
- jfloat defaultHeight,
- jboolean isWidthWrapContent,
- jboolean isHeightWrapContent);
-
-static void OnInstanceClose(JNIEnv* env, jobject jcaller,
- jstring instanceId);
-
-static void ForceLayout(JNIEnv* env, jobject jcaller,
- jstring instanceId);
-
-static jboolean NotifyLayout(JNIEnv* env, jobject jcaller,
- jstring instanceId);
-
-static void SetStyleWidth(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring ref,
- jfloat value);
-
-static void SetStyleHeight(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring ref,
- jfloat value);
-
-static void SetMargin(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring ref,
- jint edge,
- jfloat value);
-
-static void SetPadding(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring ref,
- jint edge,
- jfloat value);
-
-static void SetPosition(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring ref,
- jint edge,
- jfloat value);
-
-static void MarkDirty(JNIEnv* env, jobject jcaller,
- jstring instanceId,
- jstring ref,
- jboolean dirty);
-
-static void RegisterCoreEnv(JNIEnv* env, jobject jcaller,
- jstring key,
- jstring value);
-
-static void ResetWXBridge(JNIEnv* env, jobject jcaller,
- jobject bridge,
- jstring className);
-
-static void UpdateGlobalConfig(JNIEnv* env, jobject jcaller,
- jstring config);
-
-// Step 2: method stubs.
-
-static intptr_t g_WXBridge_onReceivedResult = 0;
-static void Java_WXBridge_onReceivedResult(JNIEnv* env, jobject obj, jlong
- callbackId,
- jbyteArray result) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "onReceivedResult",
-
-"("
-"J"
-"[B"
-")"
-"V",
- &g_WXBridge_onReceivedResult);
-
- env->CallVoidMethod(obj,
- method_id, callbackId, result);
- base::android::CheckException(env);
-
-}
-
-static intptr_t g_WXBridge_callNative = 0;
-static jint Java_WXBridge_callNative(JNIEnv* env, jobject obj, jstring
- instanceId,
- jbyteArray tasks,
- jstring callback) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callNative",
-
-"("
-"Ljava/lang/String;"
-"[B"
-"Ljava/lang/String;"
-")"
-"I",
- &g_WXBridge_callNative);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, tasks, callback);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_reportJSException = 0;
-static void Java_WXBridge_reportJSException(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring func,
- jstring exception) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "reportJSException",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-")"
-"V",
- &g_WXBridge_reportJSException);
-
- env->CallVoidMethod(obj,
- method_id, instanceId, func, exception);
- base::android::CheckException(env);
-
-}
-
-static intptr_t g_WXBridge_callNativeModule = 0;
-static base::android::ScopedLocalJavaRef<jobject>
- Java_WXBridge_callNativeModule(JNIEnv* env, jobject obj, jstring instanceId,
- jstring module,
- jstring method,
- jbyteArray arguments,
- jbyteArray options) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), NULL);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callNativeModule",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"[B"
-"[B"
-")"
-"Ljava/lang/Object;",
- &g_WXBridge_callNativeModule);
-
- jobject ret =
- env->CallObjectMethod(obj,
- method_id, instanceId, module, method, arguments, options);
- base::android::CheckException(env);
- return base::android::ScopedLocalJavaRef<jobject>(env, ret);
-}
-
-static intptr_t g_WXBridge_callNativeComponent = 0;
-static void Java_WXBridge_callNativeComponent(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring ref,
- jstring method,
- jbyteArray arguments,
- jbyteArray optionsData) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callNativeComponent",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"[B"
-"[B"
-")"
-"V",
- &g_WXBridge_callNativeComponent);
-
- env->CallVoidMethod(obj,
- method_id, instanceId, ref, method, arguments, optionsData);
- base::android::CheckException(env);
-
-}
-
-static intptr_t g_WXBridge_setTimeoutNative = 0;
-static void Java_WXBridge_setTimeoutNative(JNIEnv* env, jobject obj, jstring
- callbackId,
- jstring time) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "setTimeoutNative",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-")"
-"V",
- &g_WXBridge_setTimeoutNative);
-
- env->CallVoidMethod(obj,
- method_id, callbackId, time);
- base::android::CheckException(env);
-
-}
-
-static intptr_t g_WXBridge_setJSFrmVersion = 0;
-static void Java_WXBridge_setJSFrmVersion(JNIEnv* env, jobject obj, jstring
- version) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "setJSFrmVersion",
-
-"("
-"Ljava/lang/String;"
-")"
-"V",
- &g_WXBridge_setJSFrmVersion);
-
- env->CallVoidMethod(obj,
- method_id, version);
- base::android::CheckException(env);
-
-}
-
-static intptr_t g_WXBridge_callUpdateFinish = 0;
-static jint Java_WXBridge_callUpdateFinish(JNIEnv* env, jobject obj, jstring
- instanceId,
- jbyteArray tasks,
- jstring callback) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callUpdateFinish",
-
-"("
-"Ljava/lang/String;"
-"[B"
-"Ljava/lang/String;"
-")"
-"I",
- &g_WXBridge_callUpdateFinish);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, tasks, callback);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callRefreshFinish = 0;
-static jint Java_WXBridge_callRefreshFinish(JNIEnv* env, jobject obj, jstring
- instanceId,
- jbyteArray tasks,
- jstring callback) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callRefreshFinish",
-
-"("
-"Ljava/lang/String;"
-"[B"
-"Ljava/lang/String;"
-")"
-"I",
- &g_WXBridge_callRefreshFinish);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, tasks, callback);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_reportServerCrash = 0;
-static void Java_WXBridge_reportServerCrash(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring crashFile) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env));
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "reportServerCrash",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-")"
-"V",
- &g_WXBridge_reportServerCrash);
-
- env->CallVoidMethod(obj,
- method_id, instanceId, crashFile);
- base::android::CheckException(env);
-
-}
-
-static intptr_t g_WXBridge_callCreateBody = 0;
-static jint Java_WXBridge_callCreateBody(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring componentType,
- jstring ref,
- jobject styles,
- jobject attributes,
- jobject events,
- jfloatArray margins,
- jfloatArray paddings,
- jfloatArray borders) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callCreateBody",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"Ljava/util/HashMap;"
-"Ljava/util/HashMap;"
-"Ljava/util/HashSet;"
-"[F"
-"[F"
-"[F"
-")"
-"I",
- &g_WXBridge_callCreateBody);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, componentType, ref, styles, attributes, events,
- margins, paddings, borders);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callAddElement = 0;
-static jint Java_WXBridge_callAddElement(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring componentType,
- jstring ref,
- int index,
- jstring parentRef,
- jobject styles,
- jobject attributes,
- jobject events,
- jfloatArray margins,
- jfloatArray paddings,
- jfloatArray borders,
- jboolean willLayout) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callAddElement",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"I"
-"Ljava/lang/String;"
-"Ljava/util/HashMap;"
-"Ljava/util/HashMap;"
-"Ljava/util/HashSet;"
-"[F"
-"[F"
-"[F"
-"Z"
-")"
-"I",
- &g_WXBridge_callAddElement);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, componentType, ref, int(index), parentRef,
- styles, attributes, events, margins, paddings, borders,
- willLayout);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callRemoveElement = 0;
-static jint Java_WXBridge_callRemoveElement(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring ref) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callRemoveElement",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-")"
-"I",
- &g_WXBridge_callRemoveElement);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, ref);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callMoveElement = 0;
-static jint Java_WXBridge_callMoveElement(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring ref,
- jstring parentref,
- int index) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callMoveElement",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"I"
-")"
-"I",
- &g_WXBridge_callMoveElement);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, ref, parentref, int(index));
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callAddEvent = 0;
-static jint Java_WXBridge_callAddEvent(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring ref,
- jstring event) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callAddEvent",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-")"
-"I",
- &g_WXBridge_callAddEvent);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, ref, event);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callRemoveEvent = 0;
-static jint Java_WXBridge_callRemoveEvent(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring ref,
- jstring event) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callRemoveEvent",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-")"
-"I",
- &g_WXBridge_callRemoveEvent);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, ref, event);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callUpdateStyle = 0;
-static jint Java_WXBridge_callUpdateStyle(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring ref,
- jobject styles,
- jobject paddings,
- jobject margins,
- jobject borders) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callUpdateStyle",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"Ljava/util/HashMap;"
-"Ljava/util/HashMap;"
-"Ljava/util/HashMap;"
-"Ljava/util/HashMap;"
-")"
-"I",
- &g_WXBridge_callUpdateStyle);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, ref, styles, paddings, margins, borders);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callUpdateAttrs = 0;
-static jint Java_WXBridge_callUpdateAttrs(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring ref,
- jobject attrs) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callUpdateAttrs",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"Ljava/util/HashMap;"
-")"
-"I",
- &g_WXBridge_callUpdateAttrs);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, ref, attrs);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callLayout = 0;
-static jint Java_WXBridge_callLayout(JNIEnv* env, jobject obj, jstring
- instanceId,
- jstring ref,
- int top,
- int bottom,
- int left,
- int right,
- int height,
- int width,
- bool isRTL,
- int index) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callLayout",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"I"
-"I"
-"I"
-"I"
-"I"
-"I"
-"Z"
-"I"
-")"
-"I",
- &g_WXBridge_callLayout);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, ref, int(top), int(bottom), int(left),
- int(right), int(height), int(width), isRTL, int(index));
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callCreateFinish = 0;
-static jint Java_WXBridge_callCreateFinish(JNIEnv* env, jobject obj, jstring
- instanceId) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callCreateFinish",
-
-"("
-"Ljava/lang/String;"
-")"
-"I",
- &g_WXBridge_callCreateFinish);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callRenderSuccess = 0;
-static jint Java_WXBridge_callRenderSuccess(JNIEnv* env, jobject obj, jstring
- instanceId) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callRenderSuccess",
-
-"("
-"Ljava/lang/String;"
-")"
-"I",
- &g_WXBridge_callRenderSuccess);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callAppendTreeCreateFinish = 0;
-static jint Java_WXBridge_callAppendTreeCreateFinish(JNIEnv* env, jobject obj,
- jstring instanceId,
- jstring ref) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callAppendTreeCreateFinish",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-")"
-"I",
- &g_WXBridge_callAppendTreeCreateFinish);
-
- jint ret =
- env->CallIntMethod(obj,
- method_id, instanceId, ref);
- base::android::CheckException(env);
- return ret;
-}
-
-static intptr_t g_WXBridge_callHasTransitionPros = 0;
-static jint Java_WXBridge_callHasTransitionPros(JNIEnv* env, jobject obj,
- jstring instanceId,
- jstring ref,
- jobject styles) {
- /* Must call RegisterNativesImpl() */
- //CHECK_CLAZZ(env, obj,
- // WXBridge_clazz(env), 0);
- jmethodID method_id =
- base::android::GetMethod(
- env, WXBridge_clazz(env),
- base::android::INSTANCE_METHOD,
- "callHasTransitionPros",
-
-"("
-"Ljava/lang/String;"
-"Ljava/lang/String;"
-"Ljava/util/HashMap;"
-")"
-"I",
- &g_WXBridge_callHasTransitionPros);
-
- jint ret =
... 335723 lines suppressed ...