The destructor functions weren't marked as required unless the create
variable call was invoked before or during post-references-resolved.
The use-case was setting a build parameter in pre-build for the first
time. Now, get-or-create-comptime-var will add it to required itself.
This was broken because the C compiler was being used on the Cakelisp
C++ files. Now, the dependencies will be checked for their extensions
before assuming they can be compiled under C as well.
* Fixed strdup and realpath not being available by default in standard C
* Increased max path length to more realistic default
* Added buildTimeBuildCommandC for strict C compilation. MSVC
shouldn't need it, but it is available either way
through (set-cakelisp-option build-time-c-compiler)
* Make Test.cpp into Test.c to fix tests
* Use typedef struct X X rather than just struct X in C for ease of
use. There may be some drawbacks to this, but whatever.
* Ensure forward-declare marks the module as requiring C++ if it uses
namespace or class.
This is in support of moving more towards C by default rather than C++
for final program output.
* Pass an "exposure" argument which informs the system whether it
needs to consider the C++ requirement global or confined to the
module. Currently there is no infection, so if a C module imports a
one with C++ in the header, things will break.
* Add stdbool to make C compilation work in various tests
* Forward-declare functions in HotReloadingCodeModifier.cake rather
than importing their modules
* Use NULL rather than fooling around with nullptr swapping
* Properly require C++ on definitions with types that use C++ features
* Properly determine comptime vs. build time code and only pay
attention to build time requirements when determining which compiler
to use
* Hack in the use of gcc over g++ when the module is determined to be
C compatible. I'm going to revisit this very soon.
Gamelib's XML.cake depends on the XML format to be defined before the
write-xml-in-format macro can function. However, this wasn't possible
in some cases because the write-xml-in-format was being evaluated
before define-xml-format.
To fix this, I added a non-ideal thing. If your macro needs to try to
wait longer before resolving, you can call
DeferCurrentReferenceResolution in the macro.
The evaluator then saves the reference off until all other references
are resolved, then re-evaluates the deferred reference.
* Add labels to hot-loading code due to its use of c-linkage, which
caused rebuilds
* Name some more executables to prevent unnecessary re-links
* Make all CRCs track whether they were updated by their instance of
cakelisp. This is necessary because a Cakelisp instance could run
another cakelisp inside of it, then that Cakelisp could end up
updating the cache which the outer one also needs.
* Fix typo in test
The following types are now changed:
- * is now addr
- & is now ref
- [] is now array
- <> is now template
- && is deprecated
I did this because I believe symbol-heavy languages end up harder to
read and understand. Now, we can do things that make a lot of sense:
(var my-int-ptr (addr int) (addr an-int))
It also means less utilization of the shift key, which is nice
ergonomics-wise. The tradeoff of course is more typing, but I consider
pressing a single key quite a bit easier than shift and a key.
The following generators are now deprecated:
++
--
%
block
The first three are in the same spirit as the type name
change. Symbols are harder to search and type than words.
These are now renamed:
bit->> becomes bit-shift->>
bit-<< becomes bit-shift-<<
This is an obnoxious change, but I figure because of low utilization
by people other than myself, now is as good a time as any.
This should wrap up the CRC feature.
* Always scan headers, even if the cache file cannot be used. This is
necessary because we want to update the header CRCs to match what was
used to build.
* Named all tests to not require oscillating a.out builds