Hello.
As said in "Method Descriptor" chapter of "The Book of the Runtime", there are multiple places in the runtime that depend on 1:1 mapping between MethodDescs and entry points. This leads to requirement that slot and entry point must exist for all methods.
Could someone explain where are these places and why exactly is 1:1 mapping needed?
@Dmitri-Botcharnikov @ruben-ayrapetyan
One methoddesc can have multiple entrypoints. We need to be able to map each of them back to the matching MethodDesc.
The key method for entrypoint -> MethodDesc mapping is MethodTable::GetMethodDescForSlotAddress
.
The key method for MethodDesc -> current entrypoint mapping is MethodDesc::GetMethodEntryPoint
.
Most helpful comment
One methoddesc can have multiple entrypoints. We need to be able to map each of them back to the matching MethodDesc.
The key method for entrypoint -> MethodDesc mapping is
MethodTable::GetMethodDescForSlotAddress
.The key method for MethodDesc -> current entrypoint mapping is
MethodDesc::GetMethodEntryPoint
.