Browse Source

Rename tsymtable.insert and delete methods to insertsym ands deletesym

Pierre Muller 3 years ago
parent
commit
5acd7a7b83

+ 3 - 3
compiler/blockutl.pas

@@ -175,7 +175,7 @@ implementation
       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,[]);
       descriptor:=cstaticvarsym.create(name,vs_value,descriptordef,[]);
-      symtablestack.top.insert(descriptor);
+      symtablestack.top.insertsym(descriptor);
       include(descriptor.symoptions,sp_internal);
       include(descriptor.symoptions,sp_internal);
       { create typed constant for the descriptor }
       { create typed constant for the descriptor }
       str_parse_typedconst(current_asmdata.AsmLists[al_const],
       str_parse_typedconst(current_asmdata.AsmLists[al_const],
@@ -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));
+          result.localst.insertsym(ctypesym.create('__FPC_BLOCK_INVOKE_PV_TYPE',orgpv));
           result.synthetickind:=tsk_block_invoke_procvar;
           result.synthetickind:=tsk_block_invoke_procvar;
         end;
         end;
     end;
     end;
@@ -255,7 +255,7 @@ implementation
         vs_value,
         vs_value,
         blockliteraldef,[]);
         blockliteraldef,[]);
       include(result.symoptions,sp_internal);
       include(result.symoptions,sp_internal);
-      symtablestack.top.insert(result);
+      symtablestack.top.insertsym(result);
       { initialise it }
       { initialise it }
       str_parse_typedconst(current_asmdata.AsmLists[al_const],
       str_parse_typedconst(current_asmdata.AsmLists[al_const],
         '(base: (isa        : @'+blockisasym.realname+
         '(base: (isa        : @'+blockisasym.realname+

+ 1 - 1
compiler/jvm/jvmdef.pas

@@ -1100,7 +1100,7 @@ implementation
             if not assigned(sym) then
             if not assigned(sym) then
               begin
               begin
                 ps:=cprocsym.create('Create');
                 ps:=cprocsym.create('Create');
-                obj.symtable.insert(ps);
+                obj.symtable.insertsym(ps);
               end;
               end;
             { determine symtable level }
             { determine symtable level }
             topowner:=obj;
             topowner:=obj;

+ 1 - 1
compiler/jvm/njvmcon.pas

@@ -452,7 +452,7 @@ implementation
         csym:=cconstsym.create_ptr('_$setconst'+tostr(current_module.symlist.count),constset,ps,resultdef);
         csym:=cconstsym.create_ptr('_$setconst'+tostr(current_module.symlist.count),constset,ps,resultdef);
         csym.visibility:=vis_private;
         csym.visibility:=vis_private;
         include(csym.symoptions,sp_internal);
         include(csym.symoptions,sp_internal);
-        current_module.localsymtable.insert(csym);
+        current_module.localsymtable.insertsym(csym);
         { generate assignment of the constant to the typed constant symbol }
         { generate assignment of the constant to the typed constant symbol }
         ssym:=jvm_add_typed_const_initializer(csym);
         ssym:=jvm_add_typed_const_initializer(csym);
         result:=current_asmdata.RefAsmSymbol(ssym.mangledname,AT_DATA);
         result:=current_asmdata.RefAsmSymbol(ssym.mangledname,AT_DATA);

+ 2 - 2
compiler/jvm/njvmutil.pas

@@ -214,7 +214,7 @@ implementation
           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]);
             sym.varoptions - [vo_is_thread_var]);
-          sym.owner.insert(vs);
+          sym.owner.insertsym(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
             that it's a threadvar) }
             that it's a threadvar) }
@@ -496,7 +496,7 @@ implementation
         begin
         begin
           { add the args parameter }
           { add the args parameter }
           pvs:=cparavarsym.create('$args',1,vs_const,search_system_type('TJSTRINGARRAY').typedef,[]);
           pvs:=cparavarsym.create('$args',1,vs_const,search_system_type('TJSTRINGARRAY').typedef,[]);
-          tprocdef(pd).parast.insert(pvs);
+          tprocdef(pd).parast.insertsym(pvs);
           tprocdef(pd).calcparas;
           tprocdef(pd).calcparas;
         end;
         end;
     end;
     end;

+ 15 - 15
compiler/jvm/pjvm.pas

@@ -175,7 +175,7 @@ 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));
+        enumclass.symtable.insertsym(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 }
@@ -183,7 +183,7 @@ implementation
         { 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;
-        enumclass.symtable.insert(temptypesym);
+        enumclass.symtable.insertsym(temptypesym);
         { but the name of the class as far as the JVM is concerned will match
         { but the name of the class as far as the JVM is concerned will match
           the enum's original name (the enum type itself won't be output in
           the enum's original name (the enum type itself won't be output in
           any class file, so no conflict there)
           any class file, so no conflict there)
@@ -212,14 +212,14 @@ implementation
         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,[]);
             fsym:=cfieldvarsym.create(tenumsym(tenumdef(def).symtable.symlist[i]).realname,vs_final,enumclass,[]);
-            enumclass.symtable.insert(fsym);
+            enumclass.symtable.insertsym(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]);
                 aliassym:=cstaticvarsym.create('__FPC_Zero_Initializer',vs_final,enumclass,[vo_is_external]);
-                enumclass.symtable.insert(aliassym);
+                enumclass.symtable.insertsym(aliassym);
                 aliassym.set_raw_mangledname(sym.mangledname);
                 aliassym.set_raw_mangledname(sym.mangledname);
               end;
               end;
           end;
           end;
@@ -228,7 +228,7 @@ implementation
         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);
         arrsym:=ctypesym.create('__FPC_TEnumValues',arrdef);
-        enumclass.symtable.insert(arrsym);
+        enumclass.symtable.insertsym(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--
            simply use a fixed length array and copy it) }
            simply use a fixed length array and copy it) }
@@ -242,12 +242,12 @@ implementation
           begin
           begin
             { add field for the value }
             { add field for the value }
             fsym:=cfieldvarsym.create('__fpc_fenumval',vs_final,s32inttype,[]);
             fsym:=cfieldvarsym.create('__fpc_fenumval',vs_final,s32inttype,[]);
-            enumclass.symtable.insert(fsym);
+            enumclass.symtable.insertsym(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,[]);
             fsym:=cfieldvarsym.create('__fpc_ord2enum',vs_final,juhashmap,[]);
-            enumclass.symtable.insert(fsym);
+            enumclass.symtable.insertsym(fsym);
             make_field_static(enumclass.symtable,fsym);
             make_field_static(enumclass.symtable,fsym);
             { add custom constructor }
             { add custom constructor }
             if not str_parse_method_dec('constructor Create(const __fpc_name: JLString; const __fpc_ord, __fpc_initenumval: longint);',potype_constructor,false,enumclass,pd) then
             if not str_parse_method_dec('constructor Create(const __fpc_name: JLString; const __fpc_ord, __fpc_initenumval: longint);',potype_constructor,false,enumclass,pd) then
@@ -305,12 +305,12 @@ implementation
           checking when creating the "Values" method }
           checking when creating the "Values" method }
         fsym:=cfieldvarsym.create('$VALUES',vs_final,arrdef,[]);
         fsym:=cfieldvarsym.create('$VALUES',vs_final,arrdef,[]);
         fsym.visibility:=vis_strictprivate;
         fsym.visibility:=vis_strictprivate;
-        enumclass.symtable.insert(fsym,false);
+        enumclass.symtable.insertsym(fsym,false);
         sym:=make_field_static(enumclass.symtable,fsym);
         sym:=make_field_static(enumclass.symtable,fsym);
         { alias for accessing the field in generated Pascal code }
         { alias for accessing the field in generated Pascal code }
         sl:=tpropaccesslist.create;
         sl:=tpropaccesslist.create;
         sl.addsym(sl_load,sym);
         sl.addsym(sl_load,sym);
-        enumclass.symtable.insert(cabsolutevarsym.create_ref('__fpc_FVALUES',arrdef,sl));
+        enumclass.symtable.insertsym(cabsolutevarsym.create_ref('__fpc_FVALUES',arrdef,sl));
         { add initialization of the static class fields created above }
         { add initialization of the static class fields created above }
         if not str_parse_method_dec('constructor fpc_enum_class_constructor;',potype_class_constructor,true,enumclass,pd) then
         if not str_parse_method_dec('constructor fpc_enum_class_constructor;',potype_class_constructor,true,enumclass,pd) then
           internalerror(2011062303);
           internalerror(2011062303);
@@ -356,7 +356,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));
+        pvclass.symtable.insertsym(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)
@@ -381,7 +381,7 @@ implementation
         { 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;
-        pvclass.symtable.insert(temptypesym);
+        pvclass.symtable.insertsym(temptypesym);
 
 
         { in case of a procedure of object, add a nested interface type that
         { in case of a procedure of object, add a nested interface type that
           has one method that conforms to the procvartype (with name
           has one method that conforms to the procvartype (with name
@@ -398,7 +398,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));
+            pvclass.symtable.insertsym(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) }
@@ -507,7 +507,7 @@ implementation
           Pascal code }
           Pascal code }
         typ:=ctypesym.create('__fpc_virtualclassmethod_pv_t'+wrapperpd.unique_id_str,wrapperpv);
         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.insertsym(typ);
         symtablestack.pop(pd.owner);
         symtablestack.pop(pd.owner);
       end;
       end;
 
 
@@ -595,7 +595,7 @@ implementation
               { 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]);
               ssym:=cstaticvarsym.create(internal_static_field_name(csym.realname),vs_final,csym.constdef,[vo_is_external]);
-              csym.owner.insert(ssym);
+              csym.owner.insertsym(ssym);
               { alias storage to the constsym }
               { alias storage to the constsym }
               ssym.set_mangledname(csym.realname);
               ssym.set_mangledname(csym.realname);
               for i:=0 to tenumdef(csym.constdef).symtable.symlist.count-1 do
               for i:=0 to tenumdef(csym.constdef).symtable.symlist.count-1 do
@@ -633,7 +633,7 @@ implementation
               }
               }
               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]);
               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.insertsym(ssym);
               symtablestack.pop(current_module.localsymtable);
               symtablestack.pop(current_module.localsymtable);
               { alias storage to the constsym }
               { alias storage to the constsym }
               ssym.set_mangledname(csym.realname);
               ssym.set_mangledname(csym.realname);

