Procházet zdrojové kódy

--- Merging r42998 into '.':
U compiler/blockutl.pas
U compiler/jvm/njvmutil.pas
U compiler/jvm/pjvm.pas
U compiler/ncal.pas
U compiler/ninl.pas
U compiler/pdecl.pas
U compiler/pdecsub.pas
U compiler/pdecvar.pas
U compiler/pexpr.pas
U compiler/pgenutil.pas
U compiler/pmodules.pas
U compiler/pparautl.pas
U compiler/pstatmnt.pas
U compiler/psub.pas
U compiler/psystem.pas
U compiler/ptype.pas
U compiler/symcreat.pas
U compiler/symdef.pas
U compiler/symsym.pas
U compiler/symutil.pas
--- Recording mergeinfo for merge of r42998 into '.':
U .
--- Merging r43116 into '.':
G compiler/symsym.pas
A tests/webtbf/tw36114.pp
--- Recording mergeinfo for merge of r43116 into '.':
G .

# revisions: 42998,43116

git-svn-id: branches/fixes_3_2@43442 -

marco před 5 roky
rodič
revize
d24f4b0926

+ 1 - 0
.gitattributes

@@ -14715,6 +14715,7 @@ tests/webtbf/tw3562.pp svneol=native#text/plain
 tests/webtbf/tw35671.pp svneol=native#text/plain
 tests/webtbf/tw35671.pp svneol=native#text/plain
 tests/webtbf/tw35753.pp svneol=native#text/plain
 tests/webtbf/tw35753.pp svneol=native#text/plain
 tests/webtbf/tw3583.pp svneol=native#text/plain
 tests/webtbf/tw3583.pp svneol=native#text/plain
+tests/webtbf/tw36114.pp svneol=native#text/pascal
 tests/webtbf/tw3626.pp svneol=native#text/plain
 tests/webtbf/tw3626.pp svneol=native#text/plain
 tests/webtbf/tw3631.pp svneol=native#text/plain
 tests/webtbf/tw3631.pp svneol=native#text/plain
 tests/webtbf/tw3643.pp svneol=native#text/plain
 tests/webtbf/tw3643.pp svneol=native#text/plain

+ 3 - 3
compiler/blockutl.pas

@@ -174,7 +174,7 @@ implementation
       { find the type of the descriptor structure }
       { find the type of the descriptor structure }
       descriptordef:=search_named_unit_globaltype('BLOCKRTL','FPC_BLOCK_DESCRIPTOR_SIMPLE',true).typedef;
       descriptordef:=search_named_unit_globaltype('BLOCKRTL','FPC_BLOCK_DESCRIPTOR_SIMPLE',true).typedef;
       { create new static variable }
       { create new static variable }
-      descriptor:=cstaticvarsym.create(name,vs_value,descriptordef,[],true);
+      descriptor:=cstaticvarsym.create(name,vs_value,descriptordef,[]);
       symtablestack.top.insert(descriptor);
       symtablestack.top.insert(descriptor);
       include(descriptor.symoptions,sp_internal);
       include(descriptor.symoptions,sp_internal);
       { create typed constant for the descriptor }
       { create typed constant for the descriptor }
@@ -227,7 +227,7 @@ implementation
         begin
         begin
           { alias for the type to invoke the procvar, used in the symcreat
           { alias for the type to invoke the procvar, used in the symcreat
             handling of tsk_block_invoke_procvar }
             handling of tsk_block_invoke_procvar }
-          result.localst.insert(ctypesym.create('__FPC_BLOCK_INVOKE_PV_TYPE',orgpv,true));
+          result.localst.insert(ctypesym.create('__FPC_BLOCK_INVOKE_PV_TYPE',orgpv));
           result.synthetickind:=tsk_block_invoke_procvar;
           result.synthetickind:=tsk_block_invoke_procvar;
         end;
         end;
     end;
     end;
@@ -253,7 +253,7 @@ implementation
       result:=cstaticvarsym.create(
       result:=cstaticvarsym.create(
         '$'+literalname,
         '$'+literalname,
         vs_value,
         vs_value,
-        blockliteraldef,[],true);
+        blockliteraldef,[]);
       include(result.symoptions,sp_internal);
       include(result.symoptions,sp_internal);
       symtablestack.top.insert(result);
       symtablestack.top.insert(result);
       { initialise it }
       { initialise it }

+ 1 - 1
compiler/jvm/njvmutil.pas

