Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
d0f26abd
K
kotlin
项目概览
硅谷海盗
/
kotlin
与 Fork 源项目一致
从无法访问的项目Fork
通知
2
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
K
kotlin
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
d0f26abd
编写于
2月 09, 2021
作者:
D
Dmitry Petrov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
JVM_IR KT-44798 don't generate multiple stubs with same signature
上级
9afe8a0a
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
97 addition
and
1 deletion
+97
-1
compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/CollectionStubMethodLowering.kt
.../kotlin/backend/jvm/lower/CollectionStubMethodLowering.kt
+4
-1
compiler/testData/codegen/bytecodeListing/collectionStubs/ListAndSet.kt
...ata/codegen/bytecodeListing/collectionStubs/ListAndSet.kt
+19
-0
compiler/testData/codegen/bytecodeListing/collectionStubs/ListAndSet.txt
...ta/codegen/bytecodeListing/collectionStubs/ListAndSet.txt
+32
-0
compiler/testData/codegen/bytecodeListing/collectionStubs/ListAndSet_ir.txt
...codegen/bytecodeListing/collectionStubs/ListAndSet_ir.txt
+32
-0
compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java
...etbrains/kotlin/codegen/BytecodeListingTestGenerated.java
+5
-0
compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java
...ins/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java
+5
-0
未找到文件。
compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/lower/CollectionStubMethodLowering.kt
浏览文件 @
d0f26abd
...
...
@@ -313,7 +313,10 @@ internal class CollectionStubMethodLowering(val context: JvmBackendContext) : Cl
.
flatMap
{
createStubFuns
(
irClass
,
it
)
}
.
mapTo
(
HashSet
())
{
it
.
toJvmSignature
()
}
return
classStubFuns
.
filter
{
it
.
toJvmSignature
()
!
in
superClassStubSignatures
}
return
classStubFuns
.
filter
{
it
.
toJvmSignature
()
!
in
superClassStubSignatures
}
.
associateBy
{
it
.
toJvmSignature
()
}
.
values
.
toList
()
}
private
fun
createStubFuns
(
irClass
:
IrClass
,
stubs
:
StubsForCollectionClass
):
List
<
IrSimpleFunction
>
{
...
...
compiler/testData/codegen/bytecodeListing/collectionStubs/ListAndSet.kt
0 → 100644
浏览文件 @
d0f26abd
// WITH_RUNTIME
// FULL_JDK
import
java.util.*
class
ListSet
<
out
E
:
Any
>
:
List
<
E
>,
Set
<
E
>
{
override
val
size
:
Int
get
()
=
TODO
()
override
fun
isEmpty
():
Boolean
=
TODO
()
override
fun
get
(
index
:
Int
):
E
=
TODO
()
override
fun
contains
(
element
:
@UnsafeVariance
E
):
Boolean
=
TODO
()
override
fun
containsAll
(
elements
:
Collection
<
@
UnsafeVariance
E
>):
Boolean
=
TODO
()
override
fun
indexOf
(
element
:
@UnsafeVariance
E
):
Int
=
TODO
()
override
fun
lastIndexOf
(
element
:
@UnsafeVariance
E
):
Int
=
TODO
()
override
fun
iterator
():
Iterator
<
E
>
=
TODO
()
override
fun
listIterator
():
ListIterator
<
E
>
=
TODO
()
override
fun
listIterator
(
index
:
Int
):
ListIterator
<
E
>
=
TODO
()
override
fun
spliterator
():
Spliterator
<
@
UnsafeVariance
E
>
=
TODO
()
override
fun
subList
(
fromIndex
:
Int
,
toIndex
:
Int
):
List
<
E
>
=
TODO
()
}
compiler/testData/codegen/bytecodeListing/collectionStubs/ListAndSet.txt
0 → 100644
浏览文件 @
d0f26abd
@kotlin.Metadata
public final class ListSet {
// source: 'ListAndSet.kt'
public method <init>(): void
public method add(p0: int, p1: java.lang.Object): void
public method add(p0: java.lang.Object): boolean
public method addAll(p0: int, p1: java.util.Collection): boolean
public method addAll(p0: java.util.Collection): boolean
public method clear(): void
public method contains(@org.jetbrains.annotations.NotNull p0: java.lang.Object): boolean
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
public @org.jetbrains.annotations.NotNull method get(p0: int): java.lang.Object
public method getSize(): int
public method indexOf(@org.jetbrains.annotations.NotNull p0: java.lang.Object): int
public method isEmpty(): boolean
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
public method lastIndexOf(@org.jetbrains.annotations.NotNull p0: java.lang.Object): int
public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator
public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator
public method remove(p0: int): java.lang.Object
public method remove(p0: java.lang.Object): boolean
public method removeAll(p0: java.util.Collection): boolean
public method replaceAll(p0: java.util.function.UnaryOperator): void
public method retainAll(p0: java.util.Collection): boolean
public method set(p0: int, p1: java.lang.Object): java.lang.Object
public bridge final method size(): int
public method sort(p0: java.util.Comparator): void
public @org.jetbrains.annotations.NotNull method spliterator(): java.util.Spliterator
public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List
public method toArray(): java.lang.Object[]
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
}
compiler/testData/codegen/bytecodeListing/collectionStubs/ListAndSet_ir.txt
0 → 100644
浏览文件 @
d0f26abd
@kotlin.Metadata
public final class ListSet {
// source: 'ListAndSet.kt'
public method <init>(): void
public method add(p0: int, p1: java.lang.Object): void
public method add(p0: java.lang.Object): boolean
public method addAll(p0: int, p1: java.util.Collection): boolean
public method addAll(p0: java.util.Collection): boolean
public method clear(): void
public method contains(@org.jetbrains.annotations.Nullable p0: java.lang.Object): boolean
public method containsAll(@org.jetbrains.annotations.NotNull p0: java.util.Collection): boolean
public @org.jetbrains.annotations.NotNull method get(p0: int): java.lang.Object
public method getSize(): int
public method indexOf(@org.jetbrains.annotations.Nullable p0: java.lang.Object): int
public method isEmpty(): boolean
public @org.jetbrains.annotations.NotNull method iterator(): java.util.Iterator
public method lastIndexOf(@org.jetbrains.annotations.Nullable p0: java.lang.Object): int
public @org.jetbrains.annotations.NotNull method listIterator(): java.util.ListIterator
public @org.jetbrains.annotations.NotNull method listIterator(p0: int): java.util.ListIterator
public method remove(p0: int): java.lang.Object
public method remove(p0: java.lang.Object): boolean
public method removeAll(p0: java.util.Collection): boolean
public method replaceAll(p0: java.util.function.UnaryOperator): void
public method retainAll(p0: java.util.Collection): boolean
public method set(p0: int, p1: java.lang.Object): java.lang.Object
public bridge final method size(): int
public method sort(p0: java.util.Comparator): void
public @org.jetbrains.annotations.NotNull method spliterator(): java.util.Spliterator
public @org.jetbrains.annotations.NotNull method subList(p0: int, p1: int): java.util.List
public method toArray(): java.lang.Object[]
public method toArray(p0: java.lang.Object[]): java.lang.Object[]
}
compiler/tests-gen/org/jetbrains/kotlin/codegen/BytecodeListingTestGenerated.java
浏览文件 @
d0f26abd
...
...
@@ -440,6 +440,11 @@ public class BytecodeListingTestGenerated extends AbstractBytecodeListingTest {
runTest
(
"compiler/testData/codegen/bytecodeListing/collectionStubs/kt44233.kt"
);
}
@TestMetadata
(
"ListAndSet.kt"
)
public
void
testListAndSet
()
throws
Exception
{
runTest
(
"compiler/testData/codegen/bytecodeListing/collectionStubs/ListAndSet.kt"
);
}
@TestMetadata
(
"mapOfPrimitivesFullJdk.kt"
)
public
void
testMapOfPrimitivesFullJdk
()
throws
Exception
{
runTest
(
"compiler/testData/codegen/bytecodeListing/collectionStubs/mapOfPrimitivesFullJdk.kt"
);
...
...
compiler/tests-gen/org/jetbrains/kotlin/codegen/ir/IrBytecodeListingTestGenerated.java
浏览文件 @
d0f26abd
...
...
@@ -440,6 +440,11 @@ public class IrBytecodeListingTestGenerated extends AbstractIrBytecodeListingTes
runTest
(
"compiler/testData/codegen/bytecodeListing/collectionStubs/kt44233.kt"
);
}
@TestMetadata
(
"ListAndSet.kt"
)
public
void
testListAndSet
()
throws
Exception
{
runTest
(
"compiler/testData/codegen/bytecodeListing/collectionStubs/ListAndSet.kt"
);
}
@TestMetadata
(
"mapOfPrimitivesFullJdk.kt"
)
public
void
testMapOfPrimitivesFullJdk
()
throws
Exception
{
runTest
(
"compiler/testData/codegen/bytecodeListing/collectionStubs/mapOfPrimitivesFullJdk.kt"
);
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录