Ver código fonte

* changed ttemp*node.tempinfo^.flags to a private field, and added setters
and getters for the ttemp*node classes instead
o this will allow descendants to prevent certain flags from being added
or removed. E.g. for LLVM, certain temps must never be put in registers
because it cannot typecast a value in a register from a non-record/array
type to an array type without forcing it to memory (so if that is done
on an lvalue, the result will be written to the memory temp instead of
to the register)

git-svn-id: trunk@34358 -

Jonas Maebe 9 anos atrás
pai
commit
179c1ab328

+ 1 - 1
compiler/hlcgobj.pas

@@ -4413,7 +4413,7 @@ implementation
           end;
         temprefn:
           begin
-            if (ti_valid in ttemprefnode(n).tempinfo^.flags) and
+            if (ti_valid in ttemprefnode(n).tempflags) and
                (ttemprefnode(n).tempinfo^.location.loc in [LOC_CREGISTER,LOC_CFPUREGISTER,LOC_CMMXREGISTER,LOC_CMMREGISTER]) and
                (ttemprefnode(n).tempinfo^.location.register = rr^.old) then
               begin

+ 4 - 4
compiler/htypechk.pas

@@ -1029,11 +1029,11 @@ implementation
             temprefn :
               begin
                 if (ra_addr_taken in how) then
-                  include(ttemprefnode(p).tempinfo^.flags,ti_addr_taken);
-                if (ti_may_be_in_reg in ttemprefnode(p).tempinfo^.flags) and
+                  ttemprefnode(p).includetempflag(ti_addr_taken);
+                if (ti_may_be_in_reg in ttemprefnode(p).tempflags) and
                    ((not records_only) or
                     (ttemprefnode(p).tempinfo^.typedef.typ = recorddef)) then
-                  exclude(ttemprefnode(p).tempinfo^.flags,ti_may_be_in_reg);
+                  ttemprefnode(p).excludetempflag(ti_may_be_in_reg);
                 break;
               end;
             else
@@ -1453,7 +1453,7 @@ implementation
            case hp.nodetype of
              temprefn :
                begin
-                 valid_for_assign := not(ti_readonly in ttemprefnode(hp).tempinfo^.flags);
+                 valid_for_assign := not(ti_readonly in ttemprefnode(hp).tempflags);
                  mayberesettypeconvs;
                  exit;
                end;

+ 1 - 1
compiler/jvm/njvmcal.pas

@@ -387,7 +387,7 @@ implementation
         para.left:=ctemprefnode.create(tempnode);
         { inherit addr_taken flag }
         if (tabstractvarsym(para.parasym).addr_taken) then
-          include(tempnode.tempinfo^.flags,ti_addr_taken);
+          tempnode.includetempflag(ti_addr_taken);
       end;
 
 

+ 84 - 19
compiler/nbas.pas

@@ -171,7 +171,10 @@ interface
        { already been disposed and to make sure the coherency between temps and     }
        { temp references is kept after a getcopy                                    }
        ptempinfo = ^ttempinfo;
-       ttempinfo = record
+       ttempinfo = object
+        private
+         flags                      : ttempinfoflags;
+        public
          { set to the copy of a tempcreate pnode (if it gets copied) so that the }
          { refs and deletenode can hook to this copy once they get copied too    }
          hookoncopy                 : ptempinfo;
@@ -181,15 +184,32 @@ interface
          owner                      : ttempcreatenode;
          withnode                   : tnode;
          location                   : tlocation;
-         flags                      : ttempinfoflags;
          tempinitcode               : tnode;
        end;
 
+       ttempinfoaccessor = class
+         class procedure settempinfoflags(tempinfo: ptempinfo; const flags: ttempinfoflags); virtual;
+         class function gettempinfoflags(tempinfo: ptempinfo): ttempinfoflags; static; inline;
+       end;
+       ttempinfoaccessorclass = class of ttempinfoaccessor;
+
+       ttempbasenode = class(tnode)
+        protected
+          class var tempinfoaccessor: ttempinfoaccessorclass;
+        protected
+          procedure settempinfoflags(const tempflags: ttempinfoflags); inline;
+          function gettempinfoflags: ttempinfoflags; inline;
+        public
+          tempinfo: ptempinfo;
+          procedure includetempflag(flag: ttempinfoflag); inline;
+          procedure excludetempflag(flag: ttempinfoflag); inline;
+          property tempflags: ttempinfoflags read gettempinfoflags write settempinfoflags;
+       end;
+
        { a node which will create a (non)persistent temp of a given type with a given  }
        { size (the size is separate to allow creating "void" temps with a custom size) }
-       ttempcreatenode = class(tnode)
+       ttempcreatenode = class(ttempbasenode)
           size: tcgint;
-          tempinfo: ptempinfo;
           ftemplvalue : tnode;
           { * persistent temps are used in manually written code where the temp }
           { be usable among different statements and where you can manually say }
@@ -215,9 +235,7 @@ interface
        ttempcreatenodeclass = class of ttempcreatenode;
 
         { a node which is a reference to a certain temp }
-        ttemprefnode = class(tnode)
-          tempinfo: ptempinfo;
-
+        ttemprefnode = class(ttempbasenode)
           constructor create(const temp: ttempcreatenode); virtual;
           constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
@@ -234,8 +252,7 @@ interface
        ttemprefnodeclass = class of ttemprefnode;
 
         { a node which removes a temp }
-        ttempdeletenode = class(tnode)
-          tempinfo: ptempinfo;
+        ttempdeletenode = class(ttempbasenode)
           constructor create(const temp: ttempcreatenode); virtual;
           { this will convert the persistant temp to a normal temp
             for returning to the other nodes }
@@ -263,6 +280,7 @@ interface
        casmnode : tasmnodeclass = tasmnode;
        cstatementnode : tstatementnodeclass = tstatementnode;
        cblocknode : tblocknodeclass = tblocknode;
+       ctempinfoaccessor : ttempinfoaccessorclass = ttempinfoaccessor;
        ctempcreatenode : ttempcreatenodeclass = ttempcreatenode;
        ctemprefnode : ttemprefnodeclass = ttemprefnode;
        ctempdeletenode : ttempdeletenodeclass = ttempdeletenode;
@@ -818,6 +836,53 @@ implementation
       end;
 
 
+{*****************************************************************************
+                          TEMPBASENODE
+*****************************************************************************}
+
+    class procedure ttempinfoaccessor.settempinfoflags(tempinfo: ptempinfo; const flags: ttempinfoflags);
+      begin
+        tempinfo^.flags:=flags;
+      end;
+
+
+    class function ttempinfoaccessor.gettempinfoflags(tempinfo: ptempinfo): ttempinfoflags;
+      begin
+        result:=tempinfo^.flags;
+      end;
+
+
+{*****************************************************************************
+                          TEMPBASENODE
+*****************************************************************************}
+
+    procedure ttempbasenode.settempinfoflags(const tempflags: ttempinfoflags);
+      begin
+        ctempinfoaccessor.settempinfoflags(tempinfo,tempflags);
+      end;
+
+
+    function ttempbasenode.gettempinfoflags: ttempinfoflags;
+      begin
+        result:=ctempinfoaccessor.gettempinfoflags(tempinfo);
+      end;
+
+
+    procedure ttempbasenode.includetempflag(flag: ttempinfoflag);
+      begin
+        { go through settempinfoflags() so it can filter out unsupported tempflags }
+        settempinfoflags(gettempinfoflags+[flag])
+      end;
+
+
+    procedure ttempbasenode.excludetempflag(flag: ttempinfoflag);
+      begin
+        { go through settempinfoflags() so it can prevent required tempflags from
+          being removed (if any) }
+        settempinfoflags(gettempinfoflags-[flag])
+      end;
+
+
 {*****************************************************************************
                           TEMPCREATENODE
 *****************************************************************************}
@@ -841,7 +906,7 @@ implementation
            (def_cgsize(_typedef)<>OS_NO) and
            { no init/final needed }
            not is_managed_type(_typedef) then
-          include(tempinfo^.flags,ti_may_be_in_reg);
+          includetempflag(ti_may_be_in_reg);
       end;
 
 
@@ -869,9 +934,9 @@ implementation
         ftemplvalue:=templvalue;
         // no assignment node, just the tempvalue
         tempinfo^.tempinitcode:=ftemplvalue;
-        include(tempinfo^.flags,ti_reference);
+        includetempflag(ti_reference);
         if readonly then
-          include(tempinfo^.flags,ti_readonly);
+          includetempflag(ti_readonly);
       end;
 
 
@@ -887,7 +952,7 @@ implementation
         n.tempinfo^.owner:=n;
         n.tempinfo^.typedef := tempinfo^.typedef;
         n.tempinfo^.temptype := tempinfo^.temptype;
-        n.tempinfo^.flags := tempinfo^.flags * tempinfostoreflags;
+        n.tempflags := n.tempflags * tempinfostoreflags;
 
         { when the tempinfo has already a hookoncopy then it is not
           reset by a tempdeletenode }
@@ -897,7 +962,7 @@ implementation
         { so that if the refs get copied as well, they can hook themselves }
         { to the copy of the temp                                          }
         tempinfo^.hookoncopy := n.tempinfo;
-        exclude(tempinfo^.flags,ti_nextref_set_hookoncopy_nil);
+        excludetempflag(ti_nextref_set_hookoncopy_nil);
 
         if assigned(tempinfo^.withnode) then
           n.tempinfo^.withnode := tempinfo^.withnode.getcopy
@@ -971,7 +1036,7 @@ implementation
         result := nil;
         expectloc:=LOC_VOID;
         { temps which are immutable do not need to be initialized/finalized }
-        if (tempinfo^.typedef.needs_inittable) and not(ti_const in tempinfo^.flags) then
+        if (tempinfo^.typedef.needs_inittable) and not(ti_const in tempflags) then
           include(current_procinfo.flags,pi_needs_implicit_finally);
         if (cs_create_pic in current_settings.moduleswitches) and
            (tf_pic_uses_got in target_info.flags) and
@@ -1002,7 +1067,7 @@ implementation
         result :=
           inherited docompare(p) and
           (ttempcreatenode(p).size = size) and
-          (ttempcreatenode(p).tempinfo^.flags*tempinfostoreflags=tempinfo^.flags*tempinfostoreflags) and
+          (ttempcreatenode(p).tempflags*tempinfostoreflags=tempflags*tempinfostoreflags) and
           equal_defs(ttempcreatenode(p).tempinfo^.typedef,tempinfo^.typedef) and
           (ttempcreatenode(p).tempinfo^.withnode.isequal(tempinfo^.withnode)) and
           (ttempcreatenode(p).tempinfo^.tempinitcode.isequal(tempinfo^.tempinitcode));
@@ -1045,7 +1110,7 @@ implementation
             { from a persistent one into a normal one, we must be  }
             { the last reference (since our parent should free the }
             { temp (JM)                                            }
-            if (ti_nextref_set_hookoncopy_nil in tempinfo^.flags) then
+            if (ti_nextref_set_hookoncopy_nil in tempflags) then
               tempinfo^.hookoncopy := nil;
           end
         else
@@ -1091,7 +1156,7 @@ implementation
       begin
         expectloc := LOC_REFERENCE;
         if not tempinfo^.typedef.needs_inittable and
-           (ti_may_be_in_reg in tempinfo^.flags) then
+           (ti_may_be_in_reg in tempflags) then
           begin
             if tempinfo^.typedef.typ=floatdef then
               begin
@@ -1191,7 +1256,7 @@ implementation
             if (not release_to_normal) then
               tempinfo^.hookoncopy:=nil
             else
-              include(tempinfo^.flags,ti_nextref_set_hookoncopy_nil);
+              includetempflag(ti_nextref_set_hookoncopy_nil);
           end
         else
           { if the temp we refer to hasn't been copied, we have a }

+ 12 - 12
compiler/ncal.pas

@@ -1954,7 +1954,7 @@ implementation
             loadn:
               result:=(tabstractvarsym(tloadnode(hp).symtableentry).varregable in [vr_none,vr_addr]);
             temprefn:
-              result:=not(ti_may_be_in_reg in ttemprefnode(hp).tempinfo^.flags);
+              result:=not(ti_may_be_in_reg in ttemprefnode(hp).tempflags);
           end;
       end;
 
@@ -2943,8 +2943,8 @@ implementation
           substituted function result may not be in a register, as we cannot
           take its address in that case                                      }
         if (realassignmenttarget.nodetype=temprefn) and
-           not(ti_addr_taken in ttemprefnode(realassignmenttarget).tempinfo^.flags) and
-           not(ti_may_be_in_reg in ttemprefnode(realassignmenttarget).tempinfo^.flags) then
+           not(ti_addr_taken in ttemprefnode(realassignmenttarget).tempflags) and
+           not(ti_may_be_in_reg in ttemprefnode(realassignmenttarget).tempflags) then
           begin
             result:=true;
             exit;
@@ -3041,7 +3041,7 @@ implementation
                   to the result on the caller side will take care of decreasing
                   the reference count }
                 if paramanager.ret_in_param(resultdef,procdefinition) then
