summaryrefslogtreecommitdiff
AgeCommit message (Collapse)Author
2018-06-14Use chartype functions to determine character type, regenerate bootstrapdependent-tagsOri Bernstein
2018-06-13Add system-selected tag lists.Ori Bernstein
This lightens the requirements for a `./configure` script, and allows creating dependent tags based on system features.
2018-06-13Add API to allow string iteration by non-space tokens.Ori Bernstein
This allows multiply space separated strings to be interated without memory allocation for std.strtok.
2018-06-13Reuse the old key when the old keyval exists.Ori Bernstein
This makes it easier to not leak memory when inserting the same key repeatedly.
2018-06-11Return an error from pledge.Ori Bernstein
Debatable if it should abort the program instead, but...
2018-06-11Fix type env assertion.Ori Bernstein
If a subtype has args, it should introduce an env.
2018-06-10Correctly float assignments inside function arguments.Ori Bernstein
2018-06-09Fix test:wqsOri Bernstein
2018-06-09Consistently and corretly add Oundef.Ori Bernstein
2018-06-08Add pledge support.Ori Bernstein
2018-06-08Add convenience wrappers for atomic operations on pointersiriri
2018-06-06OpenBSD 6.1 doesn't recognize MAP_STACK.Ori Bernstein
2018-06-03Export bytealloc/zbytealloc for users.Ori Bernstein
It's occasionally useful.
2018-06-03Add test for recursive closure.Ori Bernstein
2018-05-31libflate (DEFLATE decoding)Quentin Carbonneaux
Hi, As an official summer of cod entry, here is a start for the libflate library, which will eventually contain Myrddin's [de]compression equipment. It currently exposes a single function const decode : (outf : bio.file#, inf : bio.file# -> std.result(void, err)) that decodes a DEFLATE stream in the inf file into the outf file. The function guarantees that it will not read more than necessary from inf to either, figure out that the stream is bogus, or fully uncompress the stream. I did my due diligence with respect to testing but I am not fully confident about the correctness of the implementation; feel free to add more tests, or test it on example files. I wish: - it was fast (don't expect gunzip's speed) - it was better tested - it had stricter format checks (e.g., checking for invalid Huffman codes) - I had implemented zlib/gzip decompression On the other hand, the current implementation is quite simple and appears to work. Cheers, -- q
2018-05-29Retroactively update the ABI version.Ori Bernstein
Auto expressions changed the usefile layout, but we forgot to bump ABI.
2018-05-29Add testdeps to libmath.Ori Bernstein
2018-05-26Initialize the closure before a recursive capture.Ori Bernstein
2018-05-26Fix indentation.Ori Bernstein
2018-05-13Add tests for AES GCM decryption, fix a small bug.Ori Bernstein
2018-05-13Fix posix build.Ori Bernstein
2018-05-13Add float trapping controls.Ori Bernstein
This both allows us to error earlier when math goes wonky, and allows us to test all our code on 9front.
2018-05-12Remove useless bounds check.Ori Bernstein
We already do it when packing the value.
2018-05-12Add aesgcm decryptionOri Bernstein
2018-05-12Move nix packaging to the appropriate place.Ori Bernstein
2018-05-12Add default.nix for Nix systemsAdrian Parvin D. Ouano
2018-05-11Check return value of getcwd.Ori Bernstein
Some systems warn.
2018-05-11The deps aren't phony.Ori Bernstein
They're real files on disk.
2018-05-10Rebuild if the toolchain was updated.Ori Bernstein
2018-05-10Merge branch 'libmath-merge'Ori Bernstein
2018-05-10Turn off fancy stuff when we have an old assembler.Ori Bernstein
2018-05-09Regenerate netbsd bootstrapOri Bernstein
2018-05-09Merge remote-tracking branch 'npnth/libmath'Ori Bernstein
2018-05-08Don't specify .comm alignment.Ori Bernstein
It seems to confuse lld.
2018-05-07libjson: allow square brackets in stringsCarlin Bingham
2018-05-06Start of AES GCM work.Ori Bernstein
2018-05-06Make std.writeall api slightly nicer.Ori Bernstein
2018-05-03Finish expm1 using scale2.S. Gilles
2018-05-03Implment scale2.S. Gilles
This is, perhaps, a conforming implementation of scalB, but it is highly probable that, in the future, it will be desireable for scalB to accept arbitrary, exponents, not simply integers. Furthermore, we find scalB a non-intuitive name. Therefore, calling the function ‘scale2’ serves two purposes.
2018-05-02Implement most of expm1. Errors in huge numbers.S. Gilles
[Tan92] finishes off calculation of expm1(f) by range expansion, which involves multiplying a number by 2^M, where M grows roughly linearly with f. If f is very large (say, 0x0x42b17200 in single-precision), M may grow to be as larger than the maximal exponent (in this case, M = 128). If 2^M * P is calculated in the normal way, the intermediate value 2^M is not representable, causing mangled output. However, the result may still be computed: the value P is of magnitude < 1. Therefore, a scalb function will be necessary to perform this multiplication without creating unrepresentable intermediate values={
2018-05-01Escape test failures.Ori Bernstein
This makes things work more good when running tests by hand.
2018-05-01Merge branch 'master' of /git/ori/mcOri Bernstein
2018-04-27Extract slices recursively.Ori Bernstein
This fixes deeply nestedl slices of arrays of slices of arrays.
2018-04-24We don't do PIE yet, let's deal with it later.Ori Bernstein
2018-04-22Improve comments.Ori Bernstein
2018-04-22Add a special exit stack to our thread library.Ori Bernstein
Because OpenBSD wants a valid stack pointer in any code that enters the kernel, unmapping our stack as part of exiting the process is rather unreliable. This change allocates a stack page that we can switch to when a thread is deallocating itself, which keeps the kernel happy.
2018-04-20Fix OpenBSD 6.1 specialization.Ori Bernstein
2018-04-19Put _s in the right spot in ASM files.S. Gilles
2018-04-19Test exp.S. Gilles
We use Tang's implementation, which occasionally is off by 1 ulp. In the double-precision case, this is about par with current libc implementations. Glibc computes expf() in double-precision, so is always (at least, as observed) last-place accurate. We appear to be about on par with musl-libc in the single-precision case. In order to increase accuracy, we could either decrease the interval size (and increase table size), or switch to a different algorithm. Decreasing the interval size is non-trivial, however, as it would require recomputing the entire table, which is non-trivial.
2018-04-19Subnormalize special-case floats in fltXYassem.S. Gilles
If the exponent is the lowest possible representable, then the returned float will actually be subnormal. In this case, we do not have the implied leading 1, so we need to downshift the significand so that it doesn't get lost. We end up losing the least significant bit of the significand, but that's unavoidable.