Closed joshradin closed 2 years ago
/cib
Branch feature/74-incremental_compilation created!
I think that namespaces will have to be a per-file basis to make incremental work. In addition, everything must be in some namespace.
in tests;
public fn factorial(n: unsigned int) -> unsigned int {
if (n==0) return 1;
return n * factorial(n-1);
}
Namespaces should be made into directories, and translation units should be individual files.
The compiler should allow for incremental compilation.
The compiler should allow for directories to be specified that contains compiler jodin code that can be used by later compilation units. This should allow for incremental compilation as well. Unsure how to fully implement this yet.
Implementation
The output file type should be
.jobj
, and should output based on namespace and not declaration file. Precompiled units can either be given as individual.jobj
files, or as zip files usingDEFLATE
with the extension.jdp
.All
.jobj
files should contain a magic number at the beginning of the file that:The compiler should be given directories or
.jdp
files as inputs for compilation.Considerations
When a file already exists that is being used for compilation, the compiler should rewrite the target file.