View Issue Details

IDProjectCategoryView StatusLast Update
0036935FPCCompilerpublic2020-05-02 06:42
ReporterJ. Gareth Moreton Assigned ToSven Barth  
PrioritynoneSeveritytextReproducibilityN/A
Status closedResolutionfixed 
PlatformCross-platformOSMicrosoft Windows 
Product Version3.3.1 
Fixed in Version3.3.1 
Summary0036935: [Patch] "cs_opt_remove_emtpy_proc" typo fix
DescriptionJust something that's bugged me for quite a while now. This patch fixes a typo in the toptimizerswitch enumeration, changing "cs_opt_remove_emtpy_proc" to "cs_opt_remove_empty_proc".
Steps To ReproduceApply patch and confirm no difference to compilation process.
Additional InformationCompiler function should not change at all - even the compiler's binary should be unchanged.
Tagscompiler, patch, refactor
Fixed in Revision44888
FPCOldBugId
FPCTarget-
Attached Files

Activities

J. Gareth Moreton

2020-04-19 23:50

developer  

EmptyProcTypoFix.patch (3,744 bytes)   
Index: compiler/globtype.pas
===================================================================
--- compiler/globtype.pas	(revision 44871)
+++ compiler/globtype.pas	(working copy)
@@ -338,7 +338,7 @@
          }
          cs_opt_dead_values,
          { compiler checks for empty procedures/methods and removes calls to them if possible }
-         cs_opt_remove_emtpy_proc,
+         cs_opt_remove_empty_proc,
          cs_opt_constant_propagate,
          cs_opt_dead_store_eliminate,
          cs_opt_forcenostackframe,
@@ -425,7 +425,7 @@
 
        { switches being applied to all CPUs at the given level }
        genericlevel1optimizerswitches = [cs_opt_level1,cs_opt_peephole];
-       genericlevel2optimizerswitches = [cs_opt_level2,cs_opt_remove_emtpy_proc];
+       genericlevel2optimizerswitches = [cs_opt_level2,cs_opt_remove_empty_proc];
        genericlevel3optimizerswitches = [cs_opt_level3,cs_opt_constant_propagate,cs_opt_nodedfa{$ifndef llvm},cs_opt_use_load_modify_store{$endif},cs_opt_loopunroll];
        genericlevel4optimizerswitches = [cs_opt_level4,cs_opt_reorder_fields,cs_opt_dead_values,cs_opt_fastmath];
 
Index: compiler/ncal.pas
===================================================================
--- compiler/ncal.pas	(revision 44871)
+++ compiler/ncal.pas	(working copy)
@@ -4353,7 +4353,7 @@
              end;
 
            { can we get rid of the call? }
-           if (cs_opt_remove_emtpy_proc in current_settings.optimizerswitches) and
+           if (cs_opt_remove_empty_proc in current_settings.optimizerswitches) and
               not(cnf_return_value_used in callnodeflags) and
              (procdefinition.typ=procdef) and
              tprocdef(procdefinition).isempty and
Index: compiler/ncgvmt.pas
===================================================================
--- compiler/ncgvmt.pas	(revision 44871)
+++ compiler/ncgvmt.pas	(working copy)
@@ -980,7 +980,7 @@
                procname:='FPC_ABSTRACTERROR';
                generate_abstract_stub(current_asmdata.AsmLists[al_procedures],vmtpd);
              end
-           else if (cs_opt_remove_emtpy_proc in current_settings.optimizerswitches) and RedirectToEmpty(vmtpd) then
+           else if (cs_opt_remove_empty_proc in current_settings.optimizerswitches) and RedirectToEmpty(vmtpd) then
              begin
                procname:='FPC_EMPTYMETHOD';
                if current_module.globalsymtable<>systemunit then
Index: compiler/psub.pas
===================================================================
--- compiler/psub.pas	(revision 44871)
+++ compiler/psub.pas	(working copy)
@@ -1233,7 +1233,7 @@
        if (pi_dfaavailable in flags) and (cs_opt_dead_store_eliminate in current_settings.optimizerswitches) then
          do_optdeadstoreelim(code);
 
-       if (cs_opt_remove_emtpy_proc in current_settings.optimizerswitches) and
+       if (cs_opt_remove_empty_proc in current_settings.optimizerswitches) and
          (procdef.proctypeoption in [potype_operator,potype_procedure,potype_function]) and
          (code.nodetype=blockn) and (tblocknode(code).statements=nil) then
          procdef.isempty:=true;
Index: compiler/utils/ppuutils/ppudump.pp
===================================================================
--- compiler/utils/ppuutils/ppudump.pp	(revision 44871)
+++ compiler/utils/ppuutils/ppudump.pp	(working copy)
@@ -2419,7 +2419,7 @@
          }
          'cs_opt_dead_values',
          { compiler checks for empty procedures/methods and removes calls to them if possible }
-         'cs_opt_remove_emtpy_proc',
+         'cs_opt_remove_empty_proc',
          'cs_opt_constant_propagate',
          'cs_opt_dead_store_eliminate',
          'cs_opt_forcenostackframe',
EmptyProcTypoFix.patch (3,744 bytes)   

Sven Barth

2020-04-20 20:43

manager   ~0122300

Thanks for the patch. I know the feeling regarding annoying typos ;)

Please test and close if okay.

J. Gareth Moreton

2020-05-02 06:42

developer   ~0122592

No complaints so far - I think it's good!

Issue History

Date Modified Username Field Change
2020-04-19 23:50 J. Gareth Moreton New Issue
2020-04-19 23:50 J. Gareth Moreton File Added: EmptyProcTypoFix.patch
2020-04-19 23:52 J. Gareth Moreton Tag Attached: patch
2020-04-19 23:52 J. Gareth Moreton Tag Attached: compiler
2020-04-19 23:52 J. Gareth Moreton Tag Attached: refactor
2020-04-19 23:52 J. Gareth Moreton Priority normal => none
2020-04-19 23:52 J. Gareth Moreton Severity minor => text
2020-04-19 23:52 J. Gareth Moreton FPCTarget => -
2020-04-20 20:43 Sven Barth Assigned To => Sven Barth
2020-04-20 20:43 Sven Barth Status new => resolved
2020-04-20 20:43 Sven Barth Resolution open => fixed
2020-04-20 20:43 Sven Barth Fixed in Version => 3.3.1
2020-04-20 20:43 Sven Barth Fixed in Revision => 44888
2020-04-20 20:43 Sven Barth Note Added: 0122300
2020-05-02 06:42 J. Gareth Moreton Status resolved => closed
2020-05-02 06:42 J. Gareth Moreton Note Added: 0122592