Skip to content

Get rid of FunctionType.parameterCount. - #142

Closed
dabrahams wants to merge 1 commit into
mainfrom
no-parameterCount
Closed

Get rid of FunctionType.parameterCount.#142
dabrahams wants to merge 1 commit into
mainfrom
no-parameterCount

Conversation

@dabrahams

@dabrahams dabrahams commented Aug 31, 2026

Copy link
Copy Markdown

I will proceed with documentation and any necessary tests if we believe this is worth the added complexity.

@codecov

codecov Bot commented Aug 31, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 77.08333% with 11 lines in your changes missing coverage. Please review.
✅ Project coverage is 84.69%. Comparing base (20e6fa3) to head (4ee2448).

Files with missing lines Patch % Lines
...urces/SwiftyLLVM/Utils/MutableValueSemantics.swift 20.00% 8 Missing ⚠️
Sources/SwiftyLLVM/Types/FunctionType.swift 92.59% 2 Missing ⚠️
Sources/SwiftyLLVM/Module.swift 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #142      +/-   ##
==========================================
- Coverage   84.96%   84.69%   -0.28%     
==========================================
  Files          57       59       +2     
  Lines        1417     1457      +40     
==========================================
+ Hits         1204     1234      +30     
- Misses        213      223      +10     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@tothambrus11

tothambrus11 commented Aug 31, 2026

Copy link
Copy Markdown
Member

Thanks for the work! I think my version is simpler - we don't need to actually read the whole array, as we can query individual elements through the C++ API: #141
I'd like to avoid shared mutable and lazy properties if possible (the latter mostly because Swift compiler is quite buggy around them and often caused compiler crashes)

@dabrahams

dabrahams commented Aug 31, 2026

Copy link
Copy Markdown
Author

Yours is much better; I couldn't find the function that just gets one parameter or I wouldn't have done all that. Mine doesn't use any lazy properties.

Make yours RandomAccess though

@tothambrus11

Copy link
Copy Markdown
Member

Oh wow, it was so late yesterday that I somehow misread lazyStorage as being a lazy property...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants