Browse Source

* expectloc for wide/ansi/unicode strings is LOC_CONSTANT or LOC_REGISTER now

git-svn-id: branches/unicodestring@11666 -
florian 17 years ago
parent
commit
28499d3baa
1 changed files with 8 additions and 4 deletions
  1. 8 4
      compiler/ncon.pas

+ 8 - 4
compiler/ncon.pas

@@ -878,11 +878,15 @@ implementation
     function tstringconstnode.pass_1 : tnode;
     function tstringconstnode.pass_1 : tnode;
       begin
       begin
         result:=nil;
         result:=nil;
-        if (cst_type in [cst_ansistring,cst_widestring,cst_unicodestring]) and
-           (len=0) then
-         expectloc:=LOC_CONSTANT
+        if (cst_type in [cst_ansistring,cst_widestring,cst_unicodestring]) then
+          begin
+            if len=0 then
+              expectloc:=LOC_CONSTANT
+            else
+              expectloc:=LOC_REGISTER
+          end
         else
         else
-         expectloc:=LOC_CREFERENCE;
+          expectloc:=LOC_CREFERENCE;
       end;
       end;