* instead of using the 'throw' intrinsic, set a boolean flag, in the branchful

exceptions support code
This commit is contained in:
Nikolay Nikolov 2021-10-05 00:49:29 +03:00
parent 5124ab2521
commit 30b503abc4

View File

@ -24,6 +24,7 @@ Var
{$endif FPC_HAS_FEATURE_THREADING}
ExceptObjectStack : PExceptObject;
ExceptTryLevel : ObjpasInt;
RaisedException : Boolean;
{$ifdef FPC_USE_PSABIEH}
{$i psabieh.inc}
@ -164,7 +165,8 @@ begin
with _ExceptObjectStack^ do
RaiseProc(FObject,Addr,FrameCount,Frames);
//longjmp(_ExceptAddrStack^.Buf^,FPC_Exception);
fpc_wasm32_throw_fpcexception;
//fpc_wasm32_throw_fpcexception;
RaisedException:=true;
end;
{$endif FPC_SYSTEM_HAS_RAISEEXCEPTION}
@ -246,7 +248,8 @@ begin
// DoUnHandledException;
ExceptObjectStack^.refcount := 0;
// longjmp(_ExceptAddrStack^.Buf^,FPC_Exception);
fpc_wasm32_throw_fpcexception;
// fpc_wasm32_throw_fpcexception;
RaisedException:=true;
end;
{$endif FPC_SYSTEM_HAS_RERAISE}
@ -287,6 +290,7 @@ Procedure SysInitExceptions;
Initialize exceptionsupport
}
begin
RaisedException:=false;
ExceptObjectstack:=Nil;
end;