daurnimator
fca3e3a73f
std: add std.ArrayList.orderedRemove
2019-05-03 01:54:49 -04:00
Andrew Kelley
3552180143
optimize @memset with undefined
...
When using `@memset` to set bytes to `undefined`, Zig notices this
case and does a single Valgrind client request rather than N.
Speeds up all allocators in safe modes.
Closes #2388
2019-05-03 01:25:03 -04:00
Marc Tiehuis
3370e60dd9
std.math: Correct math.nan usage in cos
2019-05-02 19:03:49 +12:00
Marc Tiehuis
89d71a960b
std.math: Add documentation for all functions and algorithm sources
2019-05-01 18:37:46 +12:00
Marc Tiehuis
f94964cd05
std.math: Add upstream changes/fixes and simplify go derived code
...
This also starts the documentation effort for the math/ subdirectory.
The intent is to use this as a somewhat representative test-case for any
work on the documentation generator.
2019-05-01 18:13:33 +12:00
Shritesh Bhattarai
7bbc8eb16c
wasi: import all core exports
2019-04-30 23:53:17 -04:00
Shritesh Bhattarai
f53abf4063
wasi: import all constants and their types
2019-04-30 22:58:41 -04:00
Shritesh Bhattarai
d395ed2d40
wasi: implement timestamp
2019-04-30 20:43:43 -05:00
Shritesh Bhattarai
0ce05fa621
wasi: import clock and timestamp function/types
2019-04-30 20:06:39 -05:00
Shritesh Bhattarai
1fabd6bbf3
wasi: implement getRandomBytes
2019-04-30 20:50:41 -04:00
Shritesh Bhattarai
0a693b70e4
wasi: use mem.separate instead
2019-04-30 18:43:43 -05:00
Shritesh Bhattarai
20458f56d8
wasi: add getEnvMap
2019-04-30 18:18:20 -05:00
Shritesh Bhattarai
8e700bf92a
wasi: import environ_get and environ_sizes_get
2019-04-30 16:35:27 -05:00
Shritesh Bhattarai
01365be82f
WASI: implement argsAlloc and argsFree ( #2364 )
...
* wasi: change URL to canon WASI-core.md
* wasi: import args_get and args_sizes_get
* wasi: Implement argsAlloc and argsFree
* test return value for wasi arg syscalls
* wasi: return unexpectedErrorPosix in argsAlloc
* wasi: Add TODO for ArgIterator
2019-04-29 21:54:30 -04:00
LemonBoy
b1a61a6d51
compiler-rt: Add __mulodi4
2019-04-29 18:55:20 -04:00
Andrew Kelley
d2328ac71a
Merge pull request #2372 from LemonBoy/aeabi_idiv
...
compiler-rt: Add __divsi3, __aeabi_idiv
2019-04-29 18:54:21 -04:00
Andrew Kelley
e3452ba21b
json tests do not need this prefix anymore
2019-04-29 14:04:31 -04:00
Andrew Kelley
da28811c50
enable more json tests
...
I think it was a mistake that these weren't getting automatically run by
the test suite.
2019-04-29 14:02:19 -04:00
Andrew Kelley
4b6f350369
DirectAllocator: move if > 0 condition above @memcpy
...
Minor improvement to 3c13aa17 as noted by daurnimator
2019-04-29 13:48:15 -04:00
Shawn Landden
3c13aa178b
std.heap: do not excessively call mmap, and munmap in direct allocator
2019-04-29 13:47:24 -04:00
LemonBoy
4e241263ff
compiler-rt: Add __divmodsi4, __aeabi_idivmod
2019-04-29 19:17:48 +02:00
LemonBoy
738562e990
compiler-rt: Add __divsi3, __aeabi_idiv
2019-04-29 19:17:48 +02:00
Ryan Liptak
205e501e42
std.fmt: add max_depth to avoid infinite recursion from self-references
2019-04-27 11:20:10 -04:00
daurnimator
bc1840e18f
Revert "std: Add mem.nativeIntToBig and mem.nativeIntToLittle"
...
This reverts commit 211f0a2226db7c53cfa1581c5572a6100c3e17f6.
The functions `mem.nativeToBig` and `mem.nativeToLittle` already existed.
2019-04-27 11:18:53 -04:00
emekoi
66f3ef06e8
fixed syntax error
2019-04-27 11:16:33 -04:00
Andrew Kelley
2d6520d5d4
zig fmt is built directly into stage1 rather than child process
...
Previously, `zig fmt` on the stage1 compiler (which is what we currently
ship) would perform what equates to `zig run std/special/fmt_runner.zig`
Now, `zig fmt` is implemented with the hybrid zig/C++ strategy outlined
by #1964 .
This means Zig no longer has to ship some of the stage2 .zig files, and
there is no longer a delay when running `zig fmt` for the first time.
2019-04-26 20:46:28 -04:00
Andrew Kelley
ac3946620c
Merge pull request #2357 from squeek502/heap-shrink-large-align
...
DirectAllocator: reduce the amount of redundant memcpy calls on Windows
2019-04-26 19:34:24 -04:00
Andrew Kelley
28071ac637
self-hosted translate-c emits a hello world AST
...
Also breaking std lib API change: the return value of
std.zig.parse returns `*ast.Tree` rather than `ast.Tree`.
See #1964
2019-04-26 15:43:36 -04:00
Andrew Kelley
c82acdbb9e
clean up test output
...
After 4df2f3d74f test names have the word "test" in them so the
redundant word is removed from test runner. Also move the prefix/suffix
to where it logically belongs in the fully qualified symbol name.
2019-04-26 15:10:13 -04:00
Ryan Liptak
afc33f00ee
heap: fixup style of realloc memory copies
2019-04-25 13:41:19 -07:00
Ryan Liptak
57f545eed8
std.heap.DirectAllocator: reduce the amount of redundant memcpy calls on Windows
...
Previously the memory would be copied to a different aligned address in some cases where the old offset could have been used. This fixes it so that it will always try to use the old offset when possible, and only uses a different offset if the old one is truly invalid (not aligned or not enough space to store the alloc at the old offset).
2019-04-25 13:35:45 -07:00
Andrew Kelley
17ffe166c2
add preliminary windows support to std.io.COutStream
2019-04-25 00:24:25 -04:00
Andrew Kelley
976080462c
translate-c: a little closer to self-hosted implementation
2019-04-25 00:06:54 -04:00
Andrew Kelley
56e07622c6
Merge pull request #2312 from squeek502/heap-shrink-large-align
...
fix heap allocators when shrinking an object but growing its alignment
2019-04-24 23:44:28 -04:00
Shawn Landden
8ef7f6febb
remove Shebang (#!) support
...
Closes: #2165
2019-04-24 23:34:19 -04:00
vegecode
733c547a65
compiler-rt: Add missing import of test for comparesf2
2019-04-24 21:16:03 -04:00
vegecode
01168e1577
compiler-rt: add aeabi_dcmp, comparedf2
2019-04-24 21:15:39 -04:00
LemonBoy
374d16793f
Go one instruction before the return address
...
The return address may not point to an area covered by the debug infos
so we hope for the best and decrement the address so that it points to
the caller instruction.
2019-04-23 10:05:46 +02:00
LemonBoy
b095e33667
Fix silly typo
2019-04-23 09:57:57 +02:00
LemonBoy
57ec183c09
Fix reading of signed leb128 values
2019-04-23 09:57:22 +02:00
Ryan Liptak
8ce130de3c
Bump up FixedBufferAllocator test memory to account for new tests
2019-04-22 02:25:57 -07:00
Ryan Liptak
b3598163df
std.heap.DirectAllocator: Fix aligned reallocs on Windows
2019-04-22 02:20:01 -07:00
daurnimator
211f0a2226
std: Add mem.nativeIntToBig and mem.nativeIntToLittle
...
To be used where `htons`, `htonl`, etc. would be used in C.
It's useful to have a function that returns a number directly for use in initialisers.
2019-04-21 14:04:01 -04:00
Ryan Liptak
66020856b2
fix heap allocators when shrinking an object but growing its alignment
2019-04-20 23:56:39 -07:00
vegecode
bb25f212b3
compiler-rt: add aeabi_fcmp, comparesf2
2019-04-21 00:12:21 -04:00
tgschultz
22f5e5fd3e
Fixes DirectAllocator Windows implementation to call HeapFree when new_size == 0
2019-04-20 14:04:09 -04:00
Andrew Kelley
9b83fe6b4c
fixup and zig fmt
2019-04-20 13:48:38 -04:00
Andrew Kelley
907a7068ce
Merge branch 'dwarfy' of https://github.com/LemonBoy/zig into LemonBoy-dwarfy
2019-04-20 13:32:59 -04:00
LemonBoy
c2542bb7b7
Recover symbol infos from DWARF sections
2019-04-20 10:35:39 +02:00
Ryan Liptak
1030cc97ca
fix DirectAllocator not unmapping unused pages on large alignments
...
Fixes #2306
2019-04-20 02:21:42 -04:00