mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-13 01:29:28 +02:00
* Removed/ifdefed the assigned and unused variables.
git-svn-id: trunk@48391 -
This commit is contained in:
parent
0ab6b1ab4d
commit
75491ae21c
@ -252,7 +252,6 @@ unit agcpugas;
|
||||
lastsym : tai_symbol;
|
||||
lastsec : tai_section;
|
||||
inprologue,
|
||||
inhandlerdata,
|
||||
deleteai : boolean;
|
||||
totalcount,
|
||||
instrcount,
|
||||
@ -277,7 +276,6 @@ unit agcpugas;
|
||||
instrcount:=0;
|
||||
datacount:=0;
|
||||
unwinddata:=nil;
|
||||
inhandlerdata:=false;
|
||||
inprologue:=false;
|
||||
handlerdata:=nil;
|
||||
handlerdataidx:=0;
|
||||
|
@ -568,7 +568,6 @@ Implementation
|
||||
ThisRegister: TRegister;
|
||||
OffsetVal, ValidOffset, MinOffset, MaxOffset: asizeint;
|
||||
TargetOpcode: TAsmOp;
|
||||
Breakout: Boolean;
|
||||
begin
|
||||
Result := False;
|
||||
ThisRegister := taicpu(p).oper[0]^.reg;
|
||||
@ -621,8 +620,6 @@ Implementation
|
||||
|
||||
if (taicpu(hp1).opcode = taicpu(p).opcode) then
|
||||
begin
|
||||
Breakout := False;
|
||||
|
||||
if (taicpu(hp1).oppostfix = PF_NONE) and
|
||||
{ Registers need to be the same size }
|
||||
(getsubreg(ThisRegister) = getsubreg(taicpu(hp1).oper[0]^.reg)) and
|
||||
|
@ -105,7 +105,6 @@ implementation
|
||||
afterprocstartlabel : tasmlabel;
|
||||
hp,
|
||||
afterproccodestart : tai;
|
||||
instrcount : longint;
|
||||
begin
|
||||
{ insert debug information for local variables and parameters, but only
|
||||
for routines implemented in the Pascal code }
|
||||
@ -121,7 +120,6 @@ implementation
|
||||
{ set the start label for local variables after the first instruction,
|
||||
because javac's code completion support assumes that all info at
|
||||
bytecode position 0 is for parameters }
|
||||
instrcount:=0;
|
||||
afterproccodestart:=def.procstarttai;
|
||||
while assigned(afterproccodestart.next) do
|
||||
begin
|
||||
|
@ -179,10 +179,7 @@ implementation
|
||||
|
||||
|
||||
function tjvmaddrnode.isdererence: boolean;
|
||||
var
|
||||
target: tnode;
|
||||
begin
|
||||
target:=actualtargetnode(@left)^;
|
||||
result:=
|
||||
(left.nodetype=derefn);
|
||||
end;
|
||||
|
@ -1558,14 +1558,14 @@ implementation
|
||||
|
||||
|
||||
function tifnode.internalsimplify(warn: boolean) : tnode;
|
||||
{$if defined(i386) or defined(x86_64) or defined(xtensa)}
|
||||
var
|
||||
thenstmnt, elsestmnt: tnode;
|
||||
in_nr: tinlinenumber;
|
||||
paratype: tdef;
|
||||
{$endif}
|
||||
begin
|
||||
result:=nil;
|
||||
elsestmnt:=nil;
|
||||
in_nr:=Default(tinlinenumber);
|
||||
{ optimize constant expressions }
|
||||
if (left.nodetype=ordconstn) then
|
||||
begin
|
||||
@ -1607,6 +1607,8 @@ implementation
|
||||
into appropriate min/max intrinsics
|
||||
|
||||
}
|
||||
elsestmnt:=nil;
|
||||
in_nr:=Default(tinlinenumber);
|
||||
if (cs_opt_level2 in current_settings.optimizerswitches) and
|
||||
(left.nodetype in [gtn,gten,ltn,lten]) and IsSingleStatement(right,thenstmnt) and
|
||||
((t1=nil) or IsSingleStatement(t1,elsestmnt)) and
|
||||
|
@ -1520,7 +1520,6 @@ implementation
|
||||
RawRecord: TOmfRawRecord;
|
||||
i,idx: Integer;
|
||||
objsym: TObjSymbol;
|
||||
ExternalNameElem: TOmfExternalNameElement;
|
||||
ExtDefRec: TOmfRecord_EXTDEF;
|
||||
begin
|
||||
ExtNames:=TFPHashObjectList.Create;
|
||||
@ -1532,7 +1531,7 @@ implementation
|
||||
objsym:=TObjSymbol(Data.ObjSymbolList[i]);
|
||||
if objsym.bind=AB_EXTERNAL then
|
||||
begin
|
||||
ExternalNameElem:=TOmfExternalNameElement.Create(ExtNames,objsym.Name);
|
||||
TOmfExternalNameElement.Create(ExtNames,objsym.Name);
|
||||
objsym.symidx:=idx;
|
||||
Inc(idx);
|
||||
end;
|
||||
@ -4411,7 +4410,7 @@ cleanup:
|
||||
var
|
||||
s: TSymStr;
|
||||
Separator: SizeInt;
|
||||
SegName, SegClass: string;
|
||||
{SegName,} SegClass: string;
|
||||
IsStack, IsBss: Boolean;
|
||||
begin
|
||||
{ allow mixing initialized and uninitialized data in the same section
|
||||
@ -4423,12 +4422,12 @@ cleanup:
|
||||
Separator:=Pos('||',s);
|
||||
if Separator>0 then
|
||||
begin
|
||||
SegName:=Copy(s,1,Separator-1);
|
||||
//SegName:=Copy(s,1,Separator-1);
|
||||
SegClass:=Copy(s,Separator+2,Length(s)-Separator-1);
|
||||
end
|
||||
else
|
||||
begin
|
||||
SegName:=s;
|
||||
//SegName:=s;
|
||||
SegClass:='';
|
||||
end;
|
||||
{ wlink recognizes the stack segment by the class name 'STACK' }
|
||||
|
@ -1379,8 +1379,6 @@ uses
|
||||
constraintdata : tgenericconstraintdata;
|
||||
old_block_type : tblock_type;
|
||||
fileinfo : tfileposinfo;
|
||||
last_token : ttoken;
|
||||
last_type_pos : tfileposinfo;
|
||||
begin
|
||||
result:=tfphashobjectlist.create(false);
|
||||
firstidx:=0;
|
||||
@ -1389,8 +1387,6 @@ uses
|
||||
block_type:=bt_type;
|
||||
allowconst:=true;
|
||||
is_const:=false;
|
||||
last_token:=NOTOKEN;
|
||||
last_type_pos:=current_filepos;
|
||||
repeat
|
||||
if allowconst and try_to_consume(_CONST) then
|
||||
begin
|
||||
@ -1605,8 +1601,6 @@ uses
|
||||
is_const:=false;
|
||||
allowconst:=true;
|
||||
end;
|
||||
last_token:=token;
|
||||
last_type_pos:=current_filepos;
|
||||
until not (try_to_consume(_COMMA) or try_to_consume(_SEMICOLON));
|
||||
{ if the constant parameter is not terminated then the type restriction was
|
||||
not specified and we need to give an error }
|
||||
|
@ -694,7 +694,9 @@ implementation
|
||||
otherunit: boolean; }
|
||||
wrappedexception: tregister;
|
||||
exceptloc: tlocation;
|
||||
{$if defined(i386) or defined(x86_64)}
|
||||
typeindex : aint;
|
||||
{$endif}
|
||||
begin
|
||||
paraloc1.init;
|
||||
{
|
||||
@ -722,7 +724,9 @@ implementation
|
||||
{ check if the exception is handled by this node }
|
||||
if assigned(excepttype) then
|
||||
begin
|
||||
{$if defined(i386) or defined(x86_64)}
|
||||
typeindex:=(current_procinfo as tpsabiehprocinfo).CurrentAction.AddAction(excepttype);
|
||||
{$endif}
|
||||
current_asmdata.getjumplabel(catchstartlab);
|
||||
{$if defined(i386)}
|
||||
hlcg.a_cmp_const_reg_label (list,osuinttype,OC_EQ,typeindex+1,NR_FUNCTION_RESULT64_HIGH_REG,catchstartlab);
|
||||
|
@ -81,8 +81,7 @@ Var
|
||||
i : longint;
|
||||
HPath : TCmdStrListItem;
|
||||
s,s1,s2 : TCmdStr;
|
||||
prtobj,
|
||||
cprtobj : string[80];
|
||||
prtobj : string[80];
|
||||
linklibc : boolean;
|
||||
found1,
|
||||
found2 : boolean;
|
||||
@ -96,9 +95,8 @@ begin
|
||||
prtobj:='';
|
||||
{$else}
|
||||
prtobj:='prt0';
|
||||
cprtobj:='cprt0';
|
||||
if linklibc then
|
||||
prtobj:=cprtobj;
|
||||
prtobj:='cprt0';
|
||||
{$endif}
|
||||
|
||||
{ Open link.res file }
|
||||
|
@ -104,7 +104,6 @@ var
|
||||
i,j: Integer;
|
||||
ImportLibrary: TImportLibrary;
|
||||
ImportSymbol: TImportSymbol;
|
||||
AsmPrefix: String;
|
||||
|
||||
procedure AddImport(const dllname,afuncname,mangledname:string;ordnr:longint;isvar:boolean);
|
||||
begin
|
||||
@ -114,7 +113,6 @@ var
|
||||
end;
|
||||
|
||||
begin
|
||||
AsmPrefix:='imp'+Lower(current_module.modulename^);
|
||||
current_module.linkotherstaticlibs.add(current_module.importlibfilename,link_always);
|
||||
ObjWriter:=TOmfLibObjectWriter.CreateAr(current_module.importlibfilename,32);
|
||||
ObjOutput:=TOmfObjOutput.Create(ObjWriter);
|
||||
|
@ -445,13 +445,17 @@ unit cgx86;
|
||||
|
||||
procedure tcgx86.make_simple_ref(list:TAsmList;var ref: treference;isdirect:boolean);
|
||||
var
|
||||
{$ifndef i8086}
|
||||
hreg : tregister;
|
||||
{$endif i8086}
|
||||
href : treference;
|
||||
{$ifdef i386}
|
||||
add_hreg: boolean;
|
||||
{$endif i386}
|
||||
begin
|
||||
{$ifndef i8086}
|
||||
hreg:=NR_NO;
|
||||
{$endif i8086}
|
||||
{ make_simple_ref() may have already been called earlier, and in that
|
||||
case make sure we don't perform the PIC-simplifications twice }
|
||||
if (ref.refaddr in [addr_pic,addr_pic_no_got]) then
|
||||
|
Loading…
Reference in New Issue
Block a user