Andrew Kelley
22e7ca5613
ir: analysis of fn instruction
2020-04-21 16:06:15 -04:00
Andrew Kelley
cc1c2bd568
simplify ZIR spec; separate parsing/rendering from analysis
2020-04-20 19:21:03 -04:00
Andrew Kelley
91ca0e4b02
implement rendering escaped zig string literals
2020-04-19 20:33:15 -04:00
Vexu
b6fe839248
update std lib to decls being disallowed between fields
2020-04-18 23:56:05 +03:00
LemonBoy
6c907a3509
std: Introduce the Once synchronization primitive
...
The Once object allows the user to execute a function just once in a
thread-safe way.
2020-04-18 15:48:32 -04:00
Andrew Kelley
3817420d42
ziggurat uses `@truncate` instead of `& 0xff`
...
This makes it work on 32-bit targets.
closes #2939
2020-04-18 14:41:33 -04:00
Andrew Kelley
ca38b18879
rand: ref the decls so they get tested
2020-04-18 14:41:25 -04:00
Charles Shenton
e073c8a2b1
Update ziggurat.zig to use `random.int(u64)`
...
Ziggurat rng was using deprecated `random.scalar(u64)` which was causing compile errors on calls to public facing stdlib APIs (randExp) on 0.6+, this fixed those errors.
2020-04-18 14:39:36 -04:00
Christian Wesselhoeft
344f4d9bc5
std.os.readv: Add missing iov_count declaration
2020-04-18 14:32:52 -04:00
LemonBoy
a4b1242f0a
build: Create the output directory if it doesn't exist
...
Fixes #5054
2020-04-17 05:12:42 -04:00
LemonBoy
4872311364
debug: Minor QOL improvements for osx
...
* Handle FileNotFound errors when searching for .o files
* Use the STAB symbol name when everything else fails
2020-04-16 16:21:54 -04:00
Andrius Mitkus
157f566f2d
std: make math.clamp work for common uses, remove automatic bounds swapping
2020-04-16 16:19:12 -04:00
joachimschmidt557
3fd38429e4
Enable formatting in std.big.Int.format
2020-04-15 12:51:43 -04:00
Vexu
ca3bf6e6ad
translate-c cleanup and zig fmt
2020-04-15 15:15:32 +03:00
Jakub
1e23a3cd91
Added gdi32.zig and More user32 definitions
2020-04-14 16:20:48 -04:00
markfirmware
5974a88794
Update emit_raw.zig
2020-04-14 16:19:01 -04:00
daurnimator
d29ed2a785
std: fix StreamSource to disallow writing to a const buffer
2020-04-13 13:26:13 -04:00
daurnimator
b702964ae2
std: fix os.fstatat definition ( #5016 )
2020-04-13 00:45:39 -04:00
Andrew Kelley
b8796be79d
disable flaky event loop test
...
See #4922
2020-04-12 23:02:39 -04:00
Heppoko
a3b2de1d1e
fix file protocol structure definitions ( #5015 )
2020-04-12 16:45:11 -04:00
daurnimator
8e9e126d41
std: add some basic windows user32 definitions
2020-04-12 02:28:52 -04:00
xackus
dbc00e2424
ArrayList: remove old (before span) API
2020-04-11 20:40:34 -04:00
Andrew Kelley
4ceaa0595a
move fs tests to separate file; disable flaky test
...
See #5006
2020-04-11 17:50:38 -04:00
Andrew Kelley
a6e288d5fe
Merge pull request #4711 from leroycep/feature-file-locks
...
Add lock option to File.OpenFlags and File.CreateFlags
2020-04-10 15:00:45 -04:00
LemonBoy
72dca05f5c
debug: Fix parsing of DWARF info for BE machines
...
Tested with ppc32
2020-04-10 14:59:19 -04:00
Yuri Pieters
f5f77089b7
sort.binarySearch: Remove unneeded edge case check
2020-04-09 09:13:47 +01:00
Yuri Pieters
b7e72cc421
sort.binarySearch: test for regresson of #4980
2020-04-09 02:00:08 +01:00
Yuri Pieters
447dc2bb90
sort.binarySearch: fix integer underflow ( #4980 )
...
When the key was smaller than any value in the array, an error was
ocurring with the mid being zero and having 1 subtracted from it.
2020-04-09 01:58:57 +01:00
LeRoyce Pearson
5951211d3f
Reduce file lock test sleep time
2020-04-08 18:03:52 -06:00
LeRoyce Pearson
d4161e1667
Close file1 in nonblocking lock test
2020-04-08 16:42:11 -06:00
LeRoyce Pearson
772bb1ade3
Disable open flock flags on darwin
...
The tests were put into a deadlock, and it seems that darwin doesn't
support `O_SYNC`, though it supports `O_NONBLOCK`. It shouldn't block
even with that, but I'm not sure why else it would fail.
2020-04-08 16:38:58 -06:00
LeRoyce Pearson
d0d7895d33
Return error from `else`
...
That removes the other switch cases (`error.WouldBlock` here) from the
error set, I think.
2020-04-08 08:37:17 -06:00
LeRoyce Pearson
45d6fb9e36
Catch error.WouldBlock as unreachable
2020-04-08 00:39:17 -06:00
Andrew Kelley
b3aef49eea
zig provides shlwapi.lib for *-windows-gnu
...
closes #3711
2020-04-08 01:21:00 -04:00
LeRoyce Pearson
858aefac7f
Add `OpenFileW` `share_access_nonblocking` parameter
2020-04-07 21:26:46 -06:00
Phil Schumann
b109186dd5
std/zig/parse_string_literal.zig: add hex+unicode escapes ( #4678 )
2020-04-07 20:27:18 -04:00
LeRoyce Pearson
317f06dc77
Add lock_nonblocking flag for creating or opening files
...
Also, make windows share delete access. Rationale: this is how it works
on Unix systems, mostly because locks are (usually) advisory on Unix.
2020-04-07 18:00:12 -06:00
LeRoyce Pearson
117d15ed7a
Fix file locking on windows
...
The share_access bitfield was being ORed with what was supposed to be
parts of the default value, meaning that the share_access would be
more permissive than expected.
2020-04-07 16:49:37 -06:00
LeRoyce Pearson
71c5aab3e7
Make lock option an enum
...
For some reason, this breaks file locking on windows. Not sure if this is
a problem with wine.
2020-04-07 16:49:30 -06:00
Andrew Kelley
4d290758bb
fix compile errors in some std.Target functions
...
The `ve` architecture needed to be added to a couple switch statements.
2020-04-07 15:06:58 -04:00
Andrew Kelley
22dbeab29d
Merge pull request #4857 from LemonBoy/fix-4777
...
Rewrite the bound checks in slice operator
2020-04-07 14:51:25 -04:00
Andrew Kelley
87a7ea4c42
Merge pull request #4971 from Vexu/const-ref
...
Fix missing const on address of literal
2020-04-07 14:24:50 -04:00
joachimschmidt557
1ee59c5c31
move big.rational.gcd to big.int.gcd
2020-04-07 13:43:15 -04:00
Michael Neumann
2b9cef1e04
Add missing constants for DragonFly
2020-04-07 17:23:20 +02:00
Vexu
95fefcd4c9
fix broken tests
2020-04-07 16:56:48 +03:00
LeRoyce Pearson
28d71c97d1
Fix compile error on darwin
2020-04-06 23:19:39 -06:00
LeRoyce Pearson
20597c8596
Only call `os.flock` on systems that lack openat locks
2020-04-06 22:28:43 -06:00
LeRoyce Pearson
49886d2e45
Remove return value from os.flock()
2020-04-06 22:07:27 -06:00
LeRoyce Pearson
798207ec80
Merge branch 'master' into feature-file-locks
2020-04-06 21:51:57 -06:00
Andrew Kelley
fc662ddd54
mingw-w64: add 32-bit version.def
...
fixes -lversion on 32-bit windows builds
2020-04-06 20:31:00 -04:00