Skip to content

Conversation

@chiphogg
Copy link
Member

Now it all comes together. We carefully designed the overflow checkers
for each individual operation so that they took a Limits parameter,
which might be different from the full limits for the type. This PR
adds a LimitsFor<Op, Limits> helper, which takes an "output target"
limits type Limits, and an operation Op, and produces the input
limits
that will stay within that target. And this object can be used
as the "limits" parameter for the previous operation in the chain!
And we're done.

Helps #349.

chiphogg added 2 commits July 16, 2025 09:19
Now it all comes together.  We carefully designed the overflow checkers
for each individual operation so that they took a `Limits` parameter,
which might be different from the full limits for the type.  This PR
adds a `LimitsFor<Op, Limits>` helper, which takes an "output target"
limits type `Limits`, and an operation `Op`, and produces the _input
limits_ that will stay within that target.  And this object can be used
as the "limits" parameter _for the previous operation in the chain_!
And we're done.

Helps #349.
@chiphogg chiphogg requested a review from hoffbrinkle July 16, 2025 13:23
Copy link
Member

@hoffbrinkle hoffbrinkle left a comment

Choose a reason for hiding this comment

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

It's that easy?

@chiphogg
Copy link
Member Author

It's that easy?

Sure is! But it took a lot of hard work to make it that easy. 😅

@chiphogg chiphogg merged commit 7cb3fc1 into main Jul 16, 2025
14 checks passed
@chiphogg chiphogg deleted the chiphogg/overflow-op-sequence#349 branch July 16, 2025 14:06
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.

3 participants