aboutsummaryrefslogtreecommitdiff
path: root/lib/std/packed_int_array.zig
AgeCommit message (Collapse)Author
2023-04-22doc: fix minor grammar issues-k
2023-02-19Merge pull request #14671 from ziglang/multi-object-forAndrew Kelley
implement multi-object for loops
2023-02-19Fix grammatical error in doc commentThe Potato Chronicler
2023-02-18update std lib and compiler sources to new for loop syntaxAndrew Kelley
2022-12-29std: Expose Int parameter in std.PackedInt[Array,Slice]Jason Phan
2022-12-06remove most conditional compilation based on stage1Andrew Kelley
There are still a few occurrences of "stage1" in the standard library and self-hosted compiler source, however, these instances need a bit more careful inspection to ensure no breakage.
2022-08-22stage2+stage1: remove type parameter from bit builtinsVeikka Tuominen
Closes #12529 Closes #12511 Closes #6835
2022-04-05zig fmt: remove trailing whitespace on doc commentsDamien Firmenich
Fixes #11353 The renderer treats comments and doc comments differently since doc comments are parsed into the Ast. This commit adds a check after getting the text for the doc comment and trims whitespace at the end before rendering. The `a = 0,` in the test is here to avoid a ParseError while parsing the test.
2021-10-09Better documentation, use of `len` field instead of function, @bitSizeOf ↵tgschultz
instead of meta.bitCout
2021-08-24remove redundant license headers from zig standard libraryAndrew Kelley
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-06-21fix code broken from previous commitJacob G-W
2021-05-31std.sync.atomic: extended atomic helper functions (#8866)protty
- deprecates `std.Thread.spinLoopHint` and moves it to `std.atomic.spinLoopHint` - added an Atomic(T) generic wrapper type which replaces atomic.Bool and atomic.Int - in Atomic(T), selectively expose member functions depending on T and include bitwise atomic methods when T is an Integer - added fence() and compilerFence() to std.atomic
2021-05-20fix calculation of max_io_bits in PackedIntIoMatthew Borkowski
2021-05-08Merge remote-tracking branch 'origin/master' into stage2-whole-file-astgenAndrew Kelley
Conflicts: * doc/langref.html.in * lib/std/enums.zig * lib/std/fmt.zig * lib/std/hash/auto_hash.zig * lib/std/math.zig * lib/std/mem.zig * lib/std/meta.zig * test/behavior/alignof.zig * test/behavior/bitcast.zig * test/behavior/bugs/1421.zig * test/behavior/cast.zig * test/behavior/ptrcast.zig * test/behavior/type_info.zig * test/behavior/vector.zig Master branch added `try` to a bunch of testing function calls, and some lines also had changed how to refer to the native architecture and other `@import("builtin")` stuff.
2021-05-08std: update usage of std.testingVeikka Tuominen
2021-04-29move behavior tests from test/stage1/ to test/Andrew Kelley
And fix test cases to make them pass. This is in preparation for starting to pass behavior tests with self-hosted.
2021-04-15std: change `@import("builtin")` to `std.builtin`Andrew Kelley
2021-01-02Add workaround in PackedIntArray .initAllTo for #7635daurnimator
2021-01-02Add PackedIntArray .initAllTo functiondaurnimator
2020-12-31Year++Frank Denis
2020-11-19Add builtin.Signedness, use it instead of is_signedTadeo Kondrak
2020-10-17Merge branch 'openbsd-minimal' of https://github.com/semarie/zig into ↵Andrew Kelley
semarie-openbsd-minimal
2020-10-17Merge branch 'master' into openbsd-minimalSebastien Marie
2020-10-17Convert remaining call sitesJan Prudil
2020-10-17Make std.meta.Int accept a signedness parameterJan Prudil
2020-10-12Rename .macosx to .macosVignesh Rajagopalan
2020-10-11add minimal openbsd supportSébastien Marie
2020-09-30std: skip some tests that stage1 leaks too much memory withAndrew Kelley
We can restore these when we have self-hosted available. This is intended to address #6467
2020-08-20add license header to all std lib filesAndrew Kelley
add SPDX license identifier copyright ownership is zig contributors
2020-05-30Fix typo in PackedIntArray testsJakub Konka
Both `PackedIntArray` and `PackedIntSlice` tests defined `max_bits` but didn't use it in the predicate in the inline while loop.
2020-05-18Add/fix missing WASI functionality to pass libstd testsJakub Konka
This rather large commit adds/fixes missing WASI functionality in `libstd` needed to pass the `libstd` tests. As such, now by default tests targeting `wasm32-wasi` target are enabled in `test/tests.zig` module. However, they can be disabled by passing the `-Dskip-wasi=true` flag when invoking the `zig build test` command. When the flag is set to `false`, i.e., when WASI tests are included, `wasmtime` with `--dir=.` is used as the default testing command. Since the majority of `libstd` tests were relying on `fs.cwd()` call to get current working directory handle wrapped in `Dir` struct, in order to make the tests WASI-friendly, `fs.cwd()` call was replaced with `testing.getTestDir()` function which resolved to either `fs.cwd()` for non-WASI targets, or tries to fetch the preopen list from the WASI runtime and extract a preopen for '.' path. The summary of changes introduced by this commit: * implement `Dir.makeDir` and `Dir.openDir` targeting WASI * implement `Dir.deleteFile` and `Dir.deleteDir` targeting WASI * fix `os.close` and map errors in `unlinkat` * move WASI-specific `mkdirat` and `unlinkat` from `std.fs.wasi` to `std.os` module * implement `lseek_{SET, CUR, END}` targeting WASI * implement `futimens` targeting WASI * implement `ftruncate` targeting WASI * implement `readv`, `writev`, `pread{v}`, `pwrite{v}` targeting WASI * make sure ANSI escape codes are _not_ used in stderr or stdout in WASI, as WASI always sanitizes stderr, and sanitizes stdout if fd is a TTY * fix specifying WASI rights when opening/creating files/dirs * tweak `AtomicFile` to be WASI-compatible * implement `os.renameatWasi` for WASI-compliant `os.renameat` function * implement sleep() targeting WASI * fix `process.getEnvMap` targeting WASI
2020-04-28std.meta.IntType -> std.meta.IntTadeo Kondrak
2020-02-28introduce operating system version ranges as part of the targetAndrew Kelley
* 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-24remove uses of `@ArgType` and `@IntType`Vexu
2020-01-29Convert a bunch of page_allocator to testing.allocatorBenjamin Feng
2019-11-27remove type coercion from array values to referencesAndrew Kelley
* Implements #3768. This is a sweeping breaking change that requires many (trivial) edits to Zig source code. Array values no longer coerced to slices; however one may use `&` to obtain a reference to an array value, which may then be coerced to a slice. * Adds `IrInstruction::dump`, for debugging purposes. It's useful to call to inspect the instruction when debugging Zig IR. * Fixes bugs with result location semantics. See the new behavior test cases, and compile error test cases. * Fixes bugs with `@typeInfo` not properly resolving const values. * Behavior tests are passing but std lib tests are not yet. There is more work to do before merging this branch.
2019-11-25rename std.heap.direct_allocator to std.heap.page_allocatorAndrew Kelley
std.heap.direct_allocator is still available for now but it is marked deprecated.
2019-11-08update more of the std lib to use `@as`Andrew Kelley
2019-11-08update the codebase to use `@as`Andrew Kelley
2019-09-25mv std/ lib/Andrew Kelley
that's all this commit does. further commits will fix cli flags and such. see #2221