Browse Source

* removed ungettempoftype

peter 26 years ago
parent
commit
164fba5879
2 changed files with 10 additions and 19 deletions
  1. 6 5
      compiler/cg386cal.pas
  2. 4 14
      compiler/types.pas

+ 6 - 5
compiler/cg386cal.pas

@@ -1038,8 +1038,7 @@ implementation
            begin
               if assigned(pp^.left) then
                 begin
-                  if (pp^.left^.location.loc in [LOC_REFERENCE,LOC_MEM]) and
-                     ungettempoftype(pp^.left^.resulttype) then
+                  if (pp^.left^.location.loc in [LOC_REFERENCE,LOC_MEM]) then
                     ungetiftemp(pp^.left^.location.reference);
                 { process also all nodes of an array of const }
                   if pp^.left^.treetype=arrayconstructn then
@@ -1049,8 +1048,7 @@ implementation
                          hp:=pp^.left;
                          while assigned(hp) do
                           begin
-                            if (hp^.left^.location.loc in [LOC_REFERENCE,LOC_MEM]) and
-                               ungettempoftype(hp^.left^.resulttype) then
+                            if (hp^.left^.location.loc in [LOC_REFERENCE,LOC_MEM]) then
                               ungetiftemp(hp^.left^.location.reference);
                             hp:=hp^.right;
                           end;
@@ -1165,7 +1163,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.87  1999-05-27 19:44:07  peter
+  Revision 1.88  1999-05-28 11:00:49  peter
+    * removed ungettempoftype
+
+  Revision 1.87  1999/05/27 19:44:07  peter
     * removed oldasm
     * plabel -> pasmlabel
     * -a switches to source writing automaticly

+ 4 - 14
compiler/types.pas

@@ -157,9 +157,6 @@ interface
     { returns the mmx type }
     function mmx_type(p : pdef) : tmmxtype;
 
-    { should we try to unget a temp of this type
-      or is it done by temptoremove list (PM) }
-    function ungettempoftype(p : pdef) : boolean;
 
 implementation
 
@@ -541,16 +538,6 @@ implementation
         end;
       end;
 
-    { should we try to unget a temp of this type
-      or is it done by temptoremove list (PM) }
-    function ungettempoftype(p : pdef) : boolean;
-
-      begin
-         ungettempoftype:=true;
-         if assigned(p) and (p^.deftype=stringdef) and
-            (pstringdef(p)^.string_typ in [st_ansistring,st_widestring]) then
-           ungettempoftype:=false;
-      end;
 
     function mmx_type(p : pdef) : tmmxtype;
       begin
@@ -885,7 +872,10 @@ implementation
 end.
 {
   $Log$
-  Revision 1.65  1999-05-23 18:42:23  florian
+  Revision 1.66  1999-05-28 11:00:51  peter
+    * removed ungettempoftype
+
+  Revision 1.65  1999/05/23 18:42:23  florian
     * better error recovering in typed constants
     * some problems with arrays of const fixed, some problems
       due my previous