diff options
| author | bors <bors@rust-lang.org> | 2024-03-29 00:24:01 +0000 |
|---|---|---|
| committer | bors <bors@rust-lang.org> | 2024-03-29 00:24:01 +0000 |
| commit | e8c13080f7c7ead74f59bf48b7985793fedf785d (patch) | |
| tree | 6bbc840a3b62aa4a5b3d5087007d3f23048de561 /tests/rustdoc-js-std/parser-reference.js | |
| parent | c5c31447a7f2d8ffc03f058e3d39cff7627d3eb1 (diff) | |
| parent | 05783c8ed68f7b393d28f5df64f98d3d1eee5537 (diff) | |
| download | rust-e8c13080f7c7ead74f59bf48b7985793fedf785d.tar.gz rust-e8c13080f7c7ead74f59bf48b7985793fedf785d.zip | |
Auto merge of #122671 - Mark-Simulacrum:const-panic-msg, r=Nilstrieb
Codegen const panic messages as function calls
This skips emitting extra arguments at every callsite (of which there
can be many). For a librustc_driver build with overflow checks enabled,
this cuts 0.7MB from the resulting shared library (see [perf]).
A sample improvement from nightly:
```
leaq str.0(%rip), %rdi
leaq .Lalloc_d6aeb8e2aa19de39a7f0e861c998af13(%rip), %rdx
movl $25, %esi
callq *_ZN4core9panicking5panic17h17cabb89c5bcc999E@GOTPCREL(%rip)
```
to this PR:
```
leaq .Lalloc_d6aeb8e2aa19de39a7f0e861c998af13(%rip), %rdi
callq *_RNvNtNtCsduqIKoij8JB_4core9panicking11panic_const23panic_const_div_by_zero@GOTPCREL(%rip)
```
[perf]: https://perf.rust-lang.org/compare.html?start=a7e4de13c1785819f4d61da41f6704ed69d5f203&end=64fbb4f0b2d621ff46d559d1e9f5ad89a8d7789b&stat=instructions:u
Diffstat (limited to 'tests/rustdoc-js-std/parser-reference.js')
0 files changed, 0 insertions, 0 deletions
