Tau
840331ee48
Rebase link(at) properly
2021-02-21 12:04:40 +02:00
Benjamin Graf
c70832bc41
replace ArrayList.shrinkAndFree by ArrayList.shrinkRetainingCapacity
2021-02-21 11:56:14 +02:00
Jonathan Marler
a448210fcf
remove z/Z format specifier deprecations
...
The z/Z format specifiers were merged last October (4 months ago). They were then deprecated in January (just over a month ago). This PR removes them altogether.
2021-02-21 11:55:21 +02:00
rgreenblatt
f9be7471bc
fix readable slice bug (and add tests)
2021-02-21 11:48:38 +02:00
data-man
340825a7af
Add epoll_pwait2 Linux syscall
2021-02-21 11:47:13 +02:00
rgreenblatt
a5dcd07382
fix unspecified fmt
2021-02-21 01:31:46 +02:00
Michael Dusan
153cd4da0c
macos: fix cond to enable ZIG_SYSTEM_LINKER_HACK
...
closes #8037
2021-02-19 23:37:13 -05:00
Andrew Kelley
68e7726478
std.fs.net.Stream: add writev and writevAll
...
I noticed that the write function does not properly use non-blocking
I/O. This file needs to be reworked for evented I/O to properly take
advantage of non-blocking writes to network sockets.
2021-02-16 11:01:17 -07:00
Tadeo Kondrak
9270aae071
stage2: fix zero-sized function parameters ( #7998 )
2021-02-12 15:40:44 -05:00
Andrew Kelley
d3565ed6b4
Merge pull request #7749 from tadeokondrak/6429-callconv-inline
...
Replace inline fn with callconv(.Inline)
2021-02-11 16:01:58 -08:00
Evan Haas
d98f09e4f6
translate-c: comma operator should introduce a new scope
...
This prevents inadvertent side-effects when an expression is not evaluated
due to boolean short-circuiting
Fixes #7989
2021-02-12 01:40:43 +02:00
Tadeo Kondrak
bb4f4c043e
test/cli.zig: Remove inline from panic function in testGodboltApi
...
Might add another line to stack traces there.
2021-02-10 20:22:20 -07:00
Tadeo Kondrak
bcc13597fc
translate_c: switch from inline fn to callconv(.Inline)
2021-02-10 20:22:19 -07:00
Tadeo Kondrak
7644e9a752
stage2: switch from inline fn to callconv(.Inline)
2021-02-10 20:22:18 -07:00
Tadeo Kondrak
1c15091bc8
stage1: switch from inline fn to callconv(.Inline)
2021-02-10 20:06:13 -07:00
Tadeo Kondrak
5dfe0e7e8f
Convert inline fn to callconv(.Inline) everywhere
2021-02-10 20:06:12 -07:00
Tadeo Kondrak
9c797fe3ac
std.zig: reformat inline fn to callconv(.Inline)
2021-02-10 20:06:11 -07:00
Jonathan Marler
61bcac108c
Add more mingw def files
...
I've added more of the ".def" files from mingw. The list is based on all the libraries referenced by the win32metadata project. (see https://github.com/marlersoft/zigwin32 ).
2021-02-10 13:38:16 -08:00
Isaac Freund
6dc2236054
musl: update to 1.2.2
2021-02-10 11:50:55 -08:00
Evan Haas
a2ec77041b
translate-c: call @boolToInt on return value when necessary
...
In C, if a function has return type `int` and the return expression
is a boolean expression, there is no implicit cast. Therefore the
translated Zig code needs to call @boolToInt() on the result.
Written with feedback from @Vexu
Fixes #6215
2021-02-10 20:23:27 +02:00
Jonathan Marler
1480c42806
require specifier for arrayish types
2021-02-09 22:25:52 -08:00
joachimschmidt557
6a5a6386c6
stage2 ARM: fix register allocation in genArmBinOp
...
Previously, this would reuse an operand even if reuseOperand returned
false for both operands.
genArmBinOpCode was also changed to be more Three-address code oriented
in the process.
2021-02-09 23:58:41 +01:00
joachimschmidt557
c2beaba85a
stage2 ARM: fix callee_preserved_regs
...
Previously, the registers included r0, r1, r2, r3 which are not
included in the callee saved registers according to the Procedure Call
Standard for the ARM Architecture.
2021-02-09 23:57:43 +01:00
Evan Haas
221f1d898c
translate-c: Improve function pointer handling
...
Omit address-of operator if operand is a function.
Improve handling of function-call translation when using function pointers
Fixes #4124
2021-02-08 10:15:00 +02:00
Andrew Kelley
1adac0a55b
never pass -s to clang
...
We only use clang to produce object files; the idea of stripping is not
relevant here.
Fixes regression in previous commit.
2021-02-07 15:08:48 -07:00
Andrew Kelley
e197a03124
zig cc: recognize the -s flag to be "strip"
2021-02-07 14:51:27 -07:00
Michael Dusan
905c85be96
Merge pull request #7957 from mk12/catalina
...
Use -isysroot on Catalina too, not just Big Sur
2021-02-06 20:12:09 -05:00
Mitchell Kember
fc79cbcc80
Use -isysroot on Catalina too, not just Big Sur
...
This amends #7506 to apply to macOS versions since Catalina (10.15),
rather than since Big Sur (11.0).
2021-02-06 16:32:32 -05:00
Michael Dusan
300ebbd560
target: map zig ppc32 → llvm ppc
...
- llvm does not accept `ppc32` as a CPU type
closes #7947
2021-02-04 14:22:38 -08:00
Rocknest
2d447b57cc
fix typo in comment
2021-02-02 20:07:08 -08:00
Michael Dusan
8661a13b74
fix superfluous fmt specifier in update_glibc
2021-02-02 10:00:13 -05:00
Frank Denis
7a01d396ee
siphash: update the link to the SipHash paper
2021-02-02 11:17:14 +02:00
Michael Dusan
70a7c14ca6
update update_glibc to format strings with "{s}"
2021-02-01 16:57:41 -05:00
Andrew Kelley
102d954220
Merge pull request #7827 from Snektron/spirv-setup
...
Stage 2: SPIR-V setup
2021-02-01 12:49:51 -08:00
Jonathan Marler
06b29c8546
std.json large number support
2021-02-01 12:40:49 -08:00
Martin Wickham
1032a69321
Dupe strings on all public api points for std.build
2021-02-01 12:31:24 -08:00
Ryan Liptak
5e81b048a0
docs: Clarify that @field can work on declarations
2021-02-01 12:29:50 -08:00
Andrew Kelley
1517ed0a5e
Merge pull request #7895 from Luukdegram/wasm-control-flow
...
stage2: wasm control flow
2021-02-01 12:29:22 -08:00
Luuk de Gram
c0685458a2
Define wasm constants
...
Update link.Wasm.zig to use std.wasm for its constants
Make opcodes u8 and non-exhaustive
Update test and rename 'spec' to 'wasm'
2021-02-01 12:28:25 -08:00
Cameron Conn
683d3f7242
Don't read more bytes than exist in MsfStream ( #7839 )
2021-02-01 15:27:39 -05:00
joachimschmidt557
446ebddb93
stage2 ARM: save function arguments to stack for debugging
...
This changes genArg to copy registers to the stack for better
debugging. Thus, it requires genSetStack to be implemented in order for
genArg to work.
2021-02-01 12:17:24 -08:00
Vincent Rischmann
16905d96f7
Fixes for std.Thread.Condition ( #7883 )
...
* thread/condition: fix PthreadCondition compilation
* thread/condition: add wait, signal and broadcast
This is like std.Thread.Mutex which forwards calls to `impl`; avoids
having to call `cond.impl` every time.
* thread/condition: initialize the implementation
2021-02-01 15:16:39 -05:00
Andrew Kelley
11f6916f9b
Merge pull request #7892 from Vexu/stage2-cbe
...
Stage2 cbe: more control flow
2021-02-01 12:15:52 -08:00
Andrew Kelley
66c0fe4f90
Merge pull request #7922 from daurnimator/comptime-json-fields
...
std.json support for comptime fields
2021-02-01 12:11:36 -08:00
Frank Denis
a03f9548d3
std/math/big/int: normalize after a right shift
...
After a right shift, top limbs may be all zero. However, without
normalization, the number of limbs is not going to change.
In order to check if a big number is zero, we used to assume that the
number of limbs is 1. Which may not be the case after right shifts,
even if the actual value is zero.
- Normalize after a right shift
- Add a test for that issue
- Check all the limbs in `eqlZero()`. It may not be necessary if
callers always remember to normalize before calling the function.
But checking all the limbs is very cheap and makes the function less
bug-prone.
2021-02-01 12:10:01 -08:00
Veikka Tuominen
75acfcf0ea
stage2: reimplement switch
2021-02-01 15:45:11 +02:00
Veikka Tuominen
3ec5c9a3bc
stage2 cbe: implement not and some bitwise ops
2021-02-01 08:48:24 +02:00
Veikka Tuominen
106520329e
stage2 cbe: implement switchbr
2021-02-01 08:48:22 +02:00
Veikka Tuominen
258f3ec5ec
stage2 cbe: block results
2021-02-01 08:47:25 +02:00
Veikka Tuominen
bdfe3aeab8
stage2 cbe: condbr and breaks
2021-02-01 08:47:25 +02:00