Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Aeneas.wasm hello-v3.v3 - no output #18

Closed
diakopter opened this issue Apr 6, 2019 · 6 comments
Closed

Aeneas.wasm hello-v3.v3 - no output #18

diakopter opened this issue Apr 6, 2019 · 6 comments

Comments

@diakopter
Copy link
Contributor

user@host009:~/src/virgil/bin/dev$ wave ../current/wasm/Aeneas.wasm run \
../../rt/wave/wave.v3 ../../rt/wave/System.v3 ../../test/wave/hello-v3.v3
user@host009:~/src/virgil/bin/dev$ echo $?
0
@titzer
Copy link
Owner

titzer commented Apr 7, 2019

I think you want "-run" instead of "run". You'll get compile errors because the wave module and the system module both use pointers, which are not in the interpreter target used by "run". Aeneas should give an error here, but I am not sure why it does not. (note that the behavior is the same for Aeneas running on any target).

@titzer titzer closed this as completed Apr 7, 2019
@titzer
Copy link
Owner

titzer commented Apr 7, 2019

Btw, you probably want to use -heap-size=500m when compiling Aeneas to wasm, as there is no default heap size set for this target, and you'll run out of memory very quickly, which will just look like a memory access out of bounds.

@diakopter
Copy link
Contributor Author

user@host009:~/src/virgil/bin/dev$ wave ../current/wasm/Aeneas.wasm -compile -heap-size=1000m -target=wasm ../../test/wave/hello-v3.v3 ../../rt/wave/*.v3
Trap: Uncaught RuntimeError: memory access out of bounds
42 user@host009:~/src/virgil/bin/dev$

it gets a little farther...

@diakopter
Copy link
Contributor Author

worked when I compiled Aeneas.wasm with the bigger heap size. 👍

@diakopter
Copy link
Contributor Author

well, it produced a .wasm, but then when I ran it:

user@host009:~/src/virgil/bin/dev$ wave hello-v3.wasm
<unknown>:-1: Uncaught CompileError: WebAssembly.Module(): unknown section code #0x1f @+546
ERROR: could not compile hello-v3.wasm
255 

@diakopter
Copy link
Contributor Author

diakopter commented Apr 7, 2019

well, now it's working but it has exit code 32, but I don't know that I did anything differently..

user@host009:~/src/virgil/bin/dev$ wave ../current/wasm/Aeneas.wasm -compile -heap-size=500m -target=wasm ../../test/wave/hello-v3.v3 ../../rt/wave/*.v3
user@host009:~/src/virgil/bin/dev$ wave hello-v3.wasm
Hello world!
32 user@host009:~/src/virgil/bin/dev$  

@titzer 😄

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants