Expose internal getProgressionLastElement to public api

To be used in compiler loop optimizations.
#KT-18869 Fixed
This commit is contained in:
Ilya Gorbunov
2017-12-07 21:55:58 +03:00
parent c453ff01cd
commit 479f293edc
3 changed files with 12 additions and 0 deletions
@@ -49,6 +49,7 @@ private fun differenceModulo(a: Long, b: Long, c: Long): Long {
* @return the final element of the progression * @return the final element of the progression
* @suppress * @suppress
*/ */
@PublishedApi
internal fun getProgressionLastElement(start: Int, end: Int, step: Int): Int { internal fun getProgressionLastElement(start: Int, end: Int, step: Int): Int {
if (step > 0) { if (step > 0) {
return end - differenceModulo(end, start, step) return end - differenceModulo(end, start, step)
@@ -74,6 +75,7 @@ internal fun getProgressionLastElement(start: Int, end: Int, step: Int): Int {
* @return the final element of the progression * @return the final element of the progression
* @suppress * @suppress
*/ */
@PublishedApi
internal fun getProgressionLastElement(start: Long, end: Long, step: Long): Long { internal fun getProgressionLastElement(start: Long, end: Long, step: Long): Long {
if (step > 0) { if (step > 0) {
return end - differenceModulo(end, start, step) return end - differenceModulo(end, start, step)
@@ -179,6 +179,11 @@ public abstract class kotlin/collections/ShortIterator : java/util/Iterator, kot
public fun remove ()V public fun remove ()V
} }
public final class kotlin/internal/ProgressionUtilKt {
public static final fun getProgressionLastElement (III)I
public static final fun getProgressionLastElement (JJJ)J
}
public final class kotlin/jvm/JvmClassMappingKt { public final class kotlin/jvm/JvmClassMappingKt {
public static final fun getAnnotationClass (Ljava/lang/annotation/Annotation;)Lkotlin/reflect/KClass; public static final fun getAnnotationClass (Ljava/lang/annotation/Annotation;)Lkotlin/reflect/KClass;
public static final fun getJavaClass (Ljava/lang/Object;)Ljava/lang/Class; public static final fun getJavaClass (Ljava/lang/Object;)Ljava/lang/Class;
@@ -2079,6 +2079,11 @@ public final class kotlin/internal/PlatformImplementationsKt {
public static final fun apiVersionIsAtLeast (III)Z public static final fun apiVersionIsAtLeast (III)Z
} }
public final class kotlin/internal/ProgressionUtilKt {
public static final fun getProgressionLastElement (III)I
public static final fun getProgressionLastElement (JJJ)J
}
public final class kotlin/io/AccessDeniedException : kotlin/io/FileSystemException { public final class kotlin/io/AccessDeniedException : kotlin/io/FileSystemException {
public fun <init> (Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V public fun <init> (Ljava/io/File;Ljava/io/File;Ljava/lang/String;)V
public synthetic fun <init> (Ljava/io/File;Ljava/io/File;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V public synthetic fun <init> (Ljava/io/File;Ljava/io/File;Ljava/lang/String;ILkotlin/jvm/internal/DefaultConstructorMarker;)V