Mangle inline class members

<IMPL_SUFFIX> for method is a method signature hash,
if method value parameter types contain inline class types,
otherwise 'impl'.

Constructor methods are named as 'constructor-<IMPL_SUFFIX>'.

Synthesized 'box' and 'unbox' methods are named as
'<METHOD_NAME>-<IMPL_SUFFIX>'.

Erased implementations of overriding and non-overriding methods
are named as '<METHOD_NAME>-<IMPL_SUFFIX>'.

Fully specialized implementation of 'equals' will have a special suffix.
This commit is contained in:
Dmitry Petrov
2018-09-06 10:12:50 +03:00
parent aec173ac5c
commit cafaa3e13c
40 changed files with 398 additions and 184 deletions
@@ -33,9 +33,9 @@ fun Z.test() {
// @TestKt.class:
// 0 INVOKESTATIC Z\$Erased\.
// 0 INVOKESTATIC Z\-Erased\.
// 1 INVOKESTATIC Z.getAVal \(I\)I
// 2 INVOKESTATIC Z.getAVar \(I\)I
// 2 INVOKESTATIC Z.setAVar \(II\)V
// 1 INVOKESTATIC Z.getExtVal \(ILjava/lang/String;\)I
// 2 INVOKESTATIC Z.getExtVar \(ILjava/lang/String;\)I
// 2 INVOKESTATIC Z.setExtVar \(ILjava/lang/String;I\)V
// 1 INVOKESTATIC Z.getAVal-impl \(I\)I
// 2 INVOKESTATIC Z.getAVar-impl \(I\)I
// 2 INVOKESTATIC Z.setAVar-impl \(II\)V
// 1 INVOKESTATIC Z.getExtVal-impl \(ILjava/lang/String;\)I
// 2 INVOKESTATIC Z.getExtVar-impl \(ILjava/lang/String;\)I
// 2 INVOKESTATIC Z.setExtVar-impl \(ILjava/lang/String;I\)V