Andrew Kelley
18f1fef142
update standard library to new I/O streams API
2020-03-10 18:44:30 -04:00
Andrew Kelley
4616af0ca4
introduce operating system version ranges as part of the target
...
* re-introduce `std.build.Target` which is distinct from `std.Target`.
`std.build.Target` wraps `std.Target` so that it can be annotated as
"the native target" or an explicitly specified target.
* `std.Target.Os` is moved to `std.Target.Os.Tag`. The former is now a
struct which has the tag as well as version range information.
* `std.elf` gains some more ELF header constants.
* `std.Target.parse` gains the ability to parse operating system
version ranges as well as glibc version.
* Added `std.Target.isGnuLibC()`.
* self-hosted dynamic linker detection and glibc version detection.
This also adds the improved logic using `/usr/bin/env` rather than
invoking the system C compiler to find the dynamic linker when zig
is statically linked. Related: #2084
Note: this `/usr/bin/env` code is work-in-progress.
* `-target-glibc` CLI option is removed in favor of the new `-target`
syntax. Example: `-target x86_64-linux-gnu.2.27`
closes #1907
2020-02-28 14:51:53 -05:00
Vexu
538d9a5dd8
remove uses of @ArgType
and @IntType
2020-02-24 23:39:03 +02:00
xackus
783e8ad031
remove @bytesToSlice, @sliceToBytes from std lib
2020-02-21 19:46:53 +01:00
Felix (xq) Queißner
cf67d30cdc
Makes ArenaAllocator.deinit() not require a mutable reference.
2020-02-13 16:19:34 -05:00
Benjamin Feng
4d134a01f5
Move debug.global_allocator to testing.allocator
2020-01-29 12:21:29 -06:00
daurnimator
d7333d8798
std: fix LoggingAllocator, add simple test
2020-01-09 13:34:46 -05:00
Andrew Kelley
cd4d638d10
Merge pull request #3830 from fengb/wasm-page-allocator
...
WasmPageAllocator
2019-12-10 10:58:50 -05:00
Benjamin Feng
608d36ad8c
Rewrite WasmPageAllocator tests to be less flaky on environment
2019-12-08 21:22:07 -06:00
Benjamin Feng
e91522b875
Add back comptime check for wasm
2019-12-06 17:27:11 -06:00
Benjamin Feng
5a004ed834
Actually use const conventional
as the comment indicates
2019-12-06 15:16:07 -06:00
Benjamin Feng
eb495d934b
Add WasmPageAllocator tests
2019-12-05 21:54:57 -06:00
Benjamin Feng
f2b0dbea74
Resolve tests to work with or skip WasmPageAllocator
2019-12-05 19:31:49 -06:00
Benjamin Feng
694616adb5
Standardize around bigger slices
2019-12-05 18:43:51 -06:00
Benjamin Feng
7d1c4fe4dc
Switch bitmask to enums
2019-12-05 18:01:49 -06:00
Benjamin Feng
30da6d49f4
Fix freeing memory across bounds
2019-12-04 22:43:02 -06:00
Benjamin Feng
86ae75363e
Strip out an unnecessary memset
2019-12-04 21:41:01 -06:00
Benjamin Feng
5784985bb8
Use raw PackedIo to shave ~150b
2019-12-04 21:22:36 -06:00
Benjamin Feng
a910a6c871
Rejuggle how offsets are calculated
2019-12-04 18:12:25 -06:00
Benjamin Feng
a6f838aab2
Remove redundant alloc
2019-12-04 00:10:37 -06:00
Benjamin Feng
01e73bba8d
Tighten recycled search
2019-12-04 00:08:09 -06:00
Benjamin Feng
baffaf7986
Extract setBits
2019-12-04 00:07:52 -06:00
Benjamin Feng
b33211ed51
Implement block-based skipping
2019-12-03 17:24:50 -06:00
Benjamin Feng
45e0441278
Fix bugs
2019-12-02 22:04:09 -06:00
Andrew Kelley
ad214c7aa0
bring your own OS layer in the std lib
...
closes #3784
2019-12-02 15:02:17 -05:00
Benjamin Feng
f32555aa08
Work around __heap_base for now
2019-12-02 09:59:20 -06:00
Benjamin Feng
ba38a6d122
Get stuff vaguely working
2019-12-02 09:59:20 -06:00
Benjamin Feng
eb1628b033
Initialize memory segments
2019-12-02 09:59:20 -06:00
Benjamin Feng
eff926b454
Brain dump new wasm allocator
2019-12-02 09:59:20 -06:00
Andrew Kelley
4261fa3c49
move logic to the appropriate layers; add new compile error
2019-11-25 18:46:17 -05:00
Andrew Kelley
659c1bdeee
Merge branch 'wasi-run-tests' of https://github.com/fengb/zig into fengb-wasi-run-tests
2019-11-25 17:53:26 -05:00
Andrew Kelley
cb38bd0a14
rename std.heap.direct_allocator to std.heap.page_allocator
...
std.heap.direct_allocator is still available for now but it is marked
deprecated.
2019-11-25 17:25:06 -05:00
Benjamin Feng
747529e96b
Use wasm_allocator
2019-11-19 00:31:40 -06:00
Andrew Kelley
aa0daea541
update more of the std lib to use @as
2019-11-08 15:57:25 -05:00
Andrew Kelley
e0db54e89d
update the codebase to use @as
2019-11-08 15:57:24 -05:00
Andrew Kelley
6ee3cabe5c
allow type coercion from *[0]T to E![]const T
...
This is an unambiguous, safe cast.
2019-11-06 20:44:15 -05:00
Andrew Kelley
60cd11bd4b
get rid of std.os.foo.is_the_target
...
It had the downside of running all the comptime blocks and resolving
all the usingnamespaces of each system, when just trying to discover if
the current system is a particular one.
For Darwin, where it's nice to use `std.Target.current.isDarwin()`, this
demonstrates the utility that #425 would provide.
2019-10-24 01:14:52 -04:00
Vexu
2550cb4638
remove pub syntax for container fields
2019-10-21 23:04:19 -04: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