It'd be nice to have a (limited) way to write inline WebAssembly in Schism. I'd propose something like:
(define-wasm (foo (i32 a) (i32 b))
(i32.add a b))
The reason for this is that once we have library support (#19), we might be able to move a lot of the intrinsics out of the compiler. For example, allocation, cons, car, cdr, etc., are all made up of low-level calls that basically read and write memory directly. With inline wasm, we could write these functions in assembly instead and maybe remove the intrinsics from the compiler (or just write the intrinsics themselves as a library).
I don't expect inline wasm to be widely used in Schism, but it would be helpful in implementing a lot of the low-level functionality.
It'd be nice to have a (limited) way to write inline WebAssembly in Schism. I'd propose something like:
The reason for this is that once we have library support (#19), we might be able to move a lot of the intrinsics out of the compiler. For example,
allocation
,cons
,car
,cdr
, etc., are all made up of low-level calls that basically read and write memory directly. With inline wasm, we could write these functions in assembly instead and maybe remove the intrinsics from the compiler (or just write the intrinsics themselves as a library).I don't expect inline wasm to be widely used in Schism, but it would be helpful in implementing a lot of the low-level functionality.