Skip to content

Conversation

@RishabhRD
Copy link
Member

The PR does minimal changes to support using local variable in the function. For that we need to support store, subfield_view, access instructions. Considering alloc_stack and dealloc_stack have been covered in previous PR.

@RishabhRD RishabhRD requested a review from dabrahams November 23, 2025 08:57
@codecov
Copy link

codecov bot commented Nov 23, 2025

Codecov Report

❌ Patch coverage is 63.75000% with 29 lines in your changes missing coverage. Please review.
✅ Project coverage is 88.04%. Comparing base (3b11fbb) to head (99823fc).

Files with missing lines Patch % Lines
Sources/Interpreter/BuiltinValue.swift 29.41% 24 Missing ⚠️
Sources/Interpreter/Interpreter.swift 86.84% 5 Missing ⚠️
Additional details and impacted files
@@                        Coverage Diff                         @@
##           interpreter-unified-allocation    #1781      +/-   ##
==================================================================
+ Coverage                           87.89%   88.04%   +0.14%     
==================================================================
  Files                                 392      393       +1     
  Lines                               24601    24675      +74     
==================================================================
+ Hits                                21624    21725     +101     
+ Misses                               2977     2950      -27     

☔ View full report in Codecov by Sentry.
📢 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.


/// Creates instance of builtin value with integer constant `c`.
/// Creates instance of builtin value with `c`.
public init(withIntegerConstant c: IntegerConstant) {
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

withIntegerConstant is needlessly putting type information in the function name. Is this a value-preserving conversion? In that case:

Suggested change
public init(withIntegerConstant c: IntegerConstant) {
public init(_ c: IntegerConstant) {

I'm not sure the name IntegerConstant is good either, but that's a separate issue.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Assuming value-preserving means preserving mathematical value, then yes its a value preserving conversion.

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.

3 participants