* fix race condition in std.event.Channel deinit
* add support to zig build for --no-rosegment
* add passing self-hosted compare-output test for calling a function
* put a global lock on LLD linking because it's not thread safe
* introduce std.atomic.Int
* add src-self-hosted/test.zig which is tested by the main test suite
- it fully utilizes the multithreaded async/await event loop so the
tests should Go Fast
* `stage2/bin/zig build-obj test.zig` is able to spit out an error if 2 exported
functions collide
* ability for `zig test` to accept `--object` and `--assembly`
arguments
* std.build: TestStep supports addLibPath and addObjectFile
* add std.atomic.QueueMpsc.isEmpty
* make std.debug.global_allocator thread-safe
* std.event.Loop: now you have to choose between
- initSingleThreaded
- initMultiThreaded
* std.event.Loop multiplexes coroutines onto kernel threads
* Remove std.event.Loop.stop. Instead the event loop run() function
returns once there are no pending coroutines.
* fix crash in ir.cpp for calling methods under some conditions
* small progress self-hosted compiler, analyzing top level declarations
* Introduce std.event.Lock for synchronizing coroutines
* introduce std.event.Locked(T) for data that only 1 coroutine should
modify at once.
* make the self hosted compiler use multi threaded event loop
* make std.heap.DirectAllocator thread-safe
See #174
TODO:
* call sched_getaffinity instead of hard coding thread pool size 4
* support for Windows and MacOS
* #1194
* #1197
This is akin to channels in Go, except:
* implemented in userland
* they are lock-free and thread-safe
* they integrate with the userland event loop
The self hosted compiler is changed to use a channel for events,
and made to stay alive, watching files and performing builds when
things change, however the main.zig file exits after 1 build.
Note that nothing is actually built yet, it just parses the input
and then declares that the build succeeded.
Next items to do:
* add windows and macos support for std.event.Loop
* improve the event loop stop() operation
* make the event loop multiplex coroutines onto kernel threads
* watch source file for updates, and provide AST diffs
(at least list the top level declaration changes)
* top level declaration analysis
zig fmt accepts any number of file paths. For each one, if it
is a file, then it formats the file. If it is a directory, then
zig recursively scans the directory, formatting all files that
end in `.zig`.
it maintains a map of paths that have been seen already, to avoid
softlink loops.
closes#1068