mirror of
https://github.com/ziglang/zig.git
synced 2024-12-03 10:28:48 +00:00
81d5104e22
* Sema: implement global variables - Improved global constants to stop needlessly creating a Var structure; they can just store the value directly. - This required making memory management a bit more sophisticated to detect when a Decl owns the Namespace associated with it, for the purposes of deinitialization. * Decl.name and Namespace decl table keys no longer directly reference ZIR; instead they have heap-duped names, so that deleted decls, which no longer have any ZIR to reference for their names, can be removed from the parent Namespace table. - In the future I would like to explore going a different direction with this, where the strings would still point to the ZIR however they would be removed from their owner Namespace objects during the update detection. The design principle here is that the existence of incremental compilation as a feature should not incur any cost for the use case when it is not used. In this example Decl names could simply point to ZIR string table memory, and it is only because of incremental compilation that we duplicate their names. * AstGen: implement threadlocal variables * CLI: call cleanExit after building a compilation so that in release modes we don't bother freeing memory or closing file descriptors, allowing the OS to do it more efficiently. * Avoid calling `freeDecl` in the linker for unreferenced Decl objects. * Fix CBE test case expecting the compile error to point to the wrong column. |
||
---|---|---|
.. | ||
behavior | ||
src | ||
stage1/c_abi | ||
stage2 | ||
standalone | ||
assemble_and_link.zig | ||
behavior.zig | ||
cli.zig | ||
compare_output.zig | ||
compile_errors.zig | ||
gen_h.zig | ||
run_translated_c.zig | ||
runtime_safety.zig | ||
stack_traces.zig | ||
standalone.zig | ||
tests.zig | ||
translate_c.zig |