mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-14 07:09:23 +02:00
* changed TIDString and tsymentry.realname to TSymStr
o for TIDString: prevents shortstring -> ansistring conversions with -dsymansistr when looking up symbols o for realname: consistency with name git-svn-id: trunk@47301 -
This commit is contained in:
parent
38a059f039
commit
312f1436b1
@ -787,7 +787,11 @@ interface
|
|||||||
TRADirection = (rad_forward, rad_backwards, rad_backwards_reinit);
|
TRADirection = (rad_forward, rad_backwards, rad_backwards_reinit);
|
||||||
|
|
||||||
type
|
type
|
||||||
|
{$ifndef symansistr}
|
||||||
TIDString = string[maxidlen];
|
TIDString = string[maxidlen];
|
||||||
|
{$else}
|
||||||
|
TIDString = TSymStr;
|
||||||
|
{$endif}
|
||||||
|
|
||||||
tnormalset = set of byte; { 256 elements set }
|
tnormalset = set of byte; { 256 elements set }
|
||||||
pnormalset = ^tnormalset;
|
pnormalset = ^tnormalset;
|
||||||
|
@ -50,7 +50,7 @@ const
|
|||||||
CurrentPPUVersion = 208;
|
CurrentPPUVersion = 208;
|
||||||
{ for any other changes to the ppu format, increase this version number
|
{ for any other changes to the ppu format, increase this version number
|
||||||
(it's a cardinal) }
|
(it's a cardinal) }
|
||||||
CurrentPPULongVersion = 10;
|
CurrentPPULongVersion = 11;
|
||||||
|
|
||||||
{ unit flags }
|
{ unit flags }
|
||||||
uf_big_endian = $000004;
|
uf_big_endian = $000004;
|
||||||
|
@ -71,15 +71,15 @@ interface
|
|||||||
{ this object is the base for all symbol objects }
|
{ this object is the base for all symbol objects }
|
||||||
TSymEntry = class(TFPHashObject)
|
TSymEntry = class(TFPHashObject)
|
||||||
private
|
private
|
||||||
FRealName : pshortstring;
|
FRealName : {$ifdef symansistr}TSymStr{$else}pshortstring{$endif};
|
||||||
function GetRealname:shortstring;
|
function GetRealname: TSymStr;
|
||||||
procedure SetRealname(const ANewName:shortstring);
|
procedure SetRealname(const ANewName: TSymStr);
|
||||||
public
|
public
|
||||||
typ : tsymtyp;
|
typ : tsymtyp;
|
||||||
SymId : longint;
|
SymId : longint;
|
||||||
Owner : TSymtable;
|
Owner : TSymtable;
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
property RealName:shortstring read GetRealName write SetRealName;
|
property RealName: TSymStr read GetRealName write SetRealName;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
{************************************************
|
{************************************************
|
||||||
@ -167,6 +167,10 @@ implementation
|
|||||||
procedure THashedIDString.SetId(const s:TIDString);
|
procedure THashedIDString.SetId(const s:TIDString);
|
||||||
begin
|
begin
|
||||||
FId:=s;
|
FId:=s;
|
||||||
|
{$ifdef symansistr}
|
||||||
|
if length(FId)>maxidlen then
|
||||||
|
SetLength(FId,maxidlen);
|
||||||
|
{$endif}
|
||||||
FHash:=FPHash(s);
|
FHash:=FPHash(s);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -180,7 +184,9 @@ implementation
|
|||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
memrealnames.start;
|
memrealnames.start;
|
||||||
{$endif MEMDEBUG}
|
{$endif MEMDEBUG}
|
||||||
|
{$ifndef symansistr}
|
||||||
stringdispose(Frealname);
|
stringdispose(Frealname);
|
||||||
|
{$endif}
|
||||||
{$ifdef MEMDEBUG}
|
{$ifdef MEMDEBUG}
|
||||||
memrealnames.stop;
|
memrealnames.stop;
|
||||||
{$endif MEMDEBUG}
|
{$endif MEMDEBUG}
|
||||||
@ -188,24 +194,34 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
function TSymEntry.GetRealname:shortstring;
|
function TSymEntry.GetRealname:TSymStr;
|
||||||
begin
|
begin
|
||||||
|
{$ifndef symansistr}
|
||||||
if not assigned(FRealname) then
|
if not assigned(FRealname) then
|
||||||
internalerror(200611011);
|
internalerror(200611011);
|
||||||
result:=FRealname^;
|
result:=FRealname^;
|
||||||
|
{$else}
|
||||||
|
if FRealName='' then
|
||||||
|
internalerror(200611011);
|
||||||
|
result:=FRealName;
|
||||||
|
{$endif}
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
procedure TSymEntry.SetRealname(const ANewName:shortstring);
|
procedure TSymEntry.SetRealname(const ANewName:TSymStr);
|
||||||
begin
|
begin
|
||||||
|
{$ifndef symansistr}
|
||||||
stringdispose(FRealname);
|
stringdispose(FRealname);
|
||||||
FRealname:=stringdup(ANewName);
|
FRealname:=stringdup(ANewName);
|
||||||
|
{$else}
|
||||||
|
FRealname:=ANewName;
|
||||||
|
{$endif}
|
||||||
if Hash<>$ffffffff then
|
if Hash<>$ffffffff then
|
||||||
begin
|
begin
|
||||||
if FRealname^[1]='$' then
|
if ANewName[1]='$' then
|
||||||
Rename(Copy(FRealname^,2,255))
|
Rename(Copy(ANewName,2,length(ANewName)))
|
||||||
else
|
else
|
||||||
Rename(Upper(FRealname^));
|
Rename(Upper(ANewName));
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
@ -48,7 +48,7 @@ interface
|
|||||||
public
|
public
|
||||||
{ this is Nil if the symbol has no RTTI attributes }
|
{ this is Nil if the symbol has no RTTI attributes }
|
||||||
rtti_attribute_list : trtti_attribute_list;
|
rtti_attribute_list : trtti_attribute_list;
|
||||||
constructor create(st:tsymtyp;const n : string);
|
constructor create(st:tsymtyp;const n : TSymStr);
|
||||||
constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
|
constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
procedure ppuwrite(ppufile:tcompilerppufile);virtual;
|
procedure ppuwrite(ppufile:tcompilerppufile);virtual;
|
||||||
@ -76,7 +76,7 @@ interface
|
|||||||
{ when the label is defined in an asm block, this points to the
|
{ when the label is defined in an asm block, this points to the
|
||||||
generated asmlabel }
|
generated asmlabel }
|
||||||
asmblocklabel : tasmlabel;
|
asmblocklabel : tasmlabel;
|
||||||
constructor create(const n : string);virtual;
|
constructor create(const n : TSymStr);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
override ppuwrite_platform instead }
|
override ppuwrite_platform instead }
|
||||||
@ -87,7 +87,7 @@ interface
|
|||||||
|
|
||||||
tunitsym = class(Tstoredsym)
|
tunitsym = class(Tstoredsym)
|
||||||
module : tobject; { tmodule }
|
module : tobject; { tmodule }
|
||||||
constructor create(const n : string;amodule : tobject);virtual;
|
constructor create(const n : TSymStr;amodule : tobject);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
@ -98,7 +98,7 @@ interface
|
|||||||
|
|
||||||
tprogramparasym = class(Tstoredsym)
|
tprogramparasym = class(Tstoredsym)
|
||||||
isoindex : dword;
|
isoindex : dword;
|
||||||
constructor create(const n : string;i : dword);virtual;
|
constructor create(const n : TSymStr;i : dword);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
@ -110,7 +110,7 @@ interface
|
|||||||
tnamespacesym = class(Tstoredsym)
|
tnamespacesym = class(Tstoredsym)
|
||||||
unitsym:tsym;
|
unitsym:tsym;
|
||||||
unitsymderef:tderef;
|
unitsymderef:tderef;
|
||||||
constructor create(const n : string);virtual;
|
constructor create(const n : TSymStr);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
override ppuwrite_platform instead }
|
override ppuwrite_platform instead }
|
||||||
@ -132,7 +132,7 @@ interface
|
|||||||
FProcdefList : TFPObjectList;
|
FProcdefList : TFPObjectList;
|
||||||
FProcdefDerefList : TFPList;
|
FProcdefDerefList : TFPList;
|
||||||
public
|
public
|
||||||
constructor create(const n : string);virtual;
|
constructor create(const n : TSymStr);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
{ writes all declarations except the specified one }
|
{ writes all declarations except the specified one }
|
||||||
@ -162,7 +162,7 @@ interface
|
|||||||
typedef : tdef;
|
typedef : tdef;
|
||||||
typedefderef : tderef;
|
typedefderef : tderef;
|
||||||
fprettyname : ansistring;
|
fprettyname : ansistring;
|
||||||
constructor create(const n : string;def:tdef);virtual;
|
constructor create(const n : TSymStr;def:tdef);virtual;
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
@ -182,7 +182,7 @@ interface
|
|||||||
{could also be part of tabstractnormalvarsym, but there's
|
{could also be part of tabstractnormalvarsym, but there's
|
||||||
one byte left here till the next 4 byte alignment }
|
one byte left here till the next 4 byte alignment }
|
||||||
varsymaccess : tvarsymaccessflags;
|
varsymaccess : tvarsymaccessflags;
|
||||||
constructor create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
constructor create(st:tsymtyp;const n : TSymStr;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
||||||
constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
|
constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
|
||||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||||
procedure buildderef;override;
|
procedure buildderef;override;
|
||||||
@ -226,7 +226,7 @@ interface
|
|||||||
{$else symansistr}
|
{$else symansistr}
|
||||||
cachedmangledname: pshortstring; { mangled name for ObjC or Java }
|
cachedmangledname: pshortstring; { mangled name for ObjC or Java }
|
||||||
{$endif symansistr}
|
{$endif symansistr}
|
||||||
constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
|
constructor create(const n : TSymStr;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
override ppuwrite_platform instead }
|
override ppuwrite_platform instead }
|
||||||
@ -249,7 +249,7 @@ interface
|
|||||||
{ the variable is not living at entry of the scope, so it does not need to be initialized if it is a reg. var
|
{ the variable is not living at entry of the scope, so it does not need to be initialized if it is a reg. var
|
||||||
(not written to ppu, because not important and would change interface crc) }
|
(not written to ppu, because not important and would change interface crc) }
|
||||||
noregvarinitneeded : boolean;
|
noregvarinitneeded : boolean;
|
||||||
constructor create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
constructor create(st:tsymtyp;const n : TSymStr;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
||||||
constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
|
constructor ppuload(st:tsymtyp;ppufile:tcompilerppufile);
|
||||||
function globalasmsym: boolean;
|
function globalasmsym: boolean;
|
||||||
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
procedure ppuwrite(ppufile:tcompilerppufile);override;
|
||||||
@ -258,7 +258,7 @@ interface
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
tlocalvarsym = class(tabstractnormalvarsym)
|
tlocalvarsym = class(tabstractnormalvarsym)
|
||||||
constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
|
constructor create(const n : TSymStr;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
override ppuwrite_platform instead }
|
override ppuwrite_platform instead }
|
||||||
@ -276,7 +276,7 @@ interface
|
|||||||
{$ifdef EXTDEBUG}
|
{$ifdef EXTDEBUG}
|
||||||
eqval : tequaltype;
|
eqval : tequaltype;
|
||||||
{$endif EXTDEBUG}
|
{$endif EXTDEBUG}
|
||||||
constructor create(const n : string;nr:word;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
|
constructor create(const n : TSymStr;nr:word;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
@ -306,10 +306,10 @@ interface
|
|||||||
to the symbol of the corresponding class field }
|
to the symbol of the corresponding class field }
|
||||||
fieldvarsym : tfieldvarsym;
|
fieldvarsym : tfieldvarsym;
|
||||||
fieldvarsymderef : tderef;
|
fieldvarsymderef : tderef;
|
||||||
constructor create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
|
constructor create(const n : TSymStr;vsp:tvarspez;def:tdef;vopts:tvaroptions);virtual;
|
||||||
constructor create_dll(const n : string;vsp:tvarspez;def:tdef);virtual;
|
constructor create_dll(const n : TSymStr;vsp:tvarspez;def:tdef);virtual;
|
||||||
constructor create_C(const n: string; const mangled : TSymStr;vsp:tvarspez;def:tdef);virtual;
|
constructor create_C(const n: TSymStr; const mangled : TSymStr;vsp:tvarspez;def:tdef);virtual;
|
||||||
constructor create_from_fieldvar(const n:string;fieldvar:tfieldvarsym);virtual;
|
constructor create_from_fieldvar(const n: TSymStr;fieldvar:tfieldvarsym);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
@ -331,8 +331,8 @@ interface
|
|||||||
asmname : pshortstring;
|
asmname : pshortstring;
|
||||||
addroffset : PUint;
|
addroffset : PUint;
|
||||||
ref : tpropaccesslist;
|
ref : tpropaccesslist;
|
||||||
constructor create(const n : string;def:tdef);virtual;
|
constructor create(const n : TSymStr;def:tdef);virtual;
|
||||||
constructor create_ref(const n : string;def:tdef;_ref:tpropaccesslist);virtual;
|
constructor create_ref(const n : TSymStr;def:tdef;_ref:tpropaccesslist);virtual;
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
procedure buildderef;override;
|
procedure buildderef;override;
|
||||||
@ -362,7 +362,7 @@ interface
|
|||||||
dispid : longint;
|
dispid : longint;
|
||||||
propaccesslist: array[tpropaccesslisttypes] of tpropaccesslist;
|
propaccesslist: array[tpropaccesslisttypes] of tpropaccesslist;
|
||||||
parast : tsymtable;
|
parast : tsymtable;
|
||||||
constructor create(const n : string);virtual;
|
constructor create(const n : TSymStr);virtual;
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
function getsize : asizeint;
|
function getsize : asizeint;
|
||||||
@ -397,12 +397,12 @@ interface
|
|||||||
constdefderef : tderef;
|
constdefderef : tderef;
|
||||||
consttyp : tconsttyp;
|
consttyp : tconsttyp;
|
||||||
value : tconstvalue;
|
value : tconstvalue;
|
||||||
constructor create_ord(const n : string;t : tconsttyp;v : tconstexprint;def:tdef);virtual;
|
constructor create_ord(const n : TSymStr;t : tconsttyp;v : tconstexprint;def:tdef);virtual;
|
||||||
constructor create_ordptr(const n : string;t : tconsttyp;v : tconstptruint;def:tdef);virtual;
|
constructor create_ordptr(const n : TSymStr;t : tconsttyp;v : tconstptruint;def:tdef);virtual;
|
||||||
constructor create_ptr(const n : string;t : tconsttyp;v : pointer;def:tdef);virtual;
|
constructor create_ptr(const n : TSymStr;t : tconsttyp;v : pointer;def:tdef);virtual;
|
||||||
constructor create_string(const n : string;t : tconsttyp;str:pchar;l:longint;def:tdef);virtual;
|
constructor create_string(const n : TSymStr;t : tconsttyp;str:pchar;l:longint;def:tdef);virtual;
|
||||||
constructor create_wstring(const n : string;t : tconsttyp;pw:pcompilerwidestring);virtual;
|
constructor create_wstring(const n : TSymStr;t : tconsttyp;pw:pcompilerwidestring);virtual;
|
||||||
constructor create_undefined(const n : string;def:tdef);virtual;
|
constructor create_undefined(const n : TSymStr;def:tdef);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
procedure buildderef;override;
|
procedure buildderef;override;
|
||||||
@ -417,7 +417,7 @@ interface
|
|||||||
value : longint;
|
value : longint;
|
||||||
definition : tenumdef;
|
definition : tenumdef;
|
||||||
definitionderef : tderef;
|
definitionderef : tderef;
|
||||||
constructor create(const n : string;def : tenumdef;v : longint);virtual;
|
constructor create(const n : TSymStr;def : tenumdef;v : longint);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
override ppuwrite_platform instead }
|
override ppuwrite_platform instead }
|
||||||
@ -429,7 +429,7 @@ interface
|
|||||||
|
|
||||||
tsyssym = class(Tstoredsym)
|
tsyssym = class(Tstoredsym)
|
||||||
number : tinlinenumber;
|
number : tinlinenumber;
|
||||||
constructor create(const n : string;l : tinlinenumber);virtual;
|
constructor create(const n : TSymStr;l : tinlinenumber);virtual;
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
destructor destroy;override;
|
destructor destroy;override;
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
@ -458,7 +458,7 @@ interface
|
|||||||
is_used : boolean;
|
is_used : boolean;
|
||||||
buftext : pchar;
|
buftext : pchar;
|
||||||
buflen : longint;
|
buflen : longint;
|
||||||
constructor create(const n : string);
|
constructor create(const n : TSymStr);
|
||||||
constructor ppuload(ppufile:tcompilerppufile);
|
constructor ppuload(ppufile:tcompilerppufile);
|
||||||
{ do not override this routine in platform-specific subclasses,
|
{ do not override this routine in platform-specific subclasses,
|
||||||
override ppuwrite_platform instead }
|
override ppuwrite_platform instead }
|
||||||
@ -585,7 +585,7 @@ implementation
|
|||||||
TSYM (base for all symtypes)
|
TSYM (base for all symtypes)
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tstoredsym.create(st:tsymtyp;const n : string);
|
constructor tstoredsym.create(st:tsymtyp;const n : TSymStr);
|
||||||
begin
|
begin
|
||||||
inherited create(st,n);
|
inherited create(st,n);
|
||||||
end;
|
end;
|
||||||
@ -593,7 +593,11 @@ implementation
|
|||||||
|
|
||||||
constructor tstoredsym.ppuload(st:tsymtyp;ppufile:tcompilerppufile);
|
constructor tstoredsym.ppuload(st:tsymtyp;ppufile:tcompilerppufile);
|
||||||
begin
|
begin
|
||||||
|
{$ifdef symansistr}
|
||||||
|
inherited Create(st,ppufile.getansistring);
|
||||||
|
{$else symansistr}
|
||||||
inherited Create(st,ppufile.getstring);
|
inherited Create(st,ppufile.getstring);
|
||||||
|
{$endif symansistr}
|
||||||
SymId:=ppufile.getlongint;
|
SymId:=ppufile.getlongint;
|
||||||
current_module.symlist[SymId]:=self;
|
current_module.symlist[SymId]:=self;
|
||||||
ppufile.getposinfo(fileinfo);
|
ppufile.getposinfo(fileinfo);
|
||||||
@ -611,7 +615,11 @@ implementation
|
|||||||
var
|
var
|
||||||
oldintfcrc : boolean;
|
oldintfcrc : boolean;
|
||||||
begin
|
begin
|
||||||
|
{$ifdef symansistr}
|
||||||
|
ppufile.putansistring(realname);
|
||||||
|
{$else}
|
||||||
ppufile.putstring(realname);
|
ppufile.putstring(realname);
|
||||||
|
{$endif}
|
||||||
ppufile.putlongint(SymId);
|
ppufile.putlongint(SymId);
|
||||||
ppufile.putposinfo(fileinfo);
|
ppufile.putposinfo(fileinfo);
|
||||||
ppufile.putbyte(byte(visibility));
|
ppufile.putbyte(byte(visibility));
|
||||||
@ -705,7 +713,7 @@ implementation
|
|||||||
TLABELSYM
|
TLABELSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tlabelsym.create(const n : string);
|
constructor tlabelsym.create(const n : TSymStr);
|
||||||
begin
|
begin
|
||||||
inherited create(labelsym,n);
|
inherited create(labelsym,n);
|
||||||
used:=false;
|
used:=false;
|
||||||
@ -754,7 +762,7 @@ implementation
|
|||||||
TUNITSYM
|
TUNITSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tunitsym.create(const n : string;amodule : tobject);
|
constructor tunitsym.create(const n : TSymStr;amodule : tobject);
|
||||||
begin
|
begin
|
||||||
inherited create(unitsym,n);
|
inherited create(unitsym,n);
|
||||||
module:=amodule;
|
module:=amodule;
|
||||||
@ -783,7 +791,7 @@ implementation
|
|||||||
TPROGRAMPARASYM
|
TPROGRAMPARASYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tprogramparasym.create(const n : string; i : dword);
|
constructor tprogramparasym.create(const n : TSymStr; i : dword);
|
||||||
begin
|
begin
|
||||||
inherited create(programparasym,n);
|
inherited create(programparasym,n);
|
||||||
isoindex:=i;
|
isoindex:=i;
|
||||||
@ -811,7 +819,7 @@ implementation
|
|||||||
TNAMESPACESYM
|
TNAMESPACESYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tnamespacesym.create(const n : string);
|
constructor tnamespacesym.create(const n : TSymStr);
|
||||||
begin
|
begin
|
||||||
inherited create(namespacesym,n);
|
inherited create(namespacesym,n);
|
||||||
unitsym:=nil;
|
unitsym:=nil;
|
||||||
@ -849,7 +857,7 @@ implementation
|
|||||||
TPROCSYM
|
TPROCSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tprocsym.create(const n : string);
|
constructor tprocsym.create(const n : TSymStr);
|
||||||
var
|
var
|
||||||
i: longint;
|
i: longint;
|
||||||
begin
|
begin
|
||||||
@ -1387,7 +1395,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tpropertysym.create(const n : string);
|
constructor tpropertysym.create(const n : TSymStr);
|
||||||
var
|
var
|
||||||
pap : tpropaccesslisttypes;
|
pap : tpropaccesslisttypes;
|
||||||
begin
|
begin
|
||||||
@ -1650,7 +1658,7 @@ implementation
|
|||||||
TABSTRACTVARSYM
|
TABSTRACTVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tabstractvarsym.create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
constructor tabstractvarsym.create(st:tsymtyp;const n : TSymStr;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
||||||
begin
|
begin
|
||||||
inherited create(st,n);
|
inherited create(st,n);
|
||||||
vardef:=def;
|
vardef:=def;
|
||||||
@ -1846,7 +1854,7 @@ implementation
|
|||||||
TFIELDVARSYM
|
TFIELDVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tfieldvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
constructor tfieldvarsym.create(const n : TSymStr;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
||||||
begin
|
begin
|
||||||
inherited create(fieldvarsym,n,vsp,def,vopts);
|
inherited create(fieldvarsym,n,vsp,def,vopts);
|
||||||
fieldoffset:=-1;
|
fieldoffset:=-1;
|
||||||
@ -1936,7 +1944,7 @@ implementation
|
|||||||
TABSTRACTNORMALVARSYM
|
TABSTRACTNORMALVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tabstractnormalvarsym.create(st:tsymtyp;const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
constructor tabstractnormalvarsym.create(st:tsymtyp;const n : TSymStr;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
||||||
begin
|
begin
|
||||||
inherited create(st,n,vsp,def,vopts);
|
inherited create(st,n,vsp,def,vopts);
|
||||||
fillchar(localloc,sizeof(localloc),0);
|
fillchar(localloc,sizeof(localloc),0);
|
||||||
@ -1998,7 +2006,7 @@ implementation
|
|||||||
Tstaticvarsym
|
Tstaticvarsym
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tstaticvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
constructor tstaticvarsym.create(const n : TSymStr;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
||||||
begin
|
begin
|
||||||
inherited create(staticvarsym,n,vsp,def,vopts);
|
inherited create(staticvarsym,n,vsp,def,vopts);
|
||||||
fieldvarsymderef.reset;
|
fieldvarsymderef.reset;
|
||||||
@ -2010,20 +2018,20 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tstaticvarsym.create_dll(const n : string;vsp:tvarspez;def:tdef);
|
constructor tstaticvarsym.create_dll(const n : TSymStr;vsp:tvarspez;def:tdef);
|
||||||
begin
|
begin
|
||||||
tstaticvarsym(self).create(n,vsp,def,[vo_is_dll_var]);
|
tstaticvarsym(self).create(n,vsp,def,[vo_is_dll_var]);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tstaticvarsym.create_C(const n: string; const mangled : TSymStr;vsp:tvarspez;def:tdef);
|
constructor tstaticvarsym.create_C(const n: TSymStr; const mangled : TSymStr;vsp:tvarspez;def:tdef);
|
||||||
begin
|
begin
|
||||||
tstaticvarsym(self).create(n,vsp,def,[]);
|
tstaticvarsym(self).create(n,vsp,def,[]);
|
||||||
set_mangledname(mangled);
|
set_mangledname(mangled);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tstaticvarsym.create_from_fieldvar(const n: string;fieldvar:tfieldvarsym);
|
constructor tstaticvarsym.create_from_fieldvar(const n: TSymStr;fieldvar:tfieldvarsym);
|
||||||
begin
|
begin
|
||||||
create(internal_static_field_name(n),fieldvar.varspez,fieldvar.vardef,[]);
|
create(internal_static_field_name(n),fieldvar.varspez,fieldvar.vardef,[]);
|
||||||
fieldvarsym:=fieldvar;
|
fieldvarsym:=fieldvar;
|
||||||
@ -2194,7 +2202,7 @@ implementation
|
|||||||
TLOCALVARSYM
|
TLOCALVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tlocalvarsym.create(const n : string;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
constructor tlocalvarsym.create(const n : TSymStr;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
||||||
begin
|
begin
|
||||||
inherited create(localvarsym,n,vsp,def,vopts);
|
inherited create(localvarsym,n,vsp,def,vopts);
|
||||||
end;
|
end;
|
||||||
@ -2218,7 +2226,7 @@ implementation
|
|||||||
TPARAVARSYM
|
TPARAVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tparavarsym.create(const n : string;nr:word;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
constructor tparavarsym.create(const n : TSymStr;nr:word;vsp:tvarspez;def:tdef;vopts:tvaroptions);
|
||||||
begin
|
begin
|
||||||
inherited create(paravarsym,n,vsp,def,vopts);
|
inherited create(paravarsym,n,vsp,def,vopts);
|
||||||
if (vsp in [vs_var,vs_value,vs_const,vs_constref]) and
|
if (vsp in [vs_var,vs_value,vs_const,vs_constref]) and
|
||||||
@ -2313,14 +2321,14 @@ implementation
|
|||||||
TABSOLUTEVARSYM
|
TABSOLUTEVARSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tabsolutevarsym.create(const n : string;def:tdef);
|
constructor tabsolutevarsym.create(const n : TSymStr;def:tdef);
|
||||||
begin
|
begin
|
||||||
inherited create(absolutevarsym,n,vs_value,def,[]);
|
inherited create(absolutevarsym,n,vs_value,def,[]);
|
||||||
ref:=nil;
|
ref:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tabsolutevarsym.create_ref(const n : string;def:tdef;_ref:tpropaccesslist);
|
constructor tabsolutevarsym.create_ref(const n : TSymStr;def:tdef;_ref:tpropaccesslist);
|
||||||
begin
|
begin
|
||||||
inherited create(absolutevarsym,n,vs_value,def,[]);
|
inherited create(absolutevarsym,n,vs_value,def,[]);
|
||||||
ref:=_ref;
|
ref:=_ref;
|
||||||
@ -2403,7 +2411,7 @@ implementation
|
|||||||
TCONSTSYM
|
TCONSTSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tconstsym.create_ord(const n : string;t : tconsttyp;v : tconstexprint;def:tdef);
|
constructor tconstsym.create_ord(const n : TSymStr;t : tconsttyp;v : tconstexprint;def:tdef);
|
||||||
begin
|
begin
|
||||||
inherited create(constsym,n);
|
inherited create(constsym,n);
|
||||||
fillchar(value, sizeof(value), #0);
|
fillchar(value, sizeof(value), #0);
|
||||||
@ -2414,7 +2422,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tconstsym.create_ordptr(const n : string;t : tconsttyp;v : tconstptruint;def:tdef);
|
constructor tconstsym.create_ordptr(const n : TSymStr;t : tconsttyp;v : tconstptruint;def:tdef);
|
||||||
begin
|
begin
|
||||||
inherited create(constsym,n);
|
inherited create(constsym,n);
|
||||||
fillchar(value, sizeof(value), #0);
|
fillchar(value, sizeof(value), #0);
|
||||||
@ -2425,7 +2433,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tconstsym.create_ptr(const n : string;t : tconsttyp;v : pointer;def:tdef);
|
constructor tconstsym.create_ptr(const n : TSymStr;t : tconsttyp;v : pointer;def:tdef);
|
||||||
begin
|
begin
|
||||||
inherited create(constsym,n);
|
inherited create(constsym,n);
|
||||||
fillchar(value, sizeof(value), #0);
|
fillchar(value, sizeof(value), #0);
|
||||||
@ -2436,7 +2444,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tconstsym.create_string(const n : string;t : tconsttyp;str:pchar;l:longint;def: tdef);
|
constructor tconstsym.create_string(const n : TSymStr;t : tconsttyp;str:pchar;l:longint;def: tdef);
|
||||||
begin
|
begin
|
||||||
inherited create(constsym,n);
|
inherited create(constsym,n);
|
||||||
fillchar(value, sizeof(value), #0);
|
fillchar(value, sizeof(value), #0);
|
||||||
@ -2451,7 +2459,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tconstsym.create_wstring(const n : string;t : tconsttyp;pw:pcompilerwidestring);
|
constructor tconstsym.create_wstring(const n : TSymStr;t : tconsttyp;pw:pcompilerwidestring);
|
||||||
begin
|
begin
|
||||||
inherited create(constsym,n);
|
inherited create(constsym,n);
|
||||||
fillchar(value, sizeof(value), #0);
|
fillchar(value, sizeof(value), #0);
|
||||||
@ -2463,7 +2471,7 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
constructor tconstsym.create_undefined(const n : string;def: tdef);
|
constructor tconstsym.create_undefined(const n : TSymStr;def: tdef);
|
||||||
begin
|
begin
|
||||||
inherited create(constsym,n);
|
inherited create(constsym,n);
|
||||||
fillchar(value,sizeof(value),#0);
|
fillchar(value,sizeof(value),#0);
|
||||||
@ -2659,7 +2667,7 @@ implementation
|
|||||||
TENUMSYM
|
TENUMSYM
|
||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
constructor tenumsym.create(const n : string;def : tenumdef;v : longint);
|
constructor tenumsym.create(const n : TSymStr;def : tenumdef;v : longint);
|
||||||
begin
|
begin
|
||||||
inherited create(enumsym,n);
|
inherited create(enumsym,n);
|
||||||
definition:=def;
|
definition:=def;
|
||||||
@ -2703,7 +2711,7 @@ implementation
|
|||||||
****************************************************************************}
|
****************************************************************************}
|
||||||
|
|
||||||
|
|
||||||
constructor ttypesym.create(const n : string;def:tdef);
|
constructor ttypesym.create(const n : TSymStr;def:tdef);
|
||||||
|
|
||||||
begin
|
begin
|
||||||
inherited create(typesym,n);
|
inherited create(typesym,n);
|
||||||
@ -2771,7 +2779,7 @@ implementation
|
|||||||
syssym_list : TFPHashObjectList;
|
syssym_list : TFPHashObjectList;
|
||||||
|
|
||||||
|
|
||||||
constructor tsyssym.create(const n : string;l : tinlinenumber);
|
constructor tsyssym.create(const n : TSymStr;l : tinlinenumber);
|
||||||
var
|
var
|
||||||
s : shortstring;
|
s : shortstring;
|
||||||
begin
|
begin
|
||||||
@ -2821,7 +2829,7 @@ implementation
|
|||||||
TMacro
|
TMacro
|
||||||
*****************************************************************************}
|
*****************************************************************************}
|
||||||
|
|
||||||
constructor tmacro.create(const n : string);
|
constructor tmacro.create(const n : TSymStr);
|
||||||
begin
|
begin
|
||||||
inherited create(macrosym,n);
|
inherited create(macrosym,n);
|
||||||
owner:=nil;
|
owner:=nil;
|
||||||
|
@ -1813,9 +1813,9 @@ end;
|
|||||||
procedure readcommonsym(const s:string; Def: TPpuDef = nil);
|
procedure readcommonsym(const s:string; Def: TPpuDef = nil);
|
||||||
var
|
var
|
||||||
i: integer;
|
i: integer;
|
||||||
n: string;
|
n: ansistring;
|
||||||
begin
|
begin
|
||||||
n:=ppufile.getstring;
|
n:=readsymstr(ppufile);
|
||||||
if Def <> nil then
|
if Def <> nil then
|
||||||
Def.Name:=n;
|
Def.Name:=n;
|
||||||
i:=ppufile.getlongint;
|
i:=ppufile.getlongint;
|
||||||
|
@ -122,7 +122,7 @@ type
|
|||||||
|
|
||||||
public
|
public
|
||||||
DefType: TPpuDefType;
|
DefType: TPpuDefType;
|
||||||
Name: string;
|
Name: ansistring;
|
||||||
FilePos: TPpuFilePos;
|
FilePos: TPpuFilePos;
|
||||||
// Symbol/definition reference
|
// Symbol/definition reference
|
||||||
Ref: TPpuRef;
|
Ref: TPpuRef;
|
||||||
|
Loading…
Reference in New Issue
Block a user