Skip to content

Commit

Permalink
Update to Kotlin 1.6.20-M1
Browse files Browse the repository at this point in the history
  • Loading branch information
Him188 committed Feb 8, 2022
1 parent 12a4be2 commit 94ab6d9
Show file tree
Hide file tree
Showing 5 changed files with 9 additions and 14 deletions.
4 changes: 2 additions & 2 deletions buildSrc/src/main/kotlin/Versions.kt
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@
object Versions {
const val intellij = "2021.3"

const val project = "2.0.0-160.3"
const val project = "2.0.0-162.1"
const val idePlugin = "213-$project"

const val kotlin = "1.6.0"
const val kotlin = "1.6.20-M1"
const val coroutines = "1.5.2"

const val publicationGroup = "me.him188"
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import me.him188.kotlin.jvm.blocking.bridge.compiler.backend.jvm.BlockingBridgeA
import me.him188.kotlin.jvm.blocking.bridge.compiler.backend.jvm.isJvm8OrHigher
import me.him188.kotlin.jvm.blocking.bridge.compiler.extensions.IBridgeConfiguration
import org.jetbrains.kotlin.backend.common.ir.allParameters
import org.jetbrains.kotlin.backend.jvm.codegen.psiElement
import org.jetbrains.kotlin.backend.jvm.ir.isInlineClassType
import org.jetbrains.kotlin.backend.jvm.ir.psiElement
import org.jetbrains.kotlin.descriptors.effectiveVisibility
import org.jetbrains.kotlin.ir.ObsoleteDescriptorBasedAPI
import org.jetbrains.kotlin.ir.declarations.IrClass
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import org.jetbrains.kotlin.backend.common.extensions.IrPluginContext
import org.jetbrains.kotlin.backend.common.ir.*
import org.jetbrains.kotlin.backend.common.lower.DeclarationIrBuilder
import org.jetbrains.kotlin.backend.common.lower.parents
import org.jetbrains.kotlin.backend.jvm.codegen.fileParent
import org.jetbrains.kotlin.backend.jvm.ir.fileParent
import org.jetbrains.kotlin.descriptors.*
import org.jetbrains.kotlin.ir.UNDEFINED_OFFSET
import org.jetbrains.kotlin.ir.builders.*
Expand Down Expand Up @@ -37,7 +37,7 @@ internal object IntrinsicRuntimeFunctions {

internal val IrFunction.bridgeFunctionName: Name get() = Name.identifier("${this.name}")

internal val ORIGIN_JVM_BLOCKING_BRIDGE: IrDeclarationOrigin? get() = IrDeclarationOrigin.DEFINED
internal val ORIGIN_JVM_BLOCKING_BRIDGE: IrDeclarationOrigin get() = IrDeclarationOrigin.DEFINED

private fun IrPluginContext.referenceFunctionRunBlocking(): IrSimpleFunctionSymbol {
return referenceFunctions(IntrinsicRuntimeFunctions.RUN_SUSPEND).singleOrNull()
Expand Down Expand Up @@ -137,7 +137,7 @@ fun IrPluginContext.generateJvmBlockingBridges(originFunction: IrFunction): List
startOffset = originFunction.startOffset
endOffset = originFunction.endOffset

origin = ORIGIN_JVM_BLOCKING_BRIDGE ?: originFunction.origin
origin = ORIGIN_JVM_BLOCKING_BRIDGE

name = originFunction.bridgeFunctionName
returnType = originFunction.returnType
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import me.him188.kotlin.jvm.blocking.bridge.JvmBlockingBridge
import me.him188.kotlin.jvm.blocking.bridge.compiler.backend.jvm.GeneratedBlockingBridgeStubForResolution
import org.jetbrains.kotlin.backend.common.ir.allOverridden
import org.jetbrains.kotlin.backend.common.lower.parents
import org.jetbrains.kotlin.backend.jvm.codegen.psiElement
import org.jetbrains.kotlin.backend.jvm.ir.psiElement
import org.jetbrains.kotlin.codegen.topLevelClassAsmType
import org.jetbrains.kotlin.descriptors.FunctionDescriptor
import org.jetbrains.kotlin.descriptors.Modality
Expand All @@ -24,13 +24,8 @@ import org.jetbrains.kotlin.utils.addToStdlib.firstIsInstanceOrNull

val JVM_BLOCKING_BRIDGE_FQ_NAME = FqName(JvmBlockingBridge::class.qualifiedName!!)

@Suppress(
"INVISIBLE_REFERENCE",
"EXPERIMENTAL_MARKER_CAN_ONLY_BE_USED_AS_ANNOTATION_OR_ARGUMENT_IN_USE_EXPERIMENTAL",
"DEPRECATION_ERROR"
)
val GENERATED_BLOCKING_BRIDGE_FQ_NAME =
FqName(me.him188.kotlin.jvm.blocking.bridge.GeneratedBlockingBridge::class.qualifiedName!!)
FqName("me.him188.kotlin.jvm.blocking.bridge.GeneratedBlockingBridge")

val JVM_BLOCKING_BRIDGE_ASM_TYPE = JVM_BLOCKING_BRIDGE_FQ_NAME.topLevelClassAsmType()
val GENERATED_BLOCKING_BRIDGE_ASM_TYPE = GENERATED_BLOCKING_BRIDGE_FQ_NAME.topLevelClassAsmType()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ object BlockingBridgeErrorsRendering : DefaultErrorMessages.Extension {
put(
OVERRIDING_GENERATED_BLOCKING_BRIDGE,
"Overriding generated JvmBlockingBridge: ''{0}''.",
Renderers.STRING
Renderers.TO_STRING
)

put(
Expand Down

0 comments on commit 94ab6d9

Please sign in to comment.