Skip to content

Remove an unused copy of the location evaluator - #94

Merged
mernst merged 2 commits into
codespecs:masterfrom
mernst:remove-unused-evaluator
Oct 16, 2026
Merged

mernst merged 2 commits into
codespecs:masterfrom
mernst:remove-unused-evaluator

Conversation

@mernst

@mernst mernst commented Oct 12, 2026 •

Copy link
Copy Markdown
Member

returnArrayVariableWithAddr contained a copy of the DWARF location evaluator, but the variables it examines (globals and local arrays/structs) never have a location expression, so the code never ran. This pull request removes that code. visitVariableGroup contains the evaluator that Fjalar uses.

returnArrayVariableWithAddr evaluated a formal parameter's DWARF location
expression into var_loc but never used the result.
@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown

Review in Change Stack →

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration
  • Configuration used: Repository: codespecs/fjalar/.coderabbit.yaml
  • Review profile: ASSERTIVE
  • Plan: Advanced
  • Run ID: c45cb04f-0c74-42c7-b767-320185d24b01

📥 Commits

Reviewing files that changed from the base of the PR and between ea8fa94 and 1f7e404.


📒 Files selected for processing (1)
  • valgrind/fjalar/fjalar_runtime.c

Included review availability: This review used your included allowance. Your plan provides up to 1 included review per hour; 0 remain after this review.



📝 Walkthrough

Walkthrough

returnArrayVariableWithAddr no longer evaluates DWARF location expressions for local variables. It uses the existing frame-pointer or low-stack-pointer offset calculation to determine each variable’s base address. Diagnostic output now reports that base address.

Suggested reviewers: markro49


Priority: ⬇️ Low

Change: Refactor

Merge Risk: ⚪ Minimal · up to 1f7e4

Local variable address lookup retains its existing FP/SP calculation, and the removed evaluator did not affect the returned address. No actionable merge risk is identified.

Architecture Summary

Architecture risk: 🔵 Low · up to 1f7e4

The change affects 1 system.

Changed systems: valgrind

Architecture concerns
No architecture-level concerns identified.

Review details

Systems and components

  • observed — valgrind (service) was modified; 1 changed file maps to changed impact.

Before / after behavior

  • observed — Modified behavior in valgrind/fjalar/fjalar_runtime.c: Removed the DWARF location-expression interpreter, including handling for address and constant values, dereferences, arithmetic, register and base-register operations, and frame-base offsets. Local-variable address lookup now relies on the existing FP/SP offset calculation instead.
  • observed — Modified behavior in valgrind/fjalar/fjalar_runtime.c: Changed the diagnostic output to report potentialVarBaseAddr instead of the former evaluated var_loc.

Pre-merge checks | Passed 3
✅ Passed checks (3 passed)
Check name Status Explanation
Docstring Coverage Passed Docstring coverage is 100.00% which is sufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 1 functions across 1 files.
Linked Issues check Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check Passed Check skipped because no linked issues were found for this pull request.

✨ Finishing Touches
🧪 Generate unit tests (beta)
  • Create a new PR

  • Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts

Comment @coderabbitai help to get the list of available commands.

@mernst

mernst commented Oct 12, 2026

Copy link
Copy Markdown
Member Author

@coderabbitai review

@coderabbitai

coderabbitai Bot commented Oct 12, 2026 •

Copy link
Copy Markdown
✅ Action performed

Review finished.

Note: CodeRabbit is an incremental review system and does not re-review already reviewed commits. This command is applicable only when automatic reviews are paused.

@mernst
mernst merged commit 8209a0b into codespecs:master Oct 16, 2026
6 checks passed
@mernst
mernst deleted the remove-unused-evaluator branch October 16, 2026 23:25
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