Repository navigation
Flag 0.5 - #3
Merged
Merged
Flag 0.5#3
Conversation
…acked only when constant, the inliner counts what survives, switch on a union by binary search; qbe: struct copies of 4 bytes, floats on the stack on Windows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…rrays, maps of &str take a &strview, array constants take the type of the place, main is the main of C; refresh seeds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…ed, net: UDP and ready, UTF-16 on Windows, try_reserve Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…tags from the name of the type, load, symbol and close, extern func, link names, offset_of, the where of extern blocks Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…he operators of arrays are gone Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…program, LoadLibraryW, a simd as a key, QBE changes counted; refresh seeds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t without files, late reads in literals, user functions next to lane functions, masks, QBE on arm64 and rv64; refresh seeds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…t macOS writes its own way Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…in hex, 0xc0000005, and its test reads it as the 139 of Linux and macOS Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…s about a thread that runs alone in a library, a literal takes the one array, simd or map of a union, ptr of a lane of a mask is a copy; refresh seeds Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…get and vset in the cut of small slots, so v[i] keeps the simd there Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
…eads that gdb sees start on Windows Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Flag 0.5: SIMD, shared libraries and a C FFI without workarounds, processes and UDP,
flagc test, and faster generated code.Five works built in parallel, merged one commit each, then reviewed by three independent reviewers and fixed:
switchon a union by binary search. The integration of rigid bodies goes from 5.9 to 2.4 times C-O2.flagc test(each test in its own process, in parallel, with a timeout),@embed,-> neverthat narrows,not (x is T)narrows,.lenof arrays, maps of&strtake a&strview, and Flag'smainis C'smain.startfor processes that run beside the program,random_bytes,fs.modified, UDP andreadyinnet, UTF-16 on Windows, andtry_reserve.-sharedon Linux and macOS, libraries that start on their own, union tags from the name of the type,load/symbol/close,extern func, link names with= "symbol",offset_of, and thewhereofexternblocks.simd[T, n]in registers, with a new register classvin QBE on amd64 (x86-64-v2) and arm64. A 4-lane contact solver runs at about 1.5 ns per contact, next to 1.3 for C with SSE. The operators of arrays are gone, except==.Then the leftovers of that review, in two more commits:
c0c3bb8:simdin a tagged union goes at byte 16, aligned as C expects it;-memorywarns about a thread that runs alone in a library, which nothing waits for before the program closes it;[...]and{k: v}take the one array,simdor map of a union, like{...}takes its one struct;ptrof a lane of a mask is documented as a copy.acc6563: in QBE,v[i]reads and writes its lane in the register (vget/vsetin the cut of small slots), on amd64 and arm64. A loop that sets a lane and then works on the wholesimdis 4 times as fast.The changelog section is in
CHANGELOG.md(0.5.0, not released yet). The version inbuild.shis still 0.4.0 and will be bumped when the release is ready.Testing done locally
./build.sh(stage 2 and stage 3 agree, built from the new seeds),./test.sh build/flagc: 1111 passed, 0 failed (mainhas 992)../build.sh sanitizeis clean.mainfails 22 in the same environment. The extra failures come from the environment: gdb, programs that run themselves, and dynamic loading under-static. The last two commits add no new failures.main, and 3 need the Linux flagc. After the last two commits, a run that executes each test from a temporary folder gives 427 pass, 17 fail, the same 17 as before them.🤖 Generated with Claude Code