Переглянути джерело

- 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 -
sergei 11 роки тому
батько
коміт
3fb304cbe2
2 змінених файлів з 1 додано та 34 видалено
  1. 1 10
      compiler/x86_64/nx64flw.pas
  2. 0 24
      rtl/win64/seh64.inc

+ 1 - 10
compiler/x86_64/nx64flw.pas

@@ -323,22 +323,13 @@ procedure tx64tryfinallynode.pass_generate_code;
       encode everything into a single scope record. }
       encode everything into a single scope record. }
     if catch_frame then
     if catch_frame then
       begin
       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
         if (current_procinfo.procdef.proccalloption=pocall_safecall) then
           begin
           begin
             handle_safecall_exception;
             handle_safecall_exception;
             cg.a_jmp_always(current_asmdata.CurrAsmList,endfinallylabel);
             cg.a_jmp_always(current_asmdata.CurrAsmList,endfinallylabel);
           end
           end
         else
         else
-          cg.a_call_name(current_asmdata.CurrAsmList,'FPC_RERAISE_IMPLICIT',false);
+          InternalError(2014031601);
       end;
       end;
 
 
     flowcontrol:=[fc_inflowcontrol];
     flowcontrol:=[fc_inflowcontrol];

+ 0 - 24
rtl/win64/seh64.inc

@@ -302,30 +302,6 @@ begin
   RaiseException(FPC_EXCEPTION_CODE,EXCEPTION_NONCONTINUABLE,4,@args[0]);
   RaiseException(FPC_EXCEPTION_CODE,EXCEPTION_NONCONTINUABLE,4,@args[0]);
 end;
 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}
 {$ifdef DEBUG_SEH}
 procedure PrintScope(idx: integer; scope: PScopeRec);
 procedure PrintScope(idx: integer; scope: PScopeRec);