Add CompileTimeCalculation annotation as helper to interpreter's tests

This commit is contained in:
Ivan Kylchik
2021-06-24 16:53:02 +03:00
committed by TeamCityServer
parent 524189132b
commit 6482abc602
2 changed files with 11 additions and 1 deletions
@@ -0,0 +1,9 @@
package kotlin
/**
* Specify that marked function is calculated in compile time and it result can be stored as "const val"
* Must be used only on built ins methods and further will be replaced with "constexpr" modifier
*/
@Target(AnnotationTarget.FUNCTION, AnnotationTarget.PROPERTY)
@Retention(AnnotationRetention.BINARY)
public annotation class CompileTimeCalculation
@@ -35,7 +35,8 @@ class IrInterpreterHelpersSourceFilesProvider(testServices: TestServices) : Addi
)
private const val REFLECT_PATH = "./libraries/stdlib/jvm/src/kotlin/reflect"
private val EXCLUDES = listOf(
"src/kotlin/UStrings.kt", "src/kotlin/UMath.kt", "src/kotlin/UNumbers.kt", "src/kotlin/reflect/TypesJVM.kt"
"src/kotlin/UStrings.kt", "src/kotlin/UMath.kt", "src/kotlin/UNumbers.kt", "src/kotlin/reflect/TypesJVM.kt",
"core/builtins/src/kotlin/CompileTimeAnnotations.kt"
)
}