joern icon indicating copy to clipboard operation
joern copied to clipboard

[kotlin2cpg] Improve fullnames.

Open ml86 opened this issue 4 months ago • 0 comments

Improve and cleanup the fullname calculation for methods and callsites. The most noteable changes here are:

  1. The lambda function naming schema changed from package.<fileName>.<lambda>counter:signature to package.scope.<lambda>counter:signature. This give a better indication which lambda function is represented also gets rid of exception of using the filename in the method fullnames.
  2. Fixed lambda function signatures.
  3. The fullname schema of extension methods changed from extendedClassFullName.extensionMethodName:signatureWithoutThisParameter to package.extensionMethodName:signatureWithThisParameter The fact that the this parameter is part of the signature is an exception in our java fullnames but necessary in order to distinguish otherwise identical extension methods.
  4. We avoid the recalculation of the binding context with every file processed. This is now done once at the begining.
  5. Calls to ::class are now represented as calls to <operator>.class.
  6. Calculate proper BINDING nodes for lambda and anonymous functions.
  7. Calculate proper base class for type decls created for lambda and anonymous functions.

ml86 avatar Oct 02 '24 14:10 ml86