mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-21 20:29:32 +02:00
- Removed Win64 SEH code specific to results of managed types returned in registers. Since r26228 managed types are always returned in parameters.
git-svn-id: trunk@27162 -
This commit is contained in:
parent
1d5dc8c3bd
commit
3fb304cbe2
@ -323,22 +323,13 @@ procedure tx64tryfinallynode.pass_generate_code;
|
||||
encode everything into a single scope record. }
|
||||
if catch_frame then
|
||||
begin
|
||||
flowcontrol:=[fc_inflowcontrol];
|
||||
secondpass(t1);
|
||||
{ note 1: this is not a 'finally' block, no flow restrictions apply
|
||||
note 2: it contains autogenerated sequential code, flow away is impossible }
|
||||
if flowcontrol<>[fc_inflowcontrol] then
|
||||
CGMessage(cg_e_control_flow_outside_finally);
|
||||
if codegenerror then
|
||||
exit;
|
||||
|
||||
if (current_procinfo.procdef.proccalloption=pocall_safecall) then
|
||||
begin
|
||||
handle_safecall_exception;
|
||||
cg.a_jmp_always(current_asmdata.CurrAsmList,endfinallylabel);
|
||||
end
|
||||
else
|
||||
cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE_IMPLICIT',false);
|
||||
InternalError(2014031601);
|
||||
end;
|
||||
|
||||
flowcontrol:=[fc_inflowcontrol];
|
||||
|
@ -302,30 +302,6 @@ begin
|
||||
RaiseException(FPC_EXCEPTION_CODE,EXCEPTION_NONCONTINUABLE,4,@args[0]);
|
||||
end;
|
||||
|
||||
{ The only difference from fpc_reraise is removing the topmost exception.
|
||||
Normally this is done in __FPC_specific_handler, but it won't work for implicit
|
||||
frames, as there's no room in scope record to store the end rva of 'except' part.
|
||||
|
||||
This can only happen in functions which return managed result in register;
|
||||
eventually compiler must be fixed to return managed types in parameters only. }
|
||||
|
||||
procedure fpc_reraise_implicit; [public,alias:'FPC_RERAISE_IMPLICIT'];
|
||||
var
|
||||
hp: PExceptObject;
|
||||
args: array[0..3] of PtrUInt;
|
||||
begin
|
||||
hp:=ExceptObjectStack;
|
||||
args[0]:=PtrUint(hp^.addr);
|
||||
args[1]:=PtrUint(hp^.FObject);
|
||||
args[2]:=hp^.FrameCount;
|
||||
args[3]:=PtrUint(hp^.Frames);
|
||||
hp^.refcount:=0;
|
||||
hp^.FObject:=nil;
|
||||
hp^.Frames:=nil;
|
||||
Internal_PopObjectStack.Free;
|
||||
RaiseException(FPC_EXCEPTION_CODE,EXCEPTION_NONCONTINUABLE,4,@args[0]);
|
||||
end;
|
||||
|
||||
|
||||
{$ifdef DEBUG_SEH}
|
||||
procedure PrintScope(idx: integer; scope: PScopeRec);
|
||||
|
Loading…
Reference in New Issue
Block a user