Repository navigation
Row readers: report failures by where they are caught, and let the JIT call generated readers directly - #274
Merged
Conversation
…T call generated readers directly Generated row readers are no longer marked `NoInlining`, so the JIT can call them as it calls a hand-written reader (a guarded direct call instead of a plain delegate call). The mark was there only so a failure could be attributed by looking for the reader's frame on the stack trace. Now every read loop catches around its call of the row reader alone, as the streaming loops and `First`/`Single` already did, so what is caught there is the reader's failure by construction: - a failure of a generated or runtime row reader is reported with the model and the row, as before; - a failure of `Read`, of adding the row (for example a pool that refuses an array) or of a cancel passes through unchanged, as before; - a caller's own selector still passes its exception through unchanged. A failure is now attributed by where it is caught, not by reading the stack trace, so the answer is the same in trimmed native AOT builds, where a stack trace can carry no method data. The stack-trace check and the documentation of its limits are deleted. One difference: a generated reader that fails to load (for example, a model assembly changed since the consumer was built) is now reported as a row failure, with the load error inside; before, the load error passed through on its own. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Generated row readers are no longer marked
NoInlining, so the JIT can call them as it calls a hand-written reader (a guarded direct call instead of a plain delegate call).The mark was there only so a failure could be attributed by looking for the reader's frame on the stack trace. Now every read loop catches around its call of the row reader alone, as the streaming loops and
First/Singlealready did, so what is caught there is the reader's failure by construction:Read, of adding the row (for example a pool that refuses an array) or of a cancel passes through unchanged, as before;A failure is now attributed by where it is caught, not by reading the stack trace, so the answer is the same in trimmed native AOT builds, where a stack trace can carry no method data. The stack-trace check and the documentation of its limits are deleted.
One difference: a generated reader that fails to load (for example, a model assembly changed since the consumer was built) is now reported as a row failure, with the load error inside; before, the load error passed through on its own.
🤖 Generated with Claude Code