Commit Graph

8791 Commits (0746028a2a6caf28e396f042be0b23c8d6fb7a5e)

Author SHA1 Message Date
Andrew Kelley 0746028a2a ir: analyze int instruction 2020-04-21 17:54:00 -04:00
Andrew Kelley 69878207e7 ir: analyze `as` instruction 2020-04-21 17:33:41 -04:00
Andrew Kelley 25679b63eb ir: analyze primitive instruction 2020-04-21 17:11:42 -04:00
Andrew Kelley 8671e8d6d4 ir: analyze fntype instruction 2020-04-21 17:06:09 -04:00
Andrew Kelley 22e7ca5613 ir: analysis of fn instruction 2020-04-21 16:06:15 -04:00
Andrew Kelley 9a2ea5ca42 ir: comptime coerceArrayPtrToSlice 2020-04-21 13:50:04 -04:00
Andrew Kelley fb63ba2577 ir: type coercion skeleton 2020-04-21 13:24:25 -04:00
Andrew Kelley 8e0bcaca9b ir: analyze str instruction 2020-04-21 01:20:01 -04:00
Andrew Kelley 4c7507cceb ir: semantic analysis skeleton 2020-04-21 00:56:30 -04:00
Andrew Kelley cc1c2bd568 simplify ZIR spec; separate parsing/rendering from analysis 2020-04-20 19:21:03 -04:00
Andrew Kelley af4ccf34c1 ir: render keyword parameters 2020-04-19 23:59:00 -04:00
Andrew Kelley f7786d0ca8 ir: render function body 2020-04-19 23:39:34 -04:00
Andrew Kelley e74c5a7c24 ir: nice rendering of string literal constants 2020-04-19 20:44:18 -04:00
Andrew Kelley 91ca0e4b02 implement rendering escaped zig string literals 2020-04-19 20:33:15 -04:00
Andrew Kelley ded6e0326d ir: rendering skeleton 2020-04-19 20:04:11 -04:00
Andrew Kelley 1f3eeb5443 ir: parse type noreturn 2020-04-19 19:31:50 -04:00
Andrew Kelley 104ae419e4 ir: parse export instruction 2020-04-19 19:31:50 -04:00
Andrew Kelley f020999ca3 ir: parse asm instructions 2020-04-19 19:31:50 -04:00
Andrew Kelley 82e294cf09 ir: parse deref instruction 2020-04-19 19:31:50 -04:00
Andrew Kelley 730dd887e4 ir: parse string literals as parameters 2020-04-19 19:31:50 -04:00
Andrew Kelley bd37c8d8ed ir: parse ptrtoint 2020-04-19 19:31:50 -04:00
Andrew Kelley 49e2f3ca36 ir: more foolproof way to organize instruction parsing 2020-04-19 19:31:50 -04:00
Andrew Kelley 4cb203db92 ir: parsing integer literals 2020-04-19 19:31:50 -04:00
Andrew Kelley 7127c07f68 ir: parse types 2020-04-19 19:31:50 -04:00
Andrew Kelley 59154a1c51 ir: parse fn body 2020-04-19 19:31:50 -04:00
Andrew Kelley 018daa028e rework types and values data layout 2020-04-19 19:31:50 -04:00
Andrew Kelley f92ccf365b generic ir parsing framework 2020-04-19 19:31:50 -04:00
Andrew Kelley bd4280decf beginnings of zig ir parser 2020-04-19 19:31:50 -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