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
elucent
48dc3b6fe9
Added peer type resolution for [*]T and *[N]T.
2020-04-21 18:09:03 -04:00
Michael Dusan
412aac8a70
cleanup: IrBasicBlockGen
...
remove unused param from `ir_ref_inst_gen`
2020-04-21 18:07:48 -04:00
Michael Dusan
73677e178d
cleanup: IrBasicBlockGen
...
remove unused members { parent, index, ref_count }
2020-04-21 18:07:48 -04:00
Haze Booth
78e2a203e3
Remove std.lazyInit
2020-04-21 18:04:37 -04:00
LemonBoy
aca6b70184
stage1: Handle errors when generating block IR
...
Closes #5005
2020-04-20 22:39:34 -04:00
Robin Voetter
32e5248820
Remove old-style @typeOf compatibility
2020-04-20 22:38:29 -04:00
LemonBoy
5eaf948e62
stage1: Fix wrong union access
...
Thanks to @frett27 on irc for reporting the compiler would segfault when
run on ARM.
2020-04-20 13:43:14 -04:00
LemonBoy
328eb8ed8d
stage1: Fix signed multiplication overflow
...
Spotted thanks to UBSan
2020-04-19 06:46:33 -04:00
Andrew Kelley
051620dcaf
Merge pull request #5097 from Vexu/field
...
Disallow declarations between fields
2020-04-19 03:52:53 -04:00
xackus
d415ffd7d9
fix uninitialized ZigValue
2020-04-19 03:49:36 -04:00
Vexu
b6fe839248
update std lib to decls being disallowed between fields
2020-04-18 23:56:05 +03:00
Vexu
fff00c3bbb
disallow declarations between container fields
2020-04-18 23:56:03 +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
44ff55091f
Merge branch 'cshenton-patch-1'
...
closes #5085
2020-04-18 14:42:49 -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
Andrew Kelley
6b2274fd99
Merge pull request #5088 from Vexu/varargs-fix
...
Add error for non-exter variadic functions
2020-04-18 14:35:35 -04:00
Christian Wesselhoeft
344f4d9bc5
std.os.readv: Add missing iov_count declaration
2020-04-18 14:32:52 -04:00
Vexu
4f02cf32b4
fix typeInfo tests
2020-04-18 11:39:52 +03:00
Andrew Kelley
986aa42d3e
update cmake, update readme, in response to the dynamic linking fiasco
2020-04-17 18:41:21 -04:00
Vexu
1afaf42525
add error for non-exter variadic functions
2020-04-17 22:02:49 +03:00
Vexu
c026a9f6d2
fix missing compile errors on builtin cast functions
2020-04-17 14:22:20 -04:00
LemonBoy
8e96922f31
stage1: Fix several bugs in constant generation
...
The codegen would sometimes change the LLVM type for some constants to
an unnamed structure in order to accomodate extra padding. This is fine
as long as the alignment of each field is still respected and it was not
the case for structure types, leading to ill-formed constants being
generated.
Optional types suffer from this to a lower extent as their layout is
quite lucky, the only missing piece was the tail padding.
Closes #4530
Closes #4594
Closes #4295
Closes my will to live
2020-04-17 13:42:23 -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
Layne Gustafson
480deacbab
CC: fix binary dupe with no -o
2020-04-15 12:52:35 -04:00
joachimschmidt557
3fd38429e4
Enable formatting in std.big.Int.format
2020-04-15 12:51:43 -04:00
Vexu
0276d9ddc5
Merge pull request #5046 from Vexu/translate-c
...
Translate-c correct invalid shortcut
2020-04-15 18:06:38 +03:00
Vexu
ca3bf6e6ad
translate-c cleanup and zig fmt
2020-04-15 15:15:32 +03:00
Vexu
a016fb8c62
translate-c: correct invalid shortcut
2020-04-15 15:14:10 +03:00
Jakub
1e23a3cd91
Added gdi32.zig and More user32 definitions
2020-04-14 16:20:48 -04:00
foobles
022a71ca7d
Shift error message now says "fixed-width integer type" instead of just "integer type" ( #5028 )
...
* error message of ir_analyze_bit_shift now more accurate/specific
* fixed compile error test to match bit shift error message
2020-04-14 16:19:45 -04:00
markfirmware
5974a88794
Update emit_raw.zig
2020-04-14 16:19:01 -04:00
Andrew Kelley
fc48c232e5
cli: add c++
subcommand to --help menu
...
closes #5034
2020-04-14 13:38:18 -04:00
Andrew Kelley
448f8c2eb8
langref: add link to 0.6.0 version
2020-04-13 21:33:08 -04:00
LemonBoy
ce21a784a4
stage1: More fixes for BE targets
...
* Fix packed struct alignment
* Adjust some tests
2020-04-13 17:35:14 -04:00
Andrew Kelley
cf750a58d5
Release 0.6.0
2020-04-13 13:36:30 -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
Michael Dusan
e009c1596e
Merge pull request #5014 from nmeum/@panic-path
...
Update documentation of @panic
2020-04-12 18:21:06 -04:00
Heppoko
a3b2de1d1e
fix file protocol structure definitions ( #5015 )
2020-04-12 16:45:11 -04:00
emekoi
0744d93ed5
added CI job for mingw
2020-04-12 16:44:29 -04:00
Sören Tempel
6f5a7b8457
Update documentation of @panic
...
The default panic handler implementation was moved to `builtin.zig`.
2020-04-12 13:08:50 +02:00
daurnimator
8e9e126d41
std: add some basic windows user32 definitions
2020-04-12 02:28:52 -04:00
Michael Dusan
20b2457388
only use -nostdinc++
on c++ files
...
This is a follow-up to d27ef1aaef
and avoids compiler warnings:
warning: argument unused during compilation: '-nostdinc++'
2020-04-12 01:03:27 -04:00
Andrew Kelley
d27ef1aaef
Zig treats -lstdc++ identically to -lc++
...
Thanks to Michael Dusan for figuring out what was happening here.
closes #5012
2020-04-12 00:50:16 -04:00