12085 Commits

Author SHA1 Message Date
Vexu
4eeeda0f52
remove deprecated fields from types 2020-09-03 16:49:20 +03:00
Isaac Freund
d0d6647fdb
std: add seteuid/setegid to std.os
Currently these are only implemented for linux.
2020-09-03 15:22:43 +02:00
Isaac Freund
01a365f1b0
std: ensure seteuid/setegid do not change saved id 2020-09-03 15:16:26 +02:00
Isaac Freund
e8a2aecd2f
std: fix linux uid_t, use uid_t/gid_t in std.os
- correct uid_t from i32 to u32 on linux
- define uid_t and gid_t for OSes missing definitions
- use uid_t/gid_t instead of plain u32s throughout std.os
2020-09-03 15:08:37 +02:00
Vexu
6f0126e957
stage2: split Scope.Container from Scope.File 2020-09-03 15:06:45 +03:00
Vexu
1174cb1517
stage2: fix tokenizer float bug 2020-09-03 15:05:47 +03:00
Vexu
6ab0ac161e
stage2: slice return type analysis 2020-09-03 15:05:47 +03:00
Vexu
2a628fd401
stage2: astgen slice 2020-09-03 15:05:46 +03:00
Vexu
ff7c6e1e3c
stage2: astgen orelse 2020-09-03 15:05:43 +03:00
Vexu
9a59cdcd41
stage2: various small type fixes 2020-09-03 15:05:10 +03:00
Bas van den Berg
0a40a61548 os.send(to) and os.recv(from) functions made to work on windows. 2020-09-03 13:23:48 +02:00
Jens Goldberg
68818983ae Split the sync tests into sync and fsync 2020-09-03 09:52:26 +00:00
Jens Goldberg
e747d2ba17 Add C declarations and tests for the sync functions 2020-09-03 07:49:18 +00:00
pfg
bf1d83482b
"Support" allocating 0 bit types 2020-09-02 22:28:37 -07:00
daurnimator
fb3c5b84ed std: add fmt option to escape non-printable characters 2020-09-02 19:18:36 -04:00
Andrew Kelley
c86108dd63
Merge pull request #6229 from LemonBoy/fix-6054
ir: Typecheck the sentinel value in *[N:S1]T to [S2]T casts
2020-09-02 19:13:21 -04:00
Aransentin
25f6663304 Add the sync functions 2020-09-02 22:16:40 +00:00
Andrew Kelley
405c7215a8
Merge pull request #6194 from LakeByTheWoods/fmt_indentation
Refactor zig fmt indentation. Remove indent from rendering code
2020-09-02 18:14:28 -04:00
Bas van den Berg
d80554cedf Made some changes and additions to the networking to make it work on windows. 2020-09-02 23:53:29 +02:00
Lachlan Easton
bb848dbeee zig fmt: Patch rename stream to ais (auto indenting stream) & other small refactors 2020-09-02 20:16:28 +10:00
LemonBoy
5f31d54064 std: ArrayList.initCapacity now respects the specified cap
Don't use the user-supplied cap as starting point for a resize. Doing so
overallocates memory and thus negates the whole point of specifying a
precise cap value.
2020-09-02 11:11:57 +02:00
LemonBoy
73a8c9beaa std: Don't trust stat() size in readAllAlloc fns
Some files such as the ones in /proc report a st_size of zero, try to
read the file anyway if we hit that case.
2020-09-02 11:11:57 +02:00
Andrew Kelley
12ce6eb8f6 stage2: support dbg_stmt at comptime 2020-09-02 00:09:24 -07:00
Sahnvour
90ace40e07
Merge pull request #5999 from Sahnvour/hashmap
New hashmap implementation
2020-09-02 08:52:32 +02:00
Tadeo Kondrak
1b2154dfe2 builtin: Add TypeInfo.StructField.is_comptime 2020-09-02 00:17:59 -04:00
Sahnvour
575fbd5e35 hash_map: rename to ArrayHashMap and add new HashMap implementation 2020-09-02 00:17:50 +02:00
Andrew Kelley
3f7cb14b26
Merge pull request #6225 from ziglang/stage2-comptime
stage2: introduce the ability for Scope.Block to be comptime
2020-09-01 15:44:45 -04:00
Andrew Kelley
4c13d020db stage2: proper split of requireRuntimeBlock and requireFunctionBlock
* improve the ZIR generated of variable decls
   - utilize the same ZIR for the type and init value when possible
   - init value gets a result location with the variable type.
     no manual coercion is required.
 * no longer use return instructions to extract values out of comptime
   blocks. Instead run the analysis and then look at the corresponding
   analyzed instruction, relying on the comptime mechanism to report
   errors when something could not be comptime evaluated.
