| Commit message (Collapse) | Author | Age | Files | Lines |
| | |
|
| | |
|
| | |
|
| |
|
|
|
|
| |
Basically, it looks like an enum but it isn't actually a type. It
just behaves like a container to number all the (global) constants
defined within it.
|
| |
|
|
|
|
|
| |
We can now have constant definitions that are read-only, evaluated
at compile time and just behave like integer literals when accessed.
These are nice because we can now potentially inject syscall numbers/
etc through the compiler.
|
| |
|
|
|
|
| |
This was simple enough, we just needed to change the part where we
were computing the offset for each field, and the total size of the
compound structure.
|
| |
|
|
|
|
|
|
| |
Structs for now (and probably for the near future) are not allowed
to be passed by value, and instead you just pass a pointer to it.
Nested structs can also be defined, and they can be either anonymous,
or named (in which case only the members can access the type).
|
| |
|
|
|
|
|
|
|
|
|
| |
This commit does a few things in one go:
- Add support for a `char` type + some changes to support the new size
- Add support for character literals. We need some escaping here to be
able to use `\n` and `\0`, etc.
- Add support for string literals. These are all stored in the `.data`
section. Fortunately NASM already handles the escape characters.
- Fix some bugs with code generation, specifically using `movsx` to sign
extend the smaller types into 64-bit registers.
|
| |
|
|
|
|
| |
Usual disclaimer at this point: Quick&Dirty implementation, hasn't
been tested other than basic sanity checks. Arrays are automatically
decayed into pointers when the identifier is accessed.
|
| |
|
|
|
|
| |
We don't have any closures yet, so it's essentially the same as just
moving the statement after the `defer` keyword to the end of the block/
right before returning from the function.
|
| |
|
|
|
|
| |
This still requires a lot of work to avoid duplicate imports, and
handle cyclic imports, but it is a good enough for small examples
which just want to include some common definitions from std/
|
| | |
|
| |
|