rra/zhelenskiy/flattening_impl
[IR] Remove unused MFVC getters Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com> #KT-1179 [IR] Add context receivers test, fix a flattening fields bug Signed-off-by: Evgeniy.Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com> #KT-1179 [IR] Support `try` for MFVC #KT-1179 [IR] Support `if` and `when` for MFVC, fix several bugs, refactor #KT-1179 [IR] Rename MFVC tests + Add test for get-field optimization #KT-1179 [IR] Suppress temporary test failing on Android Bug is fixed in https://jetbrains.team/p/kt/reviews/6452 #KT-1179 [IR] Document the new MFVC lowering classes when necessary #KT-1179 [IR] Correct work of the new MFVC lowering classes #KT-1179 [IR] Prepare MFVC-lowering for the new MFVC classes #KT-1179 [IR] Fix MFVC with type arguments/parameters #KT-1179 [IR] Support MFVC with type parameters #KT-1179 [IR] Integrate MFVC with Inline classes #KT-1179 [IR] Fix compilation of MFVC in different module #KT-1179 [IR] Add MFVC generation tests #KT-1179 [IR] Implement equals call correct generation for MFVC #KT-1179 [IR] Implement bridges generation for MFVC #KT-1179 [IR] Implement MFVC basic flattening #KT-1179 Merge-request: KT-MR-6213 Merged-by: Evgeniy Zhelenskiy <Evgeniy.Zhelenskiy@jetbrains.com>
This commit is contained in:
committed by
Space Team
parent
5c9802ae84
commit
b7f5c039a6
@@ -0,0 +1,49 @@
|
||||
// CHECK_BYTECODE_LISTING
|
||||
// WITH_STDLIB
|
||||
// TARGET_BACKEND: JVM_IR
|
||||
// WORKS_WHEN_VALUE_CLASS
|
||||
// LANGUAGE: +ValueClasses
|
||||
|
||||
@JvmInline
|
||||
value class DPoint(val x: Double, val y: Double)
|
||||
|
||||
fun acceptBoxed(x: Any?) {}
|
||||
fun acceptFlattened(x: DPoint) {}
|
||||
fun returnBoxed() = DPoint(3.0, 4.0)
|
||||
|
||||
fun testFlattened2Boxed() {
|
||||
acceptBoxed(DPoint(1.0, 2.0))
|
||||
}
|
||||
|
||||
fun testBoxed2Boxed() {
|
||||
acceptBoxed(returnBoxed())
|
||||
}
|
||||
|
||||
fun testFlattened2Flattened() {
|
||||
acceptFlattened(DPoint(1.0, 2.0))
|
||||
}
|
||||
|
||||
fun testBoxed2Flattened() {
|
||||
acceptFlattened(returnBoxed())
|
||||
}
|
||||
|
||||
fun testIgnoredFlattened() {
|
||||
DPoint(1.0, 2.0)
|
||||
DPoint(1.0, 2.0)
|
||||
}
|
||||
|
||||
fun testIgnoredBoxed() {
|
||||
returnBoxed()
|
||||
}
|
||||
|
||||
// 1 testFlattened2Boxed\(\)V(\n {3}.*)*((\n {3}.*box-impl .*)(\n {3}.*)*){1}
|
||||
// 0 testFlattened2Boxed\(\)V(\n {3}.*)*((\n {3}.*box-impl.*)(\n {3}.*)*){2}
|
||||
// 0 testBoxed2Boxed\(\)V(\n {3}.*)*((\n {3}.*(box-impl|DSTORE|DLOAD).*)(\n {3}.*)*){1}
|
||||
// 0 testFlattened2Flattened\(\)V(\n {3}.*)*((\n {3}.*box-impl.*)(\n {3}.*)*){1}
|
||||
// 1 testFlattened2Flattened\(\)V(\n {3}.*)*((\n {3}.*DSTORE.*)(\n {3}.*)*){2}
|
||||
// 0 testFlattened2Flattened\(\)V(\n {3}.*)*((\n {3}.*DSTORE.*)(\n {3}.*)*){3}
|
||||
// 0 testBoxed2Flattened\(\)V(\n {3}.*)*((\n {3}.*box-impl .*)(\n {3}.*)*){1}
|
||||
// 1 testBoxed2Flattened\(\)V(\n {3}.*)*((\n {3}.*unbox-impl.*)(\n {3}.*)*){2}
|
||||
// 0 testBoxed2Flattened\(\)V(\n {3}.*)*((\n {3}.*unbox-impl.*)(\n {3}.*)*){3}
|
||||
// 0 testIgnoredFlattened\(\)V(\n {3}.*)*((\n {3}.*box-impl.*)(\n {3}.*)*){1}
|
||||
// 0 testIgnoredBoxed\(\)V(\n {3}.*)*((\n {3}.*box-impl.*)(\n {3}.*)*){1}
|
||||
Reference in New Issue
Block a user