Skip to content

Conversation

dbort
Copy link
Contributor

@dbort dbort commented Sep 13, 2023

Summary:
First step in hiding the off-by-one non-const buffer indices from users. Since fewer users use MethodMeta::num_non_const_buffers today (relative to the version on Program), update the behavior here, along with all of its users.

After this, we can migrate the users of Program::get_non_const_buffer_size to this new API, fixing the off-by-one as we go.

I found all of these uses with the search

cd fbsource
xbgs -sl "non_const_buffer_size" | xargs grep -le '\<non_const_buffer_size\>'

Luckily, Program's version of this is called get_non_const_buffer_size (with the extra get_ prefix) so it was straightforward to find code that used MethodMeta's methods.

Differential Revision: D48762563

@facebook-github-bot facebook-github-bot added the CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. label Sep 13, 2023
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48762563

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48762563

4 similar comments
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48762563

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48762563

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48762563

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48762563

Summary:

First step in hiding the off-by-one non-const buffer indices from users. Since fewer users use `MethodMeta::num_non_const_buffers` today (relative to the version on Program), update the behavior here, along with all of its users.

After this, we can migrate the users of `Program::get_non_const_buffer_size` to this new API, fixing the off-by-one as we go.

I found all of these uses with the search

```
cd fbsource
xbgs -sl "non_const_buffer_size" | xargs grep -le '\<non_const_buffer_size\>'
```

Luckily, `Program`'s version of this is called `get_non_const_buffer_size` (with the extra `get_` prefix) so it was straightforward to find code that used `MethodMeta`'s methods.

Differential Revision: D48762563
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D48762563

@facebook-github-bot
Copy link
Contributor

This pull request has been merged in 5762802.

Gasoonjia pushed a commit that referenced this pull request Jul 30, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants