1717 Commits

Author SHA1 Message Date
Andrius Mitkus
6481b02fdc std: fix posix Thread.spawn to accept all startFn types 2020-04-25 16:15:25 -04:00
daurnimator
1d6e53756b
std: add in_stream.isBytes 2020-04-25 20:42:13 +10:00
daurnimator
b531c0e676
std: add instream.readBytesNoEof function 2020-04-25 20:38:46 +10:00
Andrew Kelley
7634e67ba5
Merge pull request #5158 from ziglang/zir-to-elf
beginnings of (non-LLVM) self-hosted machine code generation and linking
2020-04-24 15:37:21 -04:00
Andrew Kelley
9ebf25d145 link: change default executable mode to 0o777
Jonathan S writes:

On common systems with a 022 umask, this will still result in a
file created with 755 permissions, but it works appropriately if the
system is configured more leniently. (As another data point, C's fopen
seems to open files with the 666 mode.)
2020-04-24 15:36:08 -04:00
Timon Kruiper
c829f2f7b7 Add mips support to standard library 2020-04-24 15:28:55 -04:00
xackus
ebbd137a0e fix json.WriteStream.emitJson 2020-04-23 22:14:23 +02:00
Andrew Kelley
a3dfe36ca1 zir-to-elf skeleton 2020-04-22 23:42:58 -04:00
Michael Dusan
9a06f966cd
Merge pull request #5125 from mikdusan/kern.osproductversion
macos: add fallback version detection
2020-04-22 15:57:29 -04:00
Andrew Kelley
e8545db9d4
Merge pull request #5130 from ziglang/stage2-ir
beginnings of non-LLVM self-hosted backend
2020-04-22 14:42:46 -04:00
Andrew Kelley
173a143dd0
Merge pull request #5133 from LemonBoy/win-progress
Progressbar for Windows
2020-04-22 12:52:48 -04:00
LemonBoy
0a2519fafb stage2: Allow \t in string literals
Lift the ban on literal tab chars in string literals as they have
nothing to do with code formatting.
2020-04-22 12:48:45 -04:00
LemonBoy
155e631aa6 std: Implement progress for Windows
Use the Win32 API instead of using the VT escape sequences.
2020-04-22 12:58:02 +02:00
Andrew Kelley
1eda2ada9a std.math.big.Int: don't rely on the allocator when printing 2020-04-22 03:49:50 -04:00
Andrew Kelley
2cdbb5f472 ir: analyze int casting 2020-04-21 19:48:59 -04:00
Michael Dusan
3df0a3a528
macos: add fallback version detection
Fallback to sysctl `kern.osversion` when `kern.osproductversion` is not
available (prior to 10.13.4) .

The mapping from `sw_vers -buildVersion` to `-productVersion` is
formulaic from 10.8 to 10.15 and older is handled with switch.

closes #5119
2020-04-21 18:37:03 -04:00
Haze Booth
78e2a203e3 Remove std.lazyInit 2020-04-21 18:04:37 -04:00
Andrew Kelley
22e7ca5613 ir: analysis of fn instruction 2020-04-21 16:06:15 -04:00
Robin Voetter
32e5248820 Remove old-style @typeOf compatibility 2020-04-20 22:38:29 -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
Lachlan Easton
0122f2cff6 Translate C: Redo Add comment containing c source location for failed decls. 2020-04-14 22:13:43 +10:00
daurnimator
d29ed2a785 std: fix StreamSource to disallow writing to a const buffer 2020-04-13 13:26:13 -04:00
Pierre Guilleminot
f31e0d9834 docs: use String.repeat for dom templates 2020-04-13 14:03:44 +02: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
Pierre Guilleminot
297452cf67 improve search perf: trim search results 2020-04-12 23:17:20 +02:00
Pierre Guilleminot
f76d59ef76 improve search perf: batching dom list mutations 2020-04-12 23:13:57 +02: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
Lachlan Easton
daff072af2 Add visible newlines to parser_test output when there's a failure.
Also print first line that differs between expected and result.
2020-04-10 10:38:36 +10: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