mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-04-09 17:48:46 +02:00
- removed tai_file/tai_loc, no longer needed
git-svn-id: trunk@7945 -
This commit is contained in:
parent
ce478cd249
commit
0d1ff3a0f1
@ -81,11 +81,7 @@ interface
|
||||
ait_regalloc,
|
||||
ait_tempalloc,
|
||||
{ used to mark assembler blocks and inlined functions }
|
||||
ait_marker,
|
||||
{ new source file (dwarf) }
|
||||
ait_file,
|
||||
{ new line/loc in source file (dwarf) }
|
||||
ait_loc
|
||||
ait_marker
|
||||
);
|
||||
|
||||
taiconst_type = (
|
||||
@ -148,9 +144,7 @@ interface
|
||||
'cut',
|
||||
'regalloc',
|
||||
'tempalloc',
|
||||
'marker',
|
||||
'file',
|
||||
'line'
|
||||
'marker'
|
||||
);
|
||||
|
||||
type
|
||||
@ -209,8 +203,7 @@ interface
|
||||
a new ait type! }
|
||||
SkipInstr = [ait_comment, ait_symbol,ait_section
|
||||
,ait_stab, ait_function_name, ait_force_line
|
||||
,ait_regalloc, ait_tempalloc, ait_symbol_end, ait_directive
|
||||
,ait_file,ait_loc];
|
||||
,ait_regalloc, ait_tempalloc, ait_symbol_end, ait_directive];
|
||||
|
||||
{ ait_* types which do not have line information (and hence which are of type
|
||||
tai, otherwise, they are of type tailineinfo }
|
||||
@ -220,7 +213,7 @@ interface
|
||||
ait_cutobject,ait_marker,ait_align,ait_section,ait_comment,
|
||||
ait_const,
|
||||
ait_real_32bit,ait_real_64bit,ait_real_80bit,ait_comp_64bit,ait_real_128bit,
|
||||
ait_file,ait_loc,ait_symbol
|
||||
ait_symbol
|
||||
];
|
||||
|
||||
|
||||
@ -531,27 +524,6 @@ interface
|
||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||
end;
|
||||
|
||||
{ Generates a dwarf file location }
|
||||
tai_file = class(tai)
|
||||
str : pchar;
|
||||
idx : longint;
|
||||
constructor Create(_str : string);
|
||||
destructor Destroy; override;
|
||||
constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
|
||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||
function getcopy:tlinkedlistitem;override;
|
||||
end;
|
||||
|
||||
{ Generates a dwarf line location }
|
||||
tai_loc = class(tai)
|
||||
fileentry : tai_file;
|
||||
line,
|
||||
column : longint;
|
||||
constructor Create(_fileidx : tai_file;_line,_column : longint);
|
||||
constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
|
||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||
end;
|
||||
|
||||
tadd_reg_instruction_proc=procedure(instr:Tai;r:tregister) of object;
|
||||
|
||||
{ Class template for assembler instructions
|
||||
@ -1885,94 +1857,6 @@ implementation
|
||||
end;
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
tai_file
|
||||
****************************************************************************}
|
||||
|
||||
constructor tai_file.Create(_str : string);
|
||||
begin
|
||||
inherited Create;
|
||||
typ:=ait_file;
|
||||
getmem(str,length(_str)+1);
|
||||
move(_str[1],str^,length(_str));
|
||||
str[length(_str)]:=#0;
|
||||
end;
|
||||
|
||||
|
||||
destructor tai_file.destroy;
|
||||
begin
|
||||
freemem(str);
|
||||
inherited Destroy;
|
||||
end;
|
||||
|
||||
|
||||
constructor tai_file.ppuload(t:taitype;ppufile:tcompilerppufile);
|
||||
var
|
||||
len : longint;
|
||||
begin
|
||||
inherited ppuload(t,ppufile);
|
||||
len:=ppufile.getlongint;
|
||||
getmem(str,len+1);
|
||||
ppufile.getdata(str^,len);
|
||||
str[len]:=#0;
|
||||
idx:=ppufile.getlongint;
|
||||
end;
|
||||
|
||||
|
||||
procedure tai_file.ppuwrite(ppufile:tcompilerppufile);
|
||||
var
|
||||
len : longint;
|
||||
begin
|
||||
inherited ppuwrite(ppufile);
|
||||
len:=strlen(str);
|
||||
ppufile.putlongint(len);
|
||||
ppufile.putdata(str^,len);
|
||||
ppufile.putlongint(idx);
|
||||
end;
|
||||
|
||||
|
||||
function tai_file.getcopy : tlinkedlistitem;
|
||||
var
|
||||
p : tlinkedlistitem;
|
||||
begin
|
||||
p:=inherited getcopy;
|
||||
getmem(tai_comment(p).str,strlen(str)+1);
|
||||
move(str^,tai_comment(p).str^,strlen(str)+1);
|
||||
getcopy:=p;
|
||||
end;
|
||||
|
||||
|
||||
{****************************************************************************
|
||||
tai_loc
|
||||
****************************************************************************}
|
||||
|
||||
constructor tai_loc.Create(_fileidx : tai_file;_line,_column : longint);
|
||||
begin
|
||||
inherited Create;
|
||||
typ:=ait_loc;
|
||||
fileentry:=_fileidx;
|
||||
line:=_line;
|
||||
column:=_column;
|
||||
end;
|
||||
|
||||
|
||||
constructor tai_loc.ppuload(t:taitype;ppufile:tcompilerppufile);
|
||||
begin
|
||||
inherited ppuload(t,ppufile);
|
||||
{!!!! fileidx:=ppufile.getlongint; }
|
||||
line:=ppufile.getlongint;
|
||||
column:=ppufile.getlongint;
|
||||
end;
|
||||
|
||||
|
||||
procedure tai_loc.ppuwrite(ppufile:tcompilerppufile);
|
||||
begin
|
||||
inherited ppuwrite(ppufile);
|
||||
{!!!!! ppufile.putlongint(fileidx); }
|
||||
ppufile.putlongint(line);
|
||||
ppufile.putlongint(column);
|
||||
end;
|
||||
|
||||
{*****************************************************************************
|
||||
TaiInstruction
|
||||
*****************************************************************************}
|
||||
|
@ -972,23 +972,6 @@ implementation
|
||||
end;
|
||||
end;
|
||||
|
||||
ait_file :
|
||||
begin
|
||||
tai_file(hp).idx:=nextdwarffileidx;
|
||||
inc(nextdwarffileidx);
|
||||
AsmWrite(#9'.file '+tostr(tai_file(hp).idx)+' "');
|
||||
|
||||
AsmWritePChar(tai_file(hp).str);
|
||||
AsmWrite('"');
|
||||
AsmLn;
|
||||
end;
|
||||
|
||||
ait_loc :
|
||||
begin
|
||||
AsmWrite(#9'.loc '+tostr(tai_loc(hp).fileentry.idx)+' '+tostr(tai_loc(hp).line)+' '+tostr(tai_loc(hp).column));
|
||||
AsmLn;
|
||||
end;
|
||||
|
||||
ait_force_line,
|
||||
ait_function_name : ;
|
||||
|
||||
|
@ -532,8 +532,6 @@ implementation
|
||||
aiclass[ait_regalloc]:=tai_regalloc;
|
||||
aiclass[ait_tempalloc]:=tai_tempalloc;
|
||||
aiclass[ait_marker]:=tai_marker;
|
||||
aiclass[ait_file]:=tai_file;
|
||||
aiclass[ait_loc]:=tai_loc;
|
||||
end;
|
||||
|
||||
end.
|
||||
|
Loading…
Reference in New Issue
Block a user