@@ -213,7 +213,7 @@ implementation
         begin
         begin
           vs:=cstaticvarsym.create(sym.realname+'$threadvar',sym.varspez,
           vs:=cstaticvarsym.create(sym.realname+'$threadvar',sym.varspez,
             jvmgetthreadvardef(sym.vardef),
             jvmgetthreadvardef(sym.vardef),
-            sym.varoptions - [vo_is_thread_var],true);
+            sym.varoptions - [vo_is_thread_var]);
           sym.owner.insert(vs);
           sym.owner.insert(vs);
           { make sure that the new sym does not get allocated (we will allocate
           { make sure that the new sym does not get allocated (we will allocate
             it when encountering the original sym, because only then we know
             it when encountering the original sym, because only then we know

+ 14 - 14
compiler/jvm/pjvm.pas

@@ -176,11 +176,11 @@ implementation
           name that can be used in generated Pascal code without risking an
           name that can be used in generated Pascal code without risking an
           identifier conflict (since it is local to this class; the global name
           identifier conflict (since it is local to this class; the global name
           is unique because it's an identifier that contains $-signs) }
           is unique because it's an identifier that contains $-signs) }
-        enumclass.symtable.insert(ctypesym.create('__FPC_TEnumClassAlias',enumclass,true));
+        enumclass.symtable.insert(ctypesym.create('__FPC_TEnumClassAlias',enumclass));
 
 
         { also create an alias for the enum type so that we can iterate over
         { also create an alias for the enum type so that we can iterate over
           all enum values when creating the body of the class constructor }
           all enum values when creating the body of the class constructor }
-        temptypesym:=ctypesym.create('__FPC_TEnumAlias',nil,true);
+        temptypesym:=ctypesym.create('__FPC_TEnumAlias',nil);
         { don't pass def to the ttypesym constructor, because then it
         { don't pass def to the ttypesym constructor, because then it
           will replace the current (real) typesym of that def with the alias }
           will replace the current (real) typesym of that def with the alias }
         temptypesym.typedef:=def;
         temptypesym.typedef:=def;
@@ -212,14 +212,14 @@ implementation
         { create static fields representing all enums }
         { create static fields representing all enums }
         for i:=0 to tenumdef(def).symtable.symlist.count-1 do
         for i:=0 to tenumdef(def).symtable.symlist.count-1 do
           begin
           begin
-            fsym:=cfieldvarsym.create(tenumsym(tenumdef(def).symtable.symlist[i]).realname,vs_final,enumclass,[],true);
+            fsym:=cfieldvarsym.create(tenumsym(tenumdef(def).symtable.symlist[i]).realname,vs_final,enumclass,[]);
             enumclass.symtable.insert(fsym);
             enumclass.symtable.insert(fsym);
             sym:=make_field_static(enumclass.symtable,fsym);
             sym:=make_field_static(enumclass.symtable,fsym);
             { add alias for the field representing ordinal(0), for use in
             { add alias for the field representing ordinal(0), for use in
               initialization code }
               initialization code }
             if tenumsym(tenumdef(def).symtable.symlist[i]).value=0 then
             if tenumsym(tenumdef(def).symtable.symlist[i]).value=0 then
               begin
               begin
-                aliassym:=cstaticvarsym.create('__FPC_Zero_Initializer',vs_final,enumclass,[vo_is_external],true);
+                aliassym:=cstaticvarsym.create('__FPC_Zero_Initializer',vs_final,enumclass,[vo_is_external]);
                 enumclass.symtable.insert(aliassym);
                 enumclass.symtable.insert(aliassym);
                 aliassym.set_raw_mangledname(sym.mangledname);
                 aliassym.set_raw_mangledname(sym.mangledname);
               end;
               end;
@@ -228,7 +228,7 @@ implementation
           (used internally by the JDK) }
           (used internally by the JDK) }
         arrdef:=carraydef.create(0,tenumdef(def).symtable.symlist.count-1,s32inttype);
         arrdef:=carraydef.create(0,tenumdef(def).symtable.symlist.count-1,s32inttype);
         arrdef.elementdef:=enumclass;
         arrdef.elementdef:=enumclass;
-        arrsym:=ctypesym.create('__FPC_TEnumValues',arrdef,true);
+        arrsym:=ctypesym.create('__FPC_TEnumValues',arrdef);
         enumclass.symtable.insert(arrsym);
         enumclass.symtable.insert(arrsym);
         { insert "public static values: array of enumclass" that returns $VALUES.clone()
         { insert "public static values: array of enumclass" that returns $VALUES.clone()
           (rather than a dynamic array and using clone --which we don't support yet for arrays--
           (rather than a dynamic array and using clone --which we don't support yet for arrays--
@@ -242,12 +242,12 @@ implementation
         if tenumdef(def).has_jumps then
         if tenumdef(def).has_jumps then
           begin
           begin
             { add field for the value }
             { add field for the value }
-            fsym:=cfieldvarsym.create('__fpc_fenumval',vs_final,s32inttype,[],true);
+            fsym:=cfieldvarsym.create('__fpc_fenumval',vs_final,s32inttype,[]);
             enumclass.symtable.insert(fsym);
             enumclass.symtable.insert(fsym);
             tobjectsymtable(enumclass.symtable).addfield(fsym,vis_strictprivate);
             tobjectsymtable(enumclass.symtable).addfield(fsym,vis_strictprivate);
             { add class field with hash table that maps from FPC-declared ordinal value -> enum instance }
             { add class field with hash table that maps from FPC-declared ordinal value -> enum instance }
             juhashmap:=search_system_type('JUHASHMAP').typedef;
             juhashmap:=search_system_type('JUHASHMAP').typedef;
-            fsym:=cfieldvarsym.create('__fpc_ord2enum',vs_final,juhashmap,[],true);
+            fsym:=cfieldvarsym.create('__fpc_ord2enum',vs_final,juhashmap,[]);
             enumclass.symtable.insert(fsym);
             enumclass.symtable.insert(fsym);
             make_field_static(enumclass.symtable,fsym);
             make_field_static(enumclass.symtable,fsym);
             { add custom constructor }
             { add custom constructor }
@@ -304,7 +304,7 @@ implementation
           "Values" instance method -- that's also the reason why we insert the
           "Values" instance method -- that's also the reason why we insert the
           field only now, because we cannot disable duplicate identifier
           field only now, because we cannot disable duplicate identifier
           checking when creating the "Values" method }
           checking when creating the "Values" method }
-        fsym:=cfieldvarsym.create('$VALUES',vs_final,arrdef,[],true);
+        fsym:=cfieldvarsym.create('$VALUES',vs_final,arrdef,[]);
         fsym.visibility:=vis_strictprivate;
         fsym.visibility:=vis_strictprivate;
         enumclass.symtable.insert(fsym,false);
         enumclass.symtable.insert(fsym,false);
         sym:=make_field_static(enumclass.symtable,fsym);
         sym:=make_field_static(enumclass.symtable,fsym);
@@ -360,7 +360,7 @@ implementation
         if df_generic in def.defoptions then
         if df_generic in def.defoptions then
           include(pvclass.defoptions,df_generic);
           include(pvclass.defoptions,df_generic);
         { associate typesym }
         { associate typesym }
-        pvclass.symtable.insert(ctypesym.create('__FPC_TProcVarClassAlias',pvclass,true));
+        pvclass.symtable.insert(ctypesym.create('__FPC_TProcVarClassAlias',pvclass));
         { set external name to match procvar type name }
         { set external name to match procvar type name }
         if not islocal then
         if not islocal then
           pvclass.objextname:=stringdup(name)
           pvclass.objextname:=stringdup(name)
@@ -383,7 +383,7 @@ implementation
 
 
         { add local alias for the procvartype that we can use when implementing
         { add local alias for the procvartype that we can use when implementing
           the invoke method }
           the invoke method }
-        temptypesym:=ctypesym.create('__FPC_ProcVarAlias',nil,true);
+        temptypesym:=ctypesym.create('__FPC_ProcVarAlias',nil);
         { don't pass def to the ttypesym constructor, because then it
         { don't pass def to the ttypesym constructor, because then it
           will replace the current (real) typesym of that def with the alias }
           will replace the current (real) typesym of that def with the alias }
         temptypesym.typedef:=def;
         temptypesym.typedef:=def;
@@ -404,7 +404,7 @@ implementation
             if df_generic in def.defoptions then
             if df_generic in def.defoptions then
               include(pvintf.defoptions,df_generic);
               include(pvintf.defoptions,df_generic);
             { associate typesym }
             { associate typesym }
-            pvclass.symtable.insert(ctypesym.create('Callback',pvintf,true));
+            pvclass.symtable.insert(ctypesym.create('Callback',pvintf));
 
 
             { add a method prototype matching the procvar (like the invoke
             { add a method prototype matching the procvar (like the invoke
               in the procvarclass itself) }
               in the procvarclass itself) }
@@ -515,7 +515,7 @@ implementation
         jvm_create_procvar_class_intern('__fpc_virtualclassmethod_pv_t'+wrapperpd.unique_id_str,wrapperpv,true);
         jvm_create_procvar_class_intern('__fpc_virtualclassmethod_pv_t'+wrapperpd.unique_id_str,wrapperpv,true);
         { create alias for the procvar type so we can use it in generated
         { create alias for the procvar type so we can use it in generated
           Pascal code }
           Pascal code }
-        typ:=ctypesym.create('__fpc_virtualclassmethod_pv_t'+wrapperpd.unique_id_str,wrapperpv,true);
+        typ:=ctypesym.create('__fpc_virtualclassmethod_pv_t'+wrapperpd.unique_id_str,wrapperpv);
         wrapperpv.classdef.typesym.visibility:=vis_strictprivate;
         wrapperpv.classdef.typesym.visibility:=vis_strictprivate;
         symtablestack.top.insert(typ);
         symtablestack.top.insert(typ);
         symtablestack.pop(pd.owner);
         symtablestack.pop(pd.owner);
@@ -609,7 +609,7 @@ implementation
             begin
             begin
               { make sure we don't emit a definition for this field (we'll do
               { make sure we don't emit a definition for this field (we'll do
                 that for the constsym already) -> mark as external }
                 that for the constsym already) -> mark as external }
-              ssym:=cstaticvarsym.create(internal_static_field_name(csym.realname),vs_final,csym.constdef,[vo_is_external],true);
+              ssym:=cstaticvarsym.create(internal_static_field_name(csym.realname),vs_final,csym.constdef,[vo_is_external]);
               csym.owner.insert(ssym);
               csym.owner.insert(ssym);
               { alias storage to the constsym }
               { alias storage to the constsym }
               ssym.set_mangledname(csym.realname);
               ssym.set_mangledname(csym.realname);
@@ -647,7 +647,7 @@ implementation
                 has been compiler -> insert a copy in the unit's staticsymtable
                 has been compiler -> insert a copy in the unit's staticsymtable
               }
               }
               symtablestack.push(current_module.localsymtable);
               symtablestack.push(current_module.localsymtable);
-              ssym:=cstaticvarsym.create(internal_static_field_name(csym.realname),vs_final,tsetdef(csym.constdef).getcopy,[vo_is_external,vo_has_local_copy],true);
+              ssym:=cstaticvarsym.create(internal_static_field_name(csym.realname),vs_final,tsetdef(csym.constdef).getcopy,[vo_is_external,vo_has_local_copy]);
               symtablestack.top.insert(ssym);
               symtablestack.top.insert(ssym);
               symtablestack.pop(current_module.localsymtable);
               symtablestack.pop(current_module.localsymtable);
               { alias storage to the constsym }
               { alias storage to the constsym }

+ 1 - 2
compiler/ncal.pas

@@ -582,8 +582,7 @@ implementation
           -> must have unique name in entire progream }
           -> must have unique name in entire progream }
         calldescsym:=cstaticvarsym.create(
         calldescsym:=cstaticvarsym.create(
           internaltypeprefixName[itp_vardisp_calldesc]+current_module.modulename^+'$'+tostr(current_module.localsymtable.SymList.count),
           internaltypeprefixName[itp_vardisp_calldesc]+current_module.modulename^+'$'+tostr(current_module.localsymtable.SymList.count),
-          vs_const,tcb.end_anonymous_record,[vo_is_public,vo_is_typed_const],
-          false);
+          vs_const,tcb.end_anonymous_record,[vo_is_public,vo_is_typed_const]);
         calldescsym.varstate:=vs_initialised;
         calldescsym.varstate:=vs_initialised;
         current_module.localsymtable.insert(calldescsym);
         current_module.localsymtable.insert(calldescsym);
         current_asmdata.AsmLists[al_typedconsts].concatList(
         current_asmdata.AsmLists[al_typedconsts].concatList(

+ 1 - 1
compiler/ninl.pas

@@ -443,7 +443,7 @@ implementation
           if not assigned(srsym) then
           if not assigned(srsym) then
             begin
             begin
               { no valid default variable found, so create it }
               { no valid default variable found, so create it }
-              srsym:=clocalvarsym.create(defaultname,vs_const,def,[],true);
+              srsym:=clocalvarsym.create(defaultname,vs_const,def,[]);
               srsymtable.insert(srsym);
               srsymtable.insert(srsym);
               { mark the staticvarsym as typedconst }
               { mark the staticvarsym as typedconst }
               include(tabstractvarsym(srsym).varoptions,vo_is_typed_const);
               include(tabstractvarsym(srsym).varoptions,vo_is_typed_const);

+ 6 - 6
compiler/pdecl.pas

@@ -277,13 +277,13 @@ implementation
                        { note: we keep hdef so that we might at least read the
                        { note: we keep hdef so that we might at least read the
                                constant data correctly for error recovery }
                                constant data correctly for error recovery }
                        check_allowed_for_var_or_const(hdef,false);
                        check_allowed_for_var_or_const(hdef,false);
-                       sym:=cfieldvarsym.create(orgname,varspez,hdef,[],true);
+                       sym:=cfieldvarsym.create(orgname,varspez,hdef,[]);
                        symtablestack.top.insert(sym);
                        symtablestack.top.insert(sym);
                        sym:=make_field_static(symtablestack.top,tfieldvarsym(sym));
                        sym:=make_field_static(symtablestack.top,tfieldvarsym(sym));
                      end
                      end
                    else
                    else
                      begin
                      begin
-                       sym:=cstaticvarsym.create(orgname,varspez,hdef,[],true);
+                       sym:=cstaticvarsym.create(orgname,varspez,hdef,[]);
                        sym.visibility:=symtablestack.top.currentvisibility;
                        sym.visibility:=symtablestack.top.currentvisibility;
                        symtablestack.top.insert(sym);
                        symtablestack.top.insert(sym);
                      end;
                      end;
@@ -366,12 +366,12 @@ implementation
                   begin
                   begin
                     if symtablestack.top.symtabletype=localsymtable then
                     if symtablestack.top.symtabletype=localsymtable then
                       begin
                       begin
-                        labelsym.jumpbuf:=clocalvarsym.create('LABEL$_'+labelsym.name,vs_value,rec_jmp_buf,[],true);
+                        labelsym.jumpbuf:=clocalvarsym.create('LABEL$_'+labelsym.name,vs_value,rec_jmp_buf,[]);
                         symtablestack.top.insert(labelsym.jumpbuf);
                         symtablestack.top.insert(labelsym.jumpbuf);
                       end
                       end
                     else
                     else
                       begin
                       begin
-                        labelsym.jumpbuf:=cstaticvarsym.create('LABEL$_'+labelsym.name,vs_value,rec_jmp_buf,[],true);
+                        labelsym.jumpbuf:=cstaticvarsym.create('LABEL$_'+labelsym.name,vs_value,rec_jmp_buf,[]);
                         symtablestack.top.insert(labelsym.jumpbuf);
                         symtablestack.top.insert(labelsym.jumpbuf);
                         cnodeutils.insertbssdata(tstaticvarsym(labelsym.jumpbuf));
                         cnodeutils.insertbssdata(tstaticvarsym(labelsym.jumpbuf));
                       end;
                       end;
@@ -669,7 +669,7 @@ implementation
                   sym:=tsym(symtablestack.top.Find(typename));
                   sym:=tsym(symtablestack.top.Find(typename));
                   if not assigned(sym) then
                   if not assigned(sym) then
                     begin
                     begin
-                      sym:=ctypesym.create(orgtypename,cundefineddef.create(true),true);
+                      sym:=ctypesym.create(orgtypename,cundefineddef.create(true));
                       Include(sym.symoptions,sp_generic_dummy);
                       Include(sym.symoptions,sp_generic_dummy);
                       ttypesym(sym).typedef.typesym:=sym;
                       ttypesym(sym).typedef.typesym:=sym;
                       sym.visibility:=symtablestack.top.currentvisibility;
                       sym.visibility:=symtablestack.top.currentvisibility;
@@ -710,7 +710,7 @@ implementation
               { insert a new type if we don't reuse an existing symbol }
               { insert a new type if we don't reuse an existing symbol }
               if not assigned(newtype) then
               if not assigned(newtype) then
                 begin
                 begin
-                  newtype:=ctypesym.create(genorgtypename,hdef,true);
+                  newtype:=ctypesym.create(genorgtypename,hdef);
                   newtype.visibility:=symtablestack.top.currentvisibility;
                   newtype.visibility:=symtablestack.top.currentvisibility;
                   symtablestack.top.insert(newtype);
                   symtablestack.top.insert(newtype);
                 end;
                 end;

+ 2 - 2
compiler/pdecsub.pas

@@ -350,7 +350,7 @@ implementation
              { possible proc directives }
              { possible proc directives }
              if check_proc_directive(true) then
              if check_proc_directive(true) then
                begin
                begin
-                  dummytype:=ctypesym.create('unnamed',hdef,true);
+                  dummytype:=ctypesym.create('unnamed',hdef);
                   parse_var_proc_directives(tsym(dummytype));
                   parse_var_proc_directives(tsym(dummytype));
                   dummytype.typedef:=nil;
                   dummytype.typedef:=nil;
                   hdef.typesym:=nil;
                   hdef.typesym:=nil;
@@ -1144,7 +1144,7 @@ implementation
               end;
               end;
             if not assigned(dummysym) then
             if not assigned(dummysym) then
               begin
               begin
-                dummysym:=ctypesym.create(orgspnongen,cundefineddef.create(true),true);
+                dummysym:=ctypesym.create(orgspnongen,cundefineddef.create(true));
                 if assigned(astruct) then
                 if assigned(astruct) then
                   astruct.symtable.insert(dummysym)
                   astruct.symtable.insert(dummysym)
                 else
                 else

+ 6 - 6
compiler/pdecvar.pas

@@ -863,7 +863,7 @@ implementation
             (def.typesym=nil) and
             (def.typesym=nil) and
             check_proc_directive(true) then
             check_proc_directive(true) then
            begin
            begin
-              newtype:=ctypesym.create('unnamed',def,true);
+              newtype:=ctypesym.create('unnamed',def);
               parse_var_proc_directives(tsym(newtype));
               parse_var_proc_directives(tsym(newtype));
               newtype.typedef:=nil;
               newtype.typedef:=nil;
               def.typesym:=nil;
               def.typesym:=nil;
@@ -1101,7 +1101,7 @@ implementation
           case vs.typ of
           case vs.typ of
             localvarsym :
             localvarsym :
               begin
               begin
-                tcsym:=cstaticvarsym.create('$default'+vs.realname,vs_const,vs.vardef,[],true);
+                tcsym:=cstaticvarsym.create('$default'+vs.realname,vs_const,vs.vardef,[]);
                 include(tcsym.symoptions,sp_internal);
                 include(tcsym.symoptions,sp_internal);
                 symtablestack.top.insert(tcsym);
                 symtablestack.top.insert(tcsym);
                 templist:=tasmlist.create;
                 templist:=tasmlist.create;
@@ -1348,11 +1348,11 @@ implementation
                                 (idtoken=_GENERIC);
                                 (idtoken=_GENERIC);
                    case symtablestack.top.symtabletype of
                    case symtablestack.top.symtabletype of
                      localsymtable :
                      localsymtable :
-                       vs:=clocalvarsym.create(orgpattern,vs_value,generrordef,[],false);
+                       vs:=clocalvarsym.create(orgpattern,vs_value,generrordef,[]);
                      staticsymtable,
                      staticsymtable,
                      globalsymtable :
                      globalsymtable :
                        begin
                        begin
-                         vs:=cstaticvarsym.create(orgpattern,vs_value,generrordef,[],false);
+                         vs:=cstaticvarsym.create(orgpattern,vs_value,generrordef,[]);
                          if vd_threadvar in options then
                          if vd_threadvar in options then
                            include(vs.varoptions,vo_is_thread_var);
                            include(vs.varoptions,vo_is_thread_var);
                        end;
                        end;
@@ -1648,7 +1648,7 @@ implementation
                sorg:=orgpattern;
                sorg:=orgpattern;
                if token=_ID then
                if token=_ID then
                  begin
                  begin
-                   vs:=cfieldvarsym.create(sorg,vs_value,generrordef,[],false);
+                   vs:=cfieldvarsym.create(sorg,vs_value,generrordef,[]);
 
 
                    { normally the visibility is set via addfield, but sometimes
                    { normally the visibility is set via addfield, but sometimes
                      we collect symbols so we can add them in a batch of
                      we collect symbols so we can add them in a batch of
@@ -1868,7 +1868,7 @@ implementation
                 begin
                 begin
                   consume(_ID);
                   consume(_ID);
                   consume(_COLON);
                   consume(_COLON);
-                  fieldvs:=cfieldvarsym.create(sorg,vs_value,generrordef,[],true);
+                  fieldvs:=cfieldvarsym.create(sorg,vs_value,generrordef,[]);
                   variantdesc^^.variantselector:=fieldvs;
                   variantdesc^^.variantselector:=fieldvs;
                   symtablestack.top.insert(fieldvs);
                   symtablestack.top.insert(fieldvs);
                 end;
                 end;

+ 2 - 2
compiler/pexpr.pas

@@ -343,7 +343,7 @@ implementation
                                   exit_procinfo.nestedexitlabel.defined:=true;
                                   exit_procinfo.nestedexitlabel.defined:=true;
                                   exit_procinfo.nestedexitlabel.used:=true;
                                   exit_procinfo.nestedexitlabel.used:=true;
 
 
-                                  exit_procinfo.nestedexitlabel.jumpbuf:=clocalvarsym.create('LABEL$_'+exit_procinfo.nestedexitlabel.name,vs_value,rec_jmp_buf,[],true);
+                                  exit_procinfo.nestedexitlabel.jumpbuf:=clocalvarsym.create('LABEL$_'+exit_procinfo.nestedexitlabel.name,vs_value,rec_jmp_buf,[]);
                                   exit_procinfo.procdef.localst.insert(exit_procinfo.nestedexitlabel);
                                   exit_procinfo.procdef.localst.insert(exit_procinfo.nestedexitlabel);
                                   exit_procinfo.procdef.localst.insert(exit_procinfo.nestedexitlabel.jumpbuf);
                                   exit_procinfo.procdef.localst.insert(exit_procinfo.nestedexitlabel.jumpbuf);
                                 end;
                                 end;
@@ -3026,7 +3026,7 @@ implementation
                       findwithsymtable then
                       findwithsymtable then
                      begin
                      begin
                        { create dummy symbol, it will be freed later on }
                        { create dummy symbol, it will be freed later on }
-                       srsym:=tstoredsym.create(undefinedsym,'$undefinedsym',false);
+                       srsym:=tstoredsym.create(undefinedsym,'$undefinedsym');
                        srsymtable:=nil;
                        srsymtable:=nil;
                      end
                      end
                    else
                    else

+ 4 - 4
compiler/pgenutil.pas

@@ -970,7 +970,7 @@ uses
                   else
                   else
                     srsym:=cprocsym.create(finalspecializename)
                     srsym:=cprocsym.create(finalspecializename)
                 else
                 else
-                  srsym:=ctypesym.create(finalspecializename,generrordef,true);
+                  srsym:=ctypesym.create(finalspecializename,generrordef);
                 { insert the symbol only if we don't know already that we have
                 { insert the symbol only if we don't know already that we have
                   a procsym to add it to }
                   a procsym to add it to }
                 if not assigned(psym) then
                 if not assigned(psym) then
@@ -1216,7 +1216,7 @@ uses
         repeat
         repeat
           if token=_ID then
           if token=_ID then
             begin
             begin
-              generictype:=ctypesym.create(orgpattern,cundefinedtype,false);
+              generictype:=ctypesym.create(orgpattern,cundefinedtype);
               { type parameters need to be added as strict private }
               { type parameters need to be added as strict private }
               generictype.visibility:=vis_strictprivate;
               generictype.visibility:=vis_strictprivate;
               include(generictype.symoptions,sp_generic_para);
               include(generictype.symoptions,sp_generic_para);
@@ -1413,7 +1413,7 @@ uses
             generictype:=ttypesym(genericlist[i]);
             generictype:=ttypesym(genericlist[i]);
             if assigned(generictype.owner) then
             if assigned(generictype.owner) then
               begin
               begin
-                sym:=ctypesym.create(genericlist.nameofindex(i),generictype.typedef,true);
+                sym:=ctypesym.create(genericlist.nameofindex(i),generictype.typedef);
                 { type parameters need to be added as strict private }
                 { type parameters need to be added as strict private }
                 sym.visibility:=vis_strictprivate;
                 sym.visibility:=vis_strictprivate;
                 st.insert(sym);
                 st.insert(sym);
@@ -1460,7 +1460,7 @@ uses
           begin
           begin
             { we need to pass nil as def here, because the constructor wants
             { we need to pass nil as def here, because the constructor wants
               to set the typesym of the def which is not what we want }
               to set the typesym of the def which is not what we want }
-            gensym:=ctypesym.create(copy(name,1,pos('$',name)-1),nil,true);
+            gensym:=ctypesym.create(copy(name,1,pos('$',name)-1),nil);
             gensym.typedef:=current_structdef;
             gensym.typedef:=current_structdef;
             include(gensym.symoptions,sp_internal);
             include(gensym.symoptions,sp_internal);
             { the symbol should be only visible to the generic class
             { the symbol should be only visible to the generic class

+ 8 - 8
compiler/pmodules.pas

@@ -188,7 +188,7 @@ implementation
            assigned(hp.globalmacrosymtable) then
            assigned(hp.globalmacrosymtable) then
           macrosymtablestack.push(hp.globalmacrosymtable);
           macrosymtablestack.push(hp.globalmacrosymtable);
         { insert unitsym }
         { insert unitsym }
-        unitsym:=cunitsym.create(hp.modulename^,hp,true);
+        unitsym:=cunitsym.create(hp.modulename^,hp);
         inc(unitsym.refs);
         inc(unitsym.refs);
         tabstractunitsymtable(current_module.localsymtable).insertunit(unitsym);
         tabstractunitsymtable(current_module.localsymtable).insertunit(unitsym);
         if addasused then
         if addasused then
@@ -487,7 +487,7 @@ implementation
                 can not use the modulename because that can be different
                 can not use the modulename because that can be different
                 when -Un is used }
                 when -Un is used }
               current_tokenpos:=filepos;
               current_tokenpos:=filepos;
-              unitsym:=cunitsym.create(sorg,nil,false);
+              unitsym:=cunitsym.create(sorg,nil);
               { the current module uses the unit hp2 }
               { the current module uses the unit hp2 }
               current_module.addusedunit(hp2,true,unitsym);
               current_module.addusedunit(hp2,true,unitsym);
             end
             end
@@ -546,7 +546,7 @@ implementation
                      end;
                      end;
                    { update unitsym now that we have access to the full name }
                    { update unitsym now that we have access to the full name }
                    pu.unitsym.free;
                    pu.unitsym.free;
-                   pu.unitsym:=cunitsym.create(sorg,pu.u,true);
+                   pu.unitsym:=cunitsym.create(sorg,pu.u);
                  end
                  end
                else
                else
                  begin
                  begin
@@ -712,7 +712,7 @@ implementation
            begin
            begin
              { insert symbol for got access in assembler code}
              { insert symbol for got access in assembler code}
              gotvarsym:=cstaticvarsym.create('_GLOBAL_OFFSET_TABLE_',
              gotvarsym:=cstaticvarsym.create('_GLOBAL_OFFSET_TABLE_',
-                          vs_value,voidpointertype,[vo_is_external],true);
+                          vs_value,voidpointertype,[vo_is_external]);
              gotvarsym.set_mangledname('_GLOBAL_OFFSET_TABLE_');
              gotvarsym.set_mangledname('_GLOBAL_OFFSET_TABLE_');
              current_module.localsymtable.insert(gotvarsym);
              current_module.localsymtable.insert(gotvarsym);
              { avoid unnecessary warnings }
              { avoid unnecessary warnings }
@@ -823,7 +823,7 @@ implementation
           include(def.objectoptions,oo_is_external);
           include(def.objectoptions,oo_is_external);
           include(def.objectoptions,oo_is_sealed);
           include(def.objectoptions,oo_is_sealed);
           def.objextname:=stringdup(current_module.realmodulename^);
           def.objextname:=stringdup(current_module.realmodulename^);
-          typesym:=ctypesym.create('__FPC_JVM_Module_Class_Alias$',def,true);
+          typesym:=ctypesym.create('__FPC_JVM_Module_Class_Alias$',def);
           symtablestack.top.insert(typesym);
           symtablestack.top.insert(typesym);
         end;
         end;
 {$endif jvm}
 {$endif jvm}
@@ -925,7 +925,7 @@ type
 
 
          { insert unitsym of this unit to prevent other units having
          { insert unitsym of this unit to prevent other units having
            the same name }
            the same name }
-         tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module,true));
+         tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module));
 
 
          { load default system unit, it must be loaded before interface is parsed
          { load default system unit, it must be loaded before interface is parsed
            else we cannot use e.g. feature switches before the next real token }
            else we cannot use e.g. feature switches before the next real token }
@@ -1674,7 +1674,7 @@ type
 
 
          {Insert the name of the main program into the symbol table.}
          {Insert the name of the main program into the symbol table.}
          if current_module.realmodulename^<>'' then
          if current_module.realmodulename^<>'' then
-           tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module,true));
+           tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module));
 
 
          Message1(parser_u_parsing_implementation,current_module.mainsource);
          Message1(parser_u_parsing_implementation,current_module.mainsource);
 
 
@@ -2103,7 +2103,7 @@ type
 
 
          {Insert the name of the main program into the symbol table.}
          {Insert the name of the main program into the symbol table.}
          if current_module.realmodulename^<>'' then
          if current_module.realmodulename^<>'' then
-           tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module,true));
+           tabstractunitsymtable(current_module.localsymtable).insertunit(cunitsym.create(current_module.realmodulename^,current_module));
 
 
          Message1(parser_u_parsing_implementation,current_module.mainsource);
          Message1(parser_u_parsing_implementation,current_module.mainsource);
 
 

+ 2 - 2
compiler/pparautl.pas

@@ -315,7 +315,7 @@ implementation
            if (df_generic in pd.defoptions) or
            if (df_generic in pd.defoptions) or
                not paramanager.ret_in_param(pd.returndef,pd) then
                not paramanager.ret_in_param(pd.returndef,pd) then
             begin
             begin
-              vs:=clocalvarsym.create('$result',vs_value,pd.returndef,[vo_is_funcret],true);
+              vs:=clocalvarsym.create('$result',vs_value,pd.returndef,[vo_is_funcret]);
               pd.localst.insert(vs);
               pd.localst.insert(vs);
               pd.funcretsym:=vs;
               pd.funcretsym:=vs;
             end;
             end;
