Fix compiler warnings in new wasm modules

Also don't output v8ExecutablePath in js.tests on each project
configuration.
This commit is contained in:
Alexander Udalov
2020-11-09 19:43:59 +01:00
committed by Alexander Udalov
parent 84d1393711
commit d96223a2ff
8 changed files with 18 additions and 14 deletions
@@ -48,8 +48,8 @@ import org.jetbrains.kotlin.ir.visitors.transformChildrenVoid
* Related issue: [https://github.com/WebAssembly/gc/issues/29]
*/
class EraseVirtualDispatchReceiverParametersTypes(val context: CommonBackendContext) : FileLoweringPass {
override fun lower(file: IrFile) {
file.acceptChildrenVoid(object : IrElementVisitorVoid {
override fun lower(irFile: IrFile) {
irFile.acceptChildrenVoid(object : IrElementVisitorVoid {
override fun visitElement(element: IrElement) {
element.acceptChildrenVoid(this)
}
@@ -88,4 +88,4 @@ class EraseVirtualDispatchReceiverParametersTypes(val context: CommonBackendCont
}
})
}
}
}
@@ -185,15 +185,15 @@ class WasmBaseTypeOperatorTransformer(val context: WasmBackendContext) : IrEleme
// Handling null manually
if (toType.isNullable() && fromType.isNullable()) {
return builder.irComposite {
val value = cacheValue(value)
val cachedValue = cacheValue(value)
+builder.irIfNull(
type = toType,
subject = value() as IrExpression,
subject = cachedValue() as IrExpression,
thenPart = builder.irNull(toType),
elsePart = builder.irCall(symbols.wasmRefCast, type = toType).apply {
putTypeArgument(0, fromType)
putTypeArgument(1, toType)
putValueArgument(0, value() as IrExpression)
putValueArgument(0, cachedValue() as IrExpression)
}
)
}