rust/compiler
bors fe2cfd4505 Auto merge of #119367 - Mark-Simulacrum:relative-spans, r=wesleywiser
Shrink span encoding further

Spans are now stored in a more compact form which cuts down on at least 1 byte per span (indirect/direct encoding) and at most 3 bytes per span (indirect/direct encoding, context byte, length byte). As a result, libcore metadata shrinks by 1.5MB.

I'm not a huge fan of the fairly manual encoding/decoding from bits implemented here. Something like Tokio's pack abstraction (https://github.com/tokio-rs/tokio/blob/master/tokio/src/util/bit.rs) might be desirable to cut down on some of the shifting etc. We might also say that this isn't worth doing :)

I took a look at copying the span encoding we use in memory (described [here](https://github.com/rust-lang/rust/blob/master/compiler/rustc_span/src/span_encoding.rs)). I think the format there makes a lot more sense for in-memory storage where prioritizing a fixed length (i.e., 4 or 8 bytes) is much more important. In metadata, it's much easier for us to have variable-length values, so there's less of a cliff if we don't quite fit. The bit packing scheme there would need changes to fit the varint scheme since it has a lot of all-1s patterns as the "relative offset" form.
2023-12-30 05:43:39 +00:00
..
rustc
rustc_abi
rustc_arena
rustc_ast Introduce const Trait (always-const trait bounds) 2023-12-27 12:51:32 +01:00
rustc_ast_lowering Merge Coroutine lowering functions 2023-12-28 21:24:24 +01:00
rustc_ast_passes Introduce const Trait (always-const trait bounds) 2023-12-27 12:51:32 +01:00
rustc_ast_pretty Auto merge of #119105 - dtolnay:paren, r=WaffleLapkin 2023-12-27 21:27:26 +00:00
rustc_attr Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
rustc_baked_icu_data
rustc_borrowck Movability doesn't need to be a query anymore 2023-12-28 16:35:01 +00:00
rustc_builtin_macros Remove more Session methods that duplicate DiagCtxt methods. 2023-12-24 08:17:47 +11:00
rustc_codegen_cranelift Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_codegen_gcc Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_codegen_llvm Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_codegen_ssa Auto merge of #119258 - compiler-errors:closure-kind, r=eholk 2023-12-26 04:25:53 +00:00
rustc_const_eval Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_data_structures Do not store stable crate id in on-disk hash map. 2023-12-24 17:22:48 +00:00
rustc_driver
rustc_driver_impl Auto merge of #119129 - jyn514:verbose, r=compiler-errors,estebank 2023-12-26 12:27:29 +00:00
rustc_error_codes rustc_error_codes: Update expected error in E0453.md 2023-12-28 19:46:40 +01:00
rustc_error_messages
rustc_errors Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
rustc_expand Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
rustc_feature Rollup merge of #119235 - Urgau:missing-feature-gate-sanitizer-cfi-cfgs, r=Nilstrieb 2023-12-26 13:29:13 -05:00
rustc_fluent_macro
rustc_fs_util
rustc_graphviz
rustc_hir Auto merge of #119259 - cjgillot:single-crate-id, r=Mark-Simulacrum 2023-12-29 14:37:40 +00:00
rustc_hir_analysis Fix some comments 2023-12-28 12:23:14 +08:00
rustc_hir_pretty Make closures carry their own ClosureKind, rather than deducing what it is from movability 2023-12-25 16:29:15 +00:00
rustc_hir_typeck Auto merge of #118911 - Young-Flash:fix_issue_118819, r=fmease 2023-12-29 18:39:23 +00:00
rustc_incremental Remove more Session methods that duplicate DiagCtxt methods. 2023-12-24 08:17:47 +11:00
rustc_index
rustc_index_macros
rustc_infer Auto merge of #116012 - cjgillot:gvn-const, r=oli-obk 2023-12-30 03:45:58 +00:00
rustc_interface Auto merge of #119129 - jyn514:verbose, r=compiler-errors,estebank 2023-12-26 12:27:29 +00:00
rustc_lexer
rustc_lint rustc_lint: Prevent triplication of 'unknown lint' lint 2023-12-28 19:46:51 +01:00
rustc_lint_defs Auto merge of #116274 - RalfJung:soft_unstable, r=cjgillot 2023-12-25 16:26:15 +00:00
rustc_llvm
rustc_log
rustc_macros
rustc_metadata Shrink span encoding further 2023-12-29 21:52:53 -05:00
rustc_middle Auto merge of #119392 - compiler-errors:args-parts, r=Nilstrieb 2023-12-29 04:21:41 +00:00
rustc_mir_build Movability doesn't need to be a query anymore 2023-12-28 16:35:01 +00:00
rustc_mir_dataflow Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_mir_transform Auto merge of #116012 - cjgillot:gvn-const, r=oli-obk 2023-12-30 03:45:58 +00:00
rustc_monomorphize Remove more Session methods that duplicate DiagCtxt methods. 2023-12-24 08:17:47 +11:00
rustc_next_trait_solver Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_parse Use filter instead of filter_map in Parser::expected_one_of_not_found 2023-12-28 21:19:41 +01:00
rustc_parse_format
rustc_passes Rollup merge of #119402 - est31:fix_if_guard_unused, r=compiler-errors 2023-12-29 11:19:28 +01:00
rustc_pattern_analysis Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_privacy Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
rustc_query_impl Auto merge of #119129 - jyn514:verbose, r=compiler-errors,estebank 2023-12-26 12:27:29 +00:00
rustc_query_system Auto merge of #119146 - nnethercote:rm-DiagCtxt-api-duplication, r=compiler-errors 2023-12-26 02:24:39 +00:00
rustc_resolve Remove Session methods that duplicate DiagCtxt methods. 2023-12-24 08:05:28 +11:00
rustc_serialize
rustc_session Auto merge of #119129 - jyn514:verbose, r=compiler-errors,estebank 2023-12-26 12:27:29 +00:00
rustc_smir Movability doesn't need to be a query anymore 2023-12-28 16:35:01 +00:00
rustc_span Rollup merge of #119235 - Urgau:missing-feature-gate-sanitizer-cfi-cfgs, r=Nilstrieb 2023-12-26 13:29:13 -05:00
rustc_symbol_mangling Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
rustc_target Rollup merge of #112936 - Toasterson:illumos-aarch64-target, r=jackh726 2023-12-23 20:02:27 +01:00
rustc_trait_selection Movability doesn't need to be a query anymore 2023-12-28 16:35:01 +00:00
rustc_traits
rustc_transmute
rustc_ty_utils Movability doesn't need to be a query anymore 2023-12-28 16:35:01 +00:00
rustc_type_ir Remove movability from TyKind::Coroutine 2023-12-28 16:35:01 +00:00
stable_mir Restore movability to SMIR 2023-12-28 16:35:01 +00:00