summaryrefslogtreecommitdiff
path: root/tests/rustdoc-js-std/parser-errors.js
diff options
context:
space:
mode:
authorbors <bors@rust-lang.org>2023-04-26 02:36:42 +0000
committerbors <bors@rust-lang.org>2023-04-26 02:36:42 +0000
commitadaac6b166df57ea5a20d56e4cce503b55aca927 (patch)
tree2a058aa7f4bc9cc6cf3586c7dcb24afa19bdbf86 /tests/rustdoc-js-std/parser-errors.js
parent84d4f16728ed2e5a90c800d6d84225be3ca7c3c8 (diff)
parent1f67ba61a985c621cb10ae091aaa5c2b009aa721 (diff)
downloadrust-adaac6b166df57ea5a20d56e4cce503b55aca927.tar.gz
Auto merge of #110634 - saethlin:pointy-decoder, r=cjgillot
Rewrite MemDecoder around pointers not a slice This is basically https://github.com/rust-lang/rust/pull/109910 but I'm being a lot more aggressive. The pointer-based structure means that it makes a lot more sense to absorb more complexity into `MemDecoder`, most of the diff is just complexity moving from one place to another. The primary argument for this structure is that we only incur a single bounds check when doing multi-byte reads from a `MemDecoder`. With the slice-based implementation we need to do those with `data[position..position + len]` , which needs to account for `position + len` wrapping. It would be possible to dodge the first bounds check if we stored a slice that starts at `position`, but that would require updating the pointer and length on every read. This PR also embeds the failure path in a separate function, which means that this PR should subsume all the perf wins observed in https://github.com/rust-lang/rust/pull/109867.
Diffstat (limited to 'tests/rustdoc-js-std/parser-errors.js')
0 files changed, 0 insertions, 0 deletions