-
Notifications
You must be signed in to change notification settings - Fork 59
Interpreter: Support using local variables in functions #1781
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: interpreter-unified-allocation
Are you sure you want to change the base?
Interpreter: Support using local variables in functions #1781
Conversation
Codecov Report❌ Patch coverage is
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. 🚀 New features to boost your workflow:
|
|
|
||
| /// Creates instance of builtin value with integer constant `c`. | ||
| /// Creates instance of builtin value with `c`. | ||
| public init(withIntegerConstant c: IntegerConstant) { |
There was a problem hiding this comment.
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:
| 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.
There was a problem hiding this comment.
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.
The PR does minimal changes to support using local variable in the function. For that we need to support
store,subfield_view,accessinstructions. Consideringalloc_stackanddealloc_stackhave been covered in previous PR.