2020-09-01 12:39:47 -07:00
pwzk
baa734c42a Fixing dylib search path 2020-09-01 13:53:12 -04:00
LemonBoy
dd4994a4e4 std: Fix C-string with missing NUL terminator
Spotted thanks to the stricter conversion rules.
2020-09-01 18:45:35 +02:00
LemonBoy
c51b871c45 ir: Typecheck the sentinel value in *[N:S1]T to [S2]T casts
Closes #6054
2020-09-01 17:29:10 +02:00
Lachlan Easton
7841c9b7d1 zig fmt: Fix merge errors 2020-09-01 21:59:27 +10:00
Lachlan Easton
671b3abe5d Merge remote-tracking branch 'ziglang/master' into fmt_indentation 2020-09-01 18:41:23 +10:00
Andrew Kelley
717b0e8275 stage2: introduce the ability for Scope.Block to be comptime
This gives zir_sema analysis the ability to check if the current scope
is expected to be comptime.
2020-08-31 23:34:58 -07:00
Lachlan Easton
bc24b86d82 zig fmt: Fix regression not covered by testing 2020-09-01 13:19:34 +10:00
Andrew Kelley
c354f074fa Merge remote-tracking branch 'origin/master' into llvm11 2020-08-31 15:49:44 -07:00
Andrew Kelley
26140678a5 ci: skip compile error tests on Windows
We're up against the 6 hour limit so this is a time-saving workaround.
Compile error tests are generally not OS-specific so the coverage from
the other platforms should be sufficient.
2020-08-31 14:54:05 -07:00
Jan200101
2148336a81 follow filesystem hierarchy standard when adding lib directories 2020-08-31 17:44:43 -04:00
Andrew Kelley
8dc58a4e94
Merge pull request #6208 from tadeokondrak/remove-@OpaqueType
Remove @OpaqueType
2020-08-31 17:44:03 -04:00
Andrew Kelley
4e97cf50d2 readme: link to wiki page for installing from a package manager 2020-08-31 14:41:01 -07:00
Andrew Kelley
212fe21d68 zen of zig: reword the last one a little bit 2020-08-31 14:40:08 -07:00
Andrew Kelley
0d94cb932f
Merge pull request #6197 from LemonBoy/fix-6049
gpa: Fix bookkeeping logic
2020-08-31 17:38:17 -04:00
Tadeo Kondrak
82273f1a2a translate_c: fix shadowing on nested blocks 2020-08-31 20:29:57 +03:00
Lachlan Easton
029ec456bc zig fmt: Set indent_delta to 2 when rendering inline asm 2020-08-31 23:39:50 +10:00
Lachlan Easton
5aca3baea6 zig fmt: Remove dynamic stack from auto-indenting-stream 2020-08-31 23:39:50 +10:00
LemonBoy
29de809a92 gpa: Don't leak memory when the upper bound is hit 2020-08-31 12:35:25 +02:00
Andrew Kelley
400d8d0b82
Merge pull request #6212 from ziglang/update-glibc
Update to glibc 2.32
2020-08-31 03:32:21 -04:00
Tadeo Kondrak
96e46cdd6e
std.zig.render: specify when rewrite should be removed 2020-08-30 23:45:47 -06:00
Tadeo Kondrak
c51de3c266
std.zig.render: rewrite @OpaqueType() to @Type(.Opaque) 2020-08-30 23:41:40 -06:00
Andrew Kelley
43ac5e5dac
Merge pull request #6184 from tadeokondrak/TrailerFlags-update
std.meta.TrailerFlags: use @Type to improve API
2020-08-31 01:00:23 -04:00