* use a_throw instead of a_legacy_throw in twasminlinenode.second_throw_fpcexception, unless legacy exceptions mode is selected

This commit is contained in:
Nikolay Nikolov 2025-10-05 12:55:27 +03:00
parent 8470ed075d
commit 4801ddaf0a

View File

@ -440,7 +440,10 @@ implementation
procedure twasminlinenode.second_throw_fpcexception;
begin
location_reset(location,LOC_VOID,OS_NO);
current_asmdata.CurrAsmList.Concat(taicpu.op_sym(a_legacy_throw,current_asmdata.WeakRefAsmSymbol(FPC_EXCEPTION_TAG_SYM,AT_WASM_EXCEPTION_TAG)));
if ts_wasm_native_legacy_exceptions in current_settings.targetswitches then
current_asmdata.CurrAsmList.Concat(taicpu.op_sym(a_legacy_throw,current_asmdata.WeakRefAsmSymbol(FPC_EXCEPTION_TAG_SYM,AT_WASM_EXCEPTION_TAG)))
else
current_asmdata.CurrAsmList.Concat(taicpu.op_sym(a_throw,current_asmdata.WeakRefAsmSymbol(FPC_EXCEPTION_TAG_SYM,AT_WASM_EXCEPTION_TAG)));
end;