-                  include(temp.tempinfo^.flags,ti_nofini);
+                  temp.includetempflag(ti_nofini);
                 add_init_statement(temp);
                 { When the function result is not used in an inlined function
                   we need to delete the temp. This can currently only be done by
@@ -4496,7 +4496,7 @@ implementation
             addstatement(inlinecleanupstatement,ctempdeletenode.create(tempnode));
             { inherit addr_taken flag }
             if (tabstractvarsym(p).addr_taken) then
-              include(tempnode.tempinfo^.flags,ti_addr_taken);
+              tempnode.includetempflag(ti_addr_taken);
             inlinelocals[indexnr] := ctemprefnode.create(tempnode);
           end;
       end;
@@ -4670,9 +4670,9 @@ implementation
           the routine cannot be (e.g., because its address is taken in the
           routine), or if the temp is a const and the parameter gets modified }
         if (para.left.nodetype=temprefn) and
-           (not(ti_may_be_in_reg in ttemprefnode(para.left).tempinfo^.flags) or
+           (not(ti_may_be_in_reg in ttemprefnode(para.left).tempflags) or
             not(tparavarsym(para.parasym).varregable in [vr_none,vr_addr])) and
-           (not(ti_const in ttemprefnode(para.left).tempinfo^.flags) or
+           (not(ti_const in ttemprefnode(para.left).tempflags) or
             (tparavarsym(para.parasym).varstate in [vs_initialised,vs_declared,vs_read])) then
           exit;
 
@@ -4693,19 +4693,19 @@ implementation
             para.left := ctemprefnode.create(tempnode);
             { inherit addr_taken flag }
             if (tabstractvarsym(para.parasym).addr_taken) then
-              include(tempnode.tempinfo^.flags,ti_addr_taken);
+              tempnode.includetempflag(ti_addr_taken);
 
             { inherit const }
             if tabstractvarsym(para.parasym).varspez=vs_const then
               begin
-                include(tempnode.tempinfo^.flags,ti_const);
+                tempnode.includetempflag(ti_const);
 
                 { apply less strict rules for the temp. to be a register than
                   ttempcreatenode does
 
                   this way, dyn. array, ansistrings etc. can be put into registers as well }
                 if tparavarsym(para.parasym).is_regvar(false) then
-                  include(tempnode.tempinfo^.flags,ti_may_be_in_reg);
+                  tempnode.includetempflag(ti_may_be_in_reg);
               end;
 
             result:=true;
@@ -4765,10 +4765,10 @@ implementation
         addstatement(inlinecleanupstatement,ctempdeletenode.create(tempnode));
         { inherit addr_taken flag }
         if (tabstractvarsym(para.parasym).addr_taken) then
-          include(tempnode.tempinfo^.flags,ti_addr_taken);
+          tempnode.includetempflag(ti_addr_taken);
         { inherit read only }
         if tabstractvarsym(para.parasym).varspez=vs_const then
-          include(tempnode.tempinfo^.flags,ti_const);
+          tempnode.includetempflag(ti_const);
         paraaddr:=caddrnode.create_internal(para.left);
         include(paraaddr.flags,nf_typedaddr);
         addstatement(inlineinitstatement,cassignmentnode.create(ctemprefnode.create(tempnode),

+ 21 - 21
compiler/ncgbas.pas

@@ -418,23 +418,23 @@ interface
         location_reset(location,LOC_VOID,OS_NO);
 
         { if we're secondpassing the same tcgtempcreatenode twice, we have a bug }
-        if (ti_valid in tempinfo^.flags) then
+        if (ti_valid in tempflags) then
           internalerror(200108222);
 
         { in case of ti_reference, the location will be initialised using the
           location of the tempinitnode once the first temprefnode is processed }
-        if not(ti_reference in tempinfo^.flags) then
+        if not(ti_reference in tempflags) then
           begin
             { get a (persistent) temp }
             if is_managed_type(tempinfo^.typedef) and
-              not(ti_const in tempinfo^.flags) then
+              not(ti_const in tempflags) then
               begin
                 location_reset_ref(tempinfo^.location,LOC_REFERENCE,def_cgsize(tempinfo^.typedef),0);
                 tg.gethltempmanaged(current_asmdata.CurrAsmList,tempinfo^.typedef,tempinfo^.temptype,tempinfo^.location.reference);
-                if not(ti_nofini in tempinfo^.flags) then
+                if not(ti_nofini in tempflags) then
                   hlcg.g_finalize(current_asmdata.CurrAsmList,tempinfo^.typedef,tempinfo^.location.reference);
               end
-            else if (ti_may_be_in_reg in tempinfo^.flags) then
+            else if (ti_may_be_in_reg in tempflags) then
               begin
                 location_allocate_register(current_asmdata.CurrAsmList,tempinfo^.location,tempinfo^.typedef,tempinfo^.temptype = tt_persistent);
               end
@@ -444,9 +444,9 @@ interface
                 tg.gethltemp(current_asmdata.CurrAsmList,tempinfo^.typedef,size,tempinfo^.temptype,tempinfo^.location.reference);
               end;
           end;
-        include(tempinfo^.flags,ti_valid);
+        includetempflag(ti_valid);
         if assigned(tempinfo^.tempinitcode) then
-          include(tempinfo^.flags,ti_executeinitialisation);
+          includetempflag(ti_executeinitialisation);
       end;
 
 
@@ -456,12 +456,12 @@ interface
 
     procedure tcgtemprefnode.pass_generate_code;
       begin
-        if ti_executeinitialisation in tempinfo^.flags then
+        if ti_executeinitialisation in tempflags then
           begin
             { avoid recursion }
-            exclude(tempinfo^.flags, ti_executeinitialisation);
+            excludetempflag(ti_executeinitialisation);
             secondpass(tempinfo^.tempinitcode);
-            if (ti_reference in tempinfo^.flags) then
+            if (ti_reference in tempflags) then
               begin
                 case tempinfo^.tempinitcode.location.loc of
                   LOC_CREGISTER,
@@ -473,7 +473,7 @@ interface
                         for reading, it's not in case of writing (because the
                         register could change due to SSA -> storing to the saved
                         register afterwards would be wrong). }
-                      if not(ti_readonly in tempinfo^.flags) then
+                      if not(ti_readonly in tempflags) then
                         internalerror(2011031407);
                     end;
                   { in case reference contains CREGISTERS, that doesn't matter:
@@ -484,7 +484,7 @@ interface
               end;
           end;
         { check if the temp is valid }
-        if not(ti_valid in tempinfo^.flags) then
+        if not(ti_valid in tempflags) then
           internalerror(200108231);
         location:=tempinfo^.location;
         case tempinfo^.location.loc of
@@ -495,7 +495,7 @@ interface
           LOC_REGISTER,
           LOC_FPUREGISTER,
           LOC_MMREGISTER :
-            exclude(tempinfo^.flags,ti_valid);
+            excludetempflag(ti_valid);
         end;
       end;
 
@@ -503,7 +503,7 @@ interface
     procedure tcgtemprefnode.changelocation(const ref: treference);
       begin
         { check if the temp is valid }
-        if not(ti_valid in tempinfo^.flags) then
+        if not(ti_valid in tempflags) then
           internalerror(200306081);
         if (tempinfo^.location.loc<>LOC_REFERENCE) then
           internalerror(2004020203);
@@ -523,7 +523,7 @@ interface
 
     procedure tcgtempdeletenode.pass_generate_code;
       begin
-        if ti_reference in tempinfo^.flags then
+        if ti_reference in tempflags then
           begin
             { release_to_normal means that the temp will be freed the next
               time it's used. However, reference temps reference some other
@@ -534,7 +534,7 @@ interface
             { so we only mark this temp location as "no longer valid" when
               it's deleted (ttempdeletenodes are also used during getcopy, so
               we really do need one) }
-            exclude(tempinfo^.flags,ti_valid);
+            excludetempflag(ti_valid);
             exit;
           end;
 
@@ -543,7 +543,7 @@ interface
         { see comments at ti_const declaration: if we initialised this temp with
           the value of another temp, that other temp was not freed because the
           ti_const flag was set }
-        if (ti_const in tempinfo^.flags) and
+        if (ti_const in tempflags) and
            assigned(tempinfo^.tempinitcode) then
           begin
             if tempinfo^.tempinitcode.nodetype<>assignn then
@@ -561,7 +561,7 @@ interface
               else
                 begin
                   tg.UnGetTemp(current_asmdata.CurrAsmList,tempinfo^.location.reference);
-                  exclude(tempinfo^.flags,ti_valid);
+                  excludetempflag(ti_valid);
                 end;
             end;
           LOC_CREGISTER,
@@ -627,7 +627,7 @@ interface
               if release_to_normal then
                 tempinfo^.location.loc := LOC_REGISTER
               else
-                exclude(tempinfo^.flags,ti_valid);
+                excludetempflag(ti_valid);
             end;
           LOC_CFPUREGISTER,
           LOC_FPUREGISTER:
@@ -642,7 +642,7 @@ interface
               if release_to_normal then
                 tempinfo^.location.loc := LOC_FPUREGISTER
               else
-                exclude(tempinfo^.flags,ti_valid);
+                excludetempflag(ti_valid);
             end;
           LOC_CMMREGISTER,
           LOC_MMREGISTER:
@@ -657,7 +657,7 @@ interface
               if release_to_normal then
                 tempinfo^.location.loc := LOC_MMREGISTER
               else
-                exclude(tempinfo^.flags,ti_valid);
+                excludetempflag(ti_valid);
             end;
           else
             internalerror(200507161);

+ 3 - 3
compiler/ncgld.pas

@@ -121,13 +121,13 @@ implementation
             end;
           temprefn:
             begin
-              if (ti_valid in ttemprefnode(n).tempinfo^.flags) and
+              if (ti_valid in ttemprefnode(n).tempflags) and
                  { memory temp... }
                  (ttemprefnode(n).tempinfo^.location.loc in [LOC_REFERENCE]) and
                  { ... at the place we are looking for }
                  references_equal(ttemprefnode(n).tempinfo^.location.reference,rr^.old^) and
                  { its address cannot have escaped the current routine }
-                 not(ti_addr_taken in ttemprefnode(n).tempinfo^.flags) then
+                 not(ti_addr_taken in ttemprefnode(n).tempflags) then
                 begin
                   { relocate the temp }
                   tcgtemprefnode(n).changelocation(rr^.new^);
@@ -722,7 +722,7 @@ implementation
 
         releaseright:=
           (left.nodetype<>temprefn) or
-          not(ti_const in ttemprefnode(left).tempinfo^.flags);
+          not(ti_const in ttemprefnode(left).tempflags);
 
         { shortstring assignments are handled separately }
         if is_shortstring(left.resultdef) then

+ 1 - 1
compiler/ncgutil.pas

@@ -1728,7 +1728,7 @@ implementation
             { tempinfo^.valid will be false and so we do not add            }
             { unnecessary registers. This way, we don't have to look at     }
             { tempcreate and tempdestroy nodes to get this info (JM)        }
-            if (ti_valid in ttemprefnode(n).tempinfo^.flags) then
+            if (ti_valid in ttemprefnode(n).tempflags) then
               add_regvars(rv^,ttemprefnode(n).tempinfo^.location);
           loadn:
             if (tloadnode(n).symtableentry.typ in [staticvarsym,localvarsym,paravarsym]) then

+ 1 - 1
compiler/nutils.pas

@@ -1355,7 +1355,7 @@ implementation
     function is_const(node : tnode) : boolean;
       begin
         result:=is_constnode(node) or
-          ((node.nodetype=temprefn) and (ti_const in ttemprefnode(node).tempinfo^.flags)) or
+          ((node.nodetype=temprefn) and (ti_const in ttemprefnode(node).tempflags)) or
           ((node.nodetype=loadn) and (tloadnode(node).symtableentry.typ=paravarsym) and (tparavarsym(tloadnode(node).symtableentry).varspez in [vs_const,vs_constref]));
       end;
 

+ 2 - 2
compiler/optcse.pas

@@ -407,8 +407,8 @@ unit optcse;
 
                           ttempcreatenode.create normally takes care of the register location but it does not
                           know about immutability so it cannot take care of managed types }
-                        include(ttempcreatenode(templist[i]).tempinfo^.flags,ti_const);
-                        include(ttempcreatenode(templist[i]).tempinfo^.flags,ti_may_be_in_reg);
+                        ttempcreatenode(templist[i]).includetempflag(ti_const);
+                        ttempcreatenode(templist[i]).includetempflag(ti_may_be_in_reg);
 
                         { make debugging easier and set temp. location to the original location }
                         tnode(templist[i]).fileinfo:=tnode(lists.nodelist[i]).fileinfo;

+ 1 - 1
compiler/symdef.pas

@@ -4921,7 +4921,7 @@ implementation
                       hs:='<set>';
                   end;
                   if hs<>'' then
-                   s:=s+'="'+hs+'"';
+                   s:=s+'='+hs;
                 end;
                if vo_is_hidden_para in hp.varoptions then
                  s:=s+'>';