Add borrow checker to fast dfa engine - #23572
Open
rikkimax wants to merge 1 commit into
Open
Conversation
rikkimax
force-pushed
the
fastdfa-borrowchecker
branch
from
August 10, 2026 20:58
3e0a2c9 to
0f34c27
Compare
rikkimax
force-pushed
the
fastdfa-borrowchecker
branch
from
August 10, 2026 21:12
0f34c27 to
879c7c9
Compare
DMD perf check
|
| * the `-preview=fastdfa` switch). It is subject to change and may be removed | ||
| * at a later date without notice; do not rely on it in production code. | ||
| */ | ||
| enum __fastdfa_returnborrow; |
Contributor
There was a problem hiding this comment.
I presume the leading double underscore is because it is experimental? do we have a plan to remove that, e.g. remove the leading underscores and add a deprecated alias __fastdfa_returnborrow = fastdfa_returnborrow;
Contributor
Author
There was a problem hiding this comment.
Yes, it would become an in-language attribute i.e. @escape(return^)
The borrow checker is an integrated part of the escape analysis, but I left it out before to focus on the basics and not have to deal with the many to many problem which I didn't figure out how to solve (the LLM figured it out pretty much instantly).
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.
Pretty much entirely written by DeepSeek V4 flash in the span of about 2 and half hours.
I'm very happy with the results.
Oh and those plan files are fully intended to be merged; it's a little something for @LightBender to learn from for PhobosV3 legal stuff.