AgeCommit message (Collapse)Author
2022-05-23usefiles: fix ty->nmemb when loading array (thanks mural)HEADmasterOri Bernstein
2022-05-07parse: fix typos (thanks ed)Ori Bernstein
2022-05-07bytealloc: fix typoOri Bernstein
< should be <= to match allocation.
2022-03-24Fix construction of pattern variable bindingsMura Li
Previously, inserting the variable bindings would make the Oasn nodes appear before the decl nodes in a block. Signed-off-by: Mura Li <>
2021-08-22Add initial openbsd 7.0 support.Ori Bernstein
There's some ABI breakage and some futex work, but it's a lot closer than it wast .
2021-08-20lib/http: Free session and request when done.Frank Smit
2021-08-17Use correct HTTP headers for response encoding.Frank Smit
2021-07-05mi/match: fix dtree construction order of or-patternMura Li
When we have a match statement such as match x | `std.Some _ || _: ;; the order of the patterns `std.seom _ and _ matters. before the fix, we would get false positive of "pattern matched by earlier case". Signed-off-by: Mura Li <>
2021-07-05mi/match: fix internal compiler errorMura Li
There could be more than one frontiers for each match arm. Signed-off-by: Mura Li <>
2021-06-26formatting: the long comments were annoying to read.Ori Bernstein
2021-06-26Relax the restriction of capture variables of or-patternsMura Li
Previously, the identifier with the same name in two disjunctive patterns (aka or-patterns) must be bound to the exactly same location. For instance, (x, _) || (x, _) /* ok */ (_, y) || (_, y) /* ok */ (x, _) || (_, x) /* not ok */ In certain Standard ML implementations, it's allowed to write a pattern like (x, _) || (_, x) where x is bound to different locations as long as they have the same type. This patch removes the restriction. Signed-off-by: Mura Li <>
2020-09-20Use correct dynamic linker/loader on musl-based systems (Alpine).Frank Smit
2021-03-18genp9: fix formatting issue.Ori Bernstein
2021-01-30Allow omitting the parameter name when it's unneeded.Ori Bernstein
2020-12-01bytealloc: fix bucket indexingMura Li
Previously, a blob of size N, where N is a power of 2, will be placed into the 2N-sized bucket. It turns out that the 128 KiB allocation will be assigned to a non-existent 256 KiB bucket and crash the program. Signed-off-by: Mura Li <>
2020-10-27resolve: fix copy-paste errorOri Bernstein
2020-10-27readability: '.port=port' isn't helpful, it's just 53Ori Bernstein
2020-10-27cleanup dns: private maxns, skip failed connnectionsOri Bernstein
The previous patches made maxns show up as exported API, when it shouldn't have been. We would also put failed connections into the server list and try to query them.
2020-10-25Let dnsconnect handle IPv6.Frank Smit
2020-10-25Add missing flowinfo to sockaddr_in6 struct.Frank Smit
2020-10-25Query nameservers in parallel.Frank Smit
2020-10-25Use Arch Linux instead of Alpine.Frank Smit
2020-10-25Build script for Alpine Linux.Frank Smit
2020-09-20Fix range checking for numbers.Ori Bernstein
2020-09-20Fix missing type in range tables.Ori Bernstein
2020-09-01infer: fix typo on range checkOri Bernstein
2020-08-30Fix IPv6 parsing.Frank Smit
2001:b88:1202::10 resulted in [32, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] while it should be [32, 1, 11, 136, 18, 2, 0, 0, 0, 0, 0, 0, 0, 0, 0, 16]
2020-08-30Type was not applied to pdst.Frank Smit
2020-08-28test/ipparse: put expected and parsed in different buffersOri Bernstein
2020-08-28Fix typoOri Bernstein
2020-08-28copy bytes to a dest buffer.Ori Bernstein
2020-08-11Fix botched mergeOri Bernstein
2020-08-09mergeOri Bernstein
2020-08-09Fix crypto keccak functions with multiple
2020-07-11Fix tests on BSDs and 9front, improve names.abiOri Bernstein
2020-06-24Add tests for abi conformity.S. Gilles
Tests 001 through 003 are specific errors, and 004 through 006 are batches of blanket fuzzing that uncovered at least one error each. The blanket fuzzers test function calls between all combinations of {myrddin, c} and {myrddin, c}, except for c functions calling c functions.
2020-06-24Allow runtest.{rc,sh} to handle subdirectories.S. Gilles
This allows tests consisting of multiple files, including .glue.c files, so we can check calling convention compliance.
2020-06-24Bump abi version.S. Gilles
2020-06-24Return small-aggregate values by the AMD64 abi.S. Gilles
Handling the returned value from a function call is now handled in four ways. - Functions that return void do nothing. - Functions that return in a single register are provided an extra argument by simpcall: the Node to which the return value should be stored. gencall handles moving %rax or %rxmm0d to that node as appropriate. - Functions that return large aggregates are provided an extra argument by simpcall: the address of the Node to which the return value should be stored. This is used as the hidden argument, as previously. - Functions that return small aggregates are also provided the address of the Node for the return value, but this is not used as a hidden argument. Instead, gencall uses this to know where to store the values in the return registers. Since gencall now handles the assignment of the returned value, gencall does not return a Loc *.
2020-06-20Pass small-aggregate arguments by the AMD64 abi.S. Gilles
Generally “aggregate types smaller than two eightbytes, such that each eightbyte is unambiguously integer or floating-point, are passed in registers”. Since things like structs are assumed to be on the stack (for addressing), this leads to inefficiencies in function calls: the code var foo : bar = [ .a = 123, .b = 4.567 ] baz(foo) will store foo on the stack, then load it into registers to call baz, and the prologue of baz will immediately push foo back onto the stack. Ah, well.
2020-06-11Add classification algorithm for small-struct passing.S. Gilles
This is meant to implement section 3.2.3 of the AMD64 abi draft. Types which are meant to inter-operate with C should be passed in ways that C will expect. - uint16, flt32, bool, &c. should map to the obvious things - myrddin structs should map to C structs - myrddin tuples could map to C structs, so are treated as structs with unnamed fields. - myrddin unions that are classified as enums are treated as ints. Slices and (non-enum) unions are always passed on the stack, regardless of size, and therefore do not inter-operate with C. - myrddin slices could map to struct { type *data; size_t len; } transparently. However, this would require a lot of work on the myrddin rt code, and would incur a minor performance penalty in the common case of simply passing a slice as an argument in myrddin-only code. Let's hold off on completely overhauling the rt code until a compelling use case for magical slice arguments appears. - myrddin (non-enum) unions are not mapped to anything right now. They could map to struct { union {...} data; int tag; }, though there are special cases to handle with std.option(@a#).
2020-06-11Factor out the code for placing/retrieving arguments.S. Gilles
2020-06-11Add isaggregate for later use with abi conformity.S. Gilles
2020-06-11Unify alignment for heterogeneous tuples.S. Gilles
This only appears to come into play when trying to match memory layout of tuples with structs, or when accessing deeply nested tuples.
2020-06-10Fix check for dumb moves (thanks sgilles)Ori Bernstein
We need to check if we have reg->reg moves.
2020-05-11add OSX recvfrom, fix UDP announce (thanks Int21h)Ori Bernstein
system call to libsys for OS X and also made a minor edit to announcesock so it would work with UDP.
2020-05-05Merge branch 'master' of git+ssh:// Bernstein
2020-05-05Remove useless codeMura Li
2020-05-05Remove unneeded checkMura Li
2020-05-05Use /**/ instead of //Mura Li