@grain/compiler @grain/compiler-v0.3.0
⚠ BREAKING CHANGES
- cli: Remove
-f
CLI option - compiler: Remove --principal-types and --recursive-types compiler flags
- compiler: Rename --cdebug to --verbose
- cli: Pass compiler flags from the CLI to grainc directly (#613)
- Correct type signature for
_start
- Introduce
_gmain
for old behavior of_start
- Tail calls must be enabled explicitly via
--experimental-wasm-tail-call
- Static linking of Grain modules (#584)
- Rename
registerBasePrinter
todangerouslyRegisterBasePrinter
in runtime/exception - Use Grain exceptions instead of JS exceptions (#565)
- Update assignment semantics (#560)
- Grain implementation of memory allocator (#530)
- Refactor value tags (#526)
- stdlib: Ensure string methods are data-last (#494)
- runtime: Print strings without quotes (#495)
- Char literals (#477)
- Char (#474)
- convert fallible List methods to return Option (#460)
- change return type of Array.find/findIndex to Option (#459)
- upgrade binaryen to 0.4.0 & update test invocation to work with it (#435)
- Add support for bitwise operators (#425)
- remove
^
as unbox operator (fixes #183) (#426)
Features
for
loops (#525) (1032a3d)- Add ability to
throw
exceptions (1f1cd4a) - Add ability to register custom exception printers (1f1cd4a)
- add command line option to disable garbage collector (#239) (7f27a0a)
- Add Exception stdlib with Exception.registerPrinter (1f1cd4a)
- add initial Range stdlib module (#456) (508f23c)
- add List.init to stdlib (#465) (6b833d8)
- add reduce/flatMap/every/some to Array stdlib (#455) (51a7a80)
- add reducei/counti/filter/filteri/unique to Array stdlib (#473) (3e70cd5)
- add Set stdlib module (#466) (2eb2604)
- Add support for bitwise operators (#425) (5c2b8bf)
- add support for LSP lenses (#416) (753a0dc)
- add update method to map stdlib (#421) (292b5f9)
- Allow newline when creating array (#447) (114cb1a)
- Allow pattern matching on unsafe wasm i32s (#532) (8839c55)
- Allow unsafe wasm values in globals (#519) (111b549)
- Better lenses and hover for LSP (#501) (1223e9a)
- change return type of Array.find/findIndex to Option (#459) (aa3767d)
- Char (#474) (c9422f8)
- Char literals (#477) (cf7eaa5)
- cli: Pass compiler flags from the CLI to grainc directly (#613) (8f40383)
- Compile grainc to JS & create binaries with pkg (#570) (f4919bd)
- convert fallible List methods to return Option (#460) (a08768e)
- Enable Binaryen optimizations (#556) (50ebf74)
- Export compiled functions from modules (#529) (e302049)
- Grain implementation of Char and String libraries (#559) (7424cc5)
- Grain implementation of equals (#538) (09617bc)
- Grain implementation of hashing (#557) (40723fc)
- Grain implementation of memory allocator (#530) (fd8faaa)
- Grain implementation of memory manager (#534) (cea6dcc)
- Grain implementation of number runtime (#537) (94460c0)
- Grain implementation of toString/print (#540) (8c77905)
- Grain wasi bindings (#562) (323006b)
- Implement low-level wasm i32/i64/f32/f64 libraries (#517) (721d011)
- Implement String.indexOf, String.explode, and String.split (#450) (6dc5466)
- Implement support for printing in Grain (#561) (bfe471c)
- Normalized wasm exports for linked modules (3d4ac6e)
- Optimize local mutations (#527) (65a1947)
- Optimize number to string conversions by writing UTF8 directly (#539) (f18d26e)
- Pattern matching on arrays (#478) (681dddf)
- Static linking of Grain modules (#584) (3d4ac6e)
- statically link MinGW libraries on Windows (#438) (a154ac3)
- stdlib: add Stack module (#491) (8310d33)
- stdlib: Implement Char toString (#481) (37ba683)
- stdlib: String.implode (#489) (045077b)
- Support for more WebAssembly runtimes, including Wasmtime and Wasmer (3d4ac6e)
- Update assignment semantics (#560) (03a3217)
- upgrade binaryen to 0.4.0 & update test invocation to work with it (#435) (fbf52a8)
- Upgrade to Binaryen 100 (#541) (6d1fc53)
- Use Grain exceptions instead of JS exceptions (#565) (1f1cd4a)
- Use real wasm tail call instruction (#510) (9c9ffe4)
Bug Fixes
export *
with exceptions (1f1cd4a)- Allow bodiless blocks (#444) (ecfc70f)
- and/or short circuiting (#536) (38ad495)
- cli: Rework JSOO hacks to ensure stdin always gets data (#614) (b064119)
- compiler: Always get little endian i64 from bytes (#587) (1b9853a)
- compiler: Implement proper dependency resolver (#590) (d9ce392)
- compiler: Resolve names when doing CRC checks (#615) (15ea9a1)
- compiler: Update binaryen.ml bindings to include JS fixes (#600) (7bd9ac6)
- Correct type signature for
_start
(3d4ac6e) - Don't optimize away expressions which could possibly contain side effects (#523) (acc7d65)
- grainc: Only print compiler backtraces in debug mode (#588) (f5145ff)
- loop body typechecking (#533) (18e68ea)
- Multiline char locs (#484) (1e4a691)
- Multiline string locs (#482) (d3eccee)
- normalize filesystem paths to always use / separator (#433) (084a485)
- One-sided if results in any type (#531) (d85659b)
- Only backpatch closures for let-bindings (#428) (98a0b0b)
- Parsing of conditional assignment with binary operators (#572) (17fd4fa)
- Properly incRef exception printers (#581) (61c2a94)
- remove
^
as unbox operator (fixes #183) (#426) (08b6b05) - Remove ppx_expect entirely to build on Windows (#609) (a234dd8)
- Reset type vars when printing types (#420) (bb17787)
- runtime: Properly decRef record and array values (#500) (88adb94)
- runtime: Return correct pointer to morecore (#602) (af39cc4)
- set test sharding to 1 in attempt to avoid test race condition (#440) (3783ec6)
- temporarily disable inline tests (#434) (0bc446a)
- Throwing an exception now traps immediately in all cases (61c2a94)
- Tidy up type printing (#417) (14c7bd6)
- Use Is instead of Eq for match variant comparison (1f1cd4a)
- Use proper return type for calls to external functions (3d4ac6e)
- word-size independent LEB input byte checking (#567) (4079824)
Miscellaneous Chores
- cli: Remove
-f
CLI option (8f40383) - compiler: Remove --principal-types and --recursive-types compiler flags (8f40383)
- compiler: Rename --cdebug to --verbose (8f40383)
- Introduce
_gmain
for old behavior of_start
(3d4ac6e) - Refactor value tags (#526) (9b21d22)
- Rename
registerBasePrinter
todangerouslyRegisterBasePrinter
in runtime/exception (61c2a94) - runtime: Print strings without quotes (#495) (16671c2)
- stdlib: Ensure string methods are data-last (#494) (f871efc)
- Tail calls must be enabled explicitly via
--experimental-wasm-tail-call
(3d4ac6e)