mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 00:08:12 +02:00
compiler: remove unused variables and unneeded assignments
git-svn-id: trunk@23467 -
This commit is contained in:
parent
78f0d6f70e
commit
5d74e0578a
@ -1848,8 +1848,6 @@ implementation
|
||||
|
||||
|
||||
procedure tcg.a_loadmm_loc_reg(list: TAsmList; size: tcgsize; const loc: tlocation; const reg: tregister;shuffle : pmmshuffle);
|
||||
var
|
||||
tmpreg: tregister;
|
||||
begin
|
||||
case loc.loc of
|
||||
LOC_MMREGISTER,LOC_CMMREGISTER:
|
||||
|
@ -947,7 +947,6 @@ var
|
||||
var
|
||||
b : byte;
|
||||
newmodulename : string;
|
||||
ns: string;
|
||||
begin
|
||||
{ read interface part }
|
||||
repeat
|
||||
|
@ -493,8 +493,6 @@ implementation
|
||||
|
||||
procedure tcgcallnode.copy_back_paras;
|
||||
var
|
||||
hp,
|
||||
hp2 : tnode;
|
||||
ppn : tcallparanode;
|
||||
begin
|
||||
ppn:=tcallparanode(left);
|
||||
|
@ -513,9 +513,9 @@ interface
|
||||
end;
|
||||
|
||||
procedure Tcgtypeconvnode.second_nil_to_methodprocvar;
|
||||
|
||||
{$ifdef jvm}
|
||||
var r:Treference;
|
||||
|
||||
{$endif}
|
||||
begin
|
||||
{$ifdef jvm}
|
||||
{$ifndef nounsupported}
|
||||
|
@ -1996,7 +1996,6 @@ implementation
|
||||
function ttypeconvnode.typecheck_proc_to_procvar : tnode;
|
||||
var
|
||||
pd : tabstractprocdef;
|
||||
nestinglevel : byte;
|
||||
begin
|
||||
result:=nil;
|
||||
pd:=tabstractprocdef(left.resultdef);
|
||||
|
@ -264,7 +264,6 @@ implementation
|
||||
stat: tstatementnode;
|
||||
block: tnode;
|
||||
psym: tsym;
|
||||
tcinitproc: tprocdef;
|
||||
begin
|
||||
result:=maybe_insert_trashing(pd,n);
|
||||
if target_info.system in systems_typed_constants_node_init then
|
||||
@ -291,7 +290,6 @@ implementation
|
||||
if (psym.typ<>procsym) or
|
||||
(tprocsym(psym).procdeflist.count<>1) then
|
||||
internalerror(2011040301);
|
||||
tcinitproc:=tprocdef(tprocsym(psym).procdeflist[0]);
|
||||
addstatement(stat,ccallnode.create(nil,tprocsym(psym),
|
||||
pd.struct.symtable,nil,[]));
|
||||
end;
|
||||
|
@ -861,7 +861,6 @@ implementation
|
||||
|
||||
procedure tcasenode.printnodetree(var t: text);
|
||||
var
|
||||
hp : tbinarynode;
|
||||
i : longint;
|
||||
begin
|
||||
write(t,printnodeindention,'(');
|
||||
|
@ -133,7 +133,7 @@ unit optcse;
|
||||
end;
|
||||
|
||||
var
|
||||
i,j : longint;
|
||||
i : longint;
|
||||
begin
|
||||
result:=fen_false;
|
||||
{ don't add the tree below an untyped const parameter: there is
|
||||
|
@ -2738,8 +2738,8 @@ var
|
||||
abi : tabi;
|
||||
{$if defined(arm) or defined(avr)}
|
||||
cpuflag : tcpuflags;
|
||||
{$endif defined(arm) or defined(avr)}
|
||||
hs : string;
|
||||
{$endif defined(arm) or defined(avr)}
|
||||
begin
|
||||
option:=coption.create;
|
||||
disable_configfile:=false;
|
||||
|
@ -226,7 +226,6 @@ implementation
|
||||
hdef : tdef;
|
||||
temp : ttempcreatenode;
|
||||
newstatement : tstatementnode;
|
||||
procinfo : tprocinfo;
|
||||
begin
|
||||
{ Properties are not allowed, because the write can
|
||||
be different from the read }
|
||||
|
@ -1011,7 +1011,7 @@ type
|
||||
force_init_final : boolean;
|
||||
init_procinfo,
|
||||
finalize_procinfo : tcgprocinfo;
|
||||
i,idx : longint;
|
||||
i : longint;
|
||||
ag : boolean;
|
||||
finishstate : tfinishstate;
|
||||
globalstate : tglobalstate;
|
||||
|
@ -1023,7 +1023,7 @@ implementation
|
||||
|
||||
procedure tabstractrecordsymtable.addfieldlist(list: tfpobjectlist; maybereorder: boolean);
|
||||
var
|
||||
fieldvs, insertfieldvs, bestfieldvs: tfieldvarsym;
|
||||
fieldvs, insertfieldvs: tfieldvarsym;
|
||||
base, fieldoffset, space, insertfieldsize, insertfieldoffset, bestinsertfieldoffset, bestspaceleft: asizeint;
|
||||
i, j, bestfieldindex: longint;
|
||||
globalfieldalignment,
|
||||
@ -2991,7 +2991,6 @@ implementation
|
||||
function search_system_proc(const s: TIDString): tprocdef;
|
||||
var
|
||||
srsym: tsym;
|
||||
pd: tprocdef;
|
||||
begin
|
||||
srsym:=tsym(systemunit.find(s));
|
||||
if not assigned(srsym) and
|
||||
@ -3238,7 +3237,6 @@ implementation
|
||||
function search_struct_member(pd : tabstractrecorddef;const s : string):tsym;
|
||||
{ searches n in symtable of pd and all anchestors }
|
||||
var
|
||||
srsym : tsym;
|
||||
srsymtable : tsymtable;
|
||||
begin
|
||||
{ in case this is a formal class, first find the real definition }
|
||||
|
@ -60,22 +60,17 @@ implementation
|
||||
|
||||
function findreg_by_intname(const s:string):integer;
|
||||
var
|
||||
i,p : integer;
|
||||
s1: string;
|
||||
|
||||
l,r,m: integer;
|
||||
begin
|
||||
{Binary search.}
|
||||
p:=0;
|
||||
i := (high(tregisterindex) + 1) shr 1;
|
||||
l := 0;
|
||||
r := high(tregisterindex) + 1;
|
||||
while l < r do
|
||||
begin
|
||||
m := (l + r) div 2;
|
||||
if int_regname_table[int_regname_index[m]] < s then l := m + 1
|
||||
else r := m;
|
||||
end;
|
||||
l := 0;
|
||||
r := high(tregisterindex) + 1;
|
||||
while l < r do
|
||||
begin
|
||||
m := (l + r) div 2;
|
||||
if int_regname_table[int_regname_index[m]] < s then l := m + 1
|
||||
else r := m;
|
||||
end;
|
||||
|
||||
if int_regname_table[int_regname_index[r]]=s then
|
||||
findreg_by_intname:=int_regname_index[r]
|
||||
|
@ -345,7 +345,6 @@ var
|
||||
memrefsize: integer;
|
||||
memopsize: integer;
|
||||
memoffset: asizeint;
|
||||
s1: string;
|
||||
begin
|
||||
ExistsMemRefNoSize := false;
|
||||
ExistsMemRef := false;
|
||||
|
Loading…
Reference in New Issue
Block a user