Browse Source

* set the node complexity of stringconstn and setconstn to 1 rather than
respectively to 0 and 255 (both generally require one memory load);
the setconstn complexity of 255 also caused the node cse to replace
them with temprefn in some cases, which wreaked havoc with the JVM
practice of determining whether in-expressions can be handled by
the generic code generator or not

git-svn-id: branches/jvmbackend@18756 -

Jonas Maebe 14 years ago
parent
commit
eb8ba875db
1 changed files with 2 additions and 1 deletions
  1. 2 1
      compiler/nutils.pas

+ 2 - 1
compiler/nutils.pas

@@ -542,6 +542,8 @@ implementation
             case p.nodetype of
               { floating point constants usually need loading from memory }
               realconstn,
+              setconstn,
+              stringconstn,
               temprefn,
               loadvmtaddrn,
               { main reason for the next one: we can't take the address of }
@@ -635,7 +637,6 @@ implementation
 {$endif ARM}
                   exit;
                 end;
-              stringconstn,
               tempcreaten,
               tempdeleten,
               pointerconstn,