- 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:
sergei 2014-03-16 15:48:49 +00:00
parent 1d5dc8c3bd
commit 3fb304cbe2
2 changed files with 1 additions and 34 deletions

View File

@ -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];

View File

@ -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);