<feed xmlns='http://www.w3.org/2005/Atom'>
<title>rust/tests/codegen/vtable-loads.rs, branch 1.80.1</title>
<subtitle>https://github.com/rust-lang/rust
</subtitle>
<id>http://git.dreamy.place/mirrors/rust/atom?h=1.80.1</id>
<link rel='self' href='http://git.dreamy.place/mirrors/rust/atom?h=1.80.1'/>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/'/>
<updated>2024-05-27T20:26:56+00:00</updated>
<entry>
<title>Omit non-needs_drop drop_in_place in vtables</title>
<updated>2024-05-27T20:26:56+00:00</updated>
<author>
<name>Mark Rousskov</name>
<email>mark.simulacrum@gmail.com</email>
</author>
<published>2024-03-17T21:42:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.dreamy.place/mirrors/rust/commit/?id=4c002fce9d8421096538273c9b78db7d68529b94'/>
<id>urn:sha1:4c002fce9d8421096538273c9b78db7d68529b94</id>
<content type='text'>
This replaces the drop_in_place reference with null in vtables. On
librustc_driver.so, this drops about ~17k dynamic relocations from the
output, since many vtables can now be placed in read-only memory, rather
than having a relocated pointer included.

This makes a tradeoff by adding a null check at vtable call sites.
That's hard to avoid without changing the vtable format (e.g., to use a
pc-relative relocation instead of an absolute address, and avoid the
dynamic relocation that way). But it seems likely that the check is
cheap at runtime.
</content>
</entry>
</feed>