@@ -1091,7 +1091,7 @@ implementation
         pnestedvarsdef:=cpointerdef.getreusable(nestedvarsdef);
         pnestedvarsdef:=cpointerdef.getreusable(nestedvarsdef);
         if not(po_assembler in pd.procoptions) then
         if not(po_assembler in pd.procoptions) then
           begin
           begin
-            nestedvars:=clocalvarsym.create('$nestedvars',vs_var,nestedvarsdef,[],true);
+            nestedvars:=clocalvarsym.create('$nestedvars',vs_var,nestedvarsdef,[]);
             include(nestedvars.symoptions,sp_internal);
             include(nestedvars.symoptions,sp_internal);
             pd.localst.insert(nestedvars);
             pd.localst.insert(nestedvars);
             pd.parentfpstruct:=nestedvars;
             pd.parentfpstruct:=nestedvars;

+ 2 - 2
compiler/pstatmnt.pas

@@ -938,7 +938,7 @@ implementation
                             begin
                             begin
                               single_type(ot,[]);
                               single_type(ot,[]);
                               check_type_valid(ot);
                               check_type_valid(ot);
-                              sym:=clocalvarsym.create(objrealname,vs_value,ot,[],true);
+                              sym:=clocalvarsym.create(objrealname,vs_value,ot,[]);
                             end
                             end
                           else
                           else
                             begin
                             begin
