Skip to content

Commit 16a4d71

Browse files
authored
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.
1 parent 5931aaa commit 16a4d71

File tree

98 files changed

+38252
-7942
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

98 files changed

+38252
-7942
lines changed

.github/workflows/compilation_on_android_ubuntu.yml

+39-5
Original file line numberDiff line numberDiff line change
@@ -65,7 +65,8 @@ env:
6565
THREADS_TEST_OPTIONS: "-s spec -b -p -P"
6666
X86_32_TARGET_TEST_OPTIONS: "-m x86_32 -P"
6767
WASI_TEST_OPTIONS: "-s wasi_certification -w"
68-
WAMR_COMPILER_TEST_OPTIONS: "-s wamr_compiler -b -P"
68+
WAMR_COMPILER_TEST_OPTIONS: "-s wamr_compiler -S -b -P"
69+
GC_TEST_OPTIONS: "-s spec -G -b -P"
6970

7071
jobs:
7172
build_llvm_libraries_on_ubuntu_2204:
@@ -484,6 +485,7 @@ jobs:
484485
$SIMD_TEST_OPTIONS,
485486
$THREADS_TEST_OPTIONS,
486487
$WASI_TEST_OPTIONS,
488+
$GC_TEST_OPTIONS,
487489
]
488490
wasi_sdk_release:
489491
[
@@ -517,10 +519,25 @@ jobs:
517519
test_option: $MULTI_MODULES_TEST_OPTIONS
518520
- running_mode: "multi-tier-jit"
519521
test_option: $SIMD_TEST_OPTIONS
522+
# fast-jit and multi-tier-jit don't support GC
523+
- running_mode: "fast-jit"
524+
test_option: $GC_TEST_OPTIONS
525+
- running_mode: "multi-tier-jit"
526+
test_option: $GC_TEST_OPTIONS
520527
steps:
521528
- name: checkout
522529
uses: actions/checkout@v4
523530

531+
- name: Set-up OCaml
532+
uses: ocaml/setup-ocaml@v2
533+
if: matrix.test_option == '$GC_TEST_OPTIONS'
534+
with:
535+
ocaml-compiler: 4.13
536+
537+
- name: Set-up Ocamlbuild
538+
if: matrix.test_option == '$GC_TEST_OPTIONS'
539+
run: opam install ocamlbuild dune
540+
524541
- name: download and install wasi-sdk
525542
if: matrix.test_option == '$WASI_TEST_OPTIONS'
526543
run: |
@@ -545,9 +562,9 @@ jobs:
545562

546563
- name: set env variable(if x86_32 test needed)
547564
if: >
548-
(matrix.test_option == '$DEFAULT_TEST_OPTIONS' || matrix.test_option == '$THREADS_TEST_OPTIONS'
549-
|| matrix.test_option == '$WASI_TEST_OPTIONS')
550-
&& matrix.running_mode != 'fast-jit' && matrix.running_mode != 'jit' && matrix.running_mode != 'multi-tier-jit'
565+
((matrix.test_option == '$DEFAULT_TEST_OPTIONS' || matrix.test_option == '$THREADS_TEST_OPTIONS'
566+
|| matrix.test_option == '$WASI_TEST_OPTIONS' || matrix.test_option == '$GC_TEST_OPTIONS')
567+
&& matrix.running_mode != 'fast-jit' && matrix.running_mode != 'jit' && matrix.running_mode != 'multi-tier-jit')
551568
run: echo "TEST_ON_X86_32=true" >> $GITHUB_ENV
552569

553570
#only download llvm libraries in jit and aot mode
@@ -584,9 +601,18 @@ jobs:
584601

585602
- name: run tests
586603
timeout-minutes: 30
604+
if: matrix.test_option != '$GC_TEST_OPTIONS'
587605
run: ./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
588606
working-directory: ./tests/wamr-test-suites
589607

608+
- name: run gc tests
609+
timeout-minutes: 20
610+
if: matrix.test_option == '$GC_TEST_OPTIONS'
611+
run: |
612+
eval $(opam env)
613+
./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
614+
working-directory: ./tests/wamr-test-suites
615+
590616
#only install x32 support libraries when to run x86_32 cases
591617
- name: install x32 support libraries
592618
if: env.TEST_ON_X86_32 == 'true'
@@ -600,10 +626,18 @@ jobs:
600626

601627
- name: run tests x86_32
602628
timeout-minutes: 30
603-
if: env.TEST_ON_X86_32 == 'true'
629+
if: env.TEST_ON_X86_32 == 'true' && matrix.test_option != '$GC_TEST_OPTIONS'
604630
run: ./test_wamr.sh ${{ env.X86_32_TARGET_TEST_OPTIONS }} ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
605631
working-directory: ./tests/wamr-test-suites
606632

633+
- name: run gc tests x86_32
634+
timeout-minutes: 20
635+
if: env.TEST_ON_X86_32 == 'true' && matrix.test_option == '$GC_TEST_OPTIONS'
636+
run: |
637+
eval $(opam env)
638+
./test_wamr.sh ${{ env.X86_32_TARGET_TEST_OPTIONS }} ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
639+
working-directory: ./tests/wamr-test-suites
640+
607641
test-wamr-ide:
608642
needs:
609643
[

.github/workflows/compilation_on_sgx.yml

+2-1
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,8 @@ concurrency:
4848
cancel-in-progress: true
4949

5050
env:
51-
AOT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
51+
# ref types enabled in wamrc by default, so we need to enable it for iwasm in AOT mode
52+
AOT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=0 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0 -DWAMR_BUILD_REF_TYPES=1"
5253
CLASSIC_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
5354
FAST_INTERP_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=0 -DWAMR_BUILD_FAST_INTERP=1 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=0"
5455
FAST_JIT_BUILD_OPTIONS: "-DWAMR_BUILD_AOT=1 -DWAMR_BUILD_FAST_INTERP=0 -DWAMR_BUILD_INTERP=1 -DWAMR_BUILD_FAST_JIT=1 -DWAMR_BUILD_JIT=0 -DWAMR_BUILD_LAZY_JIT=1"

.github/workflows/spec_test_on_nuttx.yml

+50-17
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,13 @@ on:
1010
- synchronize
1111
paths:
1212
- ".github/workflows/spec_test_on_nuttx.yml"
13-
13+
- "core/**"
14+
- "!core/deps/**"
15+
- "product-mini/**"
16+
- "!samples/workload/**"
17+
- "tests/wamr-test-suites/**"
18+
- "wamr-compiler/**"
19+
- "wamr-sdk/**"
1420
schedule:
1521
- cron: '0 0 * * *'
1622

@@ -20,21 +26,21 @@ env:
2026
LLVM_CACHE_SUFFIX: "build-llvm_libraries_ex"
2127
WASI_SDK_PATH: "/opt/wasi-sdk"
2228
WAMR_COMMON_OPTION:
23-
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_STACKSIZE=32768\\nCONFIG_INTERPRETERS_WAMR_LOG=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN=y\\nCONFIG_INTERPRETERS_WAMR_REF_TYPES=y\\nCONFIG_INTERPRETERS_WAMR_ENABLE_SPEC_TEST=y\\nCONFIG_INTERPRETERS_WAMR_SHARED_MEMORY=y\\nCONFIG_INTERPRETERS_WAMR_BULK_MEMORY=y\\nCONFIG_EOL_IS_LF=y\\nCONFIG_ARM_SEMIHOSTING_HOSTFS=y\\nCONFIG_ARM_SEMIHOSTING_HOSTFS_CACHE_COHERENCE=y\\nCONFIG_RISCV_SEMIHOSTING_HOSTFS=y\\nCONFIG_FS_HOSTFS=y\\nCONFIG_LIBC_FLOATINGPOINT=y\\n"
29+
"CONFIG_INTERPRETERS_WAMR=y\\nCONFIG_INTERPRETERS_WAMR_STACKSIZE=327680\\nCONFIG_INTERPRETERS_WAMR_LOG=y\\nCONFIG_INTERPRETERS_WAMR_LIBC_BUILTIN=y\\nCONFIG_INTERPRETERS_WAMR_REF_TYPES=y\\nCONFIG_INTERPRETERS_WAMR_ENABLE_SPEC_TEST=y\\nCONFIG_INTERPRETERS_WAMR_SHARED_MEMORY=y\\nCONFIG_INTERPRETERS_WAMR_BULK_MEMORY=y\\nCONFIG_EOL_IS_LF=y\\nCONFIG_ARM_SEMIHOSTING_HOSTFS=y\\nCONFIG_ARM_SEMIHOSTING_HOSTFS_CACHE_COHERENCE=y\\nCONFIG_RISCV_SEMIHOSTING_HOSTFS=y\\nCONFIG_FS_HOSTFS=y\\nCONFIG_LIBC_FLOATINGPOINT=y\\n"
2430

2531
jobs:
2632
build_llvm_libraries:
2733
uses: ./.github/workflows/build_llvm_libraries.yml
2834
with:
2935
os: "ubuntu-22.04"
3036
arch: "ARM RISCV AArch64"
31-
container_image: ghcr.io/apache/nuttx/apache-nuttx-ci-linux@sha256:d9261eacf6c6ebe656c571757751c803e8f04c3ae9b820320a5ea5dd57b7205a
37+
container_image: ghcr.io/no1wudi/nuttx/apache-nuttx-ci-linux@sha256:8c4e00b607d4d6d66ba8f51c4544819a616eac69d3a2ac669e2af2150e2eb0f9
3238

3339
spec_test_on_qemu:
3440
runs-on: ubuntu-latest
3541
needs: [build_llvm_libraries]
3642
container:
37-
image: ghcr.io/apache/nuttx/apache-nuttx-ci-linux@sha256:d9261eacf6c6ebe656c571757751c803e8f04c3ae9b820320a5ea5dd57b7205a
43+
image: ghcr.io/no1wudi/nuttx/apache-nuttx-ci-linux@sha256:8c4e00b607d4d6d66ba8f51c4544819a616eac69d3a2ac669e2af2150e2eb0f9
3844
strategy:
3945
matrix:
4046
target_config: [
@@ -75,20 +81,25 @@ jobs:
7581
mode: "-t aot",
7682
option: "CONFIG_INTERPRETERS_WAMR_AOT=y\\n"
7783
},
78-
{
79-
mode: "-t aot -X",
80-
option: "CONFIG_INTERPRETERS_WAMR_AOT=y\\n"
81-
},
82-
{
83-
mode: "-t classic-interp",
84-
option: "CONFIG_INTERPRETERS_WAMR_CLASSIC=y\\n"
85-
},
86-
{
87-
mode: "-t fast-interp",
88-
option: "CONFIG_INTERPRETERS_WAMR_FAST=y\\n"
89-
},
84+
# {
85+
# mode: "-t aot -X",
86+
# option: "CONFIG_INTERPRETERS_WAMR_AOT=y\\n"
87+
# },
88+
# {
89+
# mode: "-t classic-interp",
90+
# option: "CONFIG_INTERPRETERS_WAMR_CLASSIC=y\\n"
91+
# },
92+
# {
93+
# mode: "-t fast-interp",
94+
# option: "CONFIG_INTERPRETERS_WAMR_FAST=y\\n"
95+
# },
9096
]
9197

98+
wamr_feature_option:
99+
# Empty option for default
100+
- { option: "", mode: "" }
101+
- { option: "CONFIG_INTERPRETERS_WAMR_GC=y\\nCONFIG_INTERPRETERS_WAMR_AOT_STACK_FRAME=y\\n", mode: "-G" }
102+
92103
exclude:
93104
# XIP is not fully supported yet on RISCV64, some relocations can not be resolved
94105
- target_config: { config: "boards/risc-v/qemu-rv/rv-virt/configs/nsh64" }
@@ -136,6 +147,23 @@ jobs:
136147
if: contains(matrix.wamr_test_option.mode, 'aot')
137148
run: cp -r core/deps/llvm apps/interpreters/wamr/wamr/core/deps/llvm
138149

150+
# Inject the config option to NuttX
151+
# TODO: Merge this into NuttX once GC is generally available
152+
- name: Modify Kconfig
153+
run: |
154+
echo "\n" >> apps/interpreters/wamr/Kconfig
155+
echo "config INTERPRETERS_WAMR_GC" >> apps/interpreters/wamr/Kconfig
156+
echo "\tbool \"Enable GC\"" >> apps/interpreters/wamr/Kconfig
157+
echo "\tdefault n" >> apps/interpreters/wamr/Kconfig
158+
echo "\n" >> apps/interpreters/wamr/Kconfig
159+
echo "config INTERPRETERS_WAMR_AOT_STACK_FRAME" >> apps/interpreters/wamr/Kconfig
160+
echo "\tbool \"Enable AOT stack frame\"" >> apps/interpreters/wamr/Kconfig
161+
echo "\tdefault n" >> apps/interpreters/wamr/Kconfig
162+
echo "\n" >> apps/interpreters/wamr/Kconfig
163+
echo "config INTERPRETERS_WAMR_TAIL_CALL" >> apps/interpreters/wamr/Kconfig
164+
echo "\tbool \"Enable Tail Call\"" >> apps/interpreters/wamr/Kconfig
165+
echo "\tdefault y" >> apps/interpreters/wamr/Kconfig
166+
139167
- name: Enable WAMR for NuttX
140168
run: |
141169
find nuttx/boards -name defconfig | xargs sed -i '$a\${{ env.WAMR_COMMON_OPTION }}'
@@ -144,6 +172,11 @@ jobs:
144172
run: |
145173
find nuttx/boards -name defconfig | xargs sed -i '$a\${{ matrix.wamr_test_option.option }}'
146174
175+
- name: Enable WAMR Feature for NuttX
176+
if: matrix.wamr_feature_option.option != ''
177+
run: |
178+
find nuttx/boards -name defconfig | xargs sed -i '$a\${{ matrix.wamr_feature_option.option }}'
179+
147180
- name: Disable FPU for NuttX
148181
if: matrix.target_config.fpu_type == 'none'
149182
run: |
@@ -172,4 +205,4 @@ jobs:
172205
- name: Test
173206
run: |
174207
cd apps/interpreters/wamr/wamr/tests/wamr-test-suites
175-
./test_wamr.sh -s spec ${{ matrix.wamr_test_option.mode }} -m ${{ matrix.target_config.target }} -b -Q -P -F ${{ steps.build_firmware.outputs.firmware }}
208+
./test_wamr.sh -s spec ${{ matrix.wamr_test_option.mode }} -m ${{ matrix.target_config.target }} -b -Q -P -F ${{ steps.build_firmware.outputs.firmware }} ${{ matrix.wamr_feature_option.mode}}

.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@
99
*.obj
1010
*.a
1111
*.so
12+
.clangd
1213
.DS_Store
1314

1415
core/deps/**

build-scripts/config_common.cmake

+33
Original file line numberDiff line numberDiff line change
@@ -300,6 +300,10 @@ if (WAMR_BUILD_SIMD EQUAL 1)
300300
message (" SIMD disabled due to not supported on target RISCV64")
301301
endif ()
302302
endif ()
303+
if (WAMR_BUILD_AOT_STACK_FRAME EQUAL 1)
304+
add_definitions (-DWASM_ENABLE_AOT_STACK_FRAME=1)
305+
message (" AOT stack frame enabled")
306+
endif ()
303307
if (WAMR_BUILD_MEMORY_PROFILING EQUAL 1)
304308
add_definitions (-DWASM_ENABLE_MEMORY_PROFILING=1)
305309
message (" Memory profiling enabled")
@@ -329,6 +333,35 @@ if (WAMR_BUILD_REF_TYPES EQUAL 1)
329333
else ()
330334
message (" Reference types disabled")
331335
endif ()
336+
if (WAMR_BUILD_GC EQUAL 1)
337+
message (" GC enabled")
338+
if (WAMR_TEST_GC EQUAL 1)
339+
message(" GC testing enabled")
340+
endif()
341+
endif ()
342+
if (WAMR_BUILD_GC EQUAL 1 AND WAMR_BUILD_GC_PERF_PROFILING EQUAL 1)
343+
add_definitions (-DWASM_ENABLE_GC_PERF_PROFILING=1)
344+
message (" GC performance profiling enabled")
345+
else ()
346+
message (" GC performance profiling disabled")
347+
endif ()
348+
if (WAMR_BUILD_STRINGREF EQUAL 1)
349+
message (" Stringref enabled")
350+
if (NOT DEFINED WAMR_STRINGREF_IMPL_SOURCE)
351+
message (" Using WAMR builtin implementation for stringref")
352+
else ()
353+
message (" Using custom implementation for stringref")
354+
endif()
355+
endif ()
356+
if (WAMR_BUILD_PERF_PROFILING EQUAL 1 OR
357+
WAMR_BUILD_DUMP_CALL_STACK EQUAL 1 OR
358+
WAMR_BUILD_GC EQUAL 1)
359+
# Enable AOT/JIT stack frame when perf-profiling, dump-call-stack
360+
# or GC is enabled
361+
if (WAMR_BUILD_AOT EQUAL 1 OR WAMR_BUILD_JIT EQUAL 1)
362+
add_definitions (-DWASM_ENABLE_AOT_STACK_FRAME=1)
363+
endif ()
364+
endif ()
332365
if (WAMR_BUILD_EXCE_HANDLING EQUAL 1)
333366
add_definitions (-DWASM_ENABLE_EXCE_HANDLING=1)
334367
add_definitions (-DWASM_ENABLE_TAGS=1)

build-scripts/runtime_lib.cmake

+11
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,16 @@ if (WAMR_BUILD_AOT EQUAL 1)
7878
include (${IWASM_DIR}/aot/iwasm_aot.cmake)
7979
endif ()
8080

81+
if (WAMR_BUILD_STRINGREF EQUAL 1)
82+
set (WAMR_BUILD_GC 1)
83+
endif ()
84+
85+
if (WAMR_BUILD_GC EQUAL 1)
86+
include (${IWASM_DIR}/common/gc/iwasm_gc.cmake)
87+
# Enable the dependent feature if GC is enabled
88+
set (WAMR_BUILD_REF_TYPES 1)
89+
endif ()
90+
8191
if (WAMR_BUILD_APP_FRAMEWORK EQUAL 1)
8292
include (${APP_FRAMEWORK_DIR}/app_framework.cmake)
8393
include (${SHARED_DIR}/coap/lib_coap.cmake)
@@ -189,6 +199,7 @@ set (source_all
189199
${IWASM_AOT_SOURCE}
190200
${IWASM_COMPL_SOURCE}
191201
${IWASM_FAST_JIT_SOURCE}
202+
${IWASM_GC_SOURCE}
192203
${WASM_APP_LIB_SOURCE_ALL}
193204
${NATIVE_INTERFACE_SOURCE}
194205
${APP_MGR_SOURCE}

core/app-mgr/app-manager/module_wasm_app.c

+4
Original file line numberDiff line numberDiff line change
@@ -1230,8 +1230,12 @@ wasm_app_module_on_install_request_byte_arrive(uint8 ch, int request_total_size,
12301230
uint8 section_type = ch;
12311231
#if WASM_ENABLE_BULK_MEMORY == 0
12321232
uint8 section_type_max = SECTION_TYPE_DATA;
1233+
#else
1234+
#if WASM_ENABLE_STRINGREF != 0
1235+
uint8 section_type_max = SECTION_TYPE_STRINGREF;
12331236
#else
12341237
uint8 section_type_max = SECTION_TYPE_DATACOUNT;
1238+
#endif /* end of WASM_ENABLE_STRINGREF != 0 */
12351239
#endif
12361240
if (section_type <= section_type_max) {
12371241
wasm_section_t *new_section;

core/config.h

+45
Original file line numberDiff line numberDiff line change
@@ -305,6 +305,11 @@
305305
#define WASM_ENABLE_SIMD 0
306306
#endif
307307

308+
/* GC performance profiling */
309+
#ifndef WASM_ENABLE_GC_PERF_PROFILING
310+
#define WASM_ENABLE_GC_PERF_PROFILING 0
311+
#endif
312+
308313
/* Memory profiling */
309314
#ifndef WASM_ENABLE_MEMORY_PROFILING
310315
#define WASM_ENABLE_MEMORY_PROFILING 0
@@ -325,6 +330,11 @@
325330
#define WASM_ENABLE_DUMP_CALL_STACK 0
326331
#endif
327332

333+
/* AOT stack frame */
334+
#ifndef WASM_ENABLE_AOT_STACK_FRAME
335+
#define WASM_ENABLE_AOT_STACK_FRAME 0
336+
#endif
337+
328338
/* Heap verification */
329339
#ifndef BH_ENABLE_GC_VERIFY
330340
#define BH_ENABLE_GC_VERIFY 0
@@ -388,6 +398,13 @@
388398
#define APP_HEAP_SIZE_MIN (256)
389399
#define APP_HEAP_SIZE_MAX (512 * 1024 * 1024)
390400

401+
/* Default min/max gc heap size of each app */
402+
#ifndef GC_HEAP_SIZE_DEFAULT
403+
#define GC_HEAP_SIZE_DEFAULT (128 * 1024)
404+
#endif
405+
#define GC_HEAP_SIZE_MIN (4 * 1024)
406+
#define GC_HEAP_SIZE_MAX (1024 * 1024 * 1024)
407+
391408
/* Default wasm stack size of each app */
392409
#if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64)
393410
#define DEFAULT_WASM_STACK_SIZE (16 * 1024)
@@ -461,6 +478,30 @@
461478
#define WASM_ENABLE_REF_TYPES 0
462479
#endif
463480

481+
#ifndef WASM_ENABLE_GC
482+
#define WASM_ENABLE_GC 0
483+
#endif
484+
485+
#ifndef WASM_CONST_EXPR_STACK_SIZE
486+
#if WASM_ENABLE_GC != 0
487+
#define WASM_CONST_EXPR_STACK_SIZE 8
488+
#else
489+
#define WASM_CONST_EXPR_STACK_SIZE 4
490+
#endif
491+
#endif
492+
493+
#ifndef WASM_ENABLE_STRINGREF
494+
#define WASM_ENABLE_STRINGREF 0
495+
#endif
496+
497+
#ifndef GC_REFTYPE_MAP_SIZE_DEFAULT
498+
#define GC_REFTYPE_MAP_SIZE_DEFAULT 64
499+
#endif
500+
501+
#ifndef GC_RTTOBJ_MAP_SIZE_DEFAULT
502+
#define GC_RTTOBJ_MAP_SIZE_DEFAULT 64
503+
#endif
504+
464505
#ifndef WASM_ENABLE_EXCE_HANDLING
465506
#define WASM_ENABLE_EXCE_HANDLING 0
466507
#endif
@@ -525,4 +566,8 @@
525566
#define WASM_ENABLE_QUICK_AOT_ENTRY 1
526567
#endif
527568

569+
#ifndef WASM_TABLE_MAX_SIZE
570+
#define WASM_TABLE_MAX_SIZE 1024
571+
#endif
572+
528573
#endif /* end of _CONFIG_H_ */

0 commit comments

Comments
 (0)