mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-15 11:29:16 +02:00
* removed ref_count from pinputfile it's not used
This commit is contained in:
parent
57b50bdc14
commit
08571bb9a9
@ -58,8 +58,7 @@ interface
|
|||||||
linebuf : plongintarr; { line buffer to retrieve lines }
|
linebuf : plongintarr; { line buffer to retrieve lines }
|
||||||
maxlinebuf : longint;
|
maxlinebuf : longint;
|
||||||
|
|
||||||
ref_count : longint; { to handle the browser refs }
|
ref_index : longint; { to handle the browser refs }
|
||||||
ref_index : longint;
|
|
||||||
ref_next : pinputfile;
|
ref_next : pinputfile;
|
||||||
|
|
||||||
constructor init(const fn:string);
|
constructor init(const fn:string);
|
||||||
@ -116,7 +115,7 @@ interface
|
|||||||
pmodulebase = ^tmodulebase;
|
pmodulebase = ^tmodulebase;
|
||||||
tmodulebase = object(tlinkedlist_item)
|
tmodulebase = object(tlinkedlist_item)
|
||||||
{ index }
|
{ index }
|
||||||
unit_index : word; { global counter for browser }
|
unit_index : longint; { global counter for browser }
|
||||||
{ sources }
|
{ sources }
|
||||||
sourcefiles : pinputfilemanager;
|
sourcefiles : pinputfilemanager;
|
||||||
{ paths and filenames }
|
{ paths and filenames }
|
||||||
@ -137,8 +136,6 @@ interface
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
|
|
||||||
uses
|
uses
|
||||||
@ -178,7 +175,6 @@ uses
|
|||||||
savelastlinepos:=0;
|
savelastlinepos:=0;
|
||||||
{ indexing refs }
|
{ indexing refs }
|
||||||
ref_next:=nil;
|
ref_next:=nil;
|
||||||
ref_count:=0;
|
|
||||||
ref_index:=0;
|
ref_index:=0;
|
||||||
{ line buffer }
|
{ line buffer }
|
||||||
linebuf:=nil;
|
linebuf:=nil;
|
||||||
@ -688,7 +684,10 @@ uses
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.4 2000-10-31 22:02:46 peter
|
Revision 1.5 2000-11-07 20:48:33 peter
|
||||||
|
* removed ref_count from pinputfile it's not used
|
||||||
|
|
||||||
|
Revision 1.4 2000/10/31 22:02:46 peter
|
||||||
* symtable splitted, no real code changes
|
* symtable splitted, no real code changes
|
||||||
|
|
||||||
Revision 1.3 2000/10/14 21:52:54 peter
|
Revision 1.3 2000/10/14 21:52:54 peter
|
||||||
|
@ -101,7 +101,7 @@ interface
|
|||||||
|
|
||||||
islibrary : boolean; { if it is a library (win32 dll) }
|
islibrary : boolean; { if it is a library (win32 dll) }
|
||||||
map : punitmap; { mapping of all used units }
|
map : punitmap; { mapping of all used units }
|
||||||
unitcount : word; { local unit counter }
|
unitcount : longint; { local unit counter }
|
||||||
globalsymtable, { pointer to the local/static symtable of this unit }
|
globalsymtable, { pointer to the local/static symtable of this unit }
|
||||||
localsymtable : pointer; { pointer to the psymtable of this unit }
|
localsymtable : pointer; { pointer to the psymtable of this unit }
|
||||||
scanner : pointer; { scanner object used }
|
scanner : pointer; { scanner object used }
|
||||||
@ -144,7 +144,7 @@ interface
|
|||||||
|
|
||||||
pused_unit = ^tused_unit;
|
pused_unit = ^tused_unit;
|
||||||
tused_unit = object(tlinkedlist_item)
|
tused_unit = object(tlinkedlist_item)
|
||||||
unitid : word;
|
unitid : longint;
|
||||||
name : pstring;
|
name : pstring;
|
||||||
checksum,
|
checksum,
|
||||||
interface_checksum : longint;
|
interface_checksum : longint;
|
||||||
@ -173,7 +173,7 @@ interface
|
|||||||
SmartLinkOFiles : TStringContainer; { List of .o files which are generated,
|
SmartLinkOFiles : TStringContainer; { List of .o files which are generated,
|
||||||
used to delete them after linking }
|
used to delete them after linking }
|
||||||
|
|
||||||
function get_source_file(moduleindex,fileindex : word) : pinputfile;
|
function get_source_file(moduleindex,fileindex : longint) : pinputfile;
|
||||||
|
|
||||||
|
|
||||||
implementation
|
implementation
|
||||||
@ -193,27 +193,17 @@ uses
|
|||||||
Global Functions
|
Global Functions
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
function get_source_file(moduleindex,fileindex : word) : pinputfile;
|
function get_source_file(moduleindex,fileindex : longint) : pinputfile;
|
||||||
var
|
var
|
||||||
hp : pmodule;
|
hp : pmodule;
|
||||||
f : pinputfile;
|
|
||||||
begin
|
begin
|
||||||
hp:=pmodule(loaded_units.first);
|
hp:=pmodule(loaded_units.first);
|
||||||
while assigned(hp) and (hp^.unit_index<>moduleindex) do
|
while assigned(hp) and (hp^.unit_index<>moduleindex) do
|
||||||
hp:=pmodule(hp^.next);
|
hp:=pmodule(hp^.next);
|
||||||
get_source_file:=nil;
|
if assigned(hp) then
|
||||||
if not assigned(hp) then
|
get_source_file:=hp^.sourcefiles^.get_file(fileindex)
|
||||||
exit;
|
else
|
||||||
f:=pinputfile(hp^.sourcefiles^.files);
|
get_source_file:=nil;
|
||||||
while assigned(f) do
|
|
||||||
begin
|
|
||||||
if f^.ref_index=fileindex then
|
|
||||||
begin
|
|
||||||
get_source_file:=f;
|
|
||||||
exit;
|
|
||||||
end;
|
|
||||||
f:=pinputfile(f^.ref_next);
|
|
||||||
end;
|
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -898,7 +888,10 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.4 2000-10-31 22:02:46 peter
|
Revision 1.5 2000-11-07 20:48:33 peter
|
||||||
|
* removed ref_count from pinputfile it's not used
|
||||||
|
|
||||||
|
Revision 1.4 2000/10/31 22:02:46 peter
|
||||||
* symtable splitted, no real code changes
|
* symtable splitted, no real code changes
|
||||||
|
|
||||||
Revision 1.3 2000/10/15 07:47:51 peter
|
Revision 1.3 2000/10/15 07:47:51 peter
|
||||||
|
@ -50,7 +50,7 @@ interface
|
|||||||
tref = object
|
tref = object
|
||||||
nextref : pref;
|
nextref : pref;
|
||||||
posinfo : tfileposinfo;
|
posinfo : tfileposinfo;
|
||||||
moduleindex : word;
|
moduleindex : longint;
|
||||||
is_written : boolean;
|
is_written : boolean;
|
||||||
constructor init(ref:pref;pos:pfileposinfo);
|
constructor init(ref:pref;pos:pfileposinfo);
|
||||||
procedure freechain;
|
procedure freechain;
|
||||||
@ -271,12 +271,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
destructor tref.done;
|
destructor tref.done;
|
||||||
var
|
|
||||||
inputfile : pinputfile;
|
|
||||||
begin
|
begin
|
||||||
inputfile:=get_source_file(moduleindex,posinfo.fileindex);
|
|
||||||
if inputfile<>nil then
|
|
||||||
dec(inputfile^.ref_count);
|
|
||||||
nextref:=nil;
|
nextref:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -572,7 +567,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.1 2000-10-31 22:02:53 peter
|
Revision 1.2 2000-11-07 20:48:33 peter
|
||||||
|
* removed ref_count from pinputfile it's not used
|
||||||
|
|
||||||
|
Revision 1.1 2000/10/31 22:02:53 peter
|
||||||
* symtable splitted, no real code changes
|
* symtable splitted, no real code changes
|
||||||
|
|
||||||
}
|
}
|
Loading…
Reference in New Issue
Block a user