+ 3 - 3
compiler/jvm/symcpu.pas

@@ -416,7 +416,7 @@ implementation
            (sym.owner<>owner)  then
            (sym.owner<>owner)  then
           begin
           begin
             ps:=cprocsym.create(accessorname);
             ps:=cprocsym.create(accessorname);
-            obj.symtable.insert(ps);
+            obj.symtable.insertsym(ps);
           end
           end
         else
         else
           ps:=tprocsym(sym);
           ps:=tprocsym(sym);
@@ -444,7 +444,7 @@ implementation
               begin
               begin
                 { parameter with value to set }
                 { parameter with value to set }
                 pvs:=cparavarsym.create('__fpc_newval__',10,vs_const,propdef,[]);
                 pvs:=cparavarsym.create('__fpc_newval__',10,vs_const,propdef,[]);
-                pd.parast.insert(pvs);
+                pd.parast.insertsym(pvs);
               end;
               end;
             if (ppo_hasparameters in propoptions) and
             if (ppo_hasparameters in propoptions) and
                not assigned(orgaccesspd) then
                not assigned(orgaccesspd) then
@@ -477,7 +477,7 @@ implementation
         tmpaccesslist:=callthroughprop.propaccesslist[accesstyp];
         tmpaccesslist:=callthroughprop.propaccesslist[accesstyp];
         callthroughprop.propaccesslist[accesstyp]:=propaccesslist[accesstyp];
         callthroughprop.propaccesslist[accesstyp]:=propaccesslist[accesstyp];
         propaccesslist[accesstyp]:=tmpaccesslist;
         propaccesslist[accesstyp]:=tmpaccesslist;
-        owner.insert(callthroughprop);
+        owner.insertsym(callthroughprop);
 
 
         pd.skpara:=callthroughprop;
         pd.skpara:=callthroughprop;
         { needs to be exported }
         { needs to be exported }

+ 1 - 1
compiler/ncal.pas

