* Use IncRefCountBy

git-svn-id: trunk@6142 -
This commit is contained in:
pierre 2007-01-23 05:49:05 +00:00
parent 0cfa2a6aad
commit f82d47e370

View File

@ -258,7 +258,7 @@ implementation
end; end;
staticvarsym : staticvarsym :
begin begin
inc(tabstractvarsym(symtableentry).refs); tabstractvarsym(symtableentry).IncRefCountBy(1);
{ static variables referenced in procedures or from finalization, { static variables referenced in procedures or from finalization,
variable needs to be in memory. variable needs to be in memory.
It is too hard and the benefit is too small to detect whether a It is too hard and the benefit is too small to detect whether a
@ -275,7 +275,7 @@ implementation
paravarsym, paravarsym,
localvarsym : localvarsym :
begin begin
inc(tabstractvarsym(symtableentry).refs); tabstractvarsym(symtableentry).IncRefCountBy(1);
{ Nested variable? The we need to load the framepointer of { Nested variable? The we need to load the framepointer of
the parent procedure } the parent procedure }
if assigned(current_procinfo) and if assigned(current_procinfo) and
@ -393,7 +393,7 @@ implementation
Tabstractvarsym(symtableentry).trigger_notifications(vn_onread); Tabstractvarsym(symtableentry).trigger_notifications(vn_onread);
{ count variable references } { count variable references }
if cg.t_times>1 then if cg.t_times>1 then
inc(tabstractvarsym(symtableentry).refs,cg.t_times-1); tabstractvarsym(symtableentry).IncRefCountBy(cg.t_times-1);
end; end;
procsym : procsym :
begin begin