@@ -971,7 +971,7 @@ implementation
                                  { create dummy symbol so we don't need a special
                                  { create dummy symbol so we don't need a special
                                  case in ncgflw, and so that we always know the
                                  case in ncgflw, and so that we always know the
                                  type }
                                  type }
-                               sym:=clocalvarsym.create('$exceptsym',vs_value,ot,[],true);
+                               sym:=clocalvarsym.create('$exceptsym',vs_value,ot,[]);
                             end;
                             end;
                           excepTSymtable:=tstt_excepTSymtable.create;
                           excepTSymtable:=tstt_excepTSymtable.create;
                           excepTSymtable.insert(sym);
                           excepTSymtable.insert(sym);

+ 1 - 1
compiler/psub.pas

@@ -739,7 +739,7 @@ implementation
             constructionsuccessful:=nil;
             constructionsuccessful:=nil;
             if is_class(procdef.struct) then
             if is_class(procdef.struct) then
               begin
               begin
-                constructionsuccessful:=clocalvarsym.create(internaltypeprefixName[itp_vmt_afterconstruction_local],vs_value,ptrsinttype,[],false);
+                constructionsuccessful:=clocalvarsym.create(internaltypeprefixName[itp_vmt_afterconstruction_local],vs_value,ptrsinttype,[]);
                 procdef.localst.insert(constructionsuccessful,false);
                 procdef.localst.insert(constructionsuccessful,false);
                 srsym:=search_struct_member(procdef.struct,'AFTERCONSTRUCTION');
                 srsym:=search_struct_member(procdef.struct,'AFTERCONSTRUCTION');
                 if not assigned(srsym) or
                 if not assigned(srsym) or

+ 11 - 11
compiler/psystem.pas

@@ -222,7 +222,7 @@ implementation
 
 
         function addtype(const s:string;def:tdef):ttypesym;
         function addtype(const s:string;def:tdef):ttypesym;
         begin
         begin
-          result:=ctypesym.create(s,def,true);
+          result:=ctypesym.create(s,def);
           systemunit.insert(result);
           systemunit.insert(result);
         end;
         end;
 
 
@@ -563,19 +563,19 @@ implementation
             { can't use addtype for pvmt because the rtti of the pointed
             { can't use addtype for pvmt because the rtti of the pointed
               type is not available. The rtti for pvmt will be written implicitly
               type is not available. The rtti for pvmt will be written implicitly
               by thev tblarray below }
               by thev tblarray below }
-            systemunit.insert(ctypesym.create('$pvmt',pvmttype,true));
-            addfield(hrecst,cfieldvarsym.create('$length',vs_value,sizesinttype,[],true));
-            addfield(hrecst,cfieldvarsym.create('$mlength',vs_value,sizesinttype,[],true));
-            addfield(hrecst,cfieldvarsym.create('$parent',vs_value,pvmttype,[],true));
+            systemunit.insert(ctypesym.create('$pvmt',pvmttype));
+            addfield(hrecst,cfieldvarsym.create('$length',vs_value,sizesinttype,[]));
+            addfield(hrecst,cfieldvarsym.create('$mlength',vs_value,sizesinttype,[]));
+            addfield(hrecst,cfieldvarsym.create('$parent',vs_value,pvmttype,[]));
             { it seems vmttype is used both for TP objects and Delphi classes,
             { it seems vmttype is used both for TP objects and Delphi classes,
               so the next entry could either be the first virtual method (vm1)
               so the next entry could either be the first virtual method (vm1)
               (object) or the class name (class). We can't easily create separate
               (object) or the class name (class). We can't easily create separate
               vtable formats for both, as gdb is hard coded to search for
               vtable formats for both, as gdb is hard coded to search for
               __vtbl_ptr_type in all cases (JM) }
               __vtbl_ptr_type in all cases (JM) }
-            addfield(hrecst,cfieldvarsym.create('$vm1_or_classname',vs_value,cpointerdef.create(cshortstringtype),[],true));
+            addfield(hrecst,cfieldvarsym.create('$vm1_or_classname',vs_value,cpointerdef.create(cshortstringtype),[]));
             vmtarraytype:=carraydef.create(0,0,s32inttype);
             vmtarraytype:=carraydef.create(0,0,s32inttype);
             tarraydef(vmtarraytype).elementdef:=voidpointertype;
             tarraydef(vmtarraytype).elementdef:=voidpointertype;
-            addfield(hrecst,cfieldvarsym.create('$__pfn',vs_value,vmtarraytype,[],true));
+            addfield(hrecst,cfieldvarsym.create('$__pfn',vs_value,vmtarraytype,[]));
             addtype('$__vtbl_ptr_type',vmttype);
             addtype('$__vtbl_ptr_type',vmttype);
             vmtarraytype:=carraydef.create(0,1,s32inttype);
             vmtarraytype:=carraydef.create(0,1,s32inttype);
             tarraydef(vmtarraytype).elementdef:=pvmttype;
             tarraydef(vmtarraytype).elementdef:=pvmttype;
@@ -583,14 +583,14 @@ implementation
           end;
           end;
         { Add a type for methodpointers }
         { Add a type for methodpointers }
         hrecst:=trecordsymtable.create('',1,current_settings.alignment.recordalignmin,current_settings.alignment.maxCrecordalign);
         hrecst:=trecordsymtable.create('',1,current_settings.alignment.recordalignmin,current_settings.alignment.maxCrecordalign);
