This allows importing only selected bindings.
For example,
(import foo :only [bar baz])
(foo/bar) # works
(foo/buzz) # doesn't work, even if the foo module has a buzz
function.
Also remove all (limited) type inference from the sysir. Type
inference is better done in frontend, limited inference in backend
just covers compilers issues.
Simple hello world with nasm working.
We need the ability to represent multiple calling conventions in IR.
All backends need to support a :default CC, but can also support more
for interop with system libraries, code from other compilers, syscalls, etc.
Also allow void returns.
Needs changes to IR to allow encoding immediates in all
instructions where possible. This makes the IR denser, means
we don't need `constant` and `callk`, and allows certain optimizations
like comparing to zero, using `inc` and `dec`, etc which are
specializations of more general instructions with constants.
This doesn't seem to reintroduce the original issue. There was
definitely some interplay with #1431
Doing git bisect landed me at commit
2f0c789ea1 as the first bad commit for
issue #1452.
Setup frontend.janet to show the basics of what is going on. Currently
emitting "fake" instructions just to hash out the idea.
One apparent issue is how we handle register spilling during variable
argument IR instructions (function calls). Arguments should come
_before_ the function call not after.
Disallow jumping to arbitrary instructions - instead, only allow jumps
to label ids. This will make various transformations and validations
easier since adding or remove instructions does not break jumps.
Rather than try and make ascii art, focus on whether information
is present in the stack trace that peoplpe actually need, and be terse.
Tools can better handler simpler and more stable interfaces.