It's been quite a while since the last push to master, and quite a lot of features have been introduced.
Fast-forward:
:up: the diagnose library has been bumped to the latest version
:sparkles: N* has been made platform-independent according to #6 and the specification
:100: unsafe blocks made it into the compiler
:sparkles: Sections data and code have been implemented and accept different grammars for their respective content
:recycle: The AST is post-processed to merge sections together
:writing_hand: It is now possible to dump both the normal and the typed AST using the flags -ddump-ast and -ddump-typed-ast. These flags will respectively dump to ./.nsc/dump/ast.debug and ./.nsc/dump/typed-ast.debug and are only used for debugging purpose
The compiler now accepts a -o FILENAME flag which dumps the output file to FILENAME instead of the default object.o
:sparkles: Pointer offsets are typechecked
:recycle: The typed AST is also post-processed to desugar complex pointer offsets into simple sequences of instructions achieving the same thing
N* accepts pointer offsets where the offset is specified inside a register. This is, however, an unsafe operation and must be enclosed in an unsafe block
:sparkles: Static relocation tables are generated whenever offsetting a data label happens. This is necessary because the data section can be relocated when creating an executable.
:recycle: Most of the ELF object generation library has been rewritten in C, to make patching easier
Instruction that are used internally in the desugaring process can be compiled into opcodes for amd64
What's left to be done:
[x] Implement nop, which serves no purpose else than padding
[x] Make push and pop available to the user, i.e. allow parsing and typechecking them (w.r.t. the specification)
It's been quite a while since the last push to master, and quite a lot of features have been introduced. Fast-forward:
diagnose
library has been bumped to the latest versionunsafe
blocks made it into the compilerdata
andcode
have been implemented and accept different grammars for their respective content-ddump-ast
and-ddump-typed-ast
. These flags will respectively dump to./.nsc/dump/ast.debug
and./.nsc/dump/typed-ast.debug
and are only used for debugging purpose-o FILENAME
flag which dumps the output file toFILENAME
instead of the defaultobject.o
unsafe
blockWhat's left to be done:
nop
, which serves no purpose else than paddingpush
andpop
available to the user, i.e. allow parsing and typechecking them (w.r.t. the specification)