Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit809b84e

Browse files
committed
Add v0 symbol mangling forf16 andf128
As discussed at <#122106>, use thecrate encoding to represent new primitives.
1 parentc45e831 commit809b84e

File tree

2 files changed

+4
-3
lines changed
  • compiler/rustc_symbol_mangling/src
  • src/doc/rustc/src/symbol-mangling

2 files changed

+4
-3
lines changed

‎compiler/rustc_symbol_mangling/src/v0.rs‎

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -319,11 +319,10 @@ impl<'tcx> Printer<'tcx> for SymbolMangler<'tcx> {
319319
ty::Uint(UintTy::U64) =>"y",
320320
ty::Uint(UintTy::U128) =>"o",
321321
ty::Uint(UintTy::Usize) =>"j",
322-
// FIXME(f16_f128): update these once `rustc-demangle` supports the new types
323-
ty::Float(FloatTy::F16) =>unimplemented!("f16_f128"),
322+
ty::Float(FloatTy::F16) =>"C3f16",
324323
ty::Float(FloatTy::F32) =>"f",
325324
ty::Float(FloatTy::F64) =>"d",
326-
ty::Float(FloatTy::F128) =>unimplemented!("f16_f128"),
325+
ty::Float(FloatTy::F128) =>"C4f128",
327326
ty::Never =>"z",
328327

329328
// Placeholders (should be demangled as `_`).

‎src/doc/rustc/src/symbol-mangling/v0.md‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -739,6 +739,8 @@ The type encodings based on the initial tag character are:
739739
* `z` — `!`
740740
* `p` — [placeholder] `_`
741741
742+
Remainingprimitivesareencodedasacrateproduction,e.g. `C4f128`.
743+
742744
* `A` —An [array][reference-array] `[T;N]`.
743745
744746
> <spanid="array-type">array-type</span> → `A`*[type]**[const]*

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp