131c7001fe
Now that the code contains explicit markers for starting and ending an initialization, and having the guarantee that an assertion fails whenever some code accesses the state of the "current initialization" even though there is no ongoing initialization gives me much more confidence in the correctness of the code. The calls to begin_initialization and end_initialization always appear in pairs, enclosing the minimal amount of code necessary for initialization. In a nutshell, global modifiable state is error-prone and hard to understand. A nice side effect is that the grammar no longer needs a special rule for the outermost initializer since the functions for the debug logging are now called explicitly. The code that misuses the initialization state just because it needs to temporarily store a sym_t somewhere is now clearly marked as such. A GCC statement expression can appear anywhere and is therefore independent of the initialization. Most probably the code can simply refer to the local variable in the grammar rule itself, or this variable needs to be encoded in the grammar %union. For sure there is a better way to handle this. There is no longer a need that the function 'declare' initializes the initialization state, it was just the wrong place to do this. |
||
---|---|---|
bin | ||
common | ||
compat | ||
crypto | ||
dist/pf | ||
distrib | ||
doc | ||
etc | ||
external | ||
extsrc | ||
games | ||
include | ||
lib | ||
libexec | ||
regress | ||
rescue | ||
sbin | ||
share | ||
sys | ||
tests | ||
tools | ||
usr.bin | ||
usr.sbin | ||
build.sh | ||
BUILDING | ||
Makefile | ||
Makefile.inc | ||
README.md | ||
UPDATING |
NetBSD
NetBSD is a free, fast, secure, and highly portable Unix-like Open Source operating system. It is available for a wide range of platforms, from large-scale servers and powerful desktop systems to handheld and embedded devices.
Building
You can cross-build NetBSD from most UNIX-like operating systems. To build for amd64 (x86_64), in the src directory:
./build.sh -U -u -j4 -m amd64 -O ~/obj release
Additional build information available in the BUILDING file.
Binaries
Testing
On a running NetBSD system:
cd /usr/tests; atf-run | atf-report
Troubleshooting
- Send bugs and patches via web form.
- Subscribe to the mailing lists. The netbsd-users list is a good choice for many problems; watch current-users if you follow the bleeding edge of NetBSD-current.
- Join the community IRC channel #netbsd @ freenode.
Latest sources
To fetch the main CVS repository:
cvs -d anoncvs@anoncvs.NetBSD.org:/cvsroot checkout -P src
To work in the Git mirror, which is updated every few hours from CVS:
git clone https://github.com/NetBSD/src.git