1
Fork 0
rust/compiler
bors adaac6b166 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.
2023-04-26 02:36:42 +00:00
..
rustc fix link 2023-03-11 10:53:47 -06:00
rustc_abi Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
rustc_apfloat
rustc_arena Allow clippy::from_mut_ref 2023-04-09 22:29:56 +02:00
rustc_ast use P<[Ident]> instead of Vec<Ident> 2023-04-21 02:14:03 -07:00
rustc_ast_lowering Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
rustc_ast_passes Auto merge of #110407 - Nilstrieb:fluent-macro, r=davidtwco 2023-04-19 08:26:47 +00:00
rustc_ast_pretty minor tweaks 2023-04-21 02:14:04 -07:00
rustc_attr Add rustc_fluent_macro to decouple fluent from rustc_macros 2023-04-18 18:56:22 +00:00
rustc_baked_icu_data update ICU4X to 1.1.0 2023-02-04 22:28:59 +01:00
rustc_borrowck Rollup merge of #110556 - kylematsuda:earlybinder-explicit-item-bounds, r=compiler-errors 2023-04-25 21:06:32 +02:00
rustc_builtin_macros Revert "Remove #[alloc_error_handler] from the compiler and library" 2023-04-25 00:08:35 +02:00
rustc_codegen_cranelift Revert "Remove #[alloc_error_handler] from the compiler and library" 2023-04-25 00:08:35 +02:00
rustc_codegen_gcc Auto merge of #101069 - zhaixiaojuan:loongarch64-inline-asm, r=Amanieu 2023-04-25 09:18:58 +00:00
rustc_codegen_llvm Auto merge of #101069 - zhaixiaojuan:loongarch64-inline-asm, r=Amanieu 2023-04-25 09:18:58 +00:00
rustc_codegen_ssa Revert "Remove #[alloc_error_handler] from the compiler and library" 2023-04-25 00:08:35 +02:00
rustc_const_eval Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
rustc_data_structures Rollup merge of #110615 - WaffleLapkin:impl_tag, r=cjgillot 2023-04-25 21:06:33 +02:00
rustc_driver Remove unneeded extern crate 2023-02-02 07:47:39 +01:00
rustc_driver_impl Fix ICE on --print=... i/o errors 2023-04-25 08:17:18 -07:00
rustc_error_codes Spelling - compiler 2023-04-17 16:09:18 -04:00
rustc_error_messages Add rustc_fluent_macro to decouple fluent from rustc_macros 2023-04-18 18:56:22 +00:00
rustc_errors Rollup merge of #110578 - bvanjoi:fix-issue-110547, r=jackh726 2023-04-21 06:44:30 +02:00
rustc_expand Auto merge of #109002 - michaelvanstraten:master, r=petrochenkov 2023-04-21 10:47:27 +00:00
rustc_feature Revert "Remove #[alloc_error_handler] from the compiler and library" 2023-04-25 00:08:35 +02:00
rustc_fluent_macro Remove unused synstructure dep 2023-04-22 22:03:33 +01:00
rustc_fs_util Add try_canonicalize to rustc_fs_util and use it over fs::canonicalize 2023-03-16 21:50:23 +01:00
rustc_graphviz
rustc_hir Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
rustc_hir_analysis Rollup merge of #110556 - kylematsuda:earlybinder-explicit-item-bounds, r=compiler-errors 2023-04-25 21:06:32 +02:00
rustc_hir_pretty minor tweaks 2023-04-21 02:14:04 -07:00
rustc_hir_typeck Rollup merge of #110556 - kylematsuda:earlybinder-explicit-item-bounds, r=compiler-errors 2023-04-25 21:06:32 +02:00
rustc_incremental Auto merge of #110407 - Nilstrieb:fluent-macro, r=davidtwco 2023-04-19 08:26:47 +00:00
rustc_index Decorative changes to IndexVec 2023-04-24 13:53:37 +00:00
rustc_infer Rollup merge of #110556 - kylematsuda:earlybinder-explicit-item-bounds, r=compiler-errors 2023-04-25 21:06:32 +02:00
rustc_interface Revert "Rename -Zoom=panic to -Zoom=unwind" 2023-04-25 00:08:33 +02:00
rustc_lexer Revert "Don't recover lifetimes/labels containing emojis as character literals" 2023-04-10 06:52:41 +00:00
rustc_lint Rollup merge of #110556 - kylematsuda:earlybinder-explicit-item-bounds, r=compiler-errors 2023-04-25 21:06:32 +02:00
rustc_lint_defs Spelling - compiler 2023-04-17 16:09:18 -04:00
rustc_llvm [LLVM17] Adapt to ExplicitEmulatedTLS removal. 2023-04-24 08:45:15 +00:00
rustc_log Stabilize IsTerminal 2023-04-10 17:24:23 +09:00
rustc_macros Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
rustc_metadata Auto merge of #110634 - saethlin:pointy-decoder, r=cjgillot 2023-04-26 02:36:42 +00:00
rustc_middle Auto merge of #110634 - saethlin:pointy-decoder, r=cjgillot 2023-04-26 02:36:42 +00:00
rustc_mir_build Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
rustc_mir_dataflow Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
rustc_mir_transform Rollup merge of #110556 - kylematsuda:earlybinder-explicit-item-bounds, r=compiler-errors 2023-04-25 21:06:32 +02:00
rustc_monomorphize Rollup merge of #110681 - klensy:cut-dep, r=lcnr 2023-04-25 02:33:29 +09:00
rustc_parse Auto merge of #110407 - Nilstrieb:fluent-macro, r=davidtwco 2023-04-19 08:26:47 +00:00
rustc_parse_format Fix typos in compiler 2023-04-10 22:02:52 +02:00
rustc_passes Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
rustc_plugin_impl Add rustc_fluent_macro to decouple fluent from rustc_macros 2023-04-18 18:56:22 +00:00
rustc_privacy add EarlyBinder to output of explicit_item_bounds; replace bound_explicit_item_bounds usages; remove bound_explicit_item_bounds query 2023-04-20 12:36:50 -06:00
rustc_query_impl Auto merge of #110634 - saethlin:pointy-decoder, r=cjgillot 2023-04-26 02:36:42 +00:00
rustc_query_system Auto merge of #110634 - saethlin:pointy-decoder, r=cjgillot 2023-04-26 02:36:42 +00:00
rustc_resolve Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
rustc_serialize Rewrite MemDecoder around pointers not a slice 2023-04-23 17:25:11 -04:00
rustc_session Revert "Rename -Zoom=panic to -Zoom=unwind" 2023-04-25 00:08:33 +02:00
rustc_smir Add Call terminator to SMIR 2023-04-20 12:00:41 -03:00
rustc_span Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
rustc_symbol_mangling Allow LocalDefId as the argument to def_path_str 2023-04-21 22:27:20 +00:00
rustc_target Add loongarch64 asm! support 2023-04-25 14:15:31 +08:00
rustc_trait_selection Rollup merge of #110671 - compiler-errors:polarity, r=lcnr 2023-04-25 21:06:34 +02:00
rustc_traits Rollup merge of #110556 - kylematsuda:earlybinder-explicit-item-bounds, r=compiler-errors 2023-04-25 21:06:32 +02:00
rustc_transmute Erase regions when confirming transmutability candidate 2023-04-16 19:12:34 +00:00
rustc_ty_utils Split {Idx, IndexVec, IndexSlice} into their own modules 2023-04-24 13:53:35 +00:00
rustc_type_ir Auto merge of #110634 - saethlin:pointy-decoder, r=cjgillot 2023-04-26 02:36:42 +00:00