Commit Graph

11 Commits

Author SHA1 Message Date
Nathan Braswell
b85873b240 Fixed a terrible bug where turns out I used the same name for a block and a parameter in the comparison meta-function -
they share the same namespace in the wasm DSL, so when I used it like a parameter in a loop it resolved to the number of scopes between the statement and the block'th parameter
which had the same type and the calculation worked fine, but it overwrote the parameter I thought wasn't being used and called a function later with.

Also, that seemed like that last of the really bad leaks & corruption, so re-enabling the freelist and am able to run some less-trivial benchmarks, namely (fib 30)!
The compiled version is between 4.7x and 65x slower than Python, depending on if you're using wasmer, wasmtime, wasm3. Would like to try WAVM as well.
A solid place to start, I think, and hopefully we'll be faster than Python once I implement a variety of dont-be-dumb optimizations (real-er malloc, static calls of statically known functions, etc)
2022-03-29 23:49:51 -04:00
Nathan Braswell
ea15f48d6f Implement dlambda and correct dlet. More attempt at Gambit 2022-02-23 16:43:03 -05:00
Nathan Braswell
f8bab2ada5 I caught the Chicken compiler red handed, it's compiled version has zip change behavior part way through, caught in the act with some prints. Where it does so changes based on optimization level, which is a bad sign. Starting a (hopfully quick) port to more standard scheme - looking to support Chez and Gambit in addition to Chicken, with at least some commented out code if not some sort of conditional compilation. We're off to a roaring start with define-syntax broken in Gambit 4.9.3, from 2019, but there was a new version released last month that I think should fix it. 2022-02-22 02:19:17 -05:00
Nathan Braswell
2874be3332 Fix the bug with de getting seperate dynamic envs, now unified but no opts for now (doing it seperetly was broken because of tyring to access it from inner closures. Also add a lot more runtime logging 2022-02-20 22:12:21 -05:00
Nathan Braswell
7f220c97b8 Finally make a clean sweep and delete / organize old files. Add skeleton for LaTeX formal writeup in doc/ and change license (since this is all new code from the past few years) to BSD-2-Clause-Patent 2022-01-30 16:57:21 -05:00
Nathan Braswell
25615815b2 bugfixes func type splitter, add more ins, trivial malloc and free, start working on print. 2021-11-29 01:51:54 -05:00
Nathan Braswell
4956596f30 Port (slightly hackilly) the rest of wasm.kp 2021-11-27 21:49:41 -05:00
Nathan Braswell
d4ff61ade5 Some work from previously, and also now an implementation of destructuring let 2021-11-16 00:15:53 -05:00
Nathan Braswell
627ccb4aa0 Begin port of partial_eval to Chicken Scheme, with a bunch of stuff to define a vaguely kraken-like environment in scheme 2021-11-09 00:35:58 -05:00
Nathan Braswell
d689a59097 Experimenting with fungll optimization, implement the okmij.org poly-variadic fix-point combinator for mutual recursion 2020-10-17 11:59:54 -04:00
Nathan Braswell
e6e053eaff create rudimentary try-kraken-online 2020-05-03 00:10:09 -04:00