-        addfield(hrecst,cfieldvarsym.create('$proc',vs_value,voidcodepointertype,[],true));
-        addfield(hrecst,cfieldvarsym.create('$self',vs_value,voidpointertype,[],true));
+        addfield(hrecst,cfieldvarsym.create('$proc',vs_value,voidcodepointertype,[]));
+        addfield(hrecst,cfieldvarsym.create('$self',vs_value,voidpointertype,[]));
         methodpointertype:=crecorddef.create('',hrecst);
         methodpointertype:=crecorddef.create('',hrecst);
         addtype('$methodpointer',methodpointertype);
         addtype('$methodpointer',methodpointertype);
         { Add a type for nested proc pointers }
         { Add a type for nested proc pointers }
         hrecst:=trecordsymtable.create('',1,current_settings.alignment.recordalignmin,current_settings.alignment.maxCrecordalign);
         hrecst:=trecordsymtable.create('',1,current_settings.alignment.recordalignmin,current_settings.alignment.maxCrecordalign);
-        addfield(hrecst,cfieldvarsym.create('$proc',vs_value,voidcodepointertype,[],true));
-        addfield(hrecst,cfieldvarsym.create('$parentfp',vs_value,parentfpvoidpointertype,[],true));
+        addfield(hrecst,cfieldvarsym.create('$proc',vs_value,voidcodepointertype,[]));
+        addfield(hrecst,cfieldvarsym.create('$parentfp',vs_value,parentfpvoidpointertype,[]));
         nestedprocpointertype:=crecorddef.create('',hrecst);
         nestedprocpointertype:=crecorddef.create('',hrecst);
         addtype('$nestedprocpointer',nestedprocpointertype);
         addtype('$nestedprocpointer',nestedprocpointertype);
         symtablestack.pop(systemunit);
         symtablestack.pop(systemunit);

+ 1 - 1
compiler/ptype.pas

@@ -1589,7 +1589,7 @@ implementation
               begin
               begin
                 if check_proc_directive(true) then
                 if check_proc_directive(true) then
                   begin
                   begin
-                    newtype:=ctypesym.create('unnamed',result,true);
+                    newtype:=ctypesym.create('unnamed',result);
                     parse_var_proc_directives(tsym(newtype));
                     parse_var_proc_directives(tsym(newtype));
                     newtype.typedef:=nil;
                     newtype.typedef:=nil;
                     result.typesym:=nil;
                     result.typesym:=nil;

+ 1 - 1
compiler/symcreat.pas

@@ -1260,7 +1260,7 @@ implementation
             fieldvardef:=cpointerdef.getreusable(vardef)
             fieldvardef:=cpointerdef.getreusable(vardef)
           else
           else
             fieldvardef:=vardef;
             fieldvardef:=vardef;
-          result:=cfieldvarsym.create(symrealname,vs_value,fieldvardef,[],true);
+          result:=cfieldvarsym.create(symrealname,vs_value,fieldvardef,[]);
           if nestedvarsst.symlist.count=0 then
           if nestedvarsst.symlist.count=0 then
             include(tfieldvarsym(result).varoptions,vo_is_first_field);
             include(tfieldvarsym(result).varoptions,vo_is_first_field);
           nestedvarsst.insert(result);
           nestedvarsst.insert(result);

+ 3 - 3
compiler/symdef.pas

@@ -4510,7 +4510,7 @@ implementation
         ts:=nil;
         ts:=nil;
         if definedname then
         if definedname then
           begin
           begin
-            ts:=ctypesym.create(n,self,true);
+            ts:=ctypesym.create(n,self);
             { avoid hints about unused types (these may only be used for
             { avoid hints about unused types (these may only be used for
               typed constant data) }
               typed constant data) }
             ts.increfcount;
             ts.increfcount;
@@ -4547,7 +4547,7 @@ implementation
           end
           end
         else
         else
           pname:=@optionalname;
           pname:=@optionalname;
-        sym:=cfieldvarsym.create(pname^,vs_value,def,[],true);
+        sym:=cfieldvarsym.create(pname^,vs_value,def,[]);
         symtable.insert(sym);
         symtable.insert(sym);
         trecordsymtable(symtable).addfield(sym,vis_hidden);
         trecordsymtable(symtable).addfield(sym,vis_hidden);
         result:=sym;
         result:=sym;
@@ -7239,7 +7239,7 @@ implementation
                  tObjectSymtable(symtable).datasize:=align(tObjectSymtable(symtable).datasize,sizeof(pint));
                  tObjectSymtable(symtable).datasize:=align(tObjectSymtable(symtable).datasize,sizeof(pint));
                  tObjectSymtable(symtable).alignrecord(tObjectSymtable(symtable).datasize,sizeof(pint));
                  tObjectSymtable(symtable).alignrecord(tObjectSymtable(symtable).datasize,sizeof(pint));
                end;
                end;
-             vmt_field:=cfieldvarsym.create('_vptr$'+objname^,vs_value,voidpointertype,[],true);
+             vmt_field:=cfieldvarsym.create('_vptr$'+objname^,vs_value,voidpointertype,[]);
              hidesym(vmt_field);
              hidesym(vmt_field);
              tObjectSymtable(symtable).insert(vmt_field);
              tObjectSymtable(symtable).insert(vmt_field);
              tObjectSymtable(symtable).addfield(tfieldvarsym(vmt_field),vis_hidden);
              tObjectSymtable(symtable).addfield(tfieldvarsym(vmt_field),vis_hidden);

+ 43 - 43
compiler/symsym.pas

@@ -46,7 +46,7 @@ interface
           procedure ppuwrite_platform(ppufile: tcompilerppufile);virtual;
           procedure ppuwrite_platform(ppufile: tcompilerppufile);virtual;
           procedure ppuload_platform(ppufile: tcompilerppufile);virtual;
           procedure ppuload_platform(ppufile: tcompilerppufile);virtual;
        public
        public
-          constructor create(st:tsymtyp;const n : string;doregister:boolean);
+          constructor create(st:tsymtyp;const n : string);
           constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
           constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
           destructor destroy;override;
           destructor destroy;override;
           procedure ppuwrite(ppufile:tcompilerppufile);virtual;
           procedure ppuwrite(ppufile:tcompilerppufile);virtual;
@@ -80,7 +80,7 @@ interface
 
 
        tunitsym = class(Tstoredsym)
        tunitsym = class(Tstoredsym)
           module : tobject; { tmodule }
           module : tobject; { tmodule }
-          constructor create(const n : string;amodule : tobject;doregister:boolean);virtual;
+          constructor create(const n : string;amodule : tobject);virtual;
           constructor ppuload(ppufile:tcompilerppufile);
           constructor ppuload(ppufile:tcompilerppufile);
           destructor destroy;override;
           destructor destroy;override;
           { do not override this routine in platform-specific subclasses,
           { do not override this routine in platform-specific subclasses,
@@ -155,7 +155,7 @@ interface
           typedef      : tdef;
           typedef      : tdef;
           typedefderef : tderef;
           typedefderef : tderef;
           fprettyname : ansistring;
           fprettyname : ansistring;
-          constructor create(const n : string;def:tdef;doregister:boolean);virtual;
+          constructor create(const n : string;def:tdef);virtual;
           destructor destroy;override;
           destructor destroy;override;
           constructor ppuload(ppufile:tcompilerppufile);
           constructor ppuload(ppufile:tcompilerppufile);
           { do not override this routine in platform-specific subclasses,
           { do not override this routine in platform-specific subclasses,
@@ -179,7 +179,7 @@ interface
           addr_taken     : boolean;
           addr_taken     : boolean;
           { true if the variable is accessed in a different scope }
           { true if the variable is accessed in a different scope }
           different_scope  : boolean;
           different_scope  : boolean;
-          constructor create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
+          constructor create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
           constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
           constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure buildderef;override;
           procedure buildderef;override;
@@ -217,7 +217,7 @@ interface
 {$else symansistr}
 {$else symansistr}
           cachedmangledname: pshortstring; { mangled name for ObjC or Java }
           cachedmangledname: pshortstring; { mangled name for ObjC or Java }
 {$endif symansistr}
 {$endif symansistr}
-          constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);virtual;
+          constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
           constructor ppuload(ppufile:tcompilerppufile);
           constructor ppuload(ppufile:tcompilerppufile);
           { do not override this routine in platform-specific subclasses,
           { do not override this routine in platform-specific subclasses,
             override ppuwrite_platform instead }
             override ppuwrite_platform instead }
@@ -240,7 +240,7 @@ interface
           { the variable is not living at entry of the scope, so it does not need to be initialized if it is a reg. var
           { the variable is not living at entry of the scope, so it does not need to be initialized if it is a reg. var
             (not written to ppu, because not important and would change interface crc) }
             (not written to ppu, because not important and would change interface crc) }
           noregvarinitneeded : boolean;
           noregvarinitneeded : boolean;
-          constructor create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
+          constructor create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
           constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
           constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
           function globalasmsym: boolean;
           function globalasmsym: boolean;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
           procedure ppuwrite(ppufile:tcompilerppufile);override;
@@ -249,7 +249,7 @@ interface
       end;
       end;
 
 
       tlocalvarsym = class(tabstractnormalvarsym)
       tlocalvarsym = class(tabstractnormalvarsym)
-          constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);virtual;
+          constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
           constructor ppuload(ppufile:tcompilerppufile);
           constructor ppuload(ppufile:tcompilerppufile);
           { do not override this routine in platform-specific subclasses,
           { do not override this routine in platform-specific subclasses,
             override ppuwrite_platform instead }
             override ppuwrite_platform instead }
@@ -296,7 +296,7 @@ interface
             to the symbol of the corresponding class field }
             to the symbol of the corresponding class field }
           fieldvarsym : tfieldvarsym;
           fieldvarsym : tfieldvarsym;
           fieldvarsymderef : tderef;
           fieldvarsymderef : tderef;
