35 Commits

Author SHA1 Message Date
Andrew Kelley
6115cf2240 migrate from std.Target.current to @import("builtin").target
closes #9388
closes #9321
2021-10-04 23:48:55 -07:00
Andrew Kelley
c05a20fc8c std: reorganization that allows new usingnamespace semantics
The proposal #9629 is now accepted, usingnamespace stays but no longer
puts identifiers in scope.
2021-09-01 17:54:06 -07:00
Andrew Kelley
d29871977f remove redundant license headers from zig standard library
We already have a LICENSE file that covers the Zig Standard Library. We
no longer need to remind everyone that the license is MIT in every single
file.

Previously this was introduced to clarify the situation for a fork of
Zig that made Zig's LICENSE file harder to find, and replaced it with
their own license that required annual payments to their company.
However that fork now appears to be dead. So there is no need to
reinforce the copyright notice in every single file.
2021-08-24 12:25:09 -07:00
Jacob G-W
9fffffb07b fix code broken from previous commit 2021-06-21 17:03:03 -07:00
Matt Chudleigh
fac0c6f25d Convert remaining addresses to u64 from usize in dwarf.zig 2021-06-18 16:19:20 -07:00
Andrew Kelley
429cd2b5dd std: change @import("builtin") to std.builtin 2021-04-15 19:06:39 -07:00
Michael Dusan
28ae498254 dwarf: fix LineNumberProgram check
- on first iteration populate `prev_` fields and do nothing else

closes #8421
2021-04-12 17:18:56 -04:00
Michael Dusan
0fa1a2cb73
Revert "dwarf: fix LineNumberProgram check"
- needed/needs to go through review process

This reverts commit 746f65f8b3ce11d67d8fd392aea8bc05a24adae6.
2021-04-12 06:55:12 -04:00
Michael Dusan
746f65f8b3
dwarf: fix LineNumberProgram check
- tolerate out-of-order DW_AT_ranges

closes #8421
2021-04-12 06:12:00 -04:00
Andrew Kelley
5f35dc0c0d zig fmt the std lib 2021-02-24 21:29:23 -07:00
Jay Petacat
a9b505fa77 Reduce use of deprecated IO types
Related: #4917
2021-01-07 23:48:58 -08:00
Andrew Kelley
66e5e92a3e
Merge pull request #7592 from LemonBoy/fix-7188
Allow variable captures on multi-prong switch arms
2021-01-04 14:23:01 -08:00
Frank Denis
6c2e0c2046 Year++ 2020-12-31 15:45:24 -08:00
LemonBoy
2561168adb std: Clean up some tests
No functional changes, remove some dead code.
2020-12-30 09:42:21 +01:00
Veikka Tuominen
6d5b76a75d
Merge pull request #7005 from jshholland/deprecate-span
Remove ArrayList.span
2020-11-18 13:14:48 +02:00
tgschultz
48d60834fd
Move leb128 and remove trivial *mem functions as discussed in #5588 (#6876)
* Move leb128 out of debug and remove trivial *mem functions as discussed in #5588

* Turns out one of the *Mem functions was used by MachO. Replaced with trivial use of FixedBufferStream.
2020-11-16 18:51:54 -05:00
Josh Holland
c25b157dda remove deprecated uses of ArrayList.span 2020-11-07 11:15:44 +00:00
Andrew Kelley
4a69b11e74 add license header to all std lib files
add SPDX license identifier
copyright ownership is zig contributors
2020-08-20 16:07:04 -04:00
Vexu
3734881577
add error for unused/duplicate block labels 2020-08-13 01:13:17 +03:00
Andrew Kelley
f1c1b8c02d stage2: add DWARF info for the main compilation unit 2020-07-31 06:48:17 +00:00
Vexu
e85fe13e44
run zig fmt on std lib and self hosted 2020-07-11 20:41:19 +03:00
Alexandros Naskos
50b70bd77f @asyncCall now requires an argument tuple 2020-06-24 14:07:39 +03:00
Josh Junon
b6dc7fc9ff
publicize member functions affected by #4909 2020-05-08 14:26:28 +03:00
Tadeo Kondrak
fdfdac4939
update comments for nosuspend 2020-05-05 05:55:27 -06:00
Tadeo Kondrak
af00afed98
zig fmt 2020-05-05 05:55:25 -06:00
LemonBoy
72dca05f5c debug: Fix parsing of DWARF info for BE machines
Tested with ppc32
2020-04-10 14:59:19 -04:00
xackus
dd570dbc0d new ArrayList API, fix enough std lib to test 2020-04-02 15:14:18 +02:00
Andrew Kelley
9e7ae06249
std lib API deprecations for the upcoming 0.6.0 release
See #3811
2020-03-30 14:23:22 -04:00
LemonBoy
9d19d9008e debug: Correct version check in debug_line parser
Version 3 is similar to version 2 plus more opcodes.
2020-03-22 19:19:41 -04:00
Andrew Kelley
ba0e3be5cf
(breaking) rework stream abstractions
The main goal here is to make the function pointers comptime, so that we
don't have to do the crazy stuff with async function frames.

Since InStream, OutStream, and SeekableStream are already generic
across error sets, it's not really worse to make them generic across the
vtable as well.

See #764 for the open issue acknowledging that using generics for these
abstractions is a design flaw.

See #130 for the efforts to make these abstractions non-generic.

This commit also changes the OutStream API so that `write` returns
number of bytes written, and `writeAll` is the one that loops until the
whole buffer is written.
2020-03-10 15:32:32 -04:00
LemonBoy
6a0927d8c1 debug: Fix end-of-stream condition in DWARF parser 2020-02-26 21:02:54 -05:00
LemonBoy
342a274948 tidy interface, const correctness 2020-02-20 20:18:51 +01:00
LemonBoy
fabab58528 less hideous 2020-02-20 19:41:29 +01:00
LemonBoy
3620b67c26 debug: Split the DWARF stuff in its own file 2020-02-20 19:41:28 +01:00
Andrew Kelley
ed36dbbd9c
mv std/ lib/
that's all this commit does. further commits will fix cli flags and
such.

see #2221
2019-09-25 23:35:41 -04:00