Show function params in variables#121
Open
integraledelebesgue wants to merge 1 commit intomainfrom
Open
Conversation
piotmag769
reviewed
May 4, 2026
|
|
||
| let user_function_id = | ||
| ctx.user_function_for_concrete_libfunc(&invocation_statement.libfunc_id)?; | ||
| let register_values_on_call = &caller_context.register_values_on_call.clone()?; |
Collaborator
There was a problem hiding this comment.
Observation: notice that when building function_param_var_map you go through args of invoke statements. Therefore, registry values in cell refs you have in the map refer to the values of registries right before execution of sierra statements that consumed it. Despite that, here you use register_values_on_call which was snapshoted before the first non-0-CASM statement, yet it still works.
Why? It is probably because all the mappings to params have fp in it - and fp doesn't change unless the function frame changes. So maybe we don't need the register_values_on_call at all - we can just get current fp and forget?
piotmag769
reviewed
May 4, 2026
3cc191d to
7953c83
Compare
7953c83 to
af4a300
Compare
piotmag769
reviewed
May 5, 2026
| program: &'a Program, | ||
| casm_debug_info: &'a CairoProgramDebugInfo, | ||
| ) -> impl Iterator<Item = (&'a Function, Range<usize>)> { | ||
| let max_statement_idx = StatementIdx(casm_debug_info.sierra_statement_info.len() - 1); |
Collaborator
There was a problem hiding this comment.
Suggested change
| let max_statement_idx = StatementIdx(casm_debug_info.sierra_statement_info.len() - 1); | |
| let max_statement_idx = StatementIdx(program.statements.len() - 1); |
| cairo-vm = { version = "3.2.0", features = ["test_utils"] } | ||
| dap = { git = "https://github.com/software-mansion-labs/dap-rs", rev = "27542c413184732cd8cb5632c8349d605ed4fe04" } | ||
| indexmap = "2.14" | ||
| indexmap = "2.13" |
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.
Closes #110