-          constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);virtual;
+          constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
           constructor create_dll(const n : string;vsp:tvarspez;def:tdef);virtual;
           constructor create_dll(const n : string;vsp:tvarspez;def:tdef);virtual;
           constructor create_C(const n: string; const mangled : TSymStr;vsp:tvarspez;def:tdef);virtual;
           constructor create_C(const n: string; const mangled : TSymStr;vsp:tvarspez;def:tdef);virtual;
           constructor create_from_fieldvar(const n:string;fieldvar:tfieldvarsym);virtual;
           constructor create_from_fieldvar(const n:string;fieldvar:tfieldvarsym);virtual;
@@ -548,7 +548,7 @@ implementation
                           TSYM (base for all symtypes)
                           TSYM (base for all symtypes)
 ****************************************************************************}
 ****************************************************************************}
 
 
-    constructor tstoredsym.create(st:tsymtyp;const n : string;doregister:boolean);
+    constructor tstoredsym.create(st:tsymtyp;const n : string);
       begin
       begin
          inherited create(st,n);
          inherited create(st,n);
       end;
       end;
@@ -645,7 +645,7 @@ implementation
 
 
     constructor tlabelsym.create(const n : string);
     constructor tlabelsym.create(const n : string);
       begin
       begin
-         inherited create(labelsym,n,true);
+         inherited create(labelsym,n);
          used:=false;
          used:=false;
          defined:=false;
          defined:=false;
          nonlocal:=false;
          nonlocal:=false;
@@ -692,9 +692,9 @@ implementation
                                   TUNITSYM
                                   TUNITSYM
 ****************************************************************************}
 ****************************************************************************}
 
 
-    constructor tunitsym.create(const n : string;amodule : tobject;doregister:boolean);
+    constructor tunitsym.create(const n : string;amodule : tobject);
       begin
       begin
-         inherited create(unitsym,n,doregister);
+         inherited create(unitsym,n);
          module:=amodule;
          module:=amodule;
       end;
       end;
 
 
@@ -723,7 +723,7 @@ implementation
 
 
     constructor tprogramparasym.create(const n : string; i : dword);
     constructor tprogramparasym.create(const n : string; i : dword);
       begin
       begin
-         inherited create(programparasym,n,true);
+         inherited create(programparasym,n);
          isoindex:=i;
          isoindex:=i;
       end;
       end;
 
 
@@ -751,7 +751,7 @@ implementation
 
 
     constructor tnamespacesym.create(const n : string);
     constructor tnamespacesym.create(const n : string);
       begin
       begin
-         inherited create(namespacesym,n,true);
+         inherited create(namespacesym,n);
          unitsym:=nil;
          unitsym:=nil;
          unitsymderef.reset;
          unitsymderef.reset;
       end;
       end;
@@ -793,7 +793,7 @@ implementation
       begin
       begin
          if not(ts_lowercase_proc_start in current_settings.targetswitches) or
          if not(ts_lowercase_proc_start in current_settings.targetswitches) or
             (n='') then
             (n='') then
-           inherited create(procsym,n,true)
+           inherited create(procsym,n)
          else
          else
            begin
            begin
              { YToX -> yToX
              { YToX -> yToX
@@ -812,7 +812,7 @@ implementation
                    end;
                    end;
                  inc(i);
                  inc(i);
                end;
                end;
-             inherited create(procsym,lower(copy(n,1,i-1))+copy(n,i,length(n)),true);
+             inherited create(procsym,lower(copy(n,1,i-1))+copy(n,i,length(n)));
            end;
            end;
          FProcdefList:=TFPObjectList.Create(false);
          FProcdefList:=TFPObjectList.Create(false);
          FProcdefderefList:=nil;
          FProcdefderefList:=nil;
@@ -1329,7 +1329,7 @@ implementation
       var
       var
         pap : tpropaccesslisttypes;
         pap : tpropaccesslisttypes;
       begin
       begin
-         inherited create(propertysym,n,true);
+         inherited create(propertysym,n);
          propoptions:=[];
          propoptions:=[];
          index:=0;
          index:=0;
          default:=0;
          default:=0;
@@ -1589,9 +1589,9 @@ implementation
                             TABSTRACTVARSYM
                             TABSTRACTVARSYM
 ****************************************************************************}
 ****************************************************************************}
 
 
-    constructor tabstractvarsym.create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
+    constructor tabstractvarsym.create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
       begin
       begin
-         inherited create(st,n,doregister);
+         inherited create(st,n);
          vardef:=def;
          vardef:=def;
          vardefderef.reset;
          vardefderef.reset;
          varspez:=vsp;
          varspez:=vsp;
@@ -1747,9 +1747,9 @@ implementation
                                TFIELDVARSYM
                                TFIELDVARSYM
 ****************************************************************************}
 ****************************************************************************}
 
 
-    constructor tfieldvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
+    constructor tfieldvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
       begin
       begin
-         inherited create(fieldvarsym,n,vsp,def,vopts,doregister);
+         inherited create(fieldvarsym,n,vsp,def,vopts);
          fieldoffset:=-1;
          fieldoffset:=-1;
       end;
       end;
 
 
@@ -1837,9 +1837,9 @@ implementation
                         TABSTRACTNORMALVARSYM
                         TABSTRACTNORMALVARSYM
 ****************************************************************************}
 ****************************************************************************}
 
 
-    constructor tabstractnormalvarsym.create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
+    constructor tabstractnormalvarsym.create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
       begin
       begin
-         inherited create(st,n,vsp,def,vopts,doregister);
+         inherited create(st,n,vsp,def,vopts);
          fillchar(localloc,sizeof(localloc),0);
          fillchar(localloc,sizeof(localloc),0);
          fillchar(initialloc,sizeof(initialloc),0);
          fillchar(initialloc,sizeof(initialloc),0);
          defaultconstsym:=nil;
          defaultconstsym:=nil;
@@ -1898,9 +1898,9 @@ implementation
                              Tstaticvarsym
                              Tstaticvarsym
 ****************************************************************************}
 ****************************************************************************}
 
 
-    constructor tstaticvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
+    constructor tstaticvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
       begin
       begin
-         inherited create(staticvarsym,n,vsp,def,vopts,doregister);
+         inherited create(staticvarsym,n,vsp,def,vopts);
          fieldvarsymderef.reset;
          fieldvarsymderef.reset;
 {$ifdef symansistr}
 {$ifdef symansistr}
          _mangledname:='';
          _mangledname:='';
@@ -1912,20 +1912,20 @@ implementation
 
 
     constructor tstaticvarsym.create_dll(const n : string;vsp:tvarspez;def:tdef);
     constructor tstaticvarsym.create_dll(const n : string;vsp:tvarspez;def:tdef);
       begin
       begin
-         tstaticvarsym(self).create(n,vsp,def,[vo_is_dll_var],true);
+         tstaticvarsym(self).create(n,vsp,def,[vo_is_dll_var]);
       end;
       end;
 
 
 
 
     constructor tstaticvarsym.create_C(const n: string; const mangled : TSymStr;vsp:tvarspez;def:tdef);
     constructor tstaticvarsym.create_C(const n: string; const mangled : TSymStr;vsp:tvarspez;def:tdef);
       begin
       begin
-         tstaticvarsym(self).create(n,vsp,def,[],true);
+         tstaticvarsym(self).create(n,vsp,def,[]);
          set_mangledname(mangled);
          set_mangledname(mangled);
       end;
       end;
 
 
 
 
     constructor tstaticvarsym.create_from_fieldvar(const n: string;fieldvar:tfieldvarsym);
     constructor tstaticvarsym.create_from_fieldvar(const n: string;fieldvar:tfieldvarsym);
       begin
       begin
