V2 API#112
Open
tothambrus11 wants to merge 61 commits into
Open
Conversation
0b72c85 to
4ad826d
Compare
Codecov Report❌ Patch coverage is Additional details and impacted files@@ Coverage Diff @@
## main #112 +/- ##
===========================================
+ Coverage 69.20% 84.32% +15.11%
===========================================
Files 50 54 +4
Lines 1117 1435 +318
===========================================
+ Hits 773 1210 +437
+ Misses 344 225 -119 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
tothambrus11
commented
Feb 17, 2026
dabrahams
reviewed
Feb 18, 2026
kyouko-taiga
requested changes
Feb 18, 2026
Contributor
kyouko-taiga
left a comment
There was a problem hiding this comment.
I don't understand the changes that have been made in C++ files.
I'm not super convinced about the way entity stores work and would prefer if we found a more efficient way to track how entities are being borrowed. I am also not a fan of the pattern using constructor to create temporary objects. I think we should use higher-order functions to that effect.
d230d68 to
35b539e
Compare
Member
Author
|
@kyouko-taiga Can we merge this? |
Merged
30f7b5a to
b47a94e
Compare
This fixes some common occurrences of swiftlang/swift#87921
Using an updated .pc file that passes SPM-compatible library flags
… hc style, require explicit targetMachine argument on Module construction
4799269 to
c35f454
Compare
…122) * Add support for controlling the alignement of a store * Add support for controlling the alignement of a load * Formatting * Improve test coverage * Update Sources/SwiftyLLVM/Values/Instructions/Load.swift Co-authored-by: Ambrus Tóth <32463042+tothambrus11@users.noreply.github.com> --------- Co-authored-by: Ambrus Tóth <32463042+tothambrus11@users.noreply.github.com>
…ty implementation
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.
This PR changes the API so that LLVM reference types no longer look like regular value-semantic objects. The wrappers themselves remained nearly identical, but all methods have been modified to return and take
UnsafeReference's to objects of given type, which can be dereferenced via.unsafe[].The new UnsafeReference type also allowed us to get rid of existentials, and implement a pseudo-subtyping of references through conversion initializers and
.erasedbetweenAnyTypeandT: IRType, betweenAnyValueandT: IRValue, and betweenAnyAttributeand attribute types.To reduce the need for
.erasedin functions that acceptAnyValue/AnyType, I modified functions to acceptUnsafeReference<some IRType/IRValue>. In case of functons with collection inputs, I added overloads with generic variadic tuple parameters, which are internally type-erased and forwarded to the erased overload. SinceAnyType is IRTypeandAnyValue is IRValue, the tuple based overload works even if some of the arguments are type-erased already.I completed adding docs for all symbols, looking at LLVM docs where needed. I also added links to the relevant LLVM docs for all intrinsics.
To review the usability of the new API, take a look at hylo-lang/hylo-new#53