Fix tests for Cosmopolitan

extensions
Volodymyr Shymanskyy 3 years ago
parent 0b09a792d6
commit c612a9d471

@ -215,6 +215,22 @@ jobs:
run: |
cd platforms/android
./gradlew build
build-cosmopolitan:
name: cosmopolitan
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Build αcτµαlly pδrταblε εxεcµταblε
run: |
cd platforms/cosmopolitan
./build.sh
- name: Test WebAssembly spec
run: |
cd test
python3 run-spec-test.py --exec "../platforms/cosmopolitan/wasm3.com --repl"
build-cross-qemu:
runs-on: ubuntu-latest

@ -1 +1,2 @@
cosmopolitan/
wasm3.com

@ -3,7 +3,7 @@ COSMOPOLITAN_URL=https://justine.lol/cosmopolitan/cosmopolitan.zip
SOURCE_DIR=../../source
EXTRA_FLAGS= #-Dd_m3HasWASI
EXTRA_FLAGS="-Dd_m3PreferStaticAlloc" #-Dd_m3HasWASI
STD=./cosmopolitan/std

@ -376,7 +376,11 @@ M3Result EvaluateExpression (IM3Module i_module, void * o_expressed, u8 i_type
M3Result result = m3Err_none;
// create a temporary runtime context
#if defined(d_m3PreferStaticAlloc)
static M3Runtime runtime;
#else
M3Runtime runtime;
#endif
M3_INIT (runtime);
runtime.environment = i_module->runtime->environment;

@ -264,8 +264,13 @@ M3Result Parse_InitExpr (M3Module * io_module, bytes_t * io_bytes, cbytes_t i_
M3Result result = m3Err_none;
// this doesn't generate code pages. just walks the wasm bytecode to find the end
IM3Runtime rt;
M3Compilation compilation = { rt= NULL, io_module, * io_bytes, i_end };
#if defined(d_m3PreferStaticAlloc)
static M3Compilation compilation;
#else
M3Compilation compilation;
#endif
compilation = (M3Compilation){ NULL, io_module, * io_bytes, i_end };
result = Compile_BlockStatements (& compilation);

Loading…
Cancel
Save