@@ -588,7 +588,7 @@ implementation
           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]);
           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.insertsym(calldescsym);
         current_asmdata.AsmLists[al_typedconsts].concatList(
         current_asmdata.AsmLists[al_typedconsts].concatList(
           tcb.get_final_asmlist(
           tcb.get_final_asmlist(
             current_asmdata.DefineAsmSymbol(calldescsym.mangledname,AB_GLOBAL,AT_DATA,calldescsym.vardef),
             current_asmdata.DefineAsmSymbol(calldescsym.mangledname,AB_GLOBAL,AT_DATA,calldescsym.vardef),

+ 6 - 6
compiler/ngenutil.pas

@@ -1666,11 +1666,11 @@ implementation
           (target_info.system in (systems_darwin+[system_powerpc_macosclassic]+systems_aix)) then
           (target_info.system in (systems_darwin+[system_powerpc_macosclassic]+systems_aix)) then
          begin
          begin
            pvs:=cparavarsym.create('ARGC',1,vs_const,s32inttype,[]);
            pvs:=cparavarsym.create('ARGC',1,vs_const,s32inttype,[]);
-           tprocdef(pd).parast.insert(pvs);
+           tprocdef(pd).parast.insertsym(pvs);
            pvs:=cparavarsym.create('ARGV',2,vs_const,cpointerdef.getreusable(charpointertype),[]);
            pvs:=cparavarsym.create('ARGV',2,vs_const,cpointerdef.getreusable(charpointertype),[]);
-           tprocdef(pd).parast.insert(pvs);
+           tprocdef(pd).parast.insertsym(pvs);
            pvs:=cparavarsym.create('ARGP',3,vs_const,cpointerdef.getreusable(charpointertype),[]);
            pvs:=cparavarsym.create('ARGP',3,vs_const,cpointerdef.getreusable(charpointertype),[]);
-           tprocdef(pd).parast.insert(pvs);
+           tprocdef(pd).parast.insertsym(pvs);
            tprocdef(pd).calcparas;
            tprocdef(pd).calcparas;
          end
          end
        { package stub for Windows is a DLLMain }
        { package stub for Windows is a DLLMain }
@@ -1678,11 +1678,11 @@ implementation
            (target_info.system in systems_all_windows+systems_nativent) then
            (target_info.system in systems_all_windows+systems_nativent) then
          begin
          begin
            pvs:=cparavarsym.create('HINSTANCE',1,vs_const,uinttype,[]);
            pvs:=cparavarsym.create('HINSTANCE',1,vs_const,uinttype,[]);
-           tprocdef(pd).parast.insert(pvs);
+           tprocdef(pd).parast.insertsym(pvs);
            pvs:=cparavarsym.create('DLLREASON',2,vs_const,u32inttype,[]);
            pvs:=cparavarsym.create('DLLREASON',2,vs_const,u32inttype,[]);
-           tprocdef(pd).parast.insert(pvs);
+           tprocdef(pd).parast.insertsym(pvs);
            pvs:=cparavarsym.create('DLLPARAM',3,vs_const,voidpointertype,[]);
            pvs:=cparavarsym.create('DLLPARAM',3,vs_const,voidpointertype,[]);
-           tprocdef(pd).parast.insert(pvs);
+           tprocdef(pd).parast.insertsym(pvs);
            tprocdef(pd).returndef:=bool32type;
            tprocdef(pd).returndef:=bool32type;
            insert_funcret_para(tprocdef(pd));
            insert_funcret_para(tprocdef(pd));
            tprocdef(pd).calcparas;
            tprocdef(pd).calcparas;

+ 1 - 1
compiler/ninl.pas

@@ -468,7 +468,7 @@ implementation
                 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,[]);
                   srsym:=clocalvarsym.create(defaultname,vs_const,def,[]);
-                  srsymtable.insert(srsym);
+                  srsymtable.insertsym(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);
                   include(tabstractvarsym(srsym).varoptions,vo_is_default_var);
                   include(tabstractvarsym(srsym).varoptions,vo_is_default_var);

+ 9 - 9
compiler/pdecl.pas

@@ -256,7 +256,7 @@ implementation
                        sym.symoptions:=sym.symoptions+dummysymoptions;
                        sym.symoptions:=sym.symoptions+dummysymoptions;
                        sym.deprecatedmsg:=deprecatedmsg;
                        sym.deprecatedmsg:=deprecatedmsg;
                        sym.visibility:=symtablestack.top.currentvisibility;
                        sym.visibility:=symtablestack.top.currentvisibility;
-                       symtablestack.top.insert(sym);
+                       symtablestack.top.insertsym(sym);
                        sym.register_sym;
                        sym.register_sym;
 {$ifdef jvm}
 {$ifdef jvm}
                        { for the JVM target, some constants need to be
                        { for the JVM target, some constants need to be
@@ -305,14 +305,14 @@ implementation
                                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,[]);
                        sym:=cfieldvarsym.create(orgname,varspez,hdef,[]);
-                       symtablestack.top.insert(sym);
+                       symtablestack.top.insertsym(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,[]);
                        sym:=cstaticvarsym.create(orgname,varspez,hdef,[]);
                        sym.visibility:=symtablestack.top.currentvisibility;
                        sym.visibility:=symtablestack.top.currentvisibility;
-                       symtablestack.top.insert(sym);
+                       symtablestack.top.insertsym(sym);
                      end;
                      end;
                    sym.register_sym;
                    sym.register_sym;
                    current_tokenpos:=storetokenpos;
                    current_tokenpos:=storetokenpos;
@@ -396,18 +396,18 @@ implementation
                     labelsym:=clabelsym.create(pattern);
                     labelsym:=clabelsym.create(pattern);
                   end;
                   end;
 
 
-                symtablestack.top.insert(labelsym);
+                symtablestack.top.insertsym(labelsym);
                 if m_non_local_goto in current_settings.modeswitches then
                 if m_non_local_goto in current_settings.modeswitches then
                   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,[]);
                         labelsym.jumpbuf:=clocalvarsym.create('LABEL$_'+labelsym.name,vs_value,rec_jmp_buf,[]);
-                        symtablestack.top.insert(labelsym.jumpbuf);
+                        symtablestack.top.insertsym(labelsym.jumpbuf);
                       end
                       end
                     else
                     else
                       begin
                       begin
                         labelsym.jumpbuf:=cstaticvarsym.create('LABEL$_'+labelsym.name,vs_value,rec_jmp_buf,[]);
                         labelsym.jumpbuf:=cstaticvarsym.create('LABEL$_'+labelsym.name,vs_value,rec_jmp_buf,[]);
-                        symtablestack.top.insert(labelsym.jumpbuf);
+                        symtablestack.top.insertsym(labelsym.jumpbuf);
                         cnodeutils.insertbssdata(tstaticvarsym(labelsym.jumpbuf));
                         cnodeutils.insertbssdata(tstaticvarsym(labelsym.jumpbuf));
                       end;
                       end;
                     include(labelsym.jumpbuf.symoptions,sp_internal);
                     include(labelsym.jumpbuf.symoptions,sp_internal);
@@ -836,7 +836,7 @@ implementation
                       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;
-                      symtablestack.top.insert(sym);
+                      symtablestack.top.insertsym(sym);
                       ttypesym(sym).typedef.owner:=sym.owner;
                       ttypesym(sym).typedef.owner:=sym.owner;
                     end
                     end
                   else
                   else
@@ -875,7 +875,7 @@ implementation
                 begin
                 begin
                   newtype:=ctypesym.create(genorgtypename,hdef);
                   newtype:=ctypesym.create(genorgtypename,hdef);
                   newtype.visibility:=symtablestack.top.currentvisibility;
                   newtype.visibility:=symtablestack.top.currentvisibility;
-                  symtablestack.top.insert(newtype);
+                  symtablestack.top.insertsym(newtype);
                 end;
                 end;
               current_tokenpos:=defpos;
               current_tokenpos:=defpos;
               current_tokenpos:=storetokenpos;
               current_tokenpos:=storetokenpos;
@@ -1315,7 +1315,7 @@ implementation
                      begin
                      begin
                        sym.symoptions:=sym.symoptions+dummysymoptions;
                        sym.symoptions:=sym.symoptions+dummysymoptions;
                        sym.deprecatedmsg:=deprecatedmsg;
                        sym.deprecatedmsg:=deprecatedmsg;
-                       symtablestack.top.insert(sym);
+                       symtablestack.top.insertsym(sym);
                      end
                      end
                    else
                    else
                      stringdispose(deprecatedmsg);
                      stringdispose(deprecatedmsg);

+ 6 - 6
compiler/pdecsub.pas

@@ -247,7 +247,7 @@ implementation
                if assigned(defaultvalue) then
                if assigned(defaultvalue) then
                  begin
                  begin
                    include(defaultvalue.symoptions,sp_internal);
                    include(defaultvalue.symoptions,sp_internal);
-                   pd.parast.insert(defaultvalue);
+                   pd.parast.insertsym(defaultvalue);
                    { check whether the default value is of the correct
                    { check whether the default value is of the correct
                      type }
                      type }
                    if compare_defs_ext(defaultvalue.constdef,hdef,nodetype,doconv,convpd,[])<=te_convert_operator then
                    if compare_defs_ext(defaultvalue.constdef,hdef,nodetype,doconv,convpd,[])<=te_convert_operator then
@@ -324,7 +324,7 @@ implementation
           repeat
           repeat
             inc(paranr);
             inc(paranr);
             vs:=cparavarsym.create(orgpattern,paranr*10,varspez,generrordef,[]);
             vs:=cparavarsym.create(orgpattern,paranr*10,varspez,generrordef,[]);
-            currparast.insert(vs);
+            currparast.insertsym(vs);
             if assigned(vs.owner) then
             if assigned(vs.owner) then
              sc.add(vs)
              sc.add(vs)
             else
             else
@@ -1112,7 +1112,7 @@ implementation
                   aprocsym:=cprocsym.create(orgsp);
                   aprocsym:=cprocsym.create(orgsp);
                 if addgendummy then
                 if addgendummy then
                   include(aprocsym.symoptions,sp_generic_dummy);
                   include(aprocsym.symoptions,sp_generic_dummy);
-                symtablestack.top.insert(aprocsym);
+                symtablestack.top.insertsym(aprocsym);
               end;
               end;
           end;
           end;
 
 
@@ -1175,9 +1175,9 @@ implementation
                       allowed, so we create a procsym as dummy }
                       allowed, so we create a procsym as dummy }
                     dummysym:=cprocsym.create(orgspnongen);
                     dummysym:=cprocsym.create(orgspnongen);
                     if assigned(astruct) then
                     if assigned(astruct) then
-                      astruct.symtable.insert(dummysym)
+                      astruct.symtable.insertsym(dummysym)
                     else
                     else
-                      symtablestack.top.insert(dummysym);
+                      symtablestack.top.insertsym(dummysym);
                   end
                   end
                 else if (dummysym.typ<>procsym) and
                 else if (dummysym.typ<>procsym) and
                     (
                     (
@@ -2277,7 +2277,7 @@ begin
         if vo_has_explicit_paraloc in vo then
         if vo_has_explicit_paraloc in vo then
           if not paramanager.parseparaloc(vs,po_syscall_to_regname) then
           if not paramanager.parseparaloc(vs,po_syscall_to_regname) then
             internalerror(2016120301);
             internalerror(2016120301);
-        pd.parast.insert(vs);
+        pd.parast.insertsym(vs);
       end
       end
     else
     else
       Message(parser_e_32bitint_or_pointer_variable_expected);
       Message(parser_e_32bitint_or_pointer_variable_expected);

+ 13 - 13
compiler/pdecvar.pas

@@ -265,7 +265,7 @@ implementation
               else
               else
                 handle_calling_convention(pd,hcc_default_actions_intf_struct);
                 handle_calling_convention(pd,hcc_default_actions_intf_struct);
               sym:=cprocsym.create(prefix+lower(p.realname));
               sym:=cprocsym.create(prefix+lower(p.realname));
-              symtablestack.top.insert(sym);
+              symtablestack.top.insertsym(sym);
               pd.procsym:=sym;
               pd.procsym:=sym;
               include(pd.procoptions,po_dispid);
               include(pd.procoptions,po_dispid);
               include(pd.procoptions,po_global);
               include(pd.procoptions,po_global);
@@ -326,7 +326,7 @@ implementation
                   { add an extra parameter, a placeholder of the value to set }
                   { add an extra parameter, a placeholder of the value to set }
                   inc(paranr);
                   inc(paranr);
                   hparavs:=cparavarsym.create('$value',10*paranr,vs_value,p.propdef,[]);
                   hparavs:=cparavarsym.create('$value',10*paranr,vs_value,p.propdef,[]);
-                  writepd.parast.insert(hparavs);
+                  writepd.parast.insertsym(hparavs);
 
 
                   writepd.proctypeoption:=potype_propsetter;
                   writepd.proctypeoption:=potype_propsetter;
                   writepd.dispid:=hdispid;
                   writepd.dispid:=hdispid;
@@ -384,7 +384,7 @@ implementation
          p.default:=longint($80000000);
          p.default:=longint($80000000);
          if is_classproperty then
          if is_classproperty then
            include(p.symoptions, sp_static);
            include(p.symoptions, sp_static);
-         symtablestack.top.insert(p);
+         symtablestack.top.insertsym(p);
          consume(_ID);
          consume(_ID);
          { property parameters ? }
          { property parameters ? }
          if try_to_consume(_LECKKLAMMER) then
          if try_to_consume(_LECKKLAMMER) then
@@ -411,7 +411,7 @@ implementation
                 repeat
                 repeat
                   inc(paranr);
                   inc(paranr);
                   hreadparavs:=cparavarsym.create(orgpattern,10*paranr,varspez,generrordef,[]);
                   hreadparavs:=cparavarsym.create(orgpattern,10*paranr,varspez,generrordef,[]);
-                  p.parast.insert(hreadparavs);
+                  p.parast.insertsym(hreadparavs);
                   sc.add(hreadparavs);
                   sc.add(hreadparavs);
                   consume(_ID);
                   consume(_ID);
                 until not try_to_consume(_COMMA);
                 until not try_to_consume(_COMMA);
@@ -566,7 +566,7 @@ implementation
                         writeprocdef.returndef:=voidtype;
                         writeprocdef.returndef:=voidtype;
                         inc(paranr);
                         inc(paranr);
                         hparavs:=cparavarsym.create('$value',10*paranr,vs_value,p.propdef,[]);
                         hparavs:=cparavarsym.create('$value',10*paranr,vs_value,p.propdef,[]);
-                        writeprocdef.parast.insert(hparavs);
+                        writeprocdef.parast.insertsym(hparavs);
                         { Insert hidden parameters }
                         { Insert hidden parameters }
                         if not assigned(astruct) then
                         if not assigned(astruct) then
                           handle_calling_convention(writeprocdef,hcc_default_actions_intf)
                           handle_calling_convention(writeprocdef,hcc_default_actions_intf)
@@ -655,7 +655,7 @@ implementation
                                  if ppo_indexed in p.propoptions then
                                  if ppo_indexed in p.propoptions then
                                    begin
                                    begin
                                      hparavs:=cparavarsym.create('$index',10,vs_value,p.indexdef,[]);
                                      hparavs:=cparavarsym.create('$index',10,vs_value,p.indexdef,[]);
-                                     storedprocdef.parast.insert(hparavs);
+                                     storedprocdef.parast.insertsym(hparavs);
                                    end;
                                    end;
 
 
                                  { Insert hidden parameters }
                                  { Insert hidden parameters }
@@ -1135,7 +1135,7 @@ implementation
               begin
               begin
                 tcsym:=cstaticvarsym.create('$default'+vs.realname,vs_const,vs.vardef,[]);
                 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.insertsym(tcsym);
                 templist:=tasmlist.create;
                 templist:=tasmlist.create;
                 read_typed_const(templist,tcsym,false);
                 read_typed_const(templist,tcsym,false);
                 { in case of a generic routine, this initialisation value is not
                 { in case of a generic routine, this initialisation value is not
@@ -1337,8 +1337,8 @@ implementation
           if assigned(abssym) then
           if assigned(abssym) then
             begin
             begin
               st:=vs.owner;
               st:=vs.owner;
-              vs.owner.Delete(vs);
-              st.insert(abssym);
+              vs.owner.Deletesym(vs);
+              st.insertsym(abssym);
               sc[0]:=abssym;
               sc[0]:=abssym;
             end;
             end;
         end;
         end;
@@ -1424,11 +1424,11 @@ implementation
                        { ensure correct error position }
                        { ensure correct error position }
                        old_current_filepos:=current_filepos;
                        old_current_filepos:=current_filepos;
                        current_filepos:=tmp_filepos;
                        current_filepos:=tmp_filepos;
-                       symtablestack.top.insert(vs);
+                       symtablestack.top.insertsym(vs);
                        current_filepos:=old_current_filepos;
                        current_filepos:=old_current_filepos;
                      end
                      end
                    else
                    else
-                     symtablestack.top.insert(vs);
+                     symtablestack.top.insertsym(vs);
                  end;
                  end;
              until not try_to_consume(_COMMA);
              until not try_to_consume(_COMMA);
 
 
@@ -1705,7 +1705,7 @@ implementation
                  begin
                  begin
                    vs.register_sym;
                    vs.register_sym;
                    sc.add(vs);
                    sc.add(vs);
-                   recst.insert(vs);
+                   recst.insertsym(vs);
                    had_generic:=false;
                    had_generic:=false;
                  end
                  end
                else
                else
@@ -1910,7 +1910,7 @@ implementation
                   consume(_COLON);
                   consume(_COLON);
                   fieldvs:=cfieldvarsym.create(sorg,vs_value,generrordef,[]);
                   fieldvs:=cfieldvarsym.create(sorg,vs_value,generrordef,[]);
                   variantdesc^^.variantselector:=fieldvs;
                   variantdesc^^.variantselector:=fieldvs;
-                  symtablestack.top.insert(fieldvs);
+                  symtablestack.top.insertsym(fieldvs);
                 end;
                 end;
               read_anon_type(casetype,true);
               read_anon_type(casetype,true);
               block_type:=bt_var;
               block_type:=bt_var;

+ 2 - 2
compiler/pexpr.pas

@@ -346,8 +346,8 @@ implementation
                                   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,[]);
                                   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.jumpbuf);
+                                  exit_procinfo.procdef.localst.insertsym(exit_procinfo.nestedexitlabel);
+                                  exit_procinfo.procdef.localst.insertsym(exit_procinfo.nestedexitlabel.jumpbuf);
                                 end;
                                 end;
 
 
                               statement_syssym:=cgotonode.create(exit_procinfo.nestedexitlabel);
                               statement_syssym:=cgotonode.create(exit_procinfo.nestedexitlabel);

+ 4 - 4
compiler/pgenutil.pas

@@ -1880,7 +1880,7 @@ uses
                 { 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 and we aren't dealing with a forwarddef }
                   a procsym to add it to and we aren't dealing with a forwarddef }
                 if not assigned(psym) and not assigned(context.forwarddef) then
                 if not assigned(psym) and not assigned(context.forwarddef) then
-                  specializest.insert(srsym);
+                  specializest.insertsym(srsym);
 
 
                 { specializations are declarations as such it is the wisest to
                 { specializations are declarations as such it is the wisest to
                   declare set the blocktype to "type"; otherwise we'll
                   declare set the blocktype to "type"; otherwise we'll
@@ -2472,7 +2472,7 @@ uses
                   internalerror(2019021602);
                   internalerror(2019021602);
                 { 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.insertsym(sym);
                 include(sym.symoptions,sp_generic_para);
                 include(sym.symoptions,sp_generic_para);
               end
               end
             else
             else
@@ -2489,7 +2489,7 @@ uses
                         generictypedef.changeowner(st);
                         generictypedef.changeowner(st);
                       end;
                       end;
                   end;
                   end;
-                st.insert(generictype);
+                st.insertsym(generictype);
                 include(generictype.symoptions,sp_generic_para);
                 include(generictype.symoptions,sp_generic_para);
               end;
               end;
             def.genericparas.add(genericlist.nameofindex(i),generictype);
             def.genericparas.add(genericlist.nameofindex(i),generictype);
@@ -2526,7 +2526,7 @@ uses
             { the symbol should be only visible to the generic class
             { the symbol should be only visible to the generic class
               itself }
               itself }
             gensym.visibility:=vis_strictprivate;
             gensym.visibility:=vis_strictprivate;
-            symtablestack.top.insert(gensym);
+            symtablestack.top.insertsym(gensym);
           end;
           end;
       end;
       end;
 
 

+ 6 - 6
compiler/pmodules.pas

@@ -664,7 +664,7 @@ implementation
             sym:=tsym(current_module.localsymtable.symlist[i]);
             sym:=tsym(current_module.localsymtable.symlist[i]);
             { this also frees sym, as the symbols are owned by the symtable }
             { this also frees sym, as the symbols are owned by the symtable }
             if not sym.is_registered then
             if not sym.is_registered then
-              current_module.localsymtable.Delete(sym);
+              current_module.localsymtable.DeleteSym(sym);
           end;
           end;
       end;
       end;
 
 
@@ -693,7 +693,7 @@ implementation
         ps.register_sym;
         ps.register_sym;
         { main are allways used }
         { main are allways used }
         inc(ps.refs);
         inc(ps.refs);
-        st.insert(ps);
+        st.insertsym(ps);
         pd:=tprocdef(cnodeutils.create_main_procdef(target_info.cprefix+name,potype,ps));
         pd:=tprocdef(cnodeutils.create_main_procdef(target_info.cprefix+name,potype,ps));
         { We don't need a local symtable, change it into the static symtable }
         { We don't need a local symtable, change it into the static symtable }
         if not (potype in [potype_mainstub,potype_pkgstub,potype_libmainstub]) then
         if not (potype in [potype_mainstub,potype_pkgstub,potype_libmainstub]) then
@@ -744,7 +744,7 @@ implementation
              gotvarsym:=cstaticvarsym.create('_GLOBAL_OFFSET_TABLE_',
              gotvarsym:=cstaticvarsym.create('_GLOBAL_OFFSET_TABLE_',
                           vs_value,voidpointertype,[vo_is_external]);
                           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.insertsym(gotvarsym);
              { avoid unnecessary warnings }
              { avoid unnecessary warnings }
              gotvarsym.varstate:=vs_read;
              gotvarsym.varstate:=vs_read;
              gotvarsym.refs:=1;
              gotvarsym.refs:=1;
@@ -777,7 +777,7 @@ implementation
 
 
     procedure copy_macro(p:TObject; arg:pointer);
     procedure copy_macro(p:TObject; arg:pointer);
       begin
       begin
-        current_module.globalmacrosymtable.insert(tmacro(p).getcopy);
+        current_module.globalmacrosymtable.insertsym(tmacro(p).getcopy);
       end;
       end;
 
 
     function try_consume_hintdirective(var moduleopt:tmoduleoptions; var deprecatedmsg:pshortstring):boolean;
     function try_consume_hintdirective(var moduleopt:tmoduleoptions; var deprecatedmsg:pshortstring):boolean;
@@ -854,7 +854,7 @@ implementation
           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);
           typesym:=ctypesym.create('__FPC_JVM_Module_Class_Alias$',def);
-          symtablestack.top.insert(typesym);
+          symtablestack.top.insertsym(typesym);
         end;
         end;
 {$endif jvm}
 {$endif jvm}
 
 
@@ -2154,7 +2154,7 @@ type
              for i:=0 to high(sc) do
              for i:=0 to high(sc) do
                begin
                begin
                  ps:=cprogramparasym.create(sc[i].name,sc[i].nr);
                  ps:=cprogramparasym.create(sc[i].name,sc[i].nr);
-                 current_module.localsymtable.insert(ps,true);
+                 current_module.localsymtable.insertsym(ps,true);
                end;
                end;
            end;
            end;
 
 

+ 18 - 18
compiler/pparautl.pas

@@ -111,7 +111,7 @@ implementation
              paranr:=paranr_result;
              paranr:=paranr_result;
            { Generate result variable accessing function result }
            { Generate result variable accessing function result }
            vs:=cparavarsym.create('$result',paranr,vs_var,pd.returndef,[vo_is_funcret,vo_is_hidden_para]);
            vs:=cparavarsym.create('$result',paranr,vs_var,pd.returndef,[vo_is_funcret,vo_is_hidden_para]);
-           pd.parast.insert(vs);
+           pd.parast.insertsym(vs);
            { Store this symbol as funcretsym for procedures }
            { Store this symbol as funcretsym for procedures }
            if pd.typ=procdef then
            if pd.typ=procdef then
             tprocdef(pd).funcretsym:=vs;
             tprocdef(pd).funcretsym:=vs;
@@ -164,7 +164,7 @@ implementation
                 vs:=cparavarsym.create('$parentfp',paranr,vs_value,
                 vs:=cparavarsym.create('$parentfp',paranr,vs_value,
                       tprocdef(pd.owner.defowner).parentfpstructptrtype,[vo_is_parentfp,vo_is_hidden_para]);
                       tprocdef(pd.owner.defowner).parentfpstructptrtype,[vo_is_parentfp,vo_is_hidden_para]);
               end;
               end;
-            pd.parast.insert(vs);
+            pd.parast.insertsym(vs);
 
 
             current_tokenpos:=storepos;
             current_tokenpos:=storepos;
           end;
           end;
@@ -187,13 +187,13 @@ implementation
           begin
           begin
             { insert Objective-C self and selector parameters }
             { insert Objective-C self and selector parameters }
             vs:=cparavarsym.create('$_cmd',paranr_objc_cmd,vs_value,objc_seltype,[vo_is_msgsel,vo_is_hidden_para]);
             vs:=cparavarsym.create('$_cmd',paranr_objc_cmd,vs_value,objc_seltype,[vo_is_msgsel,vo_is_hidden_para]);
-            pd.parast.insert(vs);
+            pd.parast.insertsym(vs);
             { make accessible to code }
             { make accessible to code }
             sl:=tpropaccesslist.create;
             sl:=tpropaccesslist.create;
             sl.addsym(sl_load,vs);
             sl.addsym(sl_load,vs);
             aliasvs:=cabsolutevarsym.create_ref('_CMD',objc_seltype,sl);
             aliasvs:=cabsolutevarsym.create_ref('_CMD',objc_seltype,sl);
             include(aliasvs.varoptions,vo_is_msgsel);
             include(aliasvs.varoptions,vo_is_msgsel);
-            tlocalsymtable(tprocdef(pd).localst).insert(aliasvs);
+            tlocalsymtable(tprocdef(pd).localst).insertsym(aliasvs);
 
 
             if (po_classmethod in pd.procoptions) then
             if (po_classmethod in pd.procoptions) then
               { compatible with what gcc does }
               { compatible with what gcc does }
@@ -202,14 +202,14 @@ implementation
               hdef:=tprocdef(pd).struct;
               hdef:=tprocdef(pd).struct;
 
 
             vs:=cparavarsym.create('$self',paranr_objc_self,vs_value,hdef,[vo_is_self,vo_is_hidden_para]);
             vs:=cparavarsym.create('$self',paranr_objc_self,vs_value,hdef,[vo_is_self,vo_is_hidden_para]);
-            pd.parast.insert(vs);
+            pd.parast.insertsym(vs);
           end
           end
         else if (pd.typ=procvardef) and
         else if (pd.typ=procvardef) and
            pd.is_methodpointer then
            pd.is_methodpointer then
           begin
           begin
             { Generate self variable }
             { Generate self variable }
             vs:=cparavarsym.create('$self',paranr_self,vs_value,voidpointertype,[vo_is_self,vo_is_hidden_para]);
             vs:=cparavarsym.create('$self',paranr_self,vs_value,voidpointertype,[vo_is_self,vo_is_hidden_para]);
-            pd.parast.insert(vs);
+            pd.parast.insertsym(vs);
           end
           end
         { while only procvardefs of this type can be declared in Pascal code,
         { while only procvardefs of this type can be declared in Pascal code,
           internally we also generate procdefs of this type when creating
           internally we also generate procdefs of this type when creating
@@ -225,7 +225,7 @@ implementation
             vs:=cparavarsym.create('$_block_literal',paranr_blockselfpara,vs_value,
             vs:=cparavarsym.create('$_block_literal',paranr_blockselfpara,vs_value,
               hdef,[vo_is_hidden_para,vo_is_parentfp]
               hdef,[vo_is_hidden_para,vo_is_parentfp]
             );
             );
-            pd.parast.insert(vs);
+            pd.parast.insertsym(vs);
             if pd.typ=procdef then
             if pd.typ=procdef then
               begin
               begin
                 { make accessible to code }
                 { make accessible to code }
@@ -233,7 +233,7 @@ implementation
                 sl.addsym(sl_load,vs);
                 sl.addsym(sl_load,vs);
                 aliasvs:=cabsolutevarsym.create_ref('FPC_BLOCK_SELF',hdef,sl);
                 aliasvs:=cabsolutevarsym.create_ref('FPC_BLOCK_SELF',hdef,sl);
                 include(aliasvs.varoptions,vo_is_parentfp);
                 include(aliasvs.varoptions,vo_is_parentfp);
-                tlocalsymtable(tprocdef(pd).localst).insert(aliasvs);
+                tlocalsymtable(tprocdef(pd).localst).insertsym(aliasvs);
               end;
               end;
           end
           end
         else
         else
@@ -261,7 +261,7 @@ implementation
                        )) then
                        )) then
                  begin
                  begin
                    vs:=cparavarsym.create('$vmt',paranr_vmt,vs_value,cclassrefdef.create(tprocdef(pd).struct),[vo_is_vmt,vo_is_hidden_para]);
                    vs:=cparavarsym.create('$vmt',paranr_vmt,vs_value,cclassrefdef.create(tprocdef(pd).struct),[vo_is_vmt,vo_is_hidden_para]);
-                   pd.parast.insert(vs);
+                   pd.parast.insertsym(vs);
                  end;
                  end;
 
 
                 { for helpers the type of Self is equivalent to the extended
                 { for helpers the type of Self is equivalent to the extended
@@ -286,7 +286,7 @@ implementation
                     hdef:=selfdef;
                     hdef:=selfdef;
                   end;
                   end;
                 vs:=cparavarsym.create('$self',paranr_self,vsp,hdef,[vo_is_self,vo_is_hidden_para]);
                 vs:=cparavarsym.create('$self',paranr_self,vsp,hdef,[vo_is_self,vo_is_hidden_para]);
-                pd.parast.insert(vs);
+                pd.parast.insertsym(vs);
 
 
                 current_tokenpos:=storepos;
                 current_tokenpos:=storepos;
               end;
               end;
@@ -319,7 +319,7 @@ implementation
                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]);
               vs:=clocalvarsym.create('$result',vs_value,pd.returndef,[vo_is_funcret]);
-              pd.localst.insert(vs);
+              pd.localst.insertsym(vs);
               pd.funcretsym:=vs;
               pd.funcretsym:=vs;
             end;
             end;
 
 
@@ -336,7 +336,7 @@ implementation
                sl.addsym(sl_load,pd.funcretsym);
                sl.addsym(sl_load,pd.funcretsym);
                aliasvs:=cabsolutevarsym.create_ref(hs,pd.returndef,sl);
                aliasvs:=cabsolutevarsym.create_ref(hs,pd.returndef,sl);
                include(aliasvs.varoptions,vo_is_funcret);
                include(aliasvs.varoptions,vo_is_funcret);
-               tlocalsymtable(pd.localst).insert(aliasvs);
+               tlocalsymtable(pd.localst).insertsym(aliasvs);
              end;
              end;
 
 
            { insert result also if support is on }
            { insert result also if support is on }
@@ -347,7 +347,7 @@ implementation
               aliasvs:=cabsolutevarsym.create_ref('RESULT',pd.returndef,sl);
               aliasvs:=cabsolutevarsym.create_ref('RESULT',pd.returndef,sl);
               include(aliasvs.varoptions,vo_is_funcret);
               include(aliasvs.varoptions,vo_is_funcret);
               include(aliasvs.varoptions,vo_is_result);
               include(aliasvs.varoptions,vo_is_result);
-              tlocalsymtable(pd.localst).insert(aliasvs);
+              tlocalsymtable(pd.localst).insertsym(aliasvs);
             end;
             end;
 
 
          end;
          end;
@@ -366,7 +366,7 @@ implementation
               variable it not needed at all, but that the HRESULT is set when the method
               variable it not needed at all, but that the HRESULT is set when the method
               is finalized) }
               is finalized) }
             vs.varregable:=vr_none;
             vs.varregable:=vr_none;
-            pd.localst.insert(vs);
+            pd.localst.insertsym(vs);
           end;
           end;
 
 
         current_tokenpos:=storepos;
         current_tokenpos:=storepos;
@@ -407,7 +407,7 @@ implementation
              begin
              begin
                hvs:=cparavarsym.create('$high'+name,paranr+1,vs_const,sizesinttype,[vo_is_high_para,vo_is_hidden_para]);
                hvs:=cparavarsym.create('$high'+name,paranr+1,vs_const,sizesinttype,[vo_is_high_para,vo_is_hidden_para]);
                hvs.symoptions:=[];
                hvs.symoptions:=[];
-               owner.insert(hvs);
+               owner.insertsym(hvs);
                { don't place to register if it will be accessed from implicit finally block }
                { don't place to register if it will be accessed from implicit finally block }
                if (varspez=vs_value) and
                if (varspez=vs_value) and
                   is_open_array(vardef) and
                   is_open_array(vardef) and
@@ -435,7 +435,7 @@ implementation
                 begin
                 begin
                   hvs:=cparavarsym.create('$typinfo'+name,paranr+1,vs_const,voidpointertype,
                   hvs:=cparavarsym.create('$typinfo'+name,paranr+1,vs_const,voidpointertype,
                                           [vo_is_typinfo_para,vo_is_hidden_para]);
                                           [vo_is_typinfo_para,vo_is_hidden_para]);
-                  owner.insert(hvs);
+                  owner.insertsym(hvs);
                 end;
                 end;
             end;
             end;
          end;
          end;
@@ -898,7 +898,7 @@ implementation
                            symentry:=currpd.parast.Find('self');
                            symentry:=currpd.parast.Find('self');
                            if symentry<>nil then
                            if symentry<>nil then
                             begin
                             begin
-                              currpd.parast.Delete(symentry);
+                              currpd.parast.DeleteSym(symentry);
                               currpd.calcparas;
                               currpd.calcparas;
                             end;
                             end;
                           end;
                           end;
@@ -1229,7 +1229,7 @@ implementation
           begin
           begin
             nestedvars:=clocalvarsym.create('$nestedvars',vs_var,nestedvarsdef,[]);
             nestedvars:=clocalvarsym.create('$nestedvars',vs_var,nestedvarsdef,[]);
             include(nestedvars.symoptions,sp_internal);
             include(nestedvars.symoptions,sp_internal);
-            pd.localst.insert(nestedvars);
+            pd.localst.insertsym(nestedvars);
             pd.parentfpstruct:=nestedvars;
             pd.parentfpstruct:=nestedvars;
             pd.parentfpinitblock:=cblocknode.create(nil);
             pd.parentfpinitblock:=cblocknode.create(nil);
           end;
           end;

+ 1 - 1
compiler/procdefutil.pas

@@ -81,7 +81,7 @@ implementation
       include(result.procoptions,po_hascallingconvention);
       include(result.procoptions,po_hascallingconvention);
       handle_calling_convention(result,hcc_default_actions_impl);
       handle_calling_convention(result,hcc_default_actions_impl);
       sym:=cprocsym.create(basesymname+result.unique_id_str);
       sym:=cprocsym.create(basesymname+result.unique_id_str);
-      st.insert(sym);
+      st.insertsym(sym);
 
 
       result.procsym:=sym;
       result.procsym:=sym;
       proc_add_definition(result);
       proc_add_definition(result);

+ 1 - 1
compiler/pstatmnt.pas

@@ -994,7 +994,7 @@ implementation
                             end;
                             end;
                           excepTSymtable:=tstt_excepTSymtable.create;
                           excepTSymtable:=tstt_excepTSymtable.create;
                           excepTSymtable.defowner:=current_procinfo.procdef;
                           excepTSymtable.defowner:=current_procinfo.procdef;
-                          excepTSymtable.insert(sym);
+                          excepTSymtable.insertsym(sym);
                           symtablestack.push(excepTSymtable);
                           symtablestack.push(excepTSymtable);
                        end
                        end
                      else
                      else

+ 1 - 1
compiler/psub.pas

@@ -779,7 +779,7 @@ implementation
             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,[]);
                 constructionsuccessful:=clocalvarsym.create(internaltypeprefixName[itp_vmt_afterconstruction_local],vs_value,ptrsinttype,[]);
-                procdef.localst.insert(constructionsuccessful,false);
+                procdef.localst.insertsym(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
                    (srsym.typ<>procsym) then
                    (srsym.typ<>procsym) then

+ 63 - 63
compiler/psystem.pas

@@ -53,70 +53,70 @@ implementation
         all intern procedures for the system unit
         all intern procedures for the system unit
       }
       }
       begin
       begin
-        systemunit.insert(csyssym.create('Concat',in_concat_x));
-        systemunit.insert(csyssym.create('Write',in_write_x));
-        systemunit.insert(csyssym.create('WriteLn',in_writeln_x));
-        systemunit.insert(csyssym.create('WriteStr',in_writestr_x));
-        systemunit.insert(csyssym.create('Assigned',in_assigned_x));
-        systemunit.insert(csyssym.create('Read',in_read_x));
-        systemunit.insert(csyssym.create('ReadLn',in_readln_x));
-        systemunit.insert(csyssym.create('ReadStr',in_readstr_x));
-        systemunit.insert(csyssym.create('Ofs',in_ofs_x));
-        systemunit.insert(csyssym.create('SizeOf',in_sizeof_x));
-        systemunit.insert(csyssym.create('BitSizeOf',in_bitsizeof_x));
-        systemunit.insert(csyssym.create('TypeOf',in_typeof_x));
-        systemunit.insert(csyssym.create('Low',in_low_x));
-        systemunit.insert(csyssym.create('High',in_high_x));
-        systemunit.insert(csyssym.create('Slice',in_slice_x));
-        systemunit.insert(csyssym.create('Seg',in_seg_x));
-        systemunit.insert(csyssym.create('Ord',in_ord_x));
-        systemunit.insert(csyssym.create('Chr',in_chr_byte));
-        systemunit.insert(csyssym.create('Pred',in_pred_x));
-        systemunit.insert(csyssym.create('Succ',in_succ_x));
-        systemunit.insert(csyssym.create('Exclude',in_exclude_x_y));
-        systemunit.insert(csyssym.create('Include',in_include_x_y));
-        systemunit.insert(csyssym.create('Pack',in_pack_x_y_z));
-        systemunit.insert(csyssym.create('Unpack',in_unpack_x_y_z));
-        systemunit.insert(csyssym.create('Break',in_break));
-        systemunit.insert(csyssym.create('Exit',in_exit));
-        systemunit.insert(csyssym.create('Continue',in_continue));
-        systemunit.insert(csyssym.create('Leave',in_leave)); {macpas only}
-        systemunit.insert(csyssym.create('Cycle',in_cycle)); {macpas only}
-        systemunit.insert(csyssym.create('Dec',in_dec_x));
-        systemunit.insert(csyssym.create('Inc',in_inc_x));
-        systemunit.insert(csyssym.create('Str',in_str_x_string));
-        systemunit.insert(csyssym.create('Assert',in_assert_x_y));
-        systemunit.insert(csyssym.create('Val',in_val_x));
-        systemunit.insert(csyssym.create('Addr',in_addr_x));
+        systemunit.insertsym(csyssym.create('Concat',in_concat_x));
+        systemunit.insertsym(csyssym.create('Write',in_write_x));
+        systemunit.insertsym(csyssym.create('WriteLn',in_writeln_x));
+        systemunit.insertsym(csyssym.create('WriteStr',in_writestr_x));
+        systemunit.insertsym(csyssym.create('Assigned',in_assigned_x));
+        systemunit.insertsym(csyssym.create('Read',in_read_x));
+        systemunit.insertsym(csyssym.create('ReadLn',in_readln_x));
+        systemunit.insertsym(csyssym.create('ReadStr',in_readstr_x));
+        systemunit.insertsym(csyssym.create('Ofs',in_ofs_x));
+        systemunit.insertsym(csyssym.create('SizeOf',in_sizeof_x));
+        systemunit.insertsym(csyssym.create('BitSizeOf',in_bitsizeof_x));
+        systemunit.insertsym(csyssym.create('TypeOf',in_typeof_x));
+        systemunit.insertsym(csyssym.create('Low',in_low_x));
+        systemunit.insertsym(csyssym.create('High',in_high_x));
+        systemunit.insertsym(csyssym.create('Slice',in_slice_x));
+        systemunit.insertsym(csyssym.create('Seg',in_seg_x));
+        systemunit.insertsym(csyssym.create('Ord',in_ord_x));
+        systemunit.insertsym(csyssym.create('Chr',in_chr_byte));
+        systemunit.insertsym(csyssym.create('Pred',in_pred_x));
+        systemunit.insertsym(csyssym.create('Succ',in_succ_x));
+        systemunit.insertsym(csyssym.create('Exclude',in_exclude_x_y));
+        systemunit.insertsym(csyssym.create('Include',in_include_x_y));
+        systemunit.insertsym(csyssym.create('Pack',in_pack_x_y_z));
+        systemunit.insertsym(csyssym.create('Unpack',in_unpack_x_y_z));
+        systemunit.insertsym(csyssym.create('Break',in_break));
+        systemunit.insertsym(csyssym.create('Exit',in_exit));
+        systemunit.insertsym(csyssym.create('Continue',in_continue));
+        systemunit.insertsym(csyssym.create('Leave',in_leave)); {macpas only}
+        systemunit.insertsym(csyssym.create('Cycle',in_cycle)); {macpas only}
+        systemunit.insertsym(csyssym.create('Dec',in_dec_x));
+        systemunit.insertsym(csyssym.create('Inc',in_inc_x));
+        systemunit.insertsym(csyssym.create('Str',in_str_x_string));
+        systemunit.insertsym(csyssym.create('Assert',in_assert_x_y));
+        systemunit.insertsym(csyssym.create('Val',in_val_x));
+        systemunit.insertsym(csyssym.create('Addr',in_addr_x));
 {$ifdef i8086}
 {$ifdef i8086}
-        systemunit.insert(csyssym.create('FarAddr',in_faraddr_x));
+        systemunit.insertsym(csyssym.create('FarAddr',in_faraddr_x));
 {$endif i8086}
 {$endif i8086}
-        systemunit.insert(csyssym.create('TypeInfo',in_typeinfo_x));
-        systemunit.insert(csyssym.create('SetLength',in_setlength_x));
-        systemunit.insert(csyssym.create('Copy',in_copy_x));
-        systemunit.insert(csyssym.create('Initialize',in_initialize_x));
-        systemunit.insert(csyssym.create('Finalize',in_finalize_x));
-        systemunit.insert(csyssym.create('Length',in_length_x));
-        systemunit.insert(csyssym.create('New',in_new_x));
-        systemunit.insert(csyssym.create('Dispose',in_dispose_x));
+        systemunit.insertsym(csyssym.create('TypeInfo',in_typeinfo_x));
+        systemunit.insertsym(csyssym.create('SetLength',in_setlength_x));
+        systemunit.insertsym(csyssym.create('Copy',in_copy_x));
+        systemunit.insertsym(csyssym.create('Initialize',in_initialize_x));
+        systemunit.insertsym(csyssym.create('Finalize',in_finalize_x));
+        systemunit.insertsym(csyssym.create('Length',in_length_x));
+        systemunit.insertsym(csyssym.create('New',in_new_x));
+        systemunit.insertsym(csyssym.create('Dispose',in_dispose_x));
 {$ifdef SUPPORT_GET_FRAME}
 {$ifdef SUPPORT_GET_FRAME}
-        systemunit.insert(csyssym.create('Get_Frame',in_get_frame));
+        systemunit.insertsym(csyssym.create('Get_Frame',in_get_frame));
 {$endif SUPPORT_GET_FRAME}
 {$endif SUPPORT_GET_FRAME}
-        systemunit.insert(csyssym.create('Unaligned',in_unaligned_x));
-        systemunit.insert(csyssym.create('Aligned',in_aligned_x));
-        systemunit.insert(csyssym.create('Volatile',in_volatile_x));
-        systemunit.insert(csyssym.create('ObjCSelector',in_objc_selector_x)); { objc only }
-        systemunit.insert(csyssym.create('ObjCEncode',in_objc_encode_x)); { objc only }
-        systemunit.insert(csyssym.create('Default',in_default_x));
-        systemunit.insert(csyssym.create('SetString',in_setstring_x_y_z));
-        systemunit.insert(csyssym.create('Insert',in_insert_x_y_z));
-        systemunit.insert(csyssym.create('Delete',in_delete_x_y_z));
-        systemunit.insert(csyssym.create('GetTypeKind',in_gettypekind_x));
-        systemunit.insert(csyssym.create('IsManagedType',in_ismanagedtype_x));
-        systemunit.insert(csyssym.create('IsConstValue',in_isconstvalue_x));
-        systemunit.insert(csyssym.create('fpc_eh_return_data_regno', in_const_eh_return_data_regno));
-        systemunit.insert(cconstsym.create_ord('False',constord,0,pasbool1type));
-        systemunit.insert(cconstsym.create_ord('True',constord,1,pasbool1type));
+        systemunit.insertsym(csyssym.create('Unaligned',in_unaligned_x));
+        systemunit.insertsym(csyssym.create('Aligned',in_aligned_x));
+        systemunit.insertsym(csyssym.create('Volatile',in_volatile_x));
+        systemunit.insertsym(csyssym.create('ObjCSelector',in_objc_selector_x)); { objc only }
+        systemunit.insertsym(csyssym.create('ObjCEncode',in_objc_encode_x)); { objc only }
+        systemunit.insertsym(csyssym.create('Default',in_default_x));
+        systemunit.insertsym(csyssym.create('SetString',in_setstring_x_y_z));
+        systemunit.insertsym(csyssym.create('Insert',in_insert_x_y_z));
+        systemunit.insertsym(csyssym.create('Delete',in_delete_x_y_z));
+        systemunit.insertsym(csyssym.create('GetTypeKind',in_gettypekind_x));
+        systemunit.insertsym(csyssym.create('IsManagedType',in_ismanagedtype_x));
+        systemunit.insertsym(csyssym.create('IsConstValue',in_isconstvalue_x));
+        systemunit.insertsym(csyssym.create('fpc_eh_return_data_regno', in_const_eh_return_data_regno));
+        systemunit.insertsym(cconstsym.create_ord('False',constord,0,pasbool1type));
+        systemunit.insertsym(cconstsym.create_ord('True',constord,1,pasbool1type));
       end;
       end;
 
 
 
 
@@ -228,12 +228,12 @@ implementation
         function addtype(const s:string;def:tdef):ttypesym;
         function addtype(const s:string;def:tdef):ttypesym;
         begin
         begin
           result:=ctypesym.create(s,def);
           result:=ctypesym.create(s,def);
-          systemunit.insert(result);
+          systemunit.insertsym(result);
         end;
         end;
 
 
         procedure addfield(recst:tabstractrecordsymtable;sym:tfieldvarsym);
         procedure addfield(recst:tabstractrecordsymtable;sym:tfieldvarsym);
         begin
         begin
-          recst.insert(sym);
+          recst.insertsym(sym);
           recst.addfield(sym,vis_hidden);
           recst.addfield(sym,vis_hidden);
         end;
         end;
 
 
@@ -647,7 +647,7 @@ 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_name,pvmttype));
+            systemunit.insertsym(ctypesym.create('$'+pvmt_name,pvmttype));
             addfield(hrecst,cfieldvarsym.create('$length',vs_value,sizesinttype,[]));
             addfield(hrecst,cfieldvarsym.create('$length',vs_value,sizesinttype,[]));
             addfield(hrecst,cfieldvarsym.create('$mlength',vs_value,sizesinttype,[]));
             addfield(hrecst,cfieldvarsym.create('$mlength',vs_value,sizesinttype,[]));
             addfield(hrecst,cfieldvarsym.create('$parent',vs_value,pvmttype,[]));
             addfield(hrecst,cfieldvarsym.create('$parent',vs_value,pvmttype,[]));

+ 2 - 2
compiler/ptype.pas

@@ -1758,9 +1758,9 @@ implementation
                           Message(parser_w_enumeration_out_of_range)
                           Message(parser_w_enumeration_out_of_range)
                         else
                         else
                           Message(parser_e_enumeration_out_of_range);
                           Message(parser_e_enumeration_out_of_range);
-                      tenumsymtable(aktenumdef.symtable).insert(cenumsym.create(s,aktenumdef,longint(l.svalue)));
+                      tenumsymtable(aktenumdef.symtable).insertsym(cenumsym.create(s,aktenumdef,longint(l.svalue)));
                       if not (cs_scopedenums in current_settings.localswitches) then
                       if not (cs_scopedenums in current_settings.localswitches) then
-                        tstoredsymtable(aktenumdef.owner).insert(cenumsym.create(s,aktenumdef,longint(l.svalue)));
+                        tstoredsymtable(aktenumdef.owner).insertsym(cenumsym.create(s,aktenumdef,longint(l.svalue)));
                       current_tokenpos:=storepos;
                       current_tokenpos:=storepos;
                     end;
                     end;
                 until not try_to_consume(_COMMA);
                 until not try_to_consume(_COMMA);

+ 3 - 3
compiler/scanner.pas

@@ -2309,7 +2309,7 @@ type
           begin
           begin
             mac:=tmacro.create(hs);
             mac:=tmacro.create(hs);
             mac.defined:=true;
             mac.defined:=true;
-            current_module.localmacrosymtable.insert(mac);
+            current_module.localmacrosymtable.insertsym(mac);
           end
           end
         else
         else
           begin
           begin
@@ -2419,7 +2419,7 @@ type
             mac:=tmacro.create(hs);
             mac:=tmacro.create(hs);
             mac.defined:=true;
             mac.defined:=true;
             mac.is_compiler_var:=true;
             mac.is_compiler_var:=true;
-            current_module.localmacrosymtable.insert(mac);
+            current_module.localmacrosymtable.insertsym(mac);
           end
           end
         else
         else
           begin
           begin
@@ -2495,7 +2495,7 @@ type
           begin
           begin
              mac:=tmacro.create(hs);
              mac:=tmacro.create(hs);
              mac.defined:=false;
              mac.defined:=false;
-             current_module.localmacrosymtable.insert(mac);
+             current_module.localmacrosymtable.insertsym(mac);
           end
           end
         else
         else
           begin
           begin

+ 4 - 4
compiler/symbase.pas

@@ -112,8 +112,8 @@ interface
           function  getcopy:TSymtable;
           function  getcopy:TSymtable;
           procedure clear;virtual;
           procedure clear;virtual;
           function  checkduplicate(var s:THashedIDString;sym:TSymEntry):boolean;virtual;
           function  checkduplicate(var s:THashedIDString;sym:TSymEntry):boolean;virtual;
-          procedure insert(sym:TSymEntry;checkdup:boolean=true);virtual;
-          procedure Delete(sym:TSymEntry);virtual;
+          procedure insertsym(sym:TSymEntry;checkdup:boolean=true);virtual;
+          procedure Deletesym(sym:TSymEntry);virtual;
           function  Find(const s:TIDString) : TSymEntry;
           function  Find(const s:TIDString) : TSymEntry;
           function  FindWithHash(const s:THashedIDString) : TSymEntry;virtual;
           function  FindWithHash(const s:THashedIDString) : TSymEntry;virtual;
           procedure insertdef(def:TDefEntry);virtual;
           procedure insertdef(def:TDefEntry);virtual;
@@ -344,7 +344,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure TSymtable.insert(sym:TSymEntry;checkdup:boolean=true);
+    procedure TSymtable.insertsym(sym:TSymEntry;checkdup:boolean=true);
       var
       var
         hashedid : THashedIDString;
         hashedid : THashedIDString;
       begin
       begin
@@ -368,7 +368,7 @@ implementation
       end;
       end;
 
 
 
 
-    procedure TSymtable.Delete(sym:TSymEntry);
+    procedure TSymtable.Deletesym(sym:TSymEntry);
       begin
       begin
         if sym.Owner<>self then
         if sym.Owner<>self then
           internalerror(200611121);
           internalerror(200611121);

+ 8 - 8
compiler/symcreat.pas

@@ -1203,7 +1203,7 @@ implementation
       else
       else
         begin
         begin
           ps:=cprocsym.create(realname);
           ps:=cprocsym.create(realname);
-          newparentst.insert(ps);
+          newparentst.insertsym(ps);
         end;
         end;
       pd.procsym:=ps;
       pd.procsym:=ps;
       pd.struct:=newstruct;
       pd.struct:=newstruct;
@@ -1275,7 +1275,7 @@ implementation
           result:=cfieldvarsym.create(symrealname,vs_value,fieldvardef,[]);
           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.insertsym(result);
           trecordsymtable(nestedvarsst).addfield(tfieldvarsym(result),vis_public);
           trecordsymtable(nestedvarsst).addfield(tfieldvarsym(result),vis_public);
 
 
           { add initialization with original value if it's a parameter }
           { add initialization with original value if it's a parameter }
@@ -1341,7 +1341,7 @@ implementation
             routine; ignore duplicates, because this will also check the
             routine; ignore duplicates, because this will also check the
             parasymtable and we want to override parameters with our local
             parasymtable and we want to override parameters with our local
             versions }
             versions }
-          pd.localst.insert(aliassym,false);
+          pd.localst.insertsym(aliassym,false);
         end;
         end;
     end;
     end;
 
 
@@ -1380,7 +1380,7 @@ implementation
         since a subscriptn requires something to subscript and
         since a subscriptn requires something to subscript and
         there is nothing in this case (class+field name will be
         there is nothing in this case (class+field name will be
         encoded in the mangled symbol name) }
         encoded in the mangled symbol name) }