-        create(internal_static_field_name(n),vs_value,fieldvar.vardef,[],true);
+        create(internal_static_field_name(n),fieldvar.varspez,fieldvar.vardef,[]);
         fieldvarsym:=fieldvar;
         fieldvarsym:=fieldvar;
       end;
       end;
 
 
@@ -2094,9 +2094,9 @@ implementation
                                TLOCALVARSYM
                                TLOCALVARSYM
 ****************************************************************************}
 ****************************************************************************}
 
 
-    constructor tlocalvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions;doregister:boolean);
+    constructor tlocalvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
       begin
       begin
-         inherited create(localvarsym,n,vsp,def,vopts,doregister);
+         inherited create(localvarsym,n,vsp,def,vopts);
       end;
       end;
 
 
 
 
@@ -2120,7 +2120,7 @@ implementation
 
 
     constructor tparavarsym.create(const n : string;nr:word;vsp:tvarspez;def:tdef;vopts:tvaroptions);
     constructor tparavarsym.create(const n : string;nr:word;vsp:tvarspez;def:tdef;vopts:tvaroptions);
       begin
       begin
-         inherited create(paravarsym,n,vsp,def,vopts,true);
+         inherited create(paravarsym,n,vsp,def,vopts);
          if (vsp in [vs_var,vs_value,vs_const,vs_constref]) and
          if (vsp in [vs_var,vs_value,vs_const,vs_constref]) and
             not(vo_is_funcret in vopts) then
             not(vo_is_funcret in vopts) then
            varstate := vs_initialised;
            varstate := vs_initialised;
@@ -2208,14 +2208,14 @@ implementation
 
 
     constructor tabsolutevarsym.create(const n : string;def:tdef);
     constructor tabsolutevarsym.create(const n : string;def:tdef);
       begin
       begin
-        inherited create(absolutevarsym,n,vs_value,def,[],true);
+        inherited create(absolutevarsym,n,vs_value,def,[]);
         ref:=nil;
         ref:=nil;
       end;
       end;
 
 
 
 
     constructor tabsolutevarsym.create_ref(const n : string;def:tdef;_ref:tpropaccesslist);
     constructor tabsolutevarsym.create_ref(const n : string;def:tdef;_ref:tpropaccesslist);
       begin
       begin
-        inherited create(absolutevarsym,n,vs_value,def,[],true);
+        inherited create(absolutevarsym,n,vs_value,def,[]);
         ref:=_ref;
         ref:=_ref;
       end;
       end;
 
 
@@ -2298,7 +2298,7 @@ implementation
 
 
     constructor tconstsym.create_ord(const n : string;t : tconsttyp;v : tconstexprint;def:tdef);
     constructor tconstsym.create_ord(const n : string;t : tconsttyp;v : tconstexprint;def:tdef);
       begin
       begin
-         inherited create(constsym,n,true);
+         inherited create(constsym,n);
          fillchar(value, sizeof(value), #0);
          fillchar(value, sizeof(value), #0);
          consttyp:=t;
          consttyp:=t;
          value.valueord:=v;
          value.valueord:=v;
@@ -2309,7 +2309,7 @@ implementation
 
 
     constructor tconstsym.create_ordptr(const n : string;t : tconsttyp;v : tconstptruint;def:tdef);
     constructor tconstsym.create_ordptr(const n : string;t : tconsttyp;v : tconstptruint;def:tdef);
       begin
       begin
-         inherited create(constsym,n,true);
+         inherited create(constsym,n);
          fillchar(value, sizeof(value), #0);
          fillchar(value, sizeof(value), #0);
          consttyp:=t;
          consttyp:=t;
          value.valueordptr:=v;
          value.valueordptr:=v;
@@ -2320,7 +2320,7 @@ implementation
 
 
     constructor tconstsym.create_ptr(const n : string;t : tconsttyp;v : pointer;def:tdef);
     constructor tconstsym.create_ptr(const n : string;t : tconsttyp;v : pointer;def:tdef);
       begin
       begin
-         inherited create(constsym,n,true);
+         inherited create(constsym,n);
          fillchar(value, sizeof(value), #0);
          fillchar(value, sizeof(value), #0);
          consttyp:=t;
          consttyp:=t;
          value.valueptr:=v;
          value.valueptr:=v;
@@ -2331,7 +2331,7 @@ implementation
 
 
     constructor tconstsym.create_string(const n : string;t : tconsttyp;str:pchar;l:longint;def: tdef);
     constructor tconstsym.create_string(const n : string;t : tconsttyp;str:pchar;l:longint;def: tdef);
       begin
       begin
-         inherited create(constsym,n,true);
+         inherited create(constsym,n);
          fillchar(value, sizeof(value), #0);
          fillchar(value, sizeof(value), #0);
          consttyp:=t;
          consttyp:=t;
          value.valueptr:=str;
          value.valueptr:=str;
@@ -2346,7 +2346,7 @@ implementation
 
 
     constructor tconstsym.create_wstring(const n : string;t : tconsttyp;pw:pcompilerwidestring);
     constructor tconstsym.create_wstring(const n : string;t : tconsttyp;pw:pcompilerwidestring);
       begin
       begin
-         inherited create(constsym,n,true);
+         inherited create(constsym,n);
          fillchar(value, sizeof(value), #0);
          fillchar(value, sizeof(value), #0);
          consttyp:=t;
          consttyp:=t;
          pcompilerwidestring(value.valueptr):=pw;
          pcompilerwidestring(value.valueptr):=pw;
@@ -2540,7 +2540,7 @@ implementation
 
 
     constructor tenumsym.create(const n : string;def : tenumdef;v : longint);
     constructor tenumsym.create(const n : string;def : tenumdef;v : longint);
       begin
       begin
-         inherited create(enumsym,n,true);
+         inherited create(enumsym,n);
          definition:=def;
          definition:=def;
          definitionderef.reset;
          definitionderef.reset;
          value:=v;
          value:=v;
@@ -2582,10 +2582,10 @@ implementation
 ****************************************************************************}
 ****************************************************************************}
 
 
 
 
-    constructor ttypesym.create(const n : string;def:tdef;doregister:boolean);
+    constructor ttypesym.create(const n : string;def:tdef);
 
 
       begin
       begin
-        inherited create(typesym,n,doregister);
+        inherited create(typesym,n);
         typedef:=def;
         typedef:=def;
         typedefderef.reset;
         typedefderef.reset;
         { register the typesym for the definition }
         { register the typesym for the definition }
@@ -2654,7 +2654,7 @@ implementation
       var
       var
         s : shortstring;
         s : shortstring;
       begin
       begin
-         inherited create(syssym,n,true);
+         inherited create(syssym,n);
          number:=l;
          number:=l;
          str(longint(l),s);
          str(longint(l),s);
          if assigned(syssym_list.find(s)) then
          if assigned(syssym_list.find(s)) then
@@ -2702,7 +2702,7 @@ implementation
 
 
     constructor tmacro.create(const n : string);
     constructor tmacro.create(const n : string);
       begin
       begin
-         inherited create(macrosym,n,true);
+         inherited create(macrosym,n);
          owner:=nil;
          owner:=nil;
          defined:=false;
          defined:=false;
          is_used:=false;
          is_used:=false;

+ 1 - 1
compiler/symutil.pas

@@ -131,7 +131,7 @@ implementation
            (def.typ=recorddef) and
            (def.typ=recorddef) and
            not assigned(def.typesym) then
            not assigned(def.typesym) then
           begin
           begin
-            ts:=ctypesym.create(trecorddef(def).symtable.realname^,def,true);
+            ts:=ctypesym.create(trecorddef(def).symtable.realname^,def);
             st.insert(ts);
             st.insert(ts);
             ts.visibility:=vis_strictprivate;
             ts.visibility:=vis_strictprivate;
             { this typesym can't be used by any Pascal code, so make sure we don't
             { this typesym can't be used by any Pascal code, so make sure we don't

+ 22 - 0
tests/webtbf/tw36114.pp

@@ -0,0 +1,22 @@
+{ %FAIL }
+
+program tw36114;
+
+{$mode objfpc}{$H+}{$J-}
+type
+  TTestme=class
+  strict private
+  const
+  {$push}{$writeableconst off} // superfluous but also doesn't work
+    c_one:integer = 1;
+    c_two:integer = 10;
+  {$pop}
+  public
+  class property one:integer read c_one;
+  class property two:integer read c_two;
+  end;
+
+begin
+  TTestme.c_one := 1000;
+  writeln(TTestme.One);
+end.