Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
120 commits
Select commit Hold shift + click to select a range
80e2f3d
Refactor GC feature (#1956)
wenyongh Feb 16, 2023
776d10f
GC: Enable extern cases, fix build issues (#1965)
wenyongh Feb 16, 2023
de5b11c
GC: Implement opcode array.new_canon_data (#1968)
wenyongh Feb 17, 2023
e89db5c
Implement GC for fast interpreter (#1999)
wenyongh Mar 7, 2023
5d44ec5
Merge branch main into dev/gc_refactor
wenyongh Mar 9, 2023
30b57cb
Implement GC struct opcodes for fast interpreter (#2030)
kylo5aby Mar 15, 2023
5283c8a
Implement GC array opcodes for fast interpreter (#2031)
yviansu Mar 15, 2023
7ef782e
Enable gc reclaim in wasm_exec_env_create (#2043)
yviansu Mar 23, 2023
181d957
nuttx: Add compile role for GC (#2077)
no1wudi Mar 28, 2023
3d327e2
Merge branch main into dev/gc_refactor (#2114)
wenyongh Apr 7, 2023
2779598
Fix GC loader issue and refine call_indirect for interpreter (#2118)
wenyongh Apr 7, 2023
5399211
Merge branch 'main' into dev/gc_refactor
wenyongh Apr 7, 2023
786cf6a
Support GC opcodes generated by binaryen (#2110)
xujuntwt95329 Apr 10, 2023
74417d6
Define the GC runtime APIs to export (#2143)
wenyongh Apr 23, 2023
5cea277
[GC] Fix uint type and add macro for cpp in gc_export.h (#2160)
xujuntwt95329 Apr 27, 2023
0b9ed39
Fix type of gc_obj field in union WASMValue (#2177)
xujuntwt95329 May 5, 2023
2e5ba11
Implement part of GC runtime export APIs (#2154)
kylo5aby May 5, 2023
453bf2d
[GC] Add API to get obj defined type and call func ref (#2180)
xujuntwt95329 May 6, 2023
9bf0999
[GC] Remove unused normalize API (#2182)
xujuntwt95329 May 6, 2023
21e4bcb
Implement GC export APIs related to func and array (#2184)
xujuntwt95329 May 6, 2023
c6e1f64
Update comments in gc_export.h and optimize wasm ref type processing …
xujuntwt95329 May 8, 2023
496fbbd
Optimize get ref_type from ref_type_maps with wasm_reftype_map_find (…
yviansu May 8, 2023
02f0156
GC: Change table_elem_type_t to pointer width to simplify the related…
no1wudi May 9, 2023
8704532
Merge pull request #2191 from bytecodealliance/main
wenyongh May 9, 2023
24c0fbd
Fix GC compile errors (#2203)
wenyongh May 11, 2023
8021df9
Fix GC issues (#2204)
xujuntwt95329 May 12, 2023
13284e6
[GC] Add missing packed types in gc_export.h (#2210)
xujuntwt95329 May 15, 2023
ea3b828
Fix ref type equal check for the packed types (#2215)
kylo5aby May 15, 2023
035cca0
Add --enable-gc option to wamrc (#2190)
no1wudi May 15, 2023
e189dcb
GC AOT: Change func_types to types in AOTModule (#2217)
no1wudi May 17, 2023
190f690
GC AOT: Emit string with '\0' as terminator (#2221)
no1wudi May 18, 2023
9fd8480
[GC] Fix frame ref not cleared issue in classic and fast interpreter …
xujuntwt95329 May 30, 2023
366b3b7
Merge branch main into dev/gc_refactor
wenyongh Jun 5, 2023
f48ffbc
Fix fast interpreter spec test issue (#2265)
xujuntwt95329 Jun 6, 2023
d665999
GC: Make Func/Struct/Array type inherited from WASMType (#2271)
no1wudi Jun 7, 2023
edba40c
GC: Change type of `types` to AOTType in AOTModule and AOTCompData (#…
no1wudi Jun 8, 2023
6e76300
Specify wasm features supported by feature_flags (#2302)
no1wudi Jun 22, 2023
76faf89
Merge branch main into dev/gc_refactor
wenyongh Jun 27, 2023
254bbdd
Add GC finalizer mechanism (#2325)
xujuntwt95329 Jul 7, 2023
61b692e
Free extra_info_nodes during heap destroying (#2353)
xujuntwt95329 Jul 11, 2023
f906585
Fix drop opcode not clear frame ref issue (#2360)
xujuntwt95329 Jul 18, 2023
6a86817
Fix static code analyzing issues (#2371)
xujuntwt95329 Jul 20, 2023
803597d
Merge branch main into dev/gc_refactor
wenyongh Aug 7, 2023
9f3a65b
Fix inconsistences in marking slot for gc object (#2434)
kylo5aby Aug 8, 2023
fb8dbc1
Fix type checking for array.copy opcode (#2438)
xujuntwt95329 Aug 8, 2023
a051dd7
Fix several memory leak issues (#2445)
xujuntwt95329 Aug 11, 2023
48b9c8c
Process GC types in wasm_runtime_invoke_native_raw (#2456)
xujuntwt95329 Aug 14, 2023
2e8d2c4
Enable GC spec test on ubuntu (#2461)
no1wudi Aug 14, 2023
0bd23eb
Fix validation non-nullable locals (#2462)
xujuntwt95329 Aug 14, 2023
d77f979
Fix extra_info_nodes size (#2464)
xujuntwt95329 Aug 15, 2023
7d86111
Refactor the LLVM IR translation of the existing opcodes for GC AOT (…
TianlongLiang Aug 23, 2023
03155cf
Merge branch main into dev/gc_refactor
wenyongh Aug 23, 2023
27aea1c
Merge pull request #2501 from bytecodealliance/main
wenyongh Aug 23, 2023
98fa210
Fix parameter processing in wasm_runtime_call_wasm_a (#2505)
xujuntwt95329 Aug 25, 2023
33ac031
Enhance LLVM AOT/JIT stack frame dump (#2350)
wenyongh Aug 28, 2023
6de889b
Fix total free size calculation during reclaiming objects (#2510)
xujuntwt95329 Aug 29, 2023
7158e39
Merge branch 'main' into dev/aot_stack_frame
wenyongh Sep 4, 2023
6cacbc6
Merge pull request #2540 from bytecodealliance/main
wenyongh Sep 11, 2023
fd5862f
Enhance AOT stack frame dump (#2541)
wenyongh Sep 15, 2023
c1dc08a
Merge branch 'main' into dev/aot_stack_frame
wenyongh Sep 17, 2023
067a86a
Implement AOT file emitting and loading for GC (#2366)
no1wudi Sep 19, 2023
4b09e28
Add option for JIT stack frame and update documents (#2565)
wenyongh Sep 19, 2023
a9cac2e
AOT compiler: Implement part of GC opcode compilation (#2486)
TianlongLiang Sep 19, 2023
7a9ed07
Merge branch main into dev/aot_stack_frame
wenyongh Oct 8, 2023
85869ed
Merge branch main into dev/gc_refactor
wenyongh Oct 8, 2023
ac426ee
GC AOT: Fix compile warnings and errors (#2623)
wenyongh Oct 8, 2023
760505e
AOT compiler: Implement left of GC opcode compilation (#2487)
TianlongLiang Oct 8, 2023
ae508e2
Merge branch dev/aot_stack_frame into dev/gc_refactor
wenyongh Oct 9, 2023
40896eb
Restore AOT stack frame after call func to fix CI error
wenyongh Oct 9, 2023
872db7c
Make max table size configurable through macro (#2632)
xujuntwt95329 Oct 12, 2023
995817e
Init frame->sp and frame->ip at entry of call func in interpreter (#2…
xujuntwt95329 Oct 12, 2023
3a31e51
Fix GC AOT issues (#2640)
wenyongh Oct 16, 2023
01627ed
Fix issues in compile GC struct/array opcodes (#2652)
wenyongh Oct 19, 2023
54fc47e
Register GC symbols to AOT loader (#2654)
no1wudi Oct 19, 2023
06d46b0
Fix some GC relative issues (#2656)
no1wudi Oct 23, 2023
2f45f12
Support stringref proposal (#2651)
yviansu Oct 23, 2023
f863d27
Add cpp macro in string_object.h (#2660)
xujuntwt95329 Oct 23, 2023
3362738
Fix AOT loader for struct type (#2658)
no1wudi Oct 23, 2023
52328f0
Fix GC AOT struct/array/i31/exception issues (#2664)
wenyongh Oct 25, 2023
348d82b
Merge branch main into dev/gc_refactor
wenyongh Nov 3, 2023
f9ccffd
Fix struct field offset and size in AOT loader (#2729)
xujuntwt95329 Nov 8, 2023
6d92534
Add gc performance profiling (#2716)
WenLY1 Nov 8, 2023
64e40c1
Fix more GC AOT/JIT issues (#2727)
wenyongh Nov 9, 2023
b4406fa
Fix align when emitting struct type (#2742)
xujuntwt95329 Nov 10, 2023
f926301
Merge dupplicated compile options for wamrc (#2748)
no1wudi Nov 10, 2023
943274e
Fix GC struct field offset calculation in AOT compiler (#2746)
wenyongh Nov 13, 2023
5d9cbfe
Implement GC AOT object reclaim process (#2762)
wenyongh Nov 22, 2023
c4010b0
Fix GC AOT on 32bit target (#2814)
xujuntwt95329 Nov 23, 2023
77d27c9
Enable stringref aot (#2816)
xujuntwt95329 Nov 27, 2023
238208a
Refine the GC frame ref flag commit (#2822)
wenyongh Nov 27, 2023
9c71ca6
Merge branch main into dev/gc_refactor
wenyongh Nov 29, 2023
8e5ab79
Disable ems memory allocator heap corruption check when GC is enabled…
wenyongh Nov 29, 2023
92176be
Sync up with the latest GC MVP spec proposal (#2836)
xujuntwt95329 Dec 12, 2023
cf7350f
Implement aot_alloc_frame/aot_free_frame with LLVM IRs (#2830)
wenyongh Dec 12, 2023
eab09a2
Merge branch main into dev/gc_refactor
wenyongh Dec 12, 2023
837a319
Fix typo of WASM_ENABLE_SPEC_TEST macro in wasm_application.c (#2902)
no1wudi Dec 13, 2023
5db9c8f
Fix warnings of printf format string mismatch (#2903)
no1wudi Dec 13, 2023
8099e7e
nuttx/wamr.mk: Fix extraneous text after 'endif' directive (#2912)
no1wudi Dec 20, 2023
c898d3a
Enable string literal section for app-manager (#2904)
xujuntwt95329 Dec 21, 2023
7de3170
Emit SIMD flag to AOT file only if SIMD is actually used (#2911)
no1wudi Dec 25, 2023
1d43fda
Enable GC spectest for NuttX (#2896)
no1wudi Dec 26, 2023
a210b97
Fix some typos and unify the AOT file format for init data (#2915)
TianlongLiang Dec 27, 2023
e6d210a
Merge branch main into dev/gc_refactor
wenyongh Jan 3, 2024
cc23a09
Fix test script error and related wamrc and GC issues (#2975)
wenyongh Jan 8, 2024
d31455f
Refactor aot stack frame commit (#2976)
wenyongh Jan 8, 2024
ad57ffb
Enable non-GC spec test again on NuttX (#2986)
no1wudi Jan 9, 2024
e7bbf88
Refine the format of call stack dump (#2996)
wenyongh Jan 11, 2024
a74839a
Don't commit params/locals ref flags in AOT code (#2990)
TianlongLiang Jan 12, 2024
6440445
Merge branch main into dev/gc_refactor
wenyongh Jan 12, 2024
4f0551a
Enable quick aot entry when GC is enabled (#3015)
wenyongh Jan 18, 2024
7c812ec
Enhance aot feature flags emit and load (#3048)
wenyongh Jan 23, 2024
e70c521
Merge branch main into dev/gc_refactor
wenyongh Jan 26, 2024
71b6bdf
Merge branch main into dev/gc_refactor
wenyongh Feb 2, 2024
dcde455
Add wasm_runtime_get_cur_local_obj_ref and change API names (#3117)
LevelCA Feb 4, 2024
004b913
Merge branch main into dev/gc_refactor
wenyongh Feb 4, 2024
bae036f
addr2line.py: A tool to convert the addr in call-stack dump to the li…
lum1n0us Feb 5, 2024
2f6e4b9
Merge branch main into dev/gc_refactor
wenyongh Feb 5, 2024
9bdd349
Fix read and validation of GC sub opcode (#3134)
wenyongh Feb 5, 2024
51eaf80
Remove JIT_STACK_FRAME macro (#3127)
wenyongh Feb 5, 2024
60c51e5
Merge branch main into dev/gc_refactor
wenyongh Feb 6, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
44 changes: 39 additions & 5 deletions .github/workflows/compilation_on_android_ubuntu.yml
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,8 @@ env:
THREADS_TEST_OPTIONS: "-s spec -b -p -P"
X86_32_TARGET_TEST_OPTIONS: "-m x86_32 -P"
WASI_TEST_OPTIONS: "-s wasi_certification -w"
WAMR_COMPILER_TEST_OPTIONS: "-s wamr_compiler -b -P"
WAMR_COMPILER_TEST_OPTIONS: "-s wamr_compiler -S -b -P"
GC_TEST_OPTIONS: "-s spec -G -b -P"

jobs:
build_llvm_libraries_on_ubuntu_2204:
Expand Down Expand Up @@ -484,6 +485,7 @@ jobs:
$SIMD_TEST_OPTIONS,
$THREADS_TEST_OPTIONS,
$WASI_TEST_OPTIONS,
$GC_TEST_OPTIONS,
]
wasi_sdk_release:
[
Expand Down Expand Up @@ -517,10 +519,25 @@ jobs:
test_option: $MULTI_MODULES_TEST_OPTIONS
- running_mode: "multi-tier-jit"
test_option: $SIMD_TEST_OPTIONS
# fast-jit and multi-tier-jit don't support GC
- running_mode: "fast-jit"
test_option: $GC_TEST_OPTIONS
- running_mode: "multi-tier-jit"
test_option: $GC_TEST_OPTIONS
steps:
- name: checkout
uses: actions/checkout@v4

- name: Set-up OCaml
uses: ocaml/setup-ocaml@v2
if: matrix.test_option == '$GC_TEST_OPTIONS'
with:
ocaml-compiler: 4.13

- name: Set-up Ocamlbuild
if: matrix.test_option == '$GC_TEST_OPTIONS'
run: opam install ocamlbuild dune

- name: download and install wasi-sdk
if: matrix.test_option == '$WASI_TEST_OPTIONS'
run: |
Expand All @@ -545,9 +562,9 @@ jobs:

- name: set env variable(if x86_32 test needed)
if: >
(matrix.test_option == '$DEFAULT_TEST_OPTIONS' || matrix.test_option == '$THREADS_TEST_OPTIONS'
|| matrix.test_option == '$WASI_TEST_OPTIONS')
&& matrix.running_mode != 'fast-jit' && matrix.running_mode != 'jit' && matrix.running_mode != 'multi-tier-jit'
((matrix.test_option == '$DEFAULT_TEST_OPTIONS' || matrix.test_option == '$THREADS_TEST_OPTIONS'
|| matrix.test_option == '$WASI_TEST_OPTIONS' || matrix.test_option == '$GC_TEST_OPTIONS')
&& matrix.running_mode != 'fast-jit' && matrix.running_mode != 'jit' && matrix.running_mode != 'multi-tier-jit')
run: echo "TEST_ON_X86_32=true" >> $GITHUB_ENV

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

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

- name: run gc tests
timeout-minutes: 20
if: matrix.test_option == '$GC_TEST_OPTIONS'
run: |
eval $(opam env)
./test_wamr.sh ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
working-directory: ./tests/wamr-test-suites

#only install x32 support libraries when to run x86_32 cases
- name: install x32 support libraries
if: env.TEST_ON_X86_32 == 'true'
Expand All @@ -600,10 +626,18 @@ jobs:

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

- name: run gc tests x86_32
timeout-minutes: 20
if: env.TEST_ON_X86_32 == 'true' && matrix.test_option == '$GC_TEST_OPTIONS'
run: |
eval $(opam env)
./test_wamr.sh ${{ env.X86_32_TARGET_TEST_OPTIONS }} ${{ matrix.test_option }} -t ${{ matrix.running_mode }}
working-directory: ./tests/wamr-test-suites

test-wamr-ide:
needs:
[
Expand Down
3 changes: 2 additions & 1 deletion .github/workflows/compilation_on_sgx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,8 @@ concurrency:
cancel-in-progress: true

env:
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"
# ref types enabled in wamrc by default, so we need to enable it for iwasm in AOT mode
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"
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"
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"
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"
Expand Down
67 changes: 50 additions & 17 deletions .github/workflows/spec_test_on_nuttx.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,13 @@ on:
- synchronize
paths:
- ".github/workflows/spec_test_on_nuttx.yml"

- "core/**"
- "!core/deps/**"
- "product-mini/**"
- "!samples/workload/**"
- "tests/wamr-test-suites/**"
- "wamr-compiler/**"
- "wamr-sdk/**"
schedule:
- cron: '0 0 * * *'

Expand All @@ -20,21 +26,21 @@ env:
LLVM_CACHE_SUFFIX: "build-llvm_libraries_ex"
WASI_SDK_PATH: "/opt/wasi-sdk"
WAMR_COMMON_OPTION:
"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"
"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"

jobs:
build_llvm_libraries:
uses: ./.github/workflows/build_llvm_libraries.yml
with:
os: "ubuntu-22.04"
arch: "ARM RISCV AArch64"
container_image: ghcr.io/apache/nuttx/apache-nuttx-ci-linux@sha256:d9261eacf6c6ebe656c571757751c803e8f04c3ae9b820320a5ea5dd57b7205a
container_image: ghcr.io/no1wudi/nuttx/apache-nuttx-ci-linux@sha256:8c4e00b607d4d6d66ba8f51c4544819a616eac69d3a2ac669e2af2150e2eb0f9

spec_test_on_qemu:
runs-on: ubuntu-latest
needs: [build_llvm_libraries]
container:
image: ghcr.io/apache/nuttx/apache-nuttx-ci-linux@sha256:d9261eacf6c6ebe656c571757751c803e8f04c3ae9b820320a5ea5dd57b7205a
image: ghcr.io/no1wudi/nuttx/apache-nuttx-ci-linux@sha256:8c4e00b607d4d6d66ba8f51c4544819a616eac69d3a2ac669e2af2150e2eb0f9
strategy:
matrix:
target_config: [
Expand Down Expand Up @@ -75,20 +81,25 @@ jobs:
mode: "-t aot",
option: "CONFIG_INTERPRETERS_WAMR_AOT=y\\n"
},
{
mode: "-t aot -X",
option: "CONFIG_INTERPRETERS_WAMR_AOT=y\\n"
},
{
mode: "-t classic-interp",
option: "CONFIG_INTERPRETERS_WAMR_CLASSIC=y\\n"
},
{
mode: "-t fast-interp",
option: "CONFIG_INTERPRETERS_WAMR_FAST=y\\n"
},
# {
# mode: "-t aot -X",
# option: "CONFIG_INTERPRETERS_WAMR_AOT=y\\n"
# },
# {
# mode: "-t classic-interp",
# option: "CONFIG_INTERPRETERS_WAMR_CLASSIC=y\\n"
# },
# {
# mode: "-t fast-interp",
# option: "CONFIG_INTERPRETERS_WAMR_FAST=y\\n"
# },
]

wamr_feature_option:
# Empty option for default
- { option: "", mode: "" }
- { option: "CONFIG_INTERPRETERS_WAMR_GC=y\\nCONFIG_INTERPRETERS_WAMR_AOT_STACK_FRAME=y\\n", mode: "-G" }

exclude:
# XIP is not fully supported yet on RISCV64, some relocations can not be resolved
- target_config: { config: "boards/risc-v/qemu-rv/rv-virt/configs/nsh64" }
Expand Down Expand Up @@ -136,6 +147,23 @@ jobs:
if: contains(matrix.wamr_test_option.mode, 'aot')
run: cp -r core/deps/llvm apps/interpreters/wamr/wamr/core/deps/llvm

# Inject the config option to NuttX
# TODO: Merge this into NuttX once GC is generally available
- name: Modify Kconfig
run: |
echo "\n" >> apps/interpreters/wamr/Kconfig
echo "config INTERPRETERS_WAMR_GC" >> apps/interpreters/wamr/Kconfig
echo "\tbool \"Enable GC\"" >> apps/interpreters/wamr/Kconfig
echo "\tdefault n" >> apps/interpreters/wamr/Kconfig
echo "\n" >> apps/interpreters/wamr/Kconfig
echo "config INTERPRETERS_WAMR_AOT_STACK_FRAME" >> apps/interpreters/wamr/Kconfig
echo "\tbool \"Enable AOT stack frame\"" >> apps/interpreters/wamr/Kconfig
echo "\tdefault n" >> apps/interpreters/wamr/Kconfig
echo "\n" >> apps/interpreters/wamr/Kconfig
echo "config INTERPRETERS_WAMR_TAIL_CALL" >> apps/interpreters/wamr/Kconfig
echo "\tbool \"Enable Tail Call\"" >> apps/interpreters/wamr/Kconfig
echo "\tdefault y" >> apps/interpreters/wamr/Kconfig

- name: Enable WAMR for NuttX
run: |
find nuttx/boards -name defconfig | xargs sed -i '$a\${{ env.WAMR_COMMON_OPTION }}'
Expand All @@ -144,6 +172,11 @@ jobs:
run: |
find nuttx/boards -name defconfig | xargs sed -i '$a\${{ matrix.wamr_test_option.option }}'

- name: Enable WAMR Feature for NuttX
if: matrix.wamr_feature_option.option != ''
run: |
find nuttx/boards -name defconfig | xargs sed -i '$a\${{ matrix.wamr_feature_option.option }}'

- name: Disable FPU for NuttX
if: matrix.target_config.fpu_type == 'none'
run: |
Expand Down Expand Up @@ -172,4 +205,4 @@ jobs:
- name: Test
run: |
cd apps/interpreters/wamr/wamr/tests/wamr-test-suites
./test_wamr.sh -s spec ${{ matrix.wamr_test_option.mode }} -m ${{ matrix.target_config.target }} -b -Q -P -F ${{ steps.build_firmware.outputs.firmware }}
./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}}
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
*.obj
*.a
*.so
.clangd
.DS_Store

core/deps/**
Expand Down
33 changes: 33 additions & 0 deletions build-scripts/config_common.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -300,6 +300,10 @@ if (WAMR_BUILD_SIMD EQUAL 1)
message (" SIMD disabled due to not supported on target RISCV64")
endif ()
endif ()
if (WAMR_BUILD_AOT_STACK_FRAME EQUAL 1)
add_definitions (-DWASM_ENABLE_AOT_STACK_FRAME=1)
message (" AOT stack frame enabled")
endif ()
if (WAMR_BUILD_MEMORY_PROFILING EQUAL 1)
add_definitions (-DWASM_ENABLE_MEMORY_PROFILING=1)
message (" Memory profiling enabled")
Expand Down Expand Up @@ -329,6 +333,35 @@ if (WAMR_BUILD_REF_TYPES EQUAL 1)
else ()
message (" Reference types disabled")
endif ()
if (WAMR_BUILD_GC EQUAL 1)
message (" GC enabled")
if (WAMR_TEST_GC EQUAL 1)
message(" GC testing enabled")
endif()
endif ()
if (WAMR_BUILD_GC EQUAL 1 AND WAMR_BUILD_GC_PERF_PROFILING EQUAL 1)
add_definitions (-DWASM_ENABLE_GC_PERF_PROFILING=1)
message (" GC performance profiling enabled")
else ()
message (" GC performance profiling disabled")
endif ()
if (WAMR_BUILD_STRINGREF EQUAL 1)
message (" Stringref enabled")
if (NOT DEFINED WAMR_STRINGREF_IMPL_SOURCE)
message (" Using WAMR builtin implementation for stringref")
else ()
message (" Using custom implementation for stringref")
endif()
endif ()
if (WAMR_BUILD_PERF_PROFILING EQUAL 1 OR
WAMR_BUILD_DUMP_CALL_STACK EQUAL 1 OR
WAMR_BUILD_GC EQUAL 1)
# Enable AOT/JIT stack frame when perf-profiling, dump-call-stack
# or GC is enabled
if (WAMR_BUILD_AOT EQUAL 1 OR WAMR_BUILD_JIT EQUAL 1)
add_definitions (-DWASM_ENABLE_AOT_STACK_FRAME=1)
endif ()
endif ()
if (WAMR_BUILD_EXCE_HANDLING EQUAL 1)
add_definitions (-DWASM_ENABLE_EXCE_HANDLING=1)
add_definitions (-DWASM_ENABLE_TAGS=1)
Expand Down
11 changes: 11 additions & 0 deletions build-scripts/runtime_lib.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,16 @@ if (WAMR_BUILD_AOT EQUAL 1)
include (${IWASM_DIR}/aot/iwasm_aot.cmake)
endif ()

if (WAMR_BUILD_STRINGREF EQUAL 1)
set (WAMR_BUILD_GC 1)
endif ()

if (WAMR_BUILD_GC EQUAL 1)
include (${IWASM_DIR}/common/gc/iwasm_gc.cmake)
# Enable the dependent feature if GC is enabled
set (WAMR_BUILD_REF_TYPES 1)
endif ()

if (WAMR_BUILD_APP_FRAMEWORK EQUAL 1)
include (${APP_FRAMEWORK_DIR}/app_framework.cmake)
include (${SHARED_DIR}/coap/lib_coap.cmake)
Expand Down Expand Up @@ -189,6 +199,7 @@ set (source_all
${IWASM_AOT_SOURCE}
${IWASM_COMPL_SOURCE}
${IWASM_FAST_JIT_SOURCE}
${IWASM_GC_SOURCE}
${WASM_APP_LIB_SOURCE_ALL}
${NATIVE_INTERFACE_SOURCE}
${APP_MGR_SOURCE}
Expand Down
4 changes: 4 additions & 0 deletions core/app-mgr/app-manager/module_wasm_app.c
Original file line number Diff line number Diff line change
Expand Up @@ -1230,8 +1230,12 @@ wasm_app_module_on_install_request_byte_arrive(uint8 ch, int request_total_size,
uint8 section_type = ch;
#if WASM_ENABLE_BULK_MEMORY == 0
uint8 section_type_max = SECTION_TYPE_DATA;
#else
#if WASM_ENABLE_STRINGREF != 0
uint8 section_type_max = SECTION_TYPE_STRINGREF;
#else
uint8 section_type_max = SECTION_TYPE_DATACOUNT;
#endif /* end of WASM_ENABLE_STRINGREF != 0 */
#endif
if (section_type <= section_type_max) {
wasm_section_t *new_section;
Expand Down
45 changes: 45 additions & 0 deletions core/config.h
Original file line number Diff line number Diff line change
Expand Up @@ -305,6 +305,11 @@
#define WASM_ENABLE_SIMD 0
#endif

/* GC performance profiling */
#ifndef WASM_ENABLE_GC_PERF_PROFILING
#define WASM_ENABLE_GC_PERF_PROFILING 0
#endif

/* Memory profiling */
#ifndef WASM_ENABLE_MEMORY_PROFILING
#define WASM_ENABLE_MEMORY_PROFILING 0
Expand All @@ -325,6 +330,11 @@
#define WASM_ENABLE_DUMP_CALL_STACK 0
#endif

/* AOT stack frame */
#ifndef WASM_ENABLE_AOT_STACK_FRAME
#define WASM_ENABLE_AOT_STACK_FRAME 0
#endif

/* Heap verification */
#ifndef BH_ENABLE_GC_VERIFY
#define BH_ENABLE_GC_VERIFY 0
Expand Down Expand Up @@ -388,6 +398,13 @@
#define APP_HEAP_SIZE_MIN (256)
#define APP_HEAP_SIZE_MAX (512 * 1024 * 1024)

/* Default min/max gc heap size of each app */
#ifndef GC_HEAP_SIZE_DEFAULT
#define GC_HEAP_SIZE_DEFAULT (128 * 1024)
#endif
#define GC_HEAP_SIZE_MIN (4 * 1024)
#define GC_HEAP_SIZE_MAX (1024 * 1024 * 1024)

/* Default wasm stack size of each app */
#if defined(BUILD_TARGET_X86_64) || defined(BUILD_TARGET_AMD_64)
#define DEFAULT_WASM_STACK_SIZE (16 * 1024)
Expand Down Expand Up @@ -461,6 +478,30 @@
#define WASM_ENABLE_REF_TYPES 0
#endif

#ifndef WASM_ENABLE_GC
#define WASM_ENABLE_GC 0
#endif

#ifndef WASM_CONST_EXPR_STACK_SIZE
#if WASM_ENABLE_GC != 0
#define WASM_CONST_EXPR_STACK_SIZE 8
#else
#define WASM_CONST_EXPR_STACK_SIZE 4
#endif
#endif

#ifndef WASM_ENABLE_STRINGREF
#define WASM_ENABLE_STRINGREF 0
#endif

#ifndef GC_REFTYPE_MAP_SIZE_DEFAULT
#define GC_REFTYPE_MAP_SIZE_DEFAULT 64
#endif

#ifndef GC_RTTOBJ_MAP_SIZE_DEFAULT
#define GC_RTTOBJ_MAP_SIZE_DEFAULT 64
#endif

#ifndef WASM_ENABLE_EXCE_HANDLING
#define WASM_ENABLE_EXCE_HANDLING 0
#endif
Expand Down Expand Up @@ -525,4 +566,8 @@
#define WASM_ENABLE_QUICK_AOT_ENTRY 1
#endif

#ifndef WASM_TABLE_MAX_SIZE
#define WASM_TABLE_MAX_SIZE 1024
#endif

#endif /* end of _CONFIG_H_ */
Loading