Skip to content

Hughsie/fast path#321

Merged
hughsie merged 2 commits into
mainfrom
hughsie/fast-path
Jun 29, 2026
Merged

Hughsie/fast path#321
hughsie merged 2 commits into
mainfrom
hughsie/fast-path

Conversation

@hughsie

@hughsie hughsie commented Jun 29, 2026

Copy link
Copy Markdown
Owner

Summary by CodeRabbit

  • Bug Fixes
    • Improved runtime handling of bound values so some items are added to the execution stack more directly and consistently.
    • Adjusted binding cleanup behaviour to avoid clearing stored state incorrectly in certain cases.

@coderabbitai

coderabbitai Bot commented Jun 29, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: 602bab03-c862-4994-8600-3e2dc8521f18

📥 Commits

Reviewing files that changed from the base of the PR and between 1cfb1c3 and 177dc80.

📒 Files selected for processing (2)
  • src/xb-machine.c
  • src/xb-value-bindings.c

📝 Walkthrough

Walkthrough

Two small targeted fixes: xb_machine_run_with_bindings bypasses the xb_machine_stack_push debug-logging wrapper, calling xb_stack_push directly in two opcode push paths. Separately, xb_value_bindings_clear_index corrects its conditional scope so that nulling of ptr and destroy_func is guarded by the same condition as the destroy call, and removes the previously unconditional kind reset.

Changes

Stack push bypass and binding clear fix

Layer / File(s) Summary
Direct xb_stack_push in opcode run paths
src/xb-machine.c
Two call sites in xb_machine_run_with_bindings switch from xb_machine_stack_push to xb_stack_push, bypassing the debug-logging wrapper in both the bound-opcode substitution path (line 1014) and the non-function opcode add-to-stack path (line 1064).
xb_value_bindings_clear_index conditional scope fix
src/xb-value-bindings.c
The conditional block now guards both the destroy_func(ptr) call and the subsequent nulling of ptr/destroy_func. The previously unconditional kind = XB_BOUND_VALUE_KIND_NONE reset is removed from this path, altering clearing semantics when ptr or destroy_func is NULL.

Estimated code review effort

🎯 3 (Moderate) | ⏱️ ~20 minutes

🚥 Pre-merge checks | ✅ 3 | ❌ 2

❌ Failed checks (1 warning, 1 inconclusive)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 50.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
Title check ❓ Inconclusive The title is vague and reads like a branch name, so it does not clearly describe the changes. Use a short, specific title that names the main change, such as the runtime stack fast-path update.
✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
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 docstrings
  • Create stacked PR
  • Commit on current branch

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

@hughsie
hughsie merged commit 4927fe9 into main Jun 29, 2026
4 checks passed
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.

1 participant