-
Notifications
You must be signed in to change notification settings - Fork 5.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[JVM_IR] Reduce the amount of
super
suffixes on accesibility bridges.
The super suffix was used for any static field/method that needed an accessor. We should only use it when that field or method is inherited. (cherry picked from commit ef36b81)
- Loading branch information
Showing
8 changed files
with
60 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
6 changes: 6 additions & 0 deletions
6
compiler/testData/codegen/bytecodeListing/accessorForTopLevelMembers.kt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
private val x: String = "OK" | ||
private fun f(y: String) = y | ||
|
||
class A { | ||
fun g() = f(x) | ||
} |
16 changes: 16 additions & 0 deletions
16
compiler/testData/codegen/bytecodeListing/accessorForTopLevelMembers.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@kotlin.Metadata | ||
public final class A { | ||
// source: 'accessorForTopLevelMembers.kt' | ||
public method <init>(): void | ||
public final @org.jetbrains.annotations.NotNull method g(): java.lang.String | ||
} | ||
|
||
@kotlin.Metadata | ||
public final class AccessorForTopLevelMembersKt { | ||
// source: 'accessorForTopLevelMembers.kt' | ||
private final static field x: java.lang.String | ||
static method <clinit>(): void | ||
public synthetic final static method access$f(p0: java.lang.String): java.lang.String | ||
public synthetic final static method access$getX$p(): java.lang.String | ||
private final static method f(p0: java.lang.String): java.lang.String | ||
} |
16 changes: 16 additions & 0 deletions
16
compiler/testData/codegen/bytecodeListing/accessorForTopLevelMembers_ir.txt
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
@kotlin.Metadata | ||
public final class A { | ||
// source: 'accessorForTopLevelMembers.kt' | ||
public method <init>(): void | ||
public final @org.jetbrains.annotations.NotNull method g(): java.lang.String | ||
} | ||
|
||
@kotlin.Metadata | ||
public final class AccessorForTopLevelMembersKt { | ||
// source: 'accessorForTopLevelMembers.kt' | ||
private final static @org.jetbrains.annotations.NotNull field x: java.lang.String | ||
static method <clinit>(): void | ||
public synthetic final static method access$f(p0: java.lang.String): java.lang.String | ||
public synthetic final static method access$getX$p(): java.lang.String | ||
private final static method f(p0: java.lang.String): java.lang.String | ||
} |
5 changes: 5 additions & 0 deletions
5
compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
5 changes: 5 additions & 0 deletions
5
compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters