Implement GC (Garbage Collection) feature for interpreter, AOT and LLVM-JIT (#3125)
Implement the GC (Garbage Collection) feature for interpreter mode, AOT mode and LLVM-JIT mode, and support most features of the latest spec proposal, and also enable the stringref feature. Use `cmake -DWAMR_BUILD_GC=1/0` to enable/disable the feature, and `wamrc --enable-gc` to generate the AOT file with GC supported. And update the AOT file version from 2 to 3 since there are many AOT ABI breaks, including the changes of AOT file format, the changes of AOT module/memory instance layouts, the AOT runtime APIs for the AOT code to invoke and so on.
This commit is contained in:
@ -41,11 +41,17 @@ add_definitions(-DWASM_ENABLE_TAIL_CALL=1)
|
||||
add_definitions(-DWASM_ENABLE_SIMD=1)
|
||||
add_definitions(-DWASM_ENABLE_REF_TYPES=1)
|
||||
add_definitions(-DWASM_ENABLE_CUSTOM_NAME_SECTION=1)
|
||||
add_definitions(-DWASM_ENABLE_AOT_STACK_FRAME=1)
|
||||
add_definitions(-DWASM_ENABLE_DUMP_CALL_STACK=1)
|
||||
add_definitions(-DWASM_ENABLE_PERF_PROFILING=1)
|
||||
add_definitions(-DWASM_ENABLE_LOAD_CUSTOM_SECTION=1)
|
||||
add_definitions(-DWASM_ENABLE_MODULE_INST_CONTEXT=1)
|
||||
|
||||
add_definitions(-DWASM_ENABLE_GC=1)
|
||||
|
||||
set (WAMR_BUILD_STRINGREF 1)
|
||||
set (WAMR_STRINGREF_IMPL_SOURCE "STUB")
|
||||
|
||||
if (WAMR_BUILD_LLVM_LEGACY_PM EQUAL 1)
|
||||
add_definitions(-DWASM_ENABLE_LLVM_LEGACY_PM=1)
|
||||
endif ()
|
||||
@ -283,6 +289,7 @@ include (${SHARED_DIR}/utils/shared_utils.cmake)
|
||||
include (${SHARED_DIR}/utils/uncommon/shared_uncommon.cmake)
|
||||
include (${IWASM_DIR}/libraries/thread-mgr/thread_mgr.cmake)
|
||||
include (${IWASM_DIR}/common/iwasm_common.cmake)
|
||||
include (${IWASM_DIR}/common/gc/iwasm_gc.cmake)
|
||||
include (${IWASM_DIR}/interpreter/iwasm_interp.cmake)
|
||||
include (${IWASM_DIR}/aot/iwasm_aot.cmake)
|
||||
include (${IWASM_DIR}/compilation/iwasm_compl.cmake)
|
||||
@ -359,7 +366,8 @@ add_library (vmlib
|
||||
${LIB_WASI_THREADS_SOURCE}
|
||||
${IWASM_COMMON_SOURCE}
|
||||
${IWASM_INTERP_SOURCE}
|
||||
${IWASM_AOT_SOURCE})
|
||||
${IWASM_AOT_SOURCE}
|
||||
${IWASM_GC_SOURCE})
|
||||
|
||||
add_library (aotclib ${IWASM_COMPL_SOURCE})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user