1
1
mirror of https://github.com/kanaka/mal.git synced 2024-09-21 10:37:58 +03:00
Commit Graph

8 Commits

Author SHA1 Message Date
Joel Martin
0a19c2f1c7 wasm: update to 2019 wat syntax, use .wat extension
wasm: update to wat syntax as of Jan 2019.

Examples:
- get_local -> local.get
- i32.wrap/i64 -> i32.warp_i64
- etc

The distinction between wat and wast has been clarified:
- wat: textual format for web assembly modules
- wast: superset of wat used in the specification to define tests.
2019-01-16 00:13:51 -06:00
Joel Martin
dd7a4f55f3 Test uncaught throw, catchless try* . Fix 46 impls.
Fixes made to: ada, c, chuck, clojure, coffee, common-lisp, cpp,
crystal, d, dart, elm, erlang, es6, factor, fsharp, gnu-smalltalk,
groovy, guile, haxe, hy, js, livescript, matlab, miniMAL, nasm, nim,
objc, objpascal, ocaml, perl, perl6, php, plsql, ps, python, r,
rpython, ruby, scheme, swift3, tcl, ts, vb, vimscript, wasm, yorick.

Catchless try* test is an optional test. Not all implementations
support catchless try* but a number were fixed so they at least don't
crash on catchless try*.
2018-12-12 14:18:26 -06:00
Joel Martin
77bf4e612d wasm: fix to work with wabt's wat2wasm. 2018-12-08 17:02:13 -06:00
Joel Martin
0c62f14e6a wasm: drop unnecessary signed suffixes.
Apparently some of the assemblers ignored these sign indicators and so
this worked in the past.
2018-12-08 17:02:13 -06:00
Joel Martin
349faa83e3 wasm: use LET macro and br_if. 2018-12-08 17:02:12 -06:00
Joel Martin
50eea9ad9c wasm: String refactor. Release macro memory
Also split platform out.
2018-12-08 17:02:12 -06:00
Joel Martin
456d0a21be wasm: improve debug output using padding. 2018-12-08 17:02:12 -06:00
Joel Martin
3ea0988652 wasm: Steps 4-A, hashmaps, metadata.
- Use more concise param and local syntax.
- Separate out string.wam.
- Add pr_str_seq functionality and add in print_readably
  functionality.
- Add REPLACE3 function.
- Remove use of putchar and simplify util.wam
- Move string functions from util.wam to string.wam including some
  renames to be more consistent with C library names.
- Add temporary content to 256 character buffers so that they are
  de-duplicated/combined.
- Use AND/OR macros.
- Improve Makefile deps and use more general wasm target.
- Properly cleanup memory in try* and use TCO as part of try*.
2018-12-08 17:02:12 -06:00