diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 9c2e066e32..50e03768cf 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -170,21 +170,7 @@ jobs: run: | set -ex source $HOME/ext/emsdk/emsdk_env.sh # Activate Emscripten - ./build0.sh - emcmake cmake . -GNinja \ - -DCMAKE_BUILD_TYPE=Debug \ - -DCMAKE_CXX_FLAGS_DEBUG="-Wall -Wextra -fexceptions" \ - -DWITH_LLVM=no \ - -DLPYTHON_BUILD_TO_WASM=yes \ - -DLFORTRAN_BUILD_ALL=yes \ - -DWITH_STACKTRACE=no \ - -DWITH_RUNTIME_STACKTRACE=no \ - -DCMAKE_PREFIX_PATH="$CONDA_PREFIX" \ - -DCMAKE_INSTALL_PREFIX=`pwd`/inst \ - -DCMAKE_C_COMPILER_LAUNCHER=sccache \ - -DCMAKE_CXX_COMPILER_LAUNCHER=sccache - - cmake --build . -j16 --target install + ./build_to_wasm.sh - name: Test built lpython.wasm shell: bash -l {0} diff --git a/.gitignore b/.gitignore index a96d3ff80c..85bac5da5a 100644 --- a/.gitignore +++ b/.gitignore @@ -175,6 +175,7 @@ output *.smod *.js *.wasm +*.data /.ccls-cache/ .cache/ ext/ diff --git a/build_to_wasm.sh b/build_to_wasm.sh index 6eb3b49cf1..dc8f1e1435 100755 --- a/build_to_wasm.sh +++ b/build_to_wasm.sh @@ -3,6 +3,11 @@ set -e set -x +mkdir -p src/bin/asset_dir +cp src/runtime/*.py src/bin/asset_dir +cp -r src/runtime/lpython src/bin/asset_dir + +./build0.sh emcmake cmake \ -DCMAKE_BUILD_TYPE=Debug \ -DCMAKE_CXX_FLAGS_DEBUG="-Wall -Wextra -fexceptions" \ diff --git a/integration_tests/CMakeLists.txt b/integration_tests/CMakeLists.txt index 15d136dfb8..2b2eab778e 100644 --- a/integration_tests/CMakeLists.txt +++ b/integration_tests/CMakeLists.txt @@ -495,6 +495,7 @@ RUN(NAME expr_20 LABELS cpython llvm c) RUN(NAME expr_21 LABELS cpython llvm c) RUN(NAME expr_22 LABELS cpython llvm c) RUN(NAME expr_23 LABELS cpython llvm c) +RUN(NAME expr_24 LABELS cpython wasm) # mandelbrot RUN(NAME expr_01u LABELS cpython llvm c NOFAST) RUN(NAME expr_02u LABELS cpython llvm c NOFAST) diff --git a/integration_tests/expr_24.py b/integration_tests/expr_24.py new file mode 100644 index 0000000000..a616e2cc33 --- /dev/null +++ b/integration_tests/expr_24.py @@ -0,0 +1,77 @@ +from lpython import i32, f64, TypeVar, Const +from numpy import empty, int32 + +h = TypeVar("h") +w = TypeVar("w") + +def show_img(w: i32, h: i32, A: i32[h, w]): + print(w, h) + print(A[0, 0]) + print(A[h - 1, w - 1]) + + assert w == 600 + assert h == 450 + assert A[0, 0] == 254 + assert A[h - 1, w - 1] == 254 + +def show_img_color(w: i32, h: i32, A: i32[h, w, 4]): + print(w, h) + print(A[0, 0, 0]) + print(A[h - 1, w - 1, 3]) + + assert w == 600 + assert h == 450 + assert A[0, 0, 0] == 214 + assert A[h - 1, w - 1, 3] == 255 + +def main0(): + Nx: Const[i32] = 600; Ny: Const[i32] = 450; Nz: Const[i32] = 4; n_max: i32 = 255 + + xcenter: f64 = f64(-0.5); ycenter: f64 = f64(0.0) + width: f64 = f64(4); height: f64 = f64(3) + dx_di: f64 = width/f64(Nx); dy_dj: f64 = -height/f64(Ny) + x_offset: f64 = xcenter - f64(Nx+1)*dx_di/f64(2.0) + y_offset: f64 = ycenter - f64(Ny+1)*dy_dj/f64(2.0) + + i: i32; j: i32; n: i32; idx: i32 + x: f64; y: f64; x_0: f64; y_0: f64; x_sqr: f64; y_sqr: f64 + + image: i32[450, 600] = empty([Ny, Nx], dtype=int32) + image_color: i32[450, 600, 4] = empty([Ny, Nx, Nz], dtype=int32) + palette: i32[4, 3] = empty([4, 3], dtype=int32) + + for j in range(Ny): + y_0 = y_offset + dy_dj * f64(j + 1) + for i in range(Nx): + x_0 = x_offset + dx_di * f64(i + 1) + x = 0.0; y = 0.0; n = 0 + while(True): + x_sqr = x ** 2.0 + y_sqr = y ** 2.0 + if (x_sqr + y_sqr > f64(4) or n == n_max): + image[j,i] = 255 - n + break + y = y_0 + f64(2.0) * x * y + x = x_0 + x_sqr - y_sqr + n = n + 1 + + palette[0,0] = 0; palette[0,1] = 135; palette[0,2] = 68 + palette[1,0] = 0; palette[1,1] = 87; palette[1,2] = 231 + palette[2,0] = 214; palette[2,1] = 45; palette[2,2] = 32 + palette[3,0] = 255; palette[3,1] = 167; palette[3,2] = 0 + + for j in range(Ny): + for i in range(Nx): + idx = image[j,i] - i32(image[j,i]/4)*4 + image_color[j,i,0] = palette[idx,0] # Red + image_color[j,i,1] = palette[idx,1] # Green + image_color[j,i,2] = palette[idx,2] # Blue + image_color[j,i,3] = 255 # Alpha + + print("The Mandelbrot image in color:") + show_img_color(Nx, Ny, image_color) + print("The Mandelbrot image in grayscale:") + show_img(Nx, Ny, image) + print("Done.") + +main0() diff --git a/src/bin/CMakeLists.txt b/src/bin/CMakeLists.txt index ba670e6037..6d51014d56 100644 --- a/src/bin/CMakeLists.txt +++ b/src/bin/CMakeLists.txt @@ -48,29 +48,24 @@ set_target_properties(lpython PROPERTIES ) if (HAVE_BUILD_TO_WASM) - # set(WASM_LINK_FLAGS - # "-g0" # Store no debugging information in the generated wasm file. This helps reduce generated file size - # "-Oz" # Optimize for size. With this code size ~ 2.4mb. Without this code size ~49mb - # "-fexceptions" # Enable Cpp exception support - # "--no-entry" # No start function to execute - # "-s ASSERTIONS" # Compile with Assertions which (as per docs) are helpful to debug compilation process - # "-s ALLOW_MEMORY_GROWTH" # Allow dynamic memory growth upto the maximum page size limit - # "-s WASM_BIGINT" # Allow use of i64 integers. ASR is needing this option to be enabled. - # "-s EXPORTED_RUNTIME_METHODS=['cwrap']" # Export cwarp. cwarp helps us to call our EMSCRIPTEN_KEEPALIVE functions - # ) - - # Some extra flags below that we may need in future. But these may/might increase the code size - # "--preload-file ./asset_dir" - # "-s SAFE_HEAP=1" - # "-s \"EXPORTED_RUNTIME_METHODS=['ccall']\"" - # "-s EXPORTED_FUNCTIONS=\"['_free', '_malloc']\"" + # "-g0": Store no debugging information in the generated wasm file. This helps reduce generated file size + # "-Oz": Optimize for size. With this code size ~ 2.4mb. Without this code size ~49mb + # "-fexceptions": Enable Cpp exception support + # "--no-entry": No start function to execute + # "-s ASSERTIONS": Compile with Assertions which (as per docs) are helpful to debug compilation process + # "-s ALLOW_MEMORY_GROWTH": Allow dynamic memory growth upto the maximum page size limit + # "-s WASM_BIGINT": Allow use of i64 integers. ASR is needing this option to be enabled. + # "-s EXPORTED_RUNTIME_METHODS=['cwrap']": Export cwarp. cwarp helps us to call our EMSCRIPTEN_KEEPALIVE functions + # "-fsanitize=undefined": Clang's Undefined Behaviour Sanitizer. The LPython parser segfaults. + # This option is for debugging, but currently helps avoid the segfault in the parser. + # "-s INITIAL_MEMORY=536870912": Start the wasm linear memory with sufficiently large size 512Mb. # Notes: # STANDALONE_WASM is disabling support for exceptions, so it is currently omitted # In build_to_wasm.sh, we need CMAKE_CXX_FLAGS_DEBUG="-Wall -Wextra -fexceptions" flags for exception support - set(WASM_COMPILE_FLAGS "-g0 -fexceptions") + set(WASM_COMPILE_FLAGS "-g0 -fexceptions -fsanitize=undefined") set(WASM_LINK_FLAGS - "-g0 -Oz -fexceptions -Wall -Wextra --no-entry -s ASSERTIONS -s ALLOW_MEMORY_GROWTH=1 -s WASM_BIGINT -s \"EXPORTED_RUNTIME_METHODS=['cwrap']\"" + "-g0 -Oz -fexceptions -fsanitize=undefined --preload-file asset_dir -Wall -Wextra --no-entry -sASSERTIONS=1 -s INITIAL_MEMORY=536870912 -s ALLOW_MEMORY_GROWTH=1 -s WASM_BIGINT -s \"EXPORTED_RUNTIME_METHODS=['cwrap']\"" ) set_target_properties(lpython PROPERTIES COMPILE_FLAGS ${WASM_COMPILE_FLAGS}) set_target_properties(lpython PROPERTIES LINK_FLAGS ${WASM_LINK_FLAGS}) diff --git a/src/libasr/ASR.asdl b/src/libasr/ASR.asdl index 0089cc8a54..ce38aee9c6 100644 --- a/src/libasr/ASR.asdl +++ b/src/libasr/ASR.asdl @@ -147,6 +147,10 @@ presence = Required | Optional -- LPython manages the conversion of arguments to be passed to such symbols -- and also converts the return values from such symbols. +-- abi=BindJS: the symbol's implementation is +-- available with Javascript. +-- This abi type is to be mainly used with the WASM Backend. + -- abi=Interactive: the symbol's implementation has been provided by the -- previous REPL execution (e.g., if LLVM backend is used for the interactive -- mode, the previous execution generated machine code for this symbol's @@ -164,6 +168,7 @@ abi -- External ABI | GFortranModule -- Yes GFortran | BindC -- Yes C | BindPython -- Yes Python + | BindJS -- Yes Javascript | Interactive -- Yes Unspecified | Intrinsic -- Yes Unspecified diff --git a/src/libasr/codegen/asr_to_wasm.cpp b/src/libasr/codegen/asr_to_wasm.cpp index 015f071db6..e6bd2567e7 100644 --- a/src/libasr/codegen/asr_to_wasm.cpp +++ b/src/libasr/codegen/asr_to_wasm.cpp @@ -142,8 +142,8 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { main_func = nullptr; avail_mem_loc = 0; - min_no_pages = 100; // fixed 6.4 Mb memory currently - max_no_pages = 100; // fixed 6.4 Mb memory currently + min_no_pages = 1000; // fixed 64 Mb memory currently + max_no_pages = 1000; // fixed 64 Mb memory currently m_compiler_globals.resize(GLOBAL_VARS_CNT); m_import_func_idx_map.resize(IMPORT_FUNCS_CNT); @@ -160,10 +160,7 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { } void import_function(ASR::Function_t* fn) { - if (ASRUtils::get_FunctionType(fn)->m_abi != ASR::abiType::BindC) return; - if (ASRUtils::get_FunctionType(fn)->m_deftype != ASR::deftypeType::Interface) return; - if (ASRUtils::get_FunctionType(fn)->m_abi != ASR::abiType::BindC) return; - if (ASRUtils::is_intrinsic_function2(fn)) return; + if (ASRUtils::get_FunctionType(fn)->m_abi != ASR::abiType::BindJS) return; emit_function_prototype(*fn); m_wa.emit_import_fn("js", fn->m_name, @@ -189,6 +186,14 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { import_function(fn); } } + } else if (ASR::is_a(*item.second)) { + ASR::Module_t *m = ASR::down_cast(item.second); + for (auto &item : m->m_symtab->get_scope()) { + if (ASR::is_a(*item.second)) { + ASR::Function_t *fn = ASR::down_cast(item.second); + import_function(fn); + } + } } else if (ASR::is_a(*item.second)) { ASR::Function_t *fn = ASR::down_cast(item.second); import_function(fn); @@ -1152,13 +1157,12 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { bool is_unsupported_function(const ASR::Function_t &x) { if (strcmp(x.m_name, "_start") == 0) return false; - if (ASRUtils::get_FunctionType(x)->m_abi == ASR::abiType::BindC && - ASRUtils::get_FunctionType(x)->m_deftype == ASR::deftypeType::Interface) { - if (ASRUtils::is_intrinsic_function2(&x)) { - diag.codegen_warning_label( - "WASM: C Intrinsic Functions not yet supported", - {x.base.base.loc}, std::string(x.m_name)); - } + if (ASRUtils::get_FunctionType(x)->m_abi == ASR::abiType::BindJS) { + return true; + } + + if (ASRUtils::get_FunctionType(x)->m_abi == ASR::abiType::BindC) { + // Skip C Intrinsic Functions return true; } for (size_t i = 0; i < x.n_body; i++) { @@ -1167,13 +1171,8 @@ class ASRToWASMVisitor : public ASR::BaseVisitor { ASR::Function_t *s = ASR::down_cast( ASRUtils::symbol_get_past_external(sub_call.m_name)); if (ASRUtils::get_FunctionType(s)->m_abi == ASR::abiType::BindC && - ASRUtils::get_FunctionType(s)->m_deftype == ASR::deftypeType::Interface && ASRUtils::is_intrinsic_function2(s)) { - diag.codegen_warning_label( - "WASM: Calls to C Intrinsic Functions are not yet " - "supported", - {x.m_body[i]->base.loc}, - "Function: calls " + std::string(s->m_name)); + // Skip functions that call into C Intrinsic Functions return true; } } diff --git a/src/lpython/semantics/python_ast_to_asr.cpp b/src/lpython/semantics/python_ast_to_asr.cpp index 96c1fb9ca1..82849a6b85 100644 --- a/src/lpython/semantics/python_ast_to_asr.cpp +++ b/src/lpython/semantics/python_ast_to_asr.cpp @@ -4230,6 +4230,8 @@ class SymbolTableVisitor : public CommonVisitor { } else if (name == "pythoncall" || name == "pythoncallable") { current_procedure_abi_type = ASR::abiType::BindPython; current_procedure_interface = (name == "pythoncall"); + } else if (name == "jscall") { + current_procedure_abi_type = ASR::abiType::BindJS; } else if (name == "overload") { overload = true; } else if (name == "interface") { diff --git a/src/lpython/utils.cpp b/src/lpython/utils.cpp index e8562458f1..6484a88448 100644 --- a/src/lpython/utils.cpp +++ b/src/lpython/utils.cpp @@ -52,6 +52,9 @@ void get_executable_path(std::string &executable_path, int &dirname_length) std::string get_runtime_library_dir() { +#ifdef HAVE_BUILD_TO_WASM + return "asset_dir"; +#endif char *env_p = std::getenv("LFORTRAN_RUNTIME_LIBRARY_DIR"); if (env_p) return env_p; diff --git a/tests/reference/asr-elemental_01-b58df26.stderr b/tests/reference/asr-elemental_01-b58df26.stderr deleted file mode 100644 index cb0cbcbb82..0000000000 --- a/tests/reference/asr-elemental_01-b58df26.stderr +++ /dev/null @@ -1,5 +0,0 @@ -semantic error: Arguments do not match for any generic procedure, sin - --> tests/../integration_tests/elemental_01.py:10:24 - | -10 | assert abs(sin(sin(array[i])) - result[i]) <= eps - | ^^^^^^^^^^^^^ diff --git a/tests/reference/asr-modules_02-ec92e6f.stderr b/tests/reference/asr-modules_02-ec92e6f.stderr deleted file mode 100644 index fff2490837..0000000000 --- a/tests/reference/asr-modules_02-ec92e6f.stderr +++ /dev/null @@ -1,8 +0,0 @@ -warning: The symbol 'f' imported from modules_02b will shadow the existing symbol 'f' - --> tests/../integration_tests/modules_02.py:1:25 - | -1 | from modules_02b import f, f - | ^ old symbol - | -1 | from modules_02b import f, f - | ^ new symbol diff --git a/tests/reference/asr_json-modules_02-53952e6.stderr b/tests/reference/asr_json-modules_02-53952e6.stderr deleted file mode 100644 index fff2490837..0000000000 --- a/tests/reference/asr_json-modules_02-53952e6.stderr +++ /dev/null @@ -1,8 +0,0 @@ -warning: The symbol 'f' imported from modules_02b will shadow the existing symbol 'f' - --> tests/../integration_tests/modules_02.py:1:25 - | -1 | from modules_02b import f, f - | ^ old symbol - | -1 | from modules_02b import f, f - | ^ new symbol diff --git a/tests/reference/wat-bool1-234bcd1.json b/tests/reference/wat-bool1-234bcd1.json index cd145b24d9..4be1a3e7c1 100644 --- a/tests/reference/wat-bool1-234bcd1.json +++ b/tests/reference/wat-bool1-234bcd1.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "wat-bool1-234bcd1.stdout", - "stdout_hash": "2ad7e7fd37dbdc380ed1fb9e4879efed1cf87dc9472196189215487b", + "stdout_hash": "1ac138f5c0fd3b21a75e6bf4e0024d5f0df2f0a6b195defd472677c2", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/wat-bool1-234bcd1.stdout b/tests/reference/wat-bool1-234bcd1.stdout index 5a2874da48..b50b0ccd6a 100644 --- a/tests/reference/wat-bool1-234bcd1.stdout +++ b/tests/reference/wat-bool1-234bcd1.stdout @@ -175,7 +175,7 @@ end return ) - (memory (;0;) 100 100) + (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "__main__global_stmts" (func 2)) (export "test_bool" (func 3)) diff --git a/tests/reference/wat-expr14-5e0cb96.json b/tests/reference/wat-expr14-5e0cb96.json index 60f08b034d..09741a198d 100644 --- a/tests/reference/wat-expr14-5e0cb96.json +++ b/tests/reference/wat-expr14-5e0cb96.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "wat-expr14-5e0cb96.stdout", - "stdout_hash": "731682ff49eaab392c46e72e575f595873b89b30309c62c75cc6e36b", + "stdout_hash": "f8ff7eb9eb4bc533fc4d36c58a0378df6dfbf135313962dbf379d69a", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/wat-expr14-5e0cb96.stdout b/tests/reference/wat-expr14-5e0cb96.stdout index 67875496c6..60c9b0a760 100644 --- a/tests/reference/wat-expr14-5e0cb96.stdout +++ b/tests/reference/wat-expr14-5e0cb96.stdout @@ -17,7 +17,7 @@ call 0 return ) - (memory (;0;) 100 100) + (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "_start" (func 2)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") diff --git a/tests/reference/wat-expr2-8b17723.json b/tests/reference/wat-expr2-8b17723.json index bcb5be8a24..ad73a311e7 100644 --- a/tests/reference/wat-expr2-8b17723.json +++ b/tests/reference/wat-expr2-8b17723.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "wat-expr2-8b17723.stdout", - "stdout_hash": "731682ff49eaab392c46e72e575f595873b89b30309c62c75cc6e36b", + "stdout_hash": "f8ff7eb9eb4bc533fc4d36c58a0378df6dfbf135313962dbf379d69a", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/wat-expr2-8b17723.stdout b/tests/reference/wat-expr2-8b17723.stdout index 67875496c6..60c9b0a760 100644 --- a/tests/reference/wat-expr2-8b17723.stdout +++ b/tests/reference/wat-expr2-8b17723.stdout @@ -17,7 +17,7 @@ call 0 return ) - (memory (;0;) 100 100) + (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "_start" (func 2)) (data (;0;) (i32.const 4) "\0c\00\00\00\01\00\00\00") diff --git a/tests/reference/wat-expr9-f73afd1.json b/tests/reference/wat-expr9-f73afd1.json index c57dd15b1f..a5aa2534df 100644 --- a/tests/reference/wat-expr9-f73afd1.json +++ b/tests/reference/wat-expr9-f73afd1.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "wat-expr9-f73afd1.stdout", - "stdout_hash": "24c9e7908c6c26b7b02f35db04295334fd8a45c90aa411146cf1cb16", + "stdout_hash": "169634bcbf991ebd3a4315e3824320762aea19971ac0a85026095e6c", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/wat-expr9-f73afd1.stdout b/tests/reference/wat-expr9-f73afd1.stdout index 2293767591..d02d5684b0 100644 --- a/tests/reference/wat-expr9-f73afd1.stdout +++ b/tests/reference/wat-expr9-f73afd1.stdout @@ -66,7 +66,7 @@ call 0 return ) - (memory (;0;) 100 100) + (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "__main__global_stmts" (func 2)) (export "main0" (func 3)) diff --git a/tests/reference/wat-loop1-e0046d4.json b/tests/reference/wat-loop1-e0046d4.json index 996a463f65..05dedbeef8 100644 --- a/tests/reference/wat-loop1-e0046d4.json +++ b/tests/reference/wat-loop1-e0046d4.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "wat-loop1-e0046d4.stdout", - "stdout_hash": "b8c4cf026606e374e199425dede3419e41b30f935b6a1c71add8f508", + "stdout_hash": "186355413b04732159a4ea9cf108245721b5a41d5a6630a4f8cc7785", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/wat-loop1-e0046d4.stdout b/tests/reference/wat-loop1-e0046d4.stdout index e3f714fc34..2683a49e6c 100644 --- a/tests/reference/wat-loop1-e0046d4.stdout +++ b/tests/reference/wat-loop1-e0046d4.stdout @@ -152,7 +152,7 @@ call 0 return ) - (memory (;0;) 100 100) + (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "__main__global_stmts" (func 2)) (export "main0" (func 3)) diff --git a/tests/reference/wat-print_str-385e953.json b/tests/reference/wat-print_str-385e953.json index d41eaeafa8..de1714455f 100644 --- a/tests/reference/wat-print_str-385e953.json +++ b/tests/reference/wat-print_str-385e953.json @@ -6,7 +6,7 @@ "outfile": null, "outfile_hash": null, "stdout": "wat-print_str-385e953.stdout", - "stdout_hash": "85817d1daa2da68a42d98f7742e17d562c67019cd40562d4aabb9ece", + "stdout_hash": "8e9a0f7a017cdd451f10e9b8686d3a9ba00c1c4088fbd01cfa2df1cc", "stderr": null, "stderr_hash": null, "returncode": 0 diff --git a/tests/reference/wat-print_str-385e953.stdout b/tests/reference/wat-print_str-385e953.stdout index a312f8c273..9db655a5ed 100644 --- a/tests/reference/wat-print_str-385e953.stdout +++ b/tests/reference/wat-print_str-385e953.stdout @@ -107,7 +107,7 @@ call 0 return ) - (memory (;0;) 100 100) + (memory (;0;) 1000 1000) (export "memory" (memory 0)) (export "__main__global_stmts" (func 2)) (export "main0" (func 3))