rtti: introduces functionName extension function to FunctionDescriptor for filling vtable with hashcode and reusing it in codegeneration
This commit is contained in:
committed by
vvlevchenko
parent
fa3943c8bd
commit
24e0ae7d00
+3
@@ -22,6 +22,9 @@ internal val FunctionDescriptor.symbolName: String
|
||||
return "kfun:" + this.fqNameSafe.toString() // FIXME: add signature
|
||||
}
|
||||
|
||||
internal val FunctionDescriptor.functionName: String
|
||||
get() = this.name.asString() // FIXME: add signature
|
||||
|
||||
internal val ClassDescriptor.symbolName: String
|
||||
get() = when (this.kind) {
|
||||
CLASS -> "kclass:"
|
||||
|
||||
+1
-1
@@ -202,7 +202,7 @@ internal class RTTIGenerator(override val context: Context) : ContextUtils {
|
||||
val vtablePtr = staticData.placeGlobalConstArray("kvtable:$className", pointerType(int8Type), vtable)
|
||||
|
||||
val methods = getMethodTableEntries(classDesc).map {
|
||||
val nameSignature = it.name.localHash // FIXME: add signature
|
||||
val nameSignature = it.functionName.localHash // FIXME: add signature
|
||||
// TODO: compile-time resolution limits binary compatibility
|
||||
val methodEntryPoint = it.implementation.entryPointAddress
|
||||
MethodTableRecord(nameSignature, methodEntryPoint)
|
||||
|
||||
Reference in New Issue
Block a user