Commit Graph

2812 Commits (78ba3b84850c1e1494797f76d147bc8c87f749e1)

Author SHA1 Message Date
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
Alexandros Naskos 778b931bf3 Fixed comptime union void field access 2018-04-25 02:50:18 +03:00
Alexandros Naskos 182a9fad2d Added ArrayInfo, NullableInfo, PromiseInfo generation 2018-04-24 17:38:30 +03:00
Alexandros Naskos 09d7033d1d PointerInfo child is known at comptime 2018-04-24 17:08:45 +03:00
Alexandros Naskos 2d8553c853 Fixed PointerInfo generation 2018-04-24 17:01:20 +03:00
Alexandros Naskos 189e8e97bd PointerInfo child is a pointer to a TypeInfo union, still not working correctly 2018-04-24 16:50:36 +03:00
Alexandros Naskos 0e5fb035e3 Added (broken) pointer info, float info 2018-04-24 16:23:22 +03:00
Alexandros Naskos e9309d3b13 Fixed IntInfo generation. 2018-04-24 15:17:34 +03:00
Alexandros Naskos ec2a3ed500 Attempt at adding comptime union field access 2018-04-24 15:03:46 +03:00
Marc Tiehuis 0501e066b5 crypto throughput test now uses os.time module 2018-04-24 23:54:27 +12:00
Alexandros Naskos fb88f5a0d2 @typeInfo with void payloads now works! 2018-04-24 11:20:33 +03:00
Marc Tiehuis d5e99cc05e Add initial complex-number support
- Library type instead of builtin
 - All C complex functions implemented

Partial WIP: Needs more tests for edge cases.
2018-04-24 19:18:31 +12:00
Alexandros Naskos 7eab62325b One step towards @typeInfo 2018-04-24 01:49:22 +03:00
Andrew Kelley 15bf0c1541 fix interaction between defer and labeled break
closes #830
2018-04-23 18:06:33 -04:00
Andrew Kelley 89a4c373d3 fix bigint twos complement implementation
closes #948
2018-04-23 12:06:18 -04:00
Marc Tiehuis e5175d432e Fix release float printing errors
Fixes #564.
Fixes #669.
Fixes #928.
2018-04-23 17:22:51 +12:00
Marc Tiehuis d8ba1bc120 Improve fmt float-printing
- Fix errors printing very small numbers
 - Add explicit scientific output mode
 - Add rounding based on a specific precision for both decimal/exp
 modes.
 - Test and confirm exp/decimal against libc for all f32 values. Various
 changes to better match libc.
2018-04-23 17:22:51 +12:00
Andrew Kelley 8503eff8c1 add compile error for invalid deref on switch target
closes #945
2018-04-22 23:46:55 -04:00
Andrew Kelley 75328e3204 exit(1) instead of abort() for file not found 2018-04-22 21:47:25 -04:00
Andrew Kelley 25dff91fa0 fix windows build broken by previous commit
fixes build failure from 1c41f1ca62
2018-04-22 21:08:52 -04:00
Andrew Kelley 1c41f1ca62 better error reporting for missing libc on windows
closes #931
2018-04-22 20:54:52 -04:00
Andrew Kelley 371a3ad4bd Merge branch 'tgschultz-std.os.time' 2018-04-22 18:13:57 -04:00
Andrew Kelley 7af6ed3f20 add alignment docs 2018-04-22 18:13:53 -04:00
Andrew Kelley 21767144fc linux: support VDSO for clock_gettime
also fix a compiler crash when using cmpxchg with nullable pointer
2018-04-22 18:11:50 -04:00
Andrew Kelley da2af9c613 fixups 2018-04-22 13:36:26 -04:00
Andrew Kelley 0dcadc61b4 Merge branch 'std.os.time' of https://github.com/tgschultz/zig into tgschultz-std.os.time 2018-04-22 13:24:25 -04:00
Andrew Kelley 98b88bb52f add alignment docs 2018-04-22 12:52:28 -04:00
Andrew Kelley 3010668390
Merge pull request #939 from tgschultz/large-alignment-directalloc
DirectAllocator alignments > os.page_size on posix
2018-04-22 12:49:13 -04:00
Andrew Kelley a3e9ae8f74 travis: use encrypted env vars for s3 credentials 2018-04-22 12:33:02 -04:00
tgschultz a1083b019c Added DirectAllocator support for alignments > os.page_size on posix systems 2018-04-21 20:41:49 -05:00
Andrew Kelley c4840d78fb add test case for #936 2018-04-21 02:10:22 -04:00
Andrew Kelley 1098545e47 std.zig.parser: remove unused field 2018-04-21 02:10:22 -04:00
Harry Eakins eef4bbb65f Changed all MB to MiB 2018-04-21 11:06:10 +12:00
Harry Eakins b229aff34a Readability improvements and bug-fix to std/crypto/throughput_test.zig 2018-04-21 11:06:10 +12:00
Andrew Kelley 6e57243a79 zig fmt: preserve comments in front of test blocks
* refactor std.zig.parser
 * fix compiler crashing for some compile errors
 * take advantage of @field in std.zig.ast
 * move ast.NodeFoo to ast.Node.Foo
 * comment preservation is more explicit

See #911
2018-04-20 02:15:09 -04:00
Jimmi Holst Christensen cc35f085ca
Merge pull request #934 from zig-lang/adding-builtin-field
Added @field builtin function
2018-04-19 22:43:41 +02:00
tgschultz ca4053ba49 Use std.os.errorUnexpectedPosix if timer initialization encounters unexpected error 2018-04-19 14:53:58 -05:00
Jimmi Holst Christensen 72bf9d90cc Added builtin field to docs 2018-04-19 21:48:09 +02:00
Jimmi Holst Christensen 1b91478bff Optimized field ptr ir for hot path and fix assignment bug 2018-04-19 21:34:18 +02:00
Jimmi Holst Christensen 6b4f6ebd89 Added field builtin function 2018-04-19 20:11:16 +02:00
tgschultz 89eade0548 Style cleanups, u64 casts, Timer.start returns error instead of unreachable on unexpected errno. 2018-04-19 10:01:41 -05:00