Commit Graph

5232 Commits

Author SHA1 Message Date
Luna
07c0d484ee net: quickfix on non-existing Address.family 2019-06-26 13:24:51 -04:00
Vexu
fa42c99d82 fixed IfTypeExpr parsing 2019-06-26 11:04:34 -04:00
Andrew Kelley
e79e8993e6
Merge pull request #2750 from cartr/thumbv4-aeabi
compiler-rt: Support thumb versions older than armv6
2019-06-26 11:03:42 -04:00
Carter Sande
f9e26d9871 compiler-rt: use more idiomatic switch syntax 2019-06-25 22:56:09 -07:00
Marc Tiehuis
f5af349bd6
Merge pull request #2714 from ziglang/fmt-overhaul
Add positional, precision and width support to std.fmt
2019-06-25 20:15:33 +12:00
Carter Sande
cd02630da8 compiler-rt: Support thumb versions older than armv6
Add versions of __aeabi_memset and __aeabi_memclr which do not use mov
instructions between low registers, as this is unsupported on thumbv4t
and thumbv5.
2019-06-24 22:32:50 -07:00
Marc Tiehuis
08e8d30dd6 Add parsing of fill and alignment in std.format
These options are now available to use when printing, however nothing
currently makes use of these.
2019-06-25 17:11:18 +12:00
Michael Dusan
de2b0cd722 fix compile error when building zig w/ clang
errors as reported on macOS w/ Xcode 10.1, 10.2 and 11.0:

src/ir.cpp:23285:16: error: variable 'bits' is used uninitialized whenever 'if' condition is false [-Werror,-Wsometimes-uninitialized]
    } else if (float_type->id == ZigTypeIdFloat)
               ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ir.cpp:23288:13: note: uninitialized use occurs here
    switch (bits) {
            ^~~~
src/ir.cpp:23285:12: note: remove the 'if' if its condition is always true
    } else if (float_type->id == ZigTypeIdFloat)
           ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
src/ir.cpp:23281:18: note: initialize the variable 'bits' to silence this warning
    unsigned bits;
2019-06-24 16:25:18 -04:00
Andrew Kelley
24400d5882
Merge branch 'shawnl-simd2' 2019-06-23 17:14:28 -04:00
Andrew Kelley
7f4de2dfdb
remove stray abort 2019-06-23 17:14:10 -04:00
Andrew Kelley
b2cbc59e4c
Merge branch 'simd2' of https://github.com/shawnl/zig into shawnl-simd2 2019-06-23 17:10:33 -04:00
emekoi
ca3660f6bf increase stack size for mingw 2019-06-23 16:51:12 -04:00
Andrew Kelley
9153b17c92
Merge pull request #2733 from emekoi/write-strings
various fixes for mingw
2019-06-22 23:51:21 -04:00
emekoi
f1c57a7f84 supress warnings for format strings on msys64 2019-06-22 20:21:48 -05:00
emekoi
3ac9e3c888 make string literal const on windows 2019-06-22 19:54:11 -05:00
Shawn Landden
71e014caec stage1: add @sin @cos @exp @exp2 @ln @log2 @log10 @fabs @floor @ceil @trunc @round
and expand @sqrt

This revealed that the accuracy of ln is not as good as the current algorithm in
musl and glibc, and should be ported again.

v2: actually include tests
v3: fix reversal of in and out arguments on f128M_sqrt()
    add test for @sqrt on comptime_float
    do not include @nearbyInt() until it works on all targets.
2019-06-22 14:34:34 -05:00
Sahnvour
987c209b40 heap: make one global instance of DirectAllocator
it is now stateless, so the de/init are not necessary anymore
2019-06-22 14:10:53 -04:00
Gray Olson
be51511d29 Update langref.html.in 2019-06-22 01:15:47 -04:00
Shawn Landden
ebde2ff899 stage1: update fn_key_eql() for @mulAdd() on vectors 2019-06-21 08:44:20 -05:00
Marc Tiehuis
948dc7b304 Link formatting workaround to issue 2019-06-21 20:23:53 +12:00
Marc Tiehuis
11526b6e9d breaking: Add positional, precision and width support to std.fmt
This removes the odd width and precision specifiers found and replacing
them with the more consistent api described in #1358.

Take the following example:

    {1:5.9}

This refers to the first argument (0-indexed) in the argument list. It
will be printed with a minimum width of 5 and will have a precision of 9
(if applicable).

Not all types correctly use these parameters just yet. There are still
some missing gaps to fill in. Fill characters and alignment have yet to
be implemented.
2019-06-21 20:11:15 +12:00
Matthew Murray
2cbcf3f38b Fix absFloat 2019-06-20 19:34:22 -04:00
Michael Dusan
60b1cf2a83 fix macOS stack trace regression
f8f054b354 exposes the issue where
macho symbol `__mh_execute_header` is weak exported with an extra
underscore and stack traces fail due to invalid header magic.

