Browse Source

Merge branch source:main into main

Curtis Hamilton 1 month ago
parent
commit
0f7712e144

+ 14 - 11
compiler/riscv/nrvcon.pas

@@ -33,6 +33,8 @@ interface
         function pass_1 : tnode;override;
 
         procedure pass_generate_code;override;
+      private
+        function is_real_constant: boolean;
       end;
 
 
@@ -51,16 +53,23 @@ implementation
                            TARMREALCONSTNODE
 *****************************************************************************}
 
-    function trvrealconstnode.pass_1 : tnode;
+    function trvrealconstnode.is_real_constant: boolean;
+
       begin
-        result:=nil;
-        if is_number_float(value_real) and (value_real=0.0) and (get_real_sign(value_real)=1) and
+        result:=is_number_float(value_real) and (value_real=0.0) and (get_real_sign(value_real)=1) and
           (
             ((CPURV_HAS_F in cpu_capabilities[current_settings.cputype]) and is_single(resultdef))
 {$ifdef RISCV64}
             or ((CPURV_HAS_D in cpu_capabilities[current_settings.cputype]) and is_double(resultdef))
 {$endif RISCV64}
-          ) then
+          );
+      end;
+
+
+    function trvrealconstnode.pass_1 : tnode;
+      begin
+        result:=nil;
+        if is_real_constant then
            expectloc:=LOC_FPUREGISTER
          else
            expectloc:=LOC_CREFERENCE;
@@ -69,13 +78,7 @@ implementation
 
     procedure trvrealconstnode.pass_generate_code;
       begin
-        if is_number_float(value_real) and (value_real=0.0) and (get_real_sign(value_real)=1) and
-          (
-            ((CPURV_HAS_F in cpu_capabilities[current_settings.cputype]) and is_single(resultdef))
-{$ifdef RISCV64}
-            or ((CPURV_HAS_D in cpu_capabilities[current_settings.cputype]) and is_double(resultdef))
-{$endif RISCV64}
-          ) then
+        if is_real_constant then
           begin
             location_reset(location,LOC_FPUREGISTER,def_cgsize(resultdef));
             location.register:=cg.getfpuregister(current_asmdata.CurrAsmList,location.size);

+ 1 - 0
packages/vcl-compat/src/system.threading.pp

@@ -3175,6 +3175,7 @@ begin
     Sub.Start;
     ThreadLog('TTask.ExecuteReplicates','Started replica');
     end;
+  DoCallUserCode;
 end;
 
 

+ 8 - 15
rtl/objpas/classes/stringl.inc

@@ -422,30 +422,23 @@ end;
 Procedure TStrings.Reverse(aList : TStrings);
 
 Var
-  I : Integer;
-  lList : TStrings;
-  lOwns : boolean;
+  I,J : Integer;
 
 begin
-  lOwns:=False;
   if aList=self then
     begin
-    lList:=Nil;
-    BeginUpdate;
+    I:=0; 
+    J:=Count-1;
+    beginUpdate;
     try
-      if (self is TStringList) then
+      while I<J do 
         begin
-        lOwns:=TstringList(Self).OwnsObjects;
-        TStringList(Self).OwnsObjects:=False;
+        Exchange(I, J);
+        Inc(I);
+        Dec(J);
         end;
-      lList:=TStringList.Create;
-      Reverse(lList);
-      AddStrings(lList,True);
     finally
-      if (self is TStringList) then
-        TStringList(Self).OwnsObjects:=lOwns;
       EndUpdate;
-      lList.Free;
     end;
     end
   else