Commit Graph

2952 Commits

Author SHA1 Message Date
Andrew Kelley
5e5eceb0de fix bootstrap_lib for windows 2018-04-29 15:50:56 -04:00
Andrew Kelley
b7095912c7 zig fmt: respect comments before statements 2018-04-29 15:48:53 -04:00
Andrew Kelley
f37e79e720
Merge pull request #963 from zig-lang/atomic-stack-and-queue
Atomic stack and queue
2018-04-29 12:29:40 -04:00
Alexandros Naskos
013f548202 Finished FnDef TypeInfo generation (warning: may be buggy). 2018-04-29 15:40:26 +03:00
Alexandros Naskos
66aa760f83 More FnDef TypeInfo generation. 2018-04-29 14:03:55 +03:00
Andrew Kelley
c76b0a845f fix std threads for linux 2018-04-29 02:56:59 -04:00
Andrew Kelley
b21bcbd775 fix std threads for macos 2018-04-29 02:52:04 -04:00
Andrew Kelley
6376d96824 support kernel threads for windows
* remove std.os.spawnThreadAllocator - windows does not support
   an explicit stack, so using an allocator for a thread stack
   space does not work.
 * std.os.spawnThread - instead of accepting a stack argument, the
   implementation will directly allocate using OS-specific APIs.
2018-04-29 02:40:22 -04:00
Andrew Kelley
bf8e419d2b linux uses pthreads when linking against libc 2018-04-29 00:40:04 -04:00
Andrew Kelley
abf90eaa67 enable atomic queue and stack tests for macos 2018-04-29 00:09:32 -04:00
Andrew Kelley
a425420993 make pthreads threads work on darwin
darwin pthreads adds a restriction that the stack start and end
must be page aligned
2018-04-29 00:07:32 -04:00
Andrew Kelley
998e25a01e pthread support working 2018-04-28 23:47:39 -04:00
Andrew Kelley
a344cb03bc *WIP* use pthreads when linking libc 2018-04-28 23:30:13 -04:00
Andrew Kelley
0bb054e5e7
Merge pull request #930 from zig-lang/float-printing
Finish and fix float printing
2018-04-28 22:43:52 -04:00
Andrew Kelley
ec2a81a081 fix compiler-rt ABI for x86_64 windows 2018-04-28 22:03:07 -04:00
Andrew Kelley
a10351b439 disable atomic stack and queue tests for non-linux 2018-04-28 18:19:00 -04:00
Andrew Kelley
5d6e44b3f2 add tests for std.atomic Queue and Stack 2018-04-28 18:00:51 -04:00
Andrew Kelley
96ecb40259 add fuzz tests for std.atomic.Stack 2018-04-28 17:53:06 -04:00
Andrew Kelley
4ac36d094c add std.atomic.Stack and std.atomic.Queue 2018-04-28 16:11:32 -04:00
Jimmi Holst Christensen
73bf897b5c Using allocate instead of allocate_nonzero so we don't have to memset 2018-04-28 19:21:23 +02:00
Jimmi Holst Christensen
d6f033b42d Fixed build error 2018-04-28 19:09:25 +02:00
Jimmi Holst Christensen
837166319d Trying to fix osx build failing by setting param_info.type to nullptr 2018-04-28 19:02:46 +02:00
Alexandros Naskos
af73462da4 Started work on function definition TypeInfo generation. 2018-04-28 19:57:59 +03:00
Jimmi Holst Christensen
341f8c1e86 Fixed wrong formatting for arg_index when reporting @ArgType error 2018-04-28 17:57:47 +02:00
Alexandros Naskos
9ba400673d Generating TypeInfo's now forces definitions to be resolved. 2018-04-28 18:38:38 +03:00
Jimmi Holst Christensen
fba0347ec4 .ReturnType and @ArgType now emits errors on unresolved types
related: #846
2018-04-28 17:17:48 +02:00
Jimmi Holst Christensen
2fc34eaa58 Functions with infered error set can now return literals
fixes #852
2018-04-28 16:27:31 +02:00
Alexandros Naskos
61b0180596 Added definition TypeInfo generation, except for function definitions. 2018-04-28 17:01:19 +03:00
Jimmi Holst Christensen
3178528335 Removed zero sized error set optimization
fixes #762
fixes #818
2018-04-28 14:05:08 +02:00
Alexandros Naskos
ea2596280f Added BoundFn TypeInfo generation. 2018-04-27 05:10:20 +03:00
Alexandros Naskos
8f703f919f Added Fn TypeInfo generation. 2018-04-27 04:29:50 +03:00
Alexandros Naskos
a2dadbc206 Added struct TypeInfo generation. 2018-04-27 02:52:09 +03:00
Alexandros Naskos
9041d0d37e Fixed enum tag type detection in TypeInfo generation. 2018-04-27 02:05:24 +03:00
Alexandros Naskos
884e32d5c3 Added ErrorUnion, Union TypeInfo generation 2018-04-26 19:56:34 +03:00
Alexandros Naskos
fbbbee6b72 Switched to shallow TypeInfo. 2018-04-26 18:18:47 +03:00
Alexandros Naskos
4aa5d87ada Added ErrorSet TypeInfo generation. 2018-04-26 17:14:38 +03:00
Alexandros Naskos
f5977f68eb Added Enum TypeInfo except for methods 2018-04-26 16:41:59 +03:00
Alexandros Naskos
7a91e4736a Reset parent on cached TypeInfo values if we need to. 2018-04-26 14:29:27 +03:00
Alexandros Naskos
bb56360bfa Added TypeInfo cache 2018-04-26 14:03:19 +03:00
Alexandros Naskos
dd88d7deda Cleanup 2018-04-26 13:27:16 +03:00
Alexandros Naskos
bc160821d3 Changed TypeInfo layout. 2018-04-25 17:50:11 +03:00
Alexandros Naskos
2606993cb4 Fixed ir_type_info_struct_set_parent for struct parents. 2018-04-25 11:59:35 +03:00
Alexandros Naskos
d68aea4f35 Added checks for field name/index mapping in TypeInfo generation. Abstracted the parent setting out. 2018-04-25 11:35:46 +03:00
Braedon
07af6559d8
Changed to use shifting and masking 2018-04-25 16:26:57 +10:00
Braedon
f6cbe9a9cc
Utf8 Encode 2018-04-25 14:59:03 +10:00
Andrew Kelley
7270f35c93 Merge remote-tracking branch 'origin/master' into float-printing 2018-04-24 23:47:37 -04:00
Andrew Kelley
27cbb44993
Merge pull request #949 from zig-lang/complex-math
Add initial complex-number support
2018-04-24 21:24:08 -04:00
Andrew Kelley
84391af7b8 convert NOTE to TODO so we catch it later
See #363

For Complex as a builtin type, see discussion in #949
2018-04-24 21:23:03 -04:00
Andrew Kelley
1d998d5dce clean up complex math tests 2018-04-24 21:14:12 -04:00
Andrew Kelley
13076d5f22 std.mem: add more slice manipulation functions
* add std.mem.trimLeft
 * add std.mem.trimRight
 * add std.mem.trimRight
 * add std.mem.lastIndexOfScalar
 * add std.mem.lastIndexOfAny
 * add std.mem.lastIndexOf
 * add std.mem.endsWith

closes #944

Thanks Braedon Wooding for the original PR
2018-04-24 20:53:36 -04:00