-      recst.insert(hstaticvs);
+      recst.insertsym(hstaticvs);
       { only set the staticvarsym's basename (= field name, without any
       { only set the staticvarsym's basename (= field name, without any
         mangling), because generating the fully mangled name right now can
         mangling), because generating the fully mangled name right now can
         result in a wrong string in case the field's type is a forward
         result in a wrong string in case the field's type is a forward
@@ -1395,9 +1395,9 @@ implementation
 {$else jvm}
 {$else jvm}
       include(hstaticvs.symoptions,sp_internal);
       include(hstaticvs.symoptions,sp_internal);
       if df_generic in tdef(recst.defowner).defoptions then
       if df_generic in tdef(recst.defowner).defoptions then
-        tabstractrecordsymtable(recst).insert(hstaticvs)
+        tabstractrecordsymtable(recst).insertsym(hstaticvs)
       else
       else
-        tdef(tabstractrecordsymtable(recst).defowner).get_top_level_symtable(false).insert(hstaticvs);
+        tdef(tabstractrecordsymtable(recst).defowner).get_top_level_symtable(false).insertsym(hstaticvs);
 {$endif jvm}
 {$endif jvm}
       { generate the symbol for the access }
       { generate the symbol for the access }
       sl:=tpropaccesslist.create;
       sl:=tpropaccesslist.create;
