We now use a generic Rand structure which abstracts the core functions
from the backing engine.
The old Mersenne Twister engine is removed and replaced instead with
three alternatives:
- Pcg32
- Xoroshiro128+
- Isaac64
These should provide sufficient coverage for most purposes, including a
CSPRNG using Isaac64. Consumers of the library that do not care about
the actual engine implementation should use DefaultPrng and DefaultCsprng.
Add basic address->symbol resolution support. Uses symtab data from the
MachO image, not external dSYM data; that's left as a future exercise.
The net effect is that we can now map addresses to function names but
not much more. File names and line number data will have to wait until
a future pull request.
Partially fixes#434.
Some performance comparisons to C.
We take the fastest time measurement taken across multiple runs.
The block hashing functions use the same md5/sha1 methods.
```
Cpu: Intel(R) Core(TM) i5-6500 CPU @ 3.20GHz
Gcc: 7.2.1 20171224
Clang: 5.0.1
Zig: 0.1.1.304f6f1d
```
See https://www.nayuki.io/page/fast-md5-hash-implementation-in-x86-assembly:
```
gcc -O2
661 Mb/s
clang -O2
490 Mb/s
zig --release-fast and zig --release-safe
570 Mb/s
zig
50 Mb/s
```
See https://www.nayuki.io/page/fast-sha1-hash-implementation-in-x86-assembly:
```
gcc -O2
588 Mb/s
clang -O2
563 Mb/s
zig --release-fast and zig --release-safe
610 Mb/s
zig
21 Mb/s
```
In short, zig provides pretty useful tools for writing this sort of
code. We are in the lead against clang (which uses the same LLVM
backend) with us being slower only against md5 with GCC.
* Merge io.InStream and io.OutStream into io.File
* Introduce io.OutStream and io.InStream interfaces
- io.File implements both of these
* Move mem.IncrementingAllocator to heap.IncrementingAllocator
Instead of:
```
%return std.io.stderr.printf("hello\n");
```
now do:
```
std.debug.warn("hello\n");
```
To print to stdout, see `io.getStdOut()`.
* Rename std.ArrayList.resizeDown to std.ArrayList.shrink.
See #329
Supporting work:
* move std.cstr.Buffer0 to std.buffer.Buffer
* add build.zig to example/shared_library/ and add an automated test
for it
* add std.list.List.resizeDown
* improve std.os.makePath
- no longer recursive
- takes into account . and ..
* add std.os.path.isAbsolute
* add std.os.path.resolve
* reimplement std.os.path.dirname
- no longer requires an allocator
- handles edge cases correctly
* `zig build --export [obj|lib|exe]` changed to `zig build_obj`,
`zig build_lib` and `zig build_exe` respectively.
* `--name` parameter is optional when it can be inferred from the
root source filename. closes#207
* `zig build` now looks for `build.zig` which interacts with
`std.build.Builder` to describe the targets, and then the zig
build system prints TODO: build these targets. See #204
* add `@bitcast` which is mainly used for pointer reinterpret
casting and make explicit casting not do pointer reinterpretation.
Closes#290
* fix debug info for byval parameters
* sort command line help options
* `std.debug.panic` supports format string printing
* add `std.mem.IncrementingAllocator`
* fix const ptr to a variable with data changing at runtime.
closes#289
remove "unnecessary if statement" error
this "depends on compile variable" code is too hard to validate,
and has false negatives. not worth it right now.
std.str removed, instead use std.mem.
std.mem.eql and std.mem.sliceEql merged and do not require explicit
type argument.
- Implemented some syscall for MacOSX
- tested on : El Capitan 10.11 x86_64
- make self hosted test run on macosx
- modified run_test so it does not fail when parseh throws
warnings (most of them are related to buildin types from
gcc that arent defined in header files and unions)
- making -mmacosx-version-min and -mios-version-min works like
gcc (command line paramers have precedence over enviroment variables)
* Introduce the concept of packages. Closes#3
* Add support for error notes.
* Introduce `@import` and `@c_import` builtin functions and
remove the `import` and `c_import` top level declarations.
* Introduce the `use` top level declaration.
* Add `--check-unused` parameter to perform semantic
analysis and codegen on all top level declarations, not
just exported ones and ones referenced by exported ones.
* Delete the root export node and add `--library` argument.