[Wasm] Keep error message for the IAE exception

This commit is contained in:
Igor Laevsky
2021-10-08 19:09:36 +03:00
committed by TeamCityServer
parent dcdc7e4633
commit 049e48e780
3 changed files with 6 additions and 4 deletions
@@ -515,12 +515,12 @@ val wasmPhases = NamedCompilerPhase(
addContinuationToNonLocalSuspendFunctionsLoweringPhase then
addContinuationToFunctionCallsLoweringPhase then
stringConstructorLowering then
tryCatchCanonicalization then
returnableBlockLoweringPhase then
forLoopsLoweringPhase then
propertyAccessorInlinerLoweringPhase then
stringConstructorLowering then
defaultArgumentStubGeneratorPhase then
defaultArgumentPatchOverridesPhase then
@@ -103,7 +103,9 @@ class BuiltInsLowering(val context: WasmBackendContext) : FileLoweringPass {
return builder.irCall(symbols.throwNoBranchMatchedException, irBuiltins.nothingType)
irBuiltins.illegalArgumentExceptionSymbol ->
return builder.irCall(symbols.throwIAE, irBuiltins.nothingType)
return builder.irCall(symbols.throwIAE, irBuiltins.nothingType, 1).apply {
putValueArgument(0, call.getValueArgument(0)!!)
}
irBuiltins.dataClassArrayMemberHashCodeSymbol -> {
// TODO: Implement