@@ -1409,7 +1409,7 @@ implementation
         is_visible_for_object), which means that the load will fail if this
         is_visible_for_object), which means that the load will fail if this
         symbol is e.g. "strict private" while the property is public }
         symbol is e.g. "strict private" while the property is public }
       tmp:=cabsolutevarsym.create_ref('$'+static_name,fieldvs.vardef,sl);
       tmp:=cabsolutevarsym.create_ref('$'+static_name,fieldvs.vardef,sl);
-      recst.insert(tmp);
+      recst.insertsym(tmp);
       result:=hstaticvs;
       result:=hstaticvs;
     end;
     end;
 
 
@@ -1487,7 +1487,7 @@ implementation
           ps.register_sym;
           ps.register_sym;
           { the RTTI always references this symbol }
           { the RTTI always references this symbol }
           inc(ps.refs);
           inc(ps.refs);
-          current_module.localsymtable.insert(ps);
+          current_module.localsymtable.insertsym(ps);
           pd:=cprocdef.create(normal_function_level,true);
           pd:=cprocdef.create(normal_function_level,true);
           { always register the def }
           { always register the def }
           pd.register_def;
           pd.register_def;

+ 5 - 5
compiler/symdef.pas

@@ -5099,7 +5099,7 @@ implementation
             { 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;
-            where.insert(ts);
+            where.insertsym(ts);
           end;
           end;
         symtablestack:=oldsymtablestack;
         symtablestack:=oldsymtablestack;
         { don't create RTTI for internal types, these are not exported }
         { don't create RTTI for internal types, these are not exported }
@@ -5122,7 +5122,7 @@ implementation
         else
         else
           pname:=@optionalname;
           pname:=@optionalname;
         sym:=cfieldvarsym.create(pname^,vs_value,def,[]);
         sym:=cfieldvarsym.create(pname^,vs_value,def,[]);
-        symtable.insert(sym);
+        symtable.insertsym(sym);
         trecordsymtable(symtable).addfield(sym,vis_hidden);
         trecordsymtable(symtable).addfield(sym,vis_hidden);
         result:=sym;
         result:=sym;
       end;
       end;
@@ -5799,7 +5799,7 @@ implementation
                     npvs:=cparavarsym.create('$high'+paraprefix+copy(pvs.name,5,length(pvs.name)),pvs.paranr,pvs.varspez,
                     npvs:=cparavarsym.create('$high'+paraprefix+copy(pvs.name,5,length(pvs.name)),pvs.paranr,pvs.varspez,
                       pvs.vardef,pvs.varoptions);
                       pvs.vardef,pvs.varoptions);
                   npvs.defaultconstsym:=pvs.defaultconstsym;
                   npvs.defaultconstsym:=pvs.defaultconstsym;
-                  tabstractprocdef(result).parast.insert(npvs);
+                  tabstractprocdef(result).parast.insertsym(npvs);
                 end;
                 end;
               constsym:
               constsym:
                 begin
                 begin
@@ -7852,7 +7852,7 @@ implementation
                    in the implementation, and they cannot be merged since only
                    in the implementation, and they cannot be merged since only
                    the once in the interface must be saved to the ppu/visible
                    the once in the interface must be saved to the ppu/visible
                    from other units }
                    from other units }
-            st.insert(psym,false);
+            st.insertsym(psym,false);
           end
           end
         else if (psym.typ<>procsym) then
         else if (psym.typ<>procsym) then
           internalerror(2009111501);
           internalerror(2009111501);
@@ -7974,7 +7974,7 @@ implementation
                end;
                end;
              vmt_field:=cfieldvarsym.create('_vptr$'+objname^,vs_value,voidpointertype,[]);
              vmt_field:=cfieldvarsym.create('_vptr$'+objname^,vs_value,voidpointertype,[]);
              hidesym(vmt_field);
              hidesym(vmt_field);
-             tObjectSymtable(symtable).insert(vmt_field);
+             tObjectSymtable(symtable).insertsym(vmt_field);
              tObjectSymtable(symtable).addfield(tfieldvarsym(vmt_field),vis_hidden);
              tObjectSymtable(symtable).addfield(tfieldvarsym(vmt_field),vis_hidden);
              include(objectoptions,oo_has_vmt);
              include(objectoptions,oo_has_vmt);
           end;
           end;

+ 4 - 4
compiler/symsym.pas

@@ -1633,12 +1633,12 @@ implementation
             if assigned(readprocdef) then
             if assigned(readprocdef) then
               begin
               begin
                 hparavs:=cparavarsym.create(orig.RealName,orig.paranr,orig.varspez,orig.vardef,[]);
                 hparavs:=cparavarsym.create(orig.RealName,orig.paranr,orig.varspez,orig.vardef,[]);
-                readprocdef.parast.insert(hparavs);
+                readprocdef.parast.insertsym(hparavs);
               end;
               end;
             if assigned(writeprocdef) then
             if assigned(writeprocdef) then
               begin
               begin
                 hparavs:=cparavarsym.create(orig.RealName,orig.paranr,orig.varspez,orig.vardef,[]);
                 hparavs:=cparavarsym.create(orig.RealName,orig.paranr,orig.varspez,orig.vardef,[]);
-                writeprocdef.parast.insert(hparavs);
+                writeprocdef.parast.insertsym(hparavs);
               end;
               end;
           end;
           end;
       end;
       end;
@@ -1652,12 +1652,12 @@ implementation
         if assigned(readprocdef) then
         if assigned(readprocdef) then
           begin
           begin
             hparavs:=cparavarsym.create('$index',10*paranr,vs_value,indexdef,[]);
             hparavs:=cparavarsym.create('$index',10*paranr,vs_value,indexdef,[]);
-            readprocdef.parast.insert(hparavs);
+            readprocdef.parast.insertsym(hparavs);
           end;
           end;
         if assigned(writeprocdef) then
         if assigned(writeprocdef) then
           begin
           begin
             hparavs:=cparavarsym.create('$index',10*paranr,vs_value,indexdef,[]);
             hparavs:=cparavarsym.create('$index',10*paranr,vs_value,indexdef,[]);
-            writeprocdef.parast.insert(hparavs);
+            writeprocdef.parast.insertsym(hparavs);
           end;
           end;
       end;
       end;
 
 

+ 19 - 19
compiler/symtable.pas

@@ -55,8 +55,8 @@ interface
           procedure writesyms(ppufile:tcompilerppufile);
           procedure writesyms(ppufile:tcompilerppufile);
        public
        public
           constructor create(const s:string);
           constructor create(const s:string);
-          procedure insert(sym:TSymEntry;checkdup:boolean=true);override;
-          procedure delete(sym:TSymEntry);override;
+          procedure insertsym(sym:TSymEntry;checkdup:boolean=true);override;
+          procedure deletesym(sym:TSymEntry);override;
           { load/write }
           { load/write }
           procedure ppuload(ppufile:tcompilerppufile);virtual;
           procedure ppuload(ppufile:tcompilerppufile);virtual;
           procedure ppuwrite(ppufile:tcompilerppufile);virtual;
           procedure ppuwrite(ppufile:tcompilerppufile);virtual;
@@ -291,7 +291,7 @@ interface
 
 
        tenumsymtable = class(tabstractsubsymtable)
        tenumsymtable = class(tabstractsubsymtable)
        public
        public
-          procedure insert(sym: TSymEntry; checkdup: boolean = true); override;
+          procedure insertsym(sym: TSymEntry; checkdup: boolean = true); override;
           constructor create(adefowner:tdef);
           constructor create(adefowner:tdef);
        end;
        end;
 
 
@@ -506,16 +506,16 @@ implementation
       end;
       end;
 
 
 
 
-    procedure tstoredsymtable.insert(sym:TSymEntry;checkdup:boolean=true);
+    procedure tstoredsymtable.insertsym(sym:TSymEntry;checkdup:boolean=true);
       begin
       begin
-        inherited insert(sym,checkdup);
+        inherited insertsym(sym,checkdup);
         init_final_check_done:=false;
         init_final_check_done:=false;
       end;
       end;
 
 
 
 
-    procedure tstoredsymtable.delete(sym:TSymEntry);
+    procedure tstoredsymtable.deletesym(sym:TSymEntry);
       begin
       begin
-        inherited delete(sym);
+        inherited deletesym(sym);
         init_final_check_done:=false;
         init_final_check_done:=false;
       end;
       end;
 
 
@@ -635,7 +635,7 @@ implementation
            end;
            end;
            if assigned(sym) then
            if assigned(sym) then
              tstoredsym(sym).ppuload_subentries(ppufile);
              tstoredsym(sym).ppuload_subentries(ppufile);
-           Insert(sym,false);
+           InsertSym(sym,false);
          until false;
          until false;
       end;
       end;
 
 
@@ -1885,7 +1885,7 @@ implementation
 
 
             { add to this record symtable, checking for duplicate names }
             { add to this record symtable, checking for duplicate names }
 //            unionst.SymList.List.List^[i].Data:=nil;
 //            unionst.SymList.List.List^[i].Data:=nil;
-            insert(sym);
+            insertsym(sym);
             varalign:=tfieldvarsym(sym).vardef.alignment;
             varalign:=tfieldvarsym(sym).vardef.alignment;
             if varalign=0 then
             if varalign=0 then
               varalign:=size_2_align(tfieldvarsym(sym).getsize);
               varalign:=size_2_align(tfieldvarsym(sym).getsize);
@@ -2635,7 +2635,7 @@ implementation
         n,ns:string;
         n,ns:string;
         oldsym:TSymEntry;
         oldsym:TSymEntry;
       begin
       begin
-        insert(sym);
+        insertsym(sym);
         n:=sym.realname;
         n:=sym.realname;
         p:=pos('.',n);
         p:=pos('.',n);
         ns:='';
         ns:='';
@@ -2648,7 +2648,7 @@ implementation
             system.delete(n,1,p);
             system.delete(n,1,p);
             oldsym:=findnamespace(upper(ns));
             oldsym:=findnamespace(upper(ns));
             if not assigned(oldsym) then
             if not assigned(oldsym) then
-              insert(cnamespacesym.create(ns));
+              insertsym(cnamespacesym.create(ns));
             p:=pos('.',n);
             p:=pos('.',n);
           end;
           end;
       end;
       end;
@@ -2847,7 +2847,7 @@ implementation
                           TEnumSymtable
                           TEnumSymtable
 ****************************************************************************}
 ****************************************************************************}
 
 
-    procedure tenumsymtable.insert(sym: TSymEntry; checkdup: boolean);
+    procedure tenumsymtable.insertsym(sym: TSymEntry; checkdup: boolean);
       var
       var
         value: longint;
         value: longint;
         def: tenumdef;
         def: tenumdef;
@@ -2877,7 +2877,7 @@ implementation
                   def.setmax(value);
                   def.setmax(value);
               end;
               end;
           end;
           end;
-        inherited insert(sym, checkdup);
+        inherited insertsym(sym, checkdup);
       end;
       end;
 
 
     constructor tenumsymtable.create(adefowner: tdef);
     constructor tenumsymtable.create(adefowner: tdef);
@@ -4705,9 +4705,9 @@ implementation
            begin
            begin
              mac:=tmacro.create(s);
              mac:=tmacro.create(s);
              if assigned(current_module) then
              if assigned(current_module) then
-               current_module.localmacrosymtable.insert(mac)
+               current_module.localmacrosymtable.insertsym(mac)
              else
              else
-               initialmacrosymtable.insert(mac);
+               initialmacrosymtable.insertsym(mac);
            end;
            end;
          Message1(parser_c_macro_defined,mac.name);
          Message1(parser_c_macro_defined,mac.name);
          mac.defined:=true;
          mac.defined:=true;
@@ -4727,9 +4727,9 @@ implementation
            begin
            begin
              mac:=tmacro.create(s);
              mac:=tmacro.create(s);
              if assigned(current_module) then
              if assigned(current_module) then
-               current_module.localmacrosymtable.insert(mac)
+               current_module.localmacrosymtable.insertsym(mac)
              else
              else
-               initialmacrosymtable.insert(mac);
+               initialmacrosymtable.insertsym(mac);
            end
            end
          else
          else
            begin
            begin
@@ -4759,9 +4759,9 @@ implementation
              mac:=tmacro.create(s);
              mac:=tmacro.create(s);
              mac.is_compiler_var:=true;
              mac.is_compiler_var:=true;
              if assigned(current_module) then
              if assigned(current_module) then
-               current_module.localmacrosymtable.insert(mac)
+               current_module.localmacrosymtable.insertsym(mac)
              else
              else
-               initialmacrosymtable.insert(mac);
+               initialmacrosymtable.insertsym(mac);
            end
            end
          else
          else
            begin
            begin

+ 1 - 1
compiler/symutil.pas

@@ -136,7 +136,7 @@ implementation
            not assigned(def.typesym) then
            not assigned(def.typesym) then
           begin
           begin
             ts:=ctypesym.create(trecorddef(def).symtable.realname^,def);
             ts:=ctypesym.create(trecorddef(def).symtable.realname^,def);
-            st.insert(ts);
+            st.insertsym(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
               print a hint about it being unused }
               print a hint about it being unused }