Skip to content
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

Add bound checks for method indices #219

Draft
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

mandolaerik
Copy link
Contributor

No description provided.

@mandolaerik mandolaerik marked this pull request as draft October 5, 2023 08:30
@mandolaerik
Copy link
Contributor Author

No tests yet, and I'm not sure this is the right approach. Opens:

  • Need a cost analysis: how much does this bloat generated code?
    • In particular: I tried to design a fallback behaviour that minimizes the cost in code bloat, but at the cost of functionality (clearing all indices to zero is cheap but more rude than strictly necessary). Need some real numbers to assess if it's worth it.
  • With this patch, the callee checks the bound; should it be the caller? That would give a better error message, but probably also more code bloat.
  • How well does this generalize to other bound checks? e.g., accessing params or session variables in object arrays, or creating traitrefs to object arrays.

@syssimics
Copy link
Contributor

Verification #12297543: fail

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