* splitted buildderef and buildderefimpl to fix interface crc

calculation
This commit is contained in:
peter 2003-10-23 14:44:07 +00:00
parent dacd24d1d0
commit 4a1ecb07d1
18 changed files with 308 additions and 107 deletions

View File

@ -209,7 +209,7 @@ interface
constructor Create;
constructor ppuload(t:taitype;ppufile:tcompilerppufile);virtual;
procedure ppuwrite(ppufile:tcompilerppufile);virtual;
procedure buildderef;virtual;
procedure buildderefimpl;virtual;
procedure derefimpl;virtual;
end;
@ -435,7 +435,7 @@ interface
protected
procedure ppuloadoper(ppufile:tcompilerppufile;var o:toper);virtual;abstract;
procedure ppuwriteoper(ppufile:tcompilerppufile;const o:toper);virtual;abstract;
procedure ppubuildderefoper(var o:toper);virtual;abstract;
procedure ppubuildderefimploper(var o:toper);virtual;abstract;
procedure ppuderefoper(var o:toper);virtual;abstract;
public
{ Condition flags for instruction }
@ -458,7 +458,7 @@ interface
function getcopy:TLinkedListItem;override;
constructor ppuload(t:taitype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
procedure SetCondition(const c:TAsmCond);
procedure allocate_oper(opers:longint);
@ -616,7 +616,7 @@ implementation
end;
procedure tai.buildderef;
procedure tai.buildderefimpl;
begin
end;
@ -2014,12 +2014,12 @@ implementation
end;
procedure taicpu_abstract.buildderef;
procedure taicpu_abstract.buildderefimpl;
var
i : integer;
begin
for i:=0 to ops-1 do
ppubuildderefoper(oper[i]^);
ppubuildderefimploper(oper[i]^);
end;
@ -2139,7 +2139,11 @@ implementation
end.
{
$Log$
Revision 1.46 2003-10-22 20:39:59 peter
Revision 1.47 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.46 2003/10/22 20:39:59 peter
* write derefdata in a separate ppu entry
Revision 1.45 2003/10/21 15:15:35 peter

View File

@ -281,6 +281,7 @@ interface
public
constructor Create(Ablocksize:integer);
destructor Destroy;override;
procedure reset;
function size:integer;
procedure align(i:integer);
procedure seek(i:integer);
@ -291,6 +292,7 @@ interface
procedure writestream(f:TCStream);
property BlockSize : integer read FBlocksize;
property FirstBlock : PDynamicBlock read FFirstBlock;
property Pos : integer read FPosn;
end;
@ -1672,7 +1674,7 @@ end;
begin
hp:=FFirstblock;
FFirstblock:=FFirstblock^.Next;
freemem(hp,blocksize+dynamicblockbasesize);
Freemem(hp);
end;
end;
@ -1686,6 +1688,24 @@ end;
end;
procedure tdynamicarray.reset;
var
hp : pdynamicblock;
begin
while assigned(FFirstblock) do
begin
hp:=FFirstblock;
FFirstblock:=FFirstblock^.Next;
Freemem(hp);
end;
FPosn:=0;
FPosnblock:=nil;
FFirstblock:=nil;
FLastblock:=nil;
grow;
end;
procedure tdynamicarray.grow;
var
nblock : pdynamicblock;
@ -1885,7 +1905,11 @@ end;
end.
{
$Log$
Revision 1.27 2003-10-22 20:40:00 peter
Revision 1.28 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.27 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.26 2003/10/11 16:06:42 florian

View File

@ -97,6 +97,7 @@ interface
islibrary : boolean; { if it is a library (win32 dll) }
map : punitmap; { mapping of all used units }
mapsize : longint; { number of units in the map }
derefdataintflen : longint;
derefdata : tdynamicarray;
globalsymtable, { pointer to the global symtable of this unit }
localsymtable : tsymtable;{ pointer to the local symtable of this unit }
@ -383,6 +384,7 @@ implementation
map:=nil;
mapsize:=0;
derefdata:=TDynamicArray.Create(1024);
derefdataintflen:=0;
globalsymtable:=nil;
localsymtable:=nil;
loaded_from:=LoadedFrom;
@ -524,6 +526,7 @@ implementation
freemem(map);
map:=nil;
end;
derefdataintflen:=0;
mapsize:=0;
sourcefiles.free;
sourcefiles:=tinputfilemanager.create;
@ -687,7 +690,11 @@ implementation
end.
{
$Log$
Revision 1.40 2003-10-22 20:40:00 peter
Revision 1.41 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.40 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.39 2003/10/22 15:22:33 peter

View File

@ -483,11 +483,15 @@ uses
procedure tppumodule.writederefdata;
var
oldcrc : boolean;
len,hlen : longint;
buf : array[0..1023] of byte;
begin
len:=derefdata.size;
if derefdataintflen>derefdata.size then
internalerror(200310223);
derefdata.seek(0);
{ Write interface data }
len:=derefdataintflen;
while (len>0) do
begin
if len>1024 then
@ -498,6 +502,23 @@ uses
ppufile.putdata(buf,hlen);
dec(len,hlen);
end;
{ Write implementation data, this does not influence crc }
oldcrc:=ppufile.do_crc;
ppufile.do_crc:=false;
len:=derefdata.size-derefdataintflen;
while (len>0) do
begin
if len>1024 then
hlen:=1024
else
hlen:=len;
derefdata.read(buf,hlen);
ppufile.putdata(buf,hlen);
dec(len,hlen);
end;
if derefdata.pos<>derefdata.size then
internalerror(200310224);
ppufile.do_crc:=oldcrc;
ppufile.writeentry(ibderefdata);
end;
@ -870,9 +891,13 @@ uses
{ we can now derefence all pointers to the implementation parts }
oldobjectlibrary:=objectlibrary;
objectlibrary:=librarydata;
aktglobalsymtable:=tstoredsymtable(globalsymtable);
tstoredsymtable(globalsymtable).derefimpl;
if assigned(localsymtable) then
tstoredsymtable(localsymtable).derefimpl;
begin
aktstaticsymtable:=tstoredsymtable(localsymtable);
tstoredsymtable(localsymtable).derefimpl;
end;
objectlibrary:=oldobjectlibrary;
end;
@ -958,11 +983,23 @@ uses
writelinkcontainer(linkothersharedlibs,iblinkothersharedlibs,true);
ppufile.do_crc:=true;
{ generate and write deref data }
tstoredsymtable(globalsymtable).buildderef;
{ generate implementation deref data, the interface deref data is
already generated when calculating the interface crc }
if (cs_compilesystem in aktmoduleswitches) then
begin
aktglobalsymtable:=tstoredsymtable(globalsymtable);
tstoredsymtable(globalsymtable).buildderef;
derefdataintflen:=derefdata.size;
end;
tstoredsymtable(globalsymtable).buildderefimpl;
if ((flags and uf_local_browser)<>0) and
assigned(localsymtable) then
tstoredsymtable(localsymtable).buildderef;
begin
aktglobalsymtable:=tstoredsymtable(globalsymtable);
aktstaticsymtable:=tstoredsymtable(localsymtable);
tstoredsymtable(localsymtable).buildderef;
tstoredsymtable(localsymtable).buildderefimpl;
end;
writederefdata;
ppufile.writeentry(ibendinterface);
@ -1052,6 +1089,13 @@ uses
{ the interface units affect the crc }
writeusedunit(true);
{ deref data of interface that affect the crc }
derefdata.reset;
aktglobalsymtable:=tstoredsymtable(globalsymtable);
tstoredsymtable(globalsymtable).buildderef;
derefdataintflen:=derefdata.size;
writederefdata;
ppufile.writeentry(ibendinterface);
{ write the symtable entries }
@ -1466,7 +1510,11 @@ if modulename^='SYMSYM' then
end.
{
$Log$
Revision 1.42 2003-10-22 20:40:00 peter
Revision 1.43 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.42 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.41 2003/10/22 17:38:25 peter

View File

@ -60,7 +60,7 @@ interface
destructor destroy;override;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
function pass_1 : tnode;override;
@ -544,15 +544,15 @@ implementation
end;
procedure tasmnode.buildderef;
procedure tasmnode.buildderefimpl;
var
hp : tai;
begin
inherited buildderef;
inherited buildderefimpl;
hp:=tai(p_asm.first);
while assigned(hp) do
begin
hp.buildderef;
hp.buildderefimpl;
hp:=tai(hp.next);
end;
end;
@ -845,7 +845,11 @@ begin
end.
{
$Log$
Revision 1.68 2003-10-22 20:40:00 peter
Revision 1.69 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.68 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.67 2003/10/21 18:15:16 peter

View File

@ -114,7 +114,7 @@ interface
destructor destroy;override;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
{ Goes through all symbols in a class and subclasses and calls
@ -974,17 +974,17 @@ type
end;
procedure tcallnode.buildderef;
procedure tcallnode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
symtableprocentryderef.build(symtableprocentry);
procdefinitionderef.build(procdefinition);
if assigned(methodpointer) then
methodpointer.buildderef;
methodpointer.buildderefimpl;
if assigned(_funcretnode) then
_funcretnode.buildderef;
_funcretnode.buildderefimpl;
if assigned(inlinecode) then
inlinecode.buildderef;
inlinecode.buildderefimpl;
end;
@ -2584,7 +2584,11 @@ begin
end.
{
$Log$
Revision 1.199 2003-10-22 20:40:00 peter
Revision 1.200 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.199 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.198 2003/10/21 18:17:02 peter

View File

@ -44,7 +44,7 @@ interface
constructor create_explicit(node : tnode;const t : ttype);
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
function pass_1 : tnode;override;
@ -499,9 +499,9 @@ implementation
end;
procedure ttypeconvnode.buildderef;
procedure ttypeconvnode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
totype.buildderef;
end;
@ -2111,7 +2111,11 @@ begin
end.
{
$Log$
Revision 1.125 2003-10-22 20:40:00 peter
Revision 1.126 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.125 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.124 2003/10/21 18:16:13 peter

View File

@ -40,7 +40,7 @@ interface
constructor create(v : bestreal;const t:ttype);virtual;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
function pass_1 : tnode;override;
@ -61,7 +61,7 @@ interface
constructor create(v : tconstexprint;const t:ttype; _rangecheck : boolean);virtual;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
function pass_1 : tnode;override;
@ -77,7 +77,7 @@ interface
constructor create(v : TConstPtrUInt;const t:ttype);virtual;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
function pass_1 : tnode;override;
@ -96,7 +96,7 @@ interface
constructor createwstr(w : pcompilerwidestring);virtual;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
destructor destroy;override;
function getcopy : tnode;override;
@ -115,7 +115,7 @@ interface
destructor destroy;override;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
function pass_1 : tnode;override;
@ -370,9 +370,9 @@ implementation
end;
procedure trealconstnode.buildderef;
procedure trealconstnode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
restype.buildderef;
end;
@ -463,9 +463,9 @@ implementation
end;
procedure tordconstnode.buildderef;
procedure tordconstnode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
restype.buildderef;
end;
@ -548,9 +548,9 @@ implementation
end;
procedure tpointerconstnode.buildderef;
procedure tpointerconstnode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
restype.buildderef;
end;
@ -681,9 +681,9 @@ implementation
end;
procedure tstringconstnode.buildderef;
procedure tstringconstnode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
end;
@ -805,9 +805,9 @@ implementation
end;
procedure tsetconstnode.buildderef;
procedure tsetconstnode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
restype.buildderef;
end;
@ -950,7 +950,11 @@ begin
end.
{
$Log$
Revision 1.55 2003-10-22 20:40:00 peter
Revision 1.56 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.55 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.54 2003/10/07 18:17:44 peter

View File

@ -60,7 +60,7 @@ interface
function getcopy : tnode;override;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
procedure insertintolist(l : tnodelist);override;
procedure printnodetree(var t:text);override;
@ -125,7 +125,7 @@ interface
{ constructor createintern(g:tinterngotolabel);}
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
function det_resulttype:tnode;override;
@ -143,7 +143,7 @@ interface
constructor create(p : tlabelsym;l:tnode);virtual;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
function det_resulttype:tnode;override;
@ -157,7 +157,7 @@ interface
constructor create(l,taddr,tframe:tnode);virtual;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
procedure insertintolist(l : tnodelist);override;
@ -287,13 +287,13 @@ implementation
end;
procedure tloopnode.buildderef;
procedure tloopnode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
if assigned(t1) then
t1.buildderef;
t1.buildderefimpl;
if assigned(t2) then
t2.buildderef;
t2.buildderefimpl;
end;
@ -979,9 +979,9 @@ implementation
end;
procedure tgotonode.buildderef;
procedure tgotonode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
labsymderef.build(labsym);
end;
@ -1076,9 +1076,9 @@ implementation
end;
procedure tlabelnode.buildderef;
procedure tlabelnode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
labsymderef.build(labsym);
end;
@ -1160,11 +1160,11 @@ implementation
end;
procedure traisenode.buildderef;
procedure traisenode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
if assigned(frametree) then
frametree.buildderef;
frametree.buildderefimpl;
end;
@ -1467,7 +1467,11 @@ begin
end.
{
$Log$
Revision 1.84 2003-10-22 20:40:00 peter
Revision 1.85 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.84 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.83 2003/10/09 21:31:37 daniel

View File

@ -44,7 +44,7 @@ interface
constructor create_procvar(v : tsym;d:tprocdef;st : tsymtable);virtual;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
procedure set_mp(p:tnode);
function getcopy : tnode;override;
@ -98,7 +98,7 @@ interface
constructor create(t : ttype);virtual;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function pass_1 : tnode;override;
function det_resulttype:tnode;override;
@ -114,7 +114,7 @@ interface
constructor create(def:tstoreddef;rt:trttitype);virtual;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
function pass_1 : tnode;override;
@ -327,9 +327,9 @@ implementation
end;
procedure tloadnode.buildderef;
procedure tloadnode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
symtableentryderef.build(symtableentry);
procdefderef.build(procdef);
end;
@ -1133,9 +1133,9 @@ implementation
end;
procedure ttypenode.buildderef;
procedure ttypenode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
restype.buildderef;
end;
@ -1206,9 +1206,9 @@ implementation
end;
procedure trttinode.buildderef;
procedure trttinode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
rttidefderef.build(rttidef);
end;
@ -1272,7 +1272,11 @@ begin
end.
{
$Log$
Revision 1.114 2003-10-22 20:40:00 peter
Revision 1.115 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.114 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.113 2003/10/17 14:38:32 peter

View File

@ -55,7 +55,7 @@ interface
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure mark_write;override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
function pass_1 : tnode;override;
@ -77,7 +77,7 @@ interface
constructor create(varsym : tsym;l : tnode);virtual;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
function pass_1 : tnode;override;
@ -239,9 +239,9 @@ implementation
left.mark_write;
end;
procedure taddrnode.buildderef;
procedure taddrnode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
getprocvardefderef.build(getprocvardef);
end;
@ -530,9 +530,9 @@ implementation
end;
procedure tsubscriptnode.buildderef;
procedure tsubscriptnode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
vsderef.build(vs);
end;
@ -920,7 +920,11 @@ begin
end.
{
$Log$
Revision 1.67 2003-10-22 20:40:00 peter
Revision 1.68 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.67 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.66 2003/10/21 18:16:13 peter

View File

@ -296,7 +296,7 @@ interface
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);virtual;
destructor destroy;override;
procedure ppuwrite(ppufile:tcompilerppufile);virtual;
procedure buildderef;virtual;
procedure buildderefimpl;virtual;
procedure derefimpl;virtual;
{ toggles the flag }
@ -357,7 +357,7 @@ interface
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
destructor destroy;override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
procedure concattolist(l : tlinkedlist);override;
function ischild(p : tnode) : boolean;override;
@ -375,7 +375,7 @@ interface
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
destructor destroy;override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
procedure concattolist(l : tlinkedlist);override;
function ischild(p : tnode) : boolean;override;
@ -559,7 +559,7 @@ implementation
end;
procedure tnode.buildderef;
procedure tnode.buildderefimpl;
begin
resulttype.buildderef;
end;
@ -744,11 +744,11 @@ implementation
end;
procedure tunarynode.buildderef;
procedure tunarynode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
if assigned(left) then
left.buildderef;
left.buildderefimpl;
end;
@ -849,11 +849,11 @@ implementation
end;
procedure tbinarynode.buildderef;
procedure tbinarynode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
if assigned(right) then
right.buildderef;
right.buildderefimpl;
end;
@ -994,7 +994,11 @@ implementation
end.
{
$Log$
Revision 1.72 2003-10-22 20:40:00 peter
Revision 1.73 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.72 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.71 2003/10/18 15:41:26 peter

View File

@ -79,7 +79,7 @@ interface
destructor destroy;override;
constructor ppuload(t:tnodetype;ppufile:tcompilerppufile);override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure derefimpl;override;
function getcopy : tnode;override;
procedure insertintolist(l : tnodelist);override;
@ -546,12 +546,12 @@ implementation
end;
procedure tcasenode.buildderef;
procedure tcasenode.buildderefimpl;
begin
inherited buildderef;
inherited buildderefimpl;
if assigned(elseblock) then
elseblock.buildderef;
{ppubuildderefcaserecord(nodes);}
elseblock.buildderefimpl;
{ppubuildderefimplcaserecord(nodes);}
end;
@ -695,7 +695,11 @@ begin
end.
{
$Log$
Revision 1.48 2003-10-22 20:40:00 peter
Revision 1.49 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.48 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.47 2003/10/09 21:31:37 daniel

View File

@ -77,6 +77,7 @@ interface
procedure ppuwritedef(ppufile:tcompilerppufile);
procedure ppuwrite(ppufile:tcompilerppufile);virtual;abstract;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure deref;override;
procedure derefimpl;override;
function size:longint;override;
@ -544,6 +545,7 @@ interface
destructor destroy;override;
procedure ppuwrite(ppufile:tcompilerppufile);override;
procedure buildderef;override;
procedure buildderefimpl;override;
procedure deref;override;
procedure derefimpl;override;
function getsymtable(t:tgetsymtable):tsymtable;override;
@ -1001,6 +1003,11 @@ implementation
end;
procedure tstoreddef.buildderefimpl;
begin
end;
procedure tstoreddef.deref;
begin
typesym:=ttypesym(typesymderef.resolve);
@ -3297,6 +3304,9 @@ implementation
var
hp : TParaItem;
begin
{ released procdef? }
if not assigned(parast) then
exit;
inherited buildderef;
rettype.buildderef;
{ parast }
@ -3526,6 +3536,9 @@ implementation
procedure tabstractprocdef.concatstabto(asmlist : taasmoutput);
begin
{ released procdef? }
if not assigned(parast) then
exit;
if (not assigned(typesym) or ttypesym(typesym).isusedinstab or (cs_gdb_dbx in aktglobalswitches))
and (is_def_stab_written = not_written) then
begin
@ -4063,6 +4076,9 @@ implementation
procedure tprocdef.concatstabto(asmlist : taasmoutput);
begin
{ released procdef? }
if not assigned(parast) then
exit;
if (proccalloption=pocall_internproc) then
exit;
if not isstabwritten then
@ -4098,16 +4114,37 @@ implementation
same symtable }
procsymderef.build(procsym);
aktparasymtable:=oldparasymtable;
aktlocalsymtable:=oldlocalsymtable;
end;
procedure tprocdef.buildderefimpl;
var
oldparasymtable,
oldlocalsymtable : tsymtable;
begin
{ released procdef? }
if not assigned(parast) then
exit;
oldparasymtable:=aktparasymtable;
oldlocalsymtable:=aktlocalsymtable;
aktparasymtable:=parast;
aktlocalsymtable:=localst;
inherited buildderefimpl;
{ locals }
if assigned(localst) then
begin
tlocalsymtable(localst).buildderef;
tlocalsymtable(localst).buildderefimpl;
funcretsymderef.build(funcretsym);
end;
{ inline tree }
if (proccalloption=pocall_inline) then
code.buildderef;
code.buildderefimpl;
aktparasymtable:=oldparasymtable;
aktlocalsymtable:=oldlocalsymtable;
@ -4119,6 +4156,10 @@ implementation
oldparasymtable,
oldlocalsymtable : tsymtable;
begin
{ released procdef? }
if not assigned(parast) then
exit;
oldparasymtable:=aktparasymtable;
oldlocalsymtable:=aktlocalsymtable;
aktparasymtable:=parast;
@ -6050,7 +6091,11 @@ implementation
end.
{
$Log$
Revision 1.183 2003-10-22 20:40:00 peter
Revision 1.184 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.183 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.182 2003/10/21 18:14:49 peter

View File

@ -332,8 +332,13 @@ implementation
procedure tcompilerppufile.putderef(const d:tderef);
var
oldcrc : boolean;
begin
oldcrc:=do_crc;
do_crc:=false;
putlongint(d.dataidx);
do_crc:=oldcrc;
end;
@ -387,7 +392,11 @@ implementation
end.
{
$Log$
Revision 1.21 2003-10-22 20:40:00 peter
Revision 1.22 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.21 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.20 2003/10/07 16:06:30 peter

View File

@ -71,6 +71,7 @@ interface
procedure load_references(ppufile:tcompilerppufile;locals:boolean);virtual;
procedure write_references(ppufile:tcompilerppufile;locals:boolean);virtual;
procedure buildderef;virtual;
procedure buildderefimpl;virtual;
procedure deref;virtual;
procedure derefimpl;virtual;
procedure insert(sym : tsymentry);override;
@ -494,6 +495,20 @@ implementation
end;
procedure tstoredsymtable.buildderefimpl;
var
hp : tdef;
begin
{ deref the implementation part of definitions }
hp:=tdef(defindex.first);
while assigned(hp) do
begin
hp.buildderefimpl;
hp:=tdef(hp.indexnext);
end;
end;
procedure tstoredsymtable.deref;
var
hp : tdef;
@ -2282,7 +2297,11 @@ implementation
end.
{
$Log$
Revision 1.119 2003-10-22 20:40:00 peter
Revision 1.120 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.119 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.118 2003/10/22 15:22:33 peter

View File

@ -71,6 +71,7 @@ interface
defoptions : tdefoptions;
constructor create;
procedure buildderef;virtual;abstract;
procedure buildderefimpl;virtual;abstract;
procedure deref;virtual;abstract;
procedure derefimpl;virtual;abstract;
function typename:string;
@ -914,7 +915,11 @@ finalization
end.
{
$Log$
Revision 1.31 2003-10-22 20:40:00 peter
Revision 1.32 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.31 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.30 2003/10/22 15:22:33 peter

View File

@ -210,7 +210,7 @@ interface
protected
procedure ppuloadoper(ppufile:tcompilerppufile;var o:toper);override;
procedure ppuwriteoper(ppufile:tcompilerppufile;const o:toper);override;
procedure ppubuildderefoper(var o:toper);override;
procedure ppubuildderefimploper(var o:toper);override;
procedure ppuderefoper(var o:toper);override;
private
{ next fields are filled in pass1, so pass2 is faster }
@ -807,7 +807,7 @@ implementation
end;
procedure taicpu.ppubuildderefoper(var o:toper);
procedure taicpu.ppubuildderefimploper(var o:toper);
begin
case o.typ of
top_local :
@ -2328,7 +2328,11 @@ implementation
end.
{
$Log$
Revision 1.34 2003-10-22 20:40:00 peter
Revision 1.35 2003-10-23 14:44:07 peter
* splitted buildderef and buildderefimpl to fix interface crc
calculation
Revision 1.34 2003/10/22 20:40:00 peter
* write derefdata in a separate ppu entry
Revision 1.33 2003/10/21 15:15:36 peter