related #2700
2019-06-20 19:29:25 -04:00
Shawn Landden
39ad072a84 test: include muladd.zig in behavior tests 2019-06-19 12:07:02 -05:00
Shawn Landden
fce2d2d18b stage1: add support for @mulAdd fused-multiply-add for floats and vectors of floats
Not all of the softfloat library is being built....

Vector support is very buggy at the moment, but should work when the bugs are fixed.
(as I had the same code working with another vector function, that hasn't been merged yet).
2019-06-19 12:07:02 -05:00
Shawn Landden
bbfb53d524 c: add fma and fmaf 2019-06-19 12:07:02 -05:00
joachimschmidt557
381c6a38b1 Correct the isEmpty function
Integrate isEmpty into the tests for std.atomic.Queue

Fix wrong test

Oops

Simpler checking
2019-06-18 16:31:06 -04:00
Jonathan Marler
c7bcf1a447 Fix windows create process retry/path search 2019-06-18 13:19:06 -04:00
Andrew Kelley
3ca4925709
Merge branch 'kristate-you-are-banned-please-fuck-off'
closes #2701
2019-06-18 11:32:31 -04:00
Andrew Kelley
9050a07540
when resolving slice types, might need to...
...resolve alignment if custom alignment is provided

fixes #2689
2019-06-18 11:31:05 -04:00
Andrew Kelley
8ed88280a6
Revert "fixes resolving aligment of child type in slice"
This reverts commit aa60d2a688.

The copyright ownership of this 10 line patch is under dispute.
See #2701 for details. So I'll revert it and then fix it myself without
looking at this patch.
2019-06-18 11:18:53 -04:00
Boris
99112b5d4a fix tiny typo in langref.html.in 2019-06-18 10:01:48 -04:00
Jonathan Marler
21dff1c4e2 Remove duplicate exe name with zig run 2019-06-17 14:10:10 -04:00
Marc Tiehuis
d5d0942a0d Small cleanup of fmt.zig
Use inferred enum literals and split the large test case up.
2019-06-17 13:00:00 -04:00
Josh Wolfe
50c8a93a5e mem.concat 2019-06-17 01:41:33 -04:00
daurnimator
6ce2a03985 std: add gimli permutation to crypto 2019-06-16 22:55:38 -04:00
Timon Kruiper
72029c2fc8 Added HashInt to function calls AutoHash\nFixes issue 2669 2019-06-16 14:36:23 -04:00
Shawn Landden
4d3356435f stage1: check for null in buf_len and buf_ptr
follow up for f4b8850002
2019-06-16 14:26:38 -04:00
Andrew Kelley
f4b8850002
fix type info crash on extern lib name 2019-06-16 14:14:57 -04:00
Jimmi HC
aa60d2a688 fixes resolving aligment of child type in slice 2019-06-16 00:03:43 -04:00
Andrew Kelley
7c5ceb0c4c
standard library integrates with knowledge of stripped debug info 2019-06-14 18:45:41 -04:00
Andrew Kelley
362c79140f
expose builtin.strip_debug_info
zig code now can be made aware that it will not have any debug
information available at runtime.
2019-06-14 18:18:43 -04:00
Andrew Kelley
f8f054b354
fix @export for arrays not respecting the symbol name
Previously, the symbol name parameter of `@export` would be ignored for
variables, and the variable name would be used for the symbol name.
Now it works as expected.

See #2679
2019-06-14 17:23:24 -04:00
Andrew Kelley
42ea2d0d1c
fix @export for arrays and allow sections on extern variables
previously `@export` for an array would panic with a TODO message.
now it will do the export. However, it uses the variable's name
rather than the name passed to `@export`. Issue #2679 remains open
for that problem.
2019-06-14 15:28:52 -04:00
Jonathan Marler
9e8db5b750 Remove const on argsAlloc 2019-06-13 11:42:17 -04:00
Josh Wolfe
82ab006e58 HashMap.getValue() 2019-06-13 11:41:34 -04:00
Jonathan Marler
8a2c2da805 Handle putNoClobber errors 2019-06-13 01:56:12 -04:00
Josh Wolfe
80fa871f4a Add HashMap apis that assert the common case
* putNoClobber() for put()
* removeAssertDiscard() for remove()
2019-06-13 00:17:12 -04:00
Nicholas Walton
fcc0728a35 Update langref.html.in
Missing an "it"
2019-06-11 14:37:15 -04:00
tgschultz
34a22a85ca altered all instances of readInt* in std.io (and std.debug) to consume the minimum byte size required instead of @sizeOf(). 2019-06-10 17:10:35 -04:00