about summary refs log tree commit diff
path: root/compiler/rustc_codegen_ssa/src/meth.rs
AgeCommit message (Collapse)AuthorLines
2021-10-11Auto merge of #89597 - michaelwoerister:improve-vtable-debuginfo, r=wesleywiserbors-1/+1
Create more accurate debuginfo for vtables. Before this PR all vtables would have the same name (`"vtable"`) in debuginfo. Now they get an unambiguous name that identifies the implementing type and the trait that is being implemented. This is only one of several possible improvements: - This PR describes vtables as arrays of `*const u8` pointers. It would nice to describe them as structs where function pointer is represented by a field with a name indicative of the method it maps to. However, this requires coming up with a naming scheme that avoids clashes between methods with the same name (which is possible if the vtable contains multiple traits). - The PR does not update the debuginfo we generate for the vtable-pointer field in a fat `dyn` pointer. Right now there does not seem to be an easy way of getting ahold of a vtable-layout without also knowing the concrete self-type of a trait object. r? `@wesleywiser`
2021-10-08Create more accurate debuginfo for vtables.Michael Woerister-1/+1
Before this commit all vtables would have the same name "vtable" in debuginfo. Now they get a name that identifies the implementing type and the trait that is being implemented.
2021-10-07Turn tcx.vtable_allocation() into a query.Michael Woerister-1/+1
2021-08-04Prepare inbounds_gep for opaque pointersTomasz Miąsko-2/+2
Implement inbounds_gep using LLVMBuildInBoundsGEP2 which takes an explicit type argument instead of deriving it from a pointer type.
2021-07-09Pass type when creating loadNikita Popov-4/+6
This makes load generation compatible with opaque pointers. The generation of nontemporal copies still accesses the pointer element type, as fixing this requires more movement.
2021-06-28Update other codegens to use tcx managed vtable allocations.Charles Lew-39/+4
2021-06-15Refactor to make interpreter and codegen backend neutral to vtable internal ↵Charles Lew-32/+23
representation.
2020-08-30mv compiler to compiler/mark-0/+126