Skip to content

Implement getter for Context.instructions_remaining#4624

Merged
jedel1043 merged 4 commits intoboa-dev:mainfrom
ShovelTime:inst_getter
Feb 25, 2026
Merged

Implement getter for Context.instructions_remaining#4624
jedel1043 merged 4 commits intoboa-dev:mainfrom
ShovelTime:inst_getter

Conversation

@ShovelTime
Copy link
Contributor

This implements Context.instructions_remaining()
for reading the remaining instruction budget of the Context, without the need for pointer arithmetic to access the field otherwise.

​This would be useful for cases where we want to monitor engine usage in a remote service for billing purposes

@github-actions
Copy link

github-actions bot commented Feb 10, 2026

Test262 conformance changes

Test result main count PR count difference
Total 52,862 52,862 0
Passed 49,472 49,471 -1
Ignored 2,249 2,249 0
Failed 1,141 1,142 +1
Panics 0 0 0
Conformance 93.59% 93.59% -0.00%
Broken tests (1):
test/intl402/NumberFormat/prototype/resolvedOptions/basic.js (previously Passed)

@codecov
Copy link

codecov bot commented Feb 17, 2026

Codecov Report

❌ Patch coverage is 0% with 2 lines in your changes missing coverage. Please review.
✅ Project coverage is 56.54%. Comparing base (6ddc2b4) to head (4a6bd1f).
⚠️ Report is 678 commits behind head on main.

Files with missing lines Patch % Lines
core/engine/src/context/mod.rs 0.00% 2 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #4624      +/-   ##
==========================================
+ Coverage   47.24%   56.54%   +9.30%     
==========================================
  Files         476      548      +72     
  Lines       46892    60009   +13117     
==========================================
+ Hits        22154    33934   +11780     
- Misses      24738    26075    +1337     

☔ 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.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Member

@jedel1043 jedel1043 left a comment

Choose a reason for hiding this comment

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

Seems a reasonable enough addition. We might want to have discussions about "lifting" the instructions_remaining parameter out of the fuzz feature, but that can be done in the future.

@jedel1043 jedel1043 added this pull request to the merge queue Feb 25, 2026
@jedel1043 jedel1043 added enhancement New feature or request API labels Feb 25, 2026
@jedel1043 jedel1043 added this to the v1.0.0 milestone Feb 25, 2026
Merged via the queue into boa-dev:main with commit 6d3501b Feb 25, 2026
18 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

API enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants