Files
compiler-explorer/views/options-output.pug
narpfel f5efd390fa Optionally show disambiguating hashes in demangled Rust identifiers (#6265)
Demangled Rust identifiers under the `legacy` name mangling scheme rely
on a hash to disambiguate items with the same name, such as different
monomorphisations of the same function or different closures’
`call_once` methods.

In the `v0` mangling scheme, this is no longer a problem. However,
configuring the demangler to show hashes in `legacy` names will include
crate-id hashes in `v0` names, which are [mostly
unneeded](https://rust-lang.github.io/rfcs/2603-rust-symbol-name-mangling-v0.html#appendix-a---suggested-demangling).

This PR introduces a new checkbox *Options...* → *Verbose demangling*
that lets the user select if they want to include disambiguating hashes
in demangled identifiers.

This checkbox is only shown for compilers that support verbose
demangling, and deactivated when the *Demangle identifiers* checkbox is
unchecked.

Resolves #1754.
Resolves #6255.
2024-04-01 21:58:42 -05:00

24 lines
1.4 KiB
Plaintext

mixin outputoption(name, longdescription, shortdescription, defaultchecked)
if noscript
.button-checkbox
if defaultchecked
input(type="checkbox" title=longdescription name=name checked='checked' value='true')
else
input(type="checkbox" title=longdescription name=name value='true')
span=shortdescription
else
- var pressed = defaultchecked ? 'true' : 'false'
.button-checkbox
button.dropdown-item.btn.btn-sm.btn-light(type='button' title=longdescription data-bind=name aria-pressed=pressed)
span=shortdescription
input.d-none(type="checkbox" checked=defaultchecked)
// If you modify this, update types/features/filters.interfaces.ts
+outputoption('binaryObject', 'Compile to binary object and disassemble the output', 'Compile to binary object', false)
// the field needs to keep being "binary" and not "link" or something closer to the description as it is part of
// our interface and we can't break it.
+outputoption('binary', 'Link to binary and disassemble the output', 'Link to binary', false)
+outputoption('execute', 'Execute code and show its output', 'Execute the code', false)
+outputoption('intel', 'Output disassembly in Intel syntax', 'Intel asm syntax', true)
+outputoption('demangle', 'Demangle output', 'Demangle identifiers', true)
+outputoption('verboseDemangling', 'Include disambiguating hashes in demangled identifiers', 'Verbose demangling', true)