Explorar el Código

+ set node complexity of const. string nodes to 1
+ better approximation if a tmp. location for a parameter when inlining can be omitted

git-svn-id: trunk@11635 -

florian hace 17 años
padre
commit
615619804a
Se han modificado 2 ficheros con 5 adiciones y 4 borrados
  1. 2 2
      compiler/ncal.pas
  2. 3 2
      compiler/nutils.pas

+ 2 - 2
compiler/ncal.pas

@@ -3042,8 +3042,8 @@ implementation
                       { call-by-reference const's may need to be passed by }
                       { reference to function called in the inlined code   }
                       (paramanager.push_addr_param(vs_const,para.parasym.vardef,procdefinition.proccalloption) and
-                       (not valid_for_addr(para.left,false) or
-                        is_constnode(para.left)))))
+                       not valid_for_addr(para.left,false))
+                     ))
                    )
                   ) then
                   begin

+ 3 - 2
compiler/nutils.pas

@@ -696,6 +696,7 @@ implementation
                     end;
                   p := tbinarynode(p).right;
                 end;
+              stringconstn,
               tempcreaten,
               tempdeleten,
               ordconstn,
@@ -775,7 +776,7 @@ implementation
                         inc(result);
                         exit;
                       end;
-          
+
                     in_inc_x,
                     in_dec_x,
                     in_include_x_y,
@@ -799,7 +800,7 @@ implementation
                         exit;
                       end;
                   end;
-                  
+
                 end;
               else
                 begin