Various proc-macro related code cleanups#157076
Conversation
This makes the proc-macro RPC protocol platform independent as necessary for running proc macros and rustc on different architectures.
|
rustbot has assigned @petrochenkov. Use Why was this reviewer chosen?The reviewer was selected based on:
|
This shrinks the proc-macro ABI a bit. Nothing on the client side needs to allocate handles. This will share the counters between proc-macros, which may cause us to run out of handles earlier, but 4 bilion handles per process is still a lot. Rust-analyzer might run out at some point, but it can recover by restarting the proc-macro-server, and it could already run out before this change anyway,
|
cc @cyrgani |
|
@bors r+ |
…trochenkov Various proc-macro related code cleanups Some are just misc cleanups. Others are to make the proc-macro ABI and RPC interface a bit less target dependent. I've got some local changes that change the ABI to what is effectively a single `&[extern "C" fn(BridgeConfig<'_>) -> Buffer]` export.
…uwer Rollup of 9 pull requests Successful merges: - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157100 (Some more per owner things) - #157065 (Stabilize `Path::is_empty`) - #157070 (Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros) - #157088 (Improve suggestions for malformed deprecated attribute) - #157103 (Add reproducibly failing tests for parallel frontend)
…trochenkov Various proc-macro related code cleanups Some are just misc cleanups. Others are to make the proc-macro ABI and RPC interface a bit less target dependent. I've got some local changes that change the ABI to what is effectively a single `&[extern "C" fn(BridgeConfig<'_>) -> Buffer]` export.
…uwer Rollup of 11 pull requests Successful merges: - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering) - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157106 (add ABI check logic for wasm) - #154835 (std::offload sharedmem) - #157065 (Stabilize `Path::is_empty`) - #157070 (Remove `skip_arg` attribute from `Diagnostic` and `Subdiagnostic` proc-macros) - #157088 (Improve suggestions for malformed deprecated attribute) - #157103 (Add reproducibly failing tests for parallel frontend) Failed merges: - #157100 (Some more per owner things)
…trochenkov Various proc-macro related code cleanups Some are just misc cleanups. Others are to make the proc-macro ABI and RPC interface a bit less target dependent. I've got some local changes that change the ABI to what is effectively a single `&[extern "C" fn(BridgeConfig<'_>) -> Buffer]` export.
…uwer Rollup of 11 pull requests Successful merges: - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error) - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering) - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157106 (add ABI check logic for wasm) - #154835 (std::offload sharedmem) - #157065 (Stabilize `Path::is_empty`) - #157088 (Improve suggestions for malformed deprecated attribute) - #157103 (Add reproducibly failing tests for parallel frontend) Failed merges: - #157100 (Some more per owner things)
…uwer Rollup of 16 pull requests Successful merges: - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error) - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering) - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157106 (add ABI check logic for wasm) - #154835 (std::offload sharedmem) - #157065 (Stabilize `Path::is_empty`) - #157088 (Improve suggestions for malformed deprecated attribute) - #157098 (Add the `clflushopt` x86 target feature) - #157103 (Add reproducibly failing tests for parallel frontend) - #157111 (Update target maintainer for x86_64-unknown-linux-none) - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`) - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`) - #157120 (Cleanups around attribute target checking) Failed merges: - #157100 (Some more per owner things)
…uwer Rollup of 16 pull requests Successful merges: - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error) - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering) - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157106 (add ABI check logic for wasm) - #154835 (std::offload sharedmem) - #157065 (Stabilize `Path::is_empty`) - #157088 (Improve suggestions for malformed deprecated attribute) - #157098 (Add the `clflushopt` x86 target feature) - #157103 (Add reproducibly failing tests for parallel frontend) - #157111 (Update target maintainer for x86_64-unknown-linux-none) - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`) - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`) - #157120 (Cleanups around attribute target checking) Failed merges: - #157100 (Some more per owner things)
…uwer Rollup of 16 pull requests Successful merges: - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error) - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering) - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157106 (add ABI check logic for wasm) - #154835 (std::offload sharedmem) - #157065 (Stabilize `Path::is_empty`) - #157088 (Improve suggestions for malformed deprecated attribute) - #157098 (Add the `clflushopt` x86 target feature) - #157103 (Add reproducibly failing tests for parallel frontend) - #157111 (Update target maintainer for x86_64-unknown-linux-none) - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`) - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`) - #157120 (Cleanups around attribute target checking) Failed merges: - #157100 (Some more per owner things)
…uwer Rollup of 16 pull requests Successful merges: - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error) - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering) - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157106 (add ABI check logic for wasm) - #154835 (std::offload sharedmem) - #157065 (Stabilize `Path::is_empty`) - #157088 (Improve suggestions for malformed deprecated attribute) - #157098 (Add the `clflushopt` x86 target feature) - #157103 (Add reproducibly failing tests for parallel frontend) - #157111 (Update target maintainer for x86_64-unknown-linux-none) - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`) - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`) - #157120 (Cleanups around attribute target checking) Failed merges: - #157100 (Some more per owner things)
…uwer Rollup of 16 pull requests Successful merges: - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error) - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering) - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157106 (add ABI check logic for wasm) - #154835 (std::offload sharedmem) - #157065 (Stabilize `Path::is_empty`) - #157088 (Improve suggestions for malformed deprecated attribute) - #157098 (Add the `clflushopt` x86 target feature) - #157103 (Add reproducibly failing tests for parallel frontend) - #157111 (Update target maintainer for x86_64-unknown-linux-none) - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`) - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`) - #157120 (Cleanups around attribute target checking) Failed merges: - #157100 (Some more per owner things)
…uwer Rollup of 16 pull requests Successful merges: - #149195 (resolve: Partially convert `ambiguous_glob_imports` lint into a hard error) - #156960 (Some cleanups around passing extra lifetime params from the resolver to ast lowering) - #156963 (definitions: remove `DefPathTable`, use `LocalDefId` instead of `DefIndex`) - #157053 (Eagerly resolve delegations in late resolution) - #157068 (NVPTX: Remove the unstable ptx linker flavor) - #157076 (Various proc-macro related code cleanups) - #157106 (add ABI check logic for wasm) - #154835 (std::offload sharedmem) - #157065 (Stabilize `Path::is_empty`) - #157088 (Improve suggestions for malformed deprecated attribute) - #157098 (Add the `clflushopt` x86 target feature) - #157103 (Add reproducibly failing tests for parallel frontend) - #157111 (Update target maintainer for x86_64-unknown-linux-none) - #157116 (rustc_public: add `with_cx()` to `CompilerInterface`) - #157119 (ast_lowering: Simplify `resolve_pin_drop_sugar_impl_item`) - #157120 (Cleanups around attribute target checking) Failed merges: - #157100 (Some more per owner things)
Rollup merge of #157076 - bjorn3:proc_macro_refactors4, r=petrochenkov Various proc-macro related code cleanups Some are just misc cleanups. Others are to make the proc-macro ABI and RPC interface a bit less target dependent. I've got some local changes that change the ABI to what is effectively a single `&[extern "C" fn(BridgeConfig<'_>) -> Buffer]` export.
|
@rust-timer build ee86314 |
This comment has been minimized.
This comment has been minimized.
|
Finished benchmarking commit (ee86314): comparison URL. Overall result: ❌ regressions - please read:Benchmarking means the PR may be perf-sensitive. It's automatically marked not fit for rolling up. Overriding is possible but disadvised: it risks changing compiler perf. Next, please: If you can, justify the regressions found in this try perf run in writing along with @bors rollup=never Instruction countOur most reliable metric. Used to determine the overall result above. However, even this metric can be noisy.
Max RSS (memory usage)This perf run didn't have relevant results for this metric. CyclesResults (secondary 3.1%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Binary sizeResults (secondary -0.0%)A less reliable metric. May be of interest, but not used to determine the overall result above.
Bootstrap: 511.654s -> 511.251s (-0.08%) |
Some are just misc cleanups. Others are to make the proc-macro ABI and RPC interface a bit less target dependent. I've got some local changes that change the ABI to what is effectively a single
&[extern "C" fn(BridgeConfig<'_>) -> Buffer]export.