WASM: NFC. Rename WasmPrimitive into WasmAutoboxed and add few comments.
This commit is contained in:
committed by
TeamCityServer
parent
59ad7e0e04
commit
9ccdffe8ad
@@ -29,8 +29,8 @@ fun IrAnnotationContainer.hasWasmReinterpretAnnotation(): Boolean =
|
||||
fun IrAnnotationContainer.hasWasmForeignAnnotation(): Boolean =
|
||||
hasAnnotation(FqName("kotlin.wasm.internal.WasmForeign"))
|
||||
|
||||
fun IrAnnotationContainer.hasWasmPrimitiveAnnotation(): Boolean =
|
||||
hasAnnotation(FqName("kotlin.wasm.internal.WasmPrimitive"))
|
||||
fun IrAnnotationContainer.hasWasmAutoboxedAnnotation(): Boolean =
|
||||
hasAnnotation(FqName("kotlin.wasm.internal.WasmAutoboxed"))
|
||||
|
||||
fun IrAnnotationContainer.getWasmImportAnnotation(): WasmImportPair? =
|
||||
getAnnotation(FqName("kotlin.wasm.internal.WasmImport"))?.let {
|
||||
|
||||
+3
-1
@@ -32,7 +32,9 @@ class WasmInlineClassesUtils(private val wasmSymbols: WasmSymbols) : InlineClass
|
||||
}
|
||||
|
||||
override fun isClassInlineLike(klass: IrClass): Boolean {
|
||||
return klass.isInline || klass.hasWasmPrimitiveAnnotation()
|
||||
// TODO: This hook is called from autoboxing lowering so we also handle autoboxing annotation here. In the future it's better
|
||||
// to separate autoboxing from the inline class handling.
|
||||
return klass.isInline || klass.hasWasmAutoboxedAnnotation()
|
||||
}
|
||||
|
||||
override val boxIntrinsic: IrSimpleFunctionSymbol
|
||||
|
||||
Reference in New Issue
Block a user