diff options
| author | Andrew Kelley <andrew@ziglang.org> | 2021-05-07 18:52:11 -0700 |
|---|---|---|
| committer | Andrew Kelley <andrew@ziglang.org> | 2021-05-07 18:52:11 -0700 |
| commit | 81d5104e228dc30184b31158c1b36ec0ec371b0b (patch) | |
| tree | 396f2bd67ffac87f6de0d9eacb7e83e496ddc41b /lib/std/Thread | |
| parent | e7c4d545cd34321c61b85f1ce286d46976293617 (diff) | |
| download | zig-81d5104e228dc30184b31158c1b36ec0ec371b0b.tar.gz zig-81d5104e228dc30184b31158c1b36ec0ec371b0b.zip | |
stage2: implement global variables
* 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.
Diffstat (limited to 'lib/std/Thread')
0 files changed, 0 insertions, 0 deletions
