Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
硅谷海盗
kotlin
提交
cce9469e
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,发现更多精彩内容 >>
提交
cce9469e
编写于
1月 19, 2021
作者:
I
Ilmir Usmanov
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
JVM_IR: Do not unbox Result parameter in Result methods
#KT-44140 Fixed
上级
10d9259d
变更
10
隐藏空白更改
内联
并排
Showing
10 changed file
with
58 addition
and
0 deletion
+58
-0
compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
...test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
+6
-0
compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt
...jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt
+2
-0
compiler/testData/codegen/box/inlineClasses/result.kt
compiler/testData/codegen/box/inlineClasses/result.kt
+13
-0
compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java
...in/test/runners/codegen/BlackBoxCodegenTestGenerated.java
+6
-0
compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
.../test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
+6
-0
compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java
...brains/kotlin/codegen/LightAnalysisModeTestGenerated.java
+5
-0
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
...js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
+5
-0
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java
...lin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java
+5
-0
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java
...s/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java
+5
-0
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
...js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
+5
-0
未找到文件。
compiler/fir/analysis-tests/tests-gen/org/jetbrains/kotlin/test/runners/codegen/FirBlackBoxCodegenTestGenerated.java
浏览文件 @
cce9469e
...
...
@@ -16328,6 +16328,12 @@ public class FirBlackBoxCodegenTestGenerated extends AbstractFirBlackBoxCodegenT
runTest("compiler/testData/codegen/box/inlineClasses/removeInInlineCollectionOfInlineClassAsInt.kt");
}
@Test
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/result.kt");
}
@Test
@TestMetadata("resultInlining.kt")
public void testResultInlining() throws Exception {
compiler/ir/backend.jvm/src/org/jetbrains/kotlin/backend/jvm/codegen/ExpressionCodegen.kt
浏览文件 @
cce9469e
...
...
@@ -637,6 +637,8 @@ class ExpressionCodegen(
private
fun
unboxResultIfNeeded
(
arg
:
IrGetValue
)
{
if
(
arg
.
type
.
erasedUpperBound
.
fqNameWhenAvailable
!=
StandardNames
.
RESULT_FQ_NAME
)
return
if
(
irFunction
!
is
IrSimpleFunction
)
return
// Skip Result's methods
if
(
irFunction
.
parentAsClass
.
fqNameWhenAvailable
==
StandardNames
.
RESULT_FQ_NAME
)
return
val
index
=
(
arg
.
symbol
as
?
IrValueParameterSymbol
)
?.
owner
?.
index
?:
return
val
genericOrAnyOverride
=
irFunction
.
overriddenSymbols
.
any
{
...
...
compiler/testData/codegen/box/inlineClasses/result.kt
0 → 100644
浏览文件 @
cce9469e
// IGNORE_BACKEND: WASM, JS_IR
// IGNORE_BACKEND_FIR: JVM_IR
// FILE: result.kt
package
kotlin
inline
class
Result
(
val
value
:
Any
?)
// FILE: box.kt
fun
box
():
String
{
return
Result
(
"OK"
).
value
as
String
}
compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/BlackBoxCodegenTestGenerated.java
浏览文件 @
cce9469e
...
...
@@ -16328,6 +16328,12 @@ public class BlackBoxCodegenTestGenerated extends AbstractBlackBoxCodegenTest {
runTest("compiler/testData/codegen/box/inlineClasses/removeInInlineCollectionOfInlineClassAsInt.kt");
}
@Test
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/result.kt");
}
@Test
@TestMetadata("resultInlining.kt")
public void testResultInlining() throws Exception {
compiler/tests-common-new/tests-gen/org/jetbrains/kotlin/test/runners/codegen/IrBlackBoxCodegenTestGenerated.java
浏览文件 @
cce9469e
...
...
@@ -16328,6 +16328,12 @@ public class IrBlackBoxCodegenTestGenerated extends AbstractIrBlackBoxCodegenTes
runTest("compiler/testData/codegen/box/inlineClasses/removeInInlineCollectionOfInlineClassAsInt.kt");
}
@Test
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/result.kt");
}
@Test
@TestMetadata("resultInlining.kt")
public void testResultInlining() throws Exception {
compiler/tests-gen/org/jetbrains/kotlin/codegen/LightAnalysisModeTestGenerated.java
浏览文件 @
cce9469e
...
...
@@ -14307,6 +14307,11 @@ public class LightAnalysisModeTestGenerated extends AbstractLightAnalysisModeTes
runTest("compiler/testData/codegen/box/inlineClasses/removeInInlineCollectionOfInlineClassAsInt.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/result.kt");
}
@TestMetadata("resultInlining.kt")
public void testResultInlining() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/resultInlining.kt");
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/es6/semantics/IrJsCodegenBoxES6TestGenerated.java
浏览文件 @
cce9469e
...
...
@@ -12247,6 +12247,11 @@ public class IrJsCodegenBoxES6TestGenerated extends AbstractIrJsCodegenBoxES6Tes
runTest("compiler/testData/codegen/box/inlineClasses/removeInInlineCollectionOfInlineClassAsInt.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/result.kt");
}
@TestMetadata("resultInlining.kt")
public void testResultInlining() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/resultInlining.kt");
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/ir/semantics/IrJsCodegenBoxTestGenerated.java
浏览文件 @
cce9469e
...
...
@@ -12247,6 +12247,11 @@ public class IrJsCodegenBoxTestGenerated extends AbstractIrJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inlineClasses/removeInInlineCollectionOfInlineClassAsInt.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/result.kt");
}
@TestMetadata("resultInlining.kt")
public void testResultInlining() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/resultInlining.kt");
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/semantics/JsCodegenBoxTestGenerated.java
浏览文件 @
cce9469e
...
...
@@ -12312,6 +12312,11 @@ public class JsCodegenBoxTestGenerated extends AbstractJsCodegenBoxTest {
runTest("compiler/testData/codegen/box/inlineClasses/removeInInlineCollectionOfInlineClassAsInt.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/result.kt");
}
@TestMetadata("resultInlining.kt")
public void testResultInlining() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/resultInlining.kt");
js/js.tests/tests-gen/org/jetbrains/kotlin/js/test/wasm/semantics/IrCodegenBoxWasmTestGenerated.java
浏览文件 @
cce9469e
...
...
@@ -6703,6 +6703,11 @@ public class IrCodegenBoxWasmTestGenerated extends AbstractIrCodegenBoxWasmTest
runTest("compiler/testData/codegen/box/inlineClasses/referToUnderlyingPropertyOfInlineClass.kt");
}
@TestMetadata("result.kt")
public void testResult() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/result.kt");
}
@TestMetadata("resultInlining.kt")
public void testResultInlining() throws Exception {
runTest("compiler/testData/codegen/box/inlineClasses/resultInlining.kt");
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录