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

2437 Commits

Author SHA1 Message Date
Joel Martin
c4ce75c08f wasm: fix get_time_ms to return millis.
Also, to avoid overflow, subtract 30 years so that the value won't
wrap in i32.
2019-01-16 13:54:20 -06:00
Joel Martin
53619a6e59 wasm: Add warpy wasm_MODE.
- Update Dockerfile to install rpython and then use that build and
  install warpy (nojit).
- Support 'warpy' in wasm_MODE. Update wasm/Makefile and wasm/run to
  support the new mode.
2019-01-16 01:12:00 -06:00
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
6a51946b52 wasm: use platform_os for JS mode.
Drop platform_js and use refactor platform_os to support JS mode. Add
get_time_ms import to platform_os so this depends on run.js and
fooboot providing that.
2019-01-14 22:37:46 -06:00
Joel Martin
99472e2576 Clojure: reader/printer instead of monkey patching
Update the Clojure/ClojureScript implementation to have full reader
and printer/pr-str impementation instead of monkey patching Clojure's
reader and print functions.
2019-01-12 15:03:59 -06:00
Joel Martin
531a310dae
Merge pull request #334 from hgdsraj/hgdsraj-patch-1
Updated README
2019-01-10 22:16:58 -06:00
Raj Mahey
70cefa38a9
Updated README
change "yes the" into "yes, the". Stylised make command and changed download to downloaded
2019-01-10 13:30:21 -08:00
Joel Martin
7aaf054b0a tests/step3_env: don't assume def! is lexical. 2019-01-04 17:05:49 -06:00
Joel Martin
8126a0229b
Merge pull request #333 from LispLY/objc-fix-conj-meta
ojbc: fix conj, meta and with-meta
2018-12-27 14:19:28 -06:00
陆遥
24c6bbf7a6 In objc. Modified conj, meta and with-meta to pass all the tests in stepA. 2018-12-18 14:05:56 +08: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
18616b105e runtest: support carriage returns in tests.
This allows carriage returns to be specified in tests which allows
multiline tests to be written i.e. by using Ctrl-V Enter to put
a literal carriage return (^M) into the test definition. The effect of
this is to send a single string to the REPL that contains newlines
which normally can't be done because readline behavior will split it
into two separate lines.
2018-12-10 12:30:58 -06:00
Joel Martin
76adfab958 wasm: split js mode platform code out.
Simplify the interface to remove imports that aren't used (stdout and
add_history) and simplify (rename fputs to printline).
2018-12-10 00:36:39 -06:00
Joel Martin
8914943790 wasm: enable execution with Node
Add node mode to travis alongside wace_libc.
2018-12-09 22:55:49 -06:00
Joel Martin
86633b3365 README: fix formatting. 2018-12-08 18:29:28 -06:00
Joel Martin
27359631a6 README: add missing talk youtube links. 2018-12-08 18:26:13 -06:00
Joel Martin
8faa94c66a wasm: add package.json to pull in wamp. 2018-12-08 18:13:53 -06:00
Joel Martin
d72395aa8b wasm: update README. Activate in travis. 2018-12-08 18:02:56 -06:00
Joel Martin
df43e71977 wasm: Update Dockerfile. WAMP and WASM_AS params. 2018-12-08 17:02:13 -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
f2858819cc wasm: add line count rules. 2018-12-08 17:02:12 -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
Joel Martin
33309c6a62 wasm: Convert to wam syntax using wamp.
- Convert sources to much more concise wam syntax supported by wamp.
- Rename sources from *.wast to *.wam and generate *.wast files by
  translating via wamp.
2018-12-08 17:02:09 -06:00
Joel Martin
b16fe73ec1 wasm: Steps 0-3 ported from basic. Preprocessor.
Needs wace from https://github.com/kanaka/wac to run.

wastpp.py processes the listed modules and outputs a single combined
module. It finds inline strings and hoists them to the top into a data
section and creates pointer variables into that memory and replaces
the inline strings with pointer lookups.
2018-12-08 17:01:04 -06:00
Joel Martin
2492836307 plpgsql, racket, tcl, yorick: fix errors. 2018-11-30 14:57:46 -06:00
Joel Martin
ae6e2220b3 guile, hy, java, make, matlab, miniMAL: fix errors 2018-11-30 14:57:46 -06:00
Joel Martin
5f80c83f9d lua, nasm, perl, rexx, vimscript: fix errors. 2018-11-30 14:57:46 -06:00
Joel Martin
2adfa11c98 ada, d, elixir, es6, factor, haxe: fix errors. 2018-11-30 14:57:45 -06:00
Joel Martin
970935dac9 awk, bash, c, coffee, js: fix errors. 2018-11-30 14:57:45 -06:00
Joel Martin & Chouser
9e2a4ab0f9 forth: fix errors/reporting in steps 1-8. 2018-11-30 14:57:45 -06:00
Joel Martin
f6f5d4f2a3 runtest.py: process output/errors as regex match.
Update output test data to be regex compatible.
2018-11-30 14:57:45 -06:00
Joel Martin
96c09dcd40 runtest.py: more generic prompt matching. 2018-11-28 22:19:54 -06:00
Joel Martin
b5ec219b49 awk: fix ignored escaped 'u' warning. 2018-11-28 21:34:52 -06:00
Joel Martin
16e0a5e6f2 mal: update Dockerfile to Ubuntu 18.04 and node 10 2018-11-28 21:33:35 -06:00
Joel Martin
784ad0354a
Merge pull request #331 from vi/patch-1
Add link to my Rust implementation
2018-11-28 20:49:25 -06:00
Joel Martin
e10ceff503 Update JS impls: use ffi-napi and Ubuntu 18.04 2018-11-28 17:12:17 -06:00
Vitaly Shukela
9bd2b1ef86
Add link to my Rust implementation
I assume this README serves as a wiki for collecting impls.
2018-11-10 00:24:56 +03:00
Joel Martin
7a41da1075
Merge pull request #330 from omarroth/update-crystal
Update Crystal implementation
2018-10-29 19:27:05 -05:00
Omar Roth
5185c56e92 Update Crystal implementation 2018-10-29 18:20:02 -05:00
Joel Martin
9581ba403e Add link to Rust implementation by Tim Morgan. 2018-08-25 17:30:33 -05:00
Joel Martin
a520ffd9a1 Travis: re-active perf for erlang.
Local testing shows that the test completes and doesn't hit OOM.
2018-07-16 19:11:26 -05:00
Joel Martin
3b2c6780cf
Merge pull request #326 from seven1m/patch-1
Fix link to FAQ document
2018-07-16 17:04:26 -07:00
Tim Morgan
5d52baf1ac
Fix link to FAQ document 2018-07-16 18:41:12 -05:00
Joel Martin
53c3bccc43 Travis: enable mal impl for perf test. 2018-07-16 18:15:19 -05:00
Joel Martin
17d2773245 Travis: trigger build after github push error.
git push gave this error and the commit was successfully pushed but it
didn't result in Travis starting a build:

remote: Resolving deltas: 100% (2/2), completed with 2 local objects.
remote: Unexpected system error after push was received.
remote: These changes may not be reflected on github.com!
remote: Your unique error code: 1d9d84300a34930b94914e59e9c3b381
To git@github.com:kanaka/mal.git
   5ffa331..1332215  master -> master
2018-07-16 17:45:55 -05:00
Joel Martin
1332215754 perf: more accurate iter count (last-iters).
We should return the iter count prior to then final iteration because
the final one was incomplete when the 10 seconds expired.
2018-07-16 12:33:36 -05:00