|
@@ -73,8 +73,8 @@
|
|
|
|
|
|
constructor tdef.load;
|
|
|
begin
|
|
|
+ inherited init;
|
|
|
deftype:=abstractdef;
|
|
|
- next := nil;
|
|
|
owner := nil;
|
|
|
has_rtti:=false;
|
|
|
has_inittable:=false;
|
|
@@ -2427,17 +2427,17 @@
|
|
|
procedure tabstractprocdef.write;
|
|
|
var
|
|
|
hp : pparaitem;
|
|
|
- oldintfcrc : boolean;
|
|
|
+ oldintfcrc : boolean;
|
|
|
begin
|
|
|
inherited write;
|
|
|
rettype.write;
|
|
|
- oldintfcrc:=current_ppu^.do_interface_crc;
|
|
|
+ oldintfcrc:=current_ppu^.do_interface_crc;
|
|
|
current_ppu^.do_interface_crc:=false;
|
|
|
writebyte(fpu_used);
|
|
|
writelong(ord(proctypeoption));
|
|
|
writesmallset(proccalloptions);
|
|
|
writesmallset(procoptions);
|
|
|
- current_ppu^.do_interface_crc:=oldintfcrc;
|
|
|
+ current_ppu^.do_interface_crc:=oldintfcrc;
|
|
|
writeword(maxparacount);
|
|
|
hp:=pparaitem(para^.first);
|
|
|
while assigned(hp) do
|
|
@@ -2480,7 +2480,7 @@
|
|
|
var
|
|
|
hs,s : string;
|
|
|
hp : pparaitem;
|
|
|
- hpc : pconstsym;
|
|
|
+ hpc : pconstsym;
|
|
|
begin
|
|
|
s:='(';
|
|
|
hp:=pparaitem(para^.last);
|
|
@@ -2494,37 +2494,37 @@
|
|
|
s:=s+'const'
|
|
|
else if hp^.paratyp=vs_out then
|
|
|
s:=s+'out';
|
|
|
- { default value }
|
|
|
- if assigned(hp^.defaultvalue) then
|
|
|
- begin
|
|
|
- hpc:=pconstsym(hp^.defaultvalue);
|
|
|
- hs:='';
|
|
|
- case hpc^.consttyp of
|
|
|
- conststring,
|
|
|
- constresourcestring :
|
|
|
- hs:=+strpas(pchar(tpointerord(hpc^.value)));
|
|
|
- constreal :
|
|
|
+ { default value }
|
|
|
+ if assigned(hp^.defaultvalue) then
|
|
|
+ begin
|
|
|
+ hpc:=pconstsym(hp^.defaultvalue);
|
|
|
+ hs:='';
|
|
|
+ case hpc^.consttyp of
|
|
|
+ conststring,
|
|
|
+ constresourcestring :
|
|
|
+ hs:=+strpas(pchar(tpointerord(hpc^.value)));
|
|
|
+ constreal :
|
|
|
str(pbestreal(tpointerord(hpc^.value))^,hs);
|
|
|
- constord,
|
|
|
- constpointer :
|
|
|
- hs:=tostr(hpc^.value);
|
|
|
- constbool :
|
|
|
- begin
|
|
|
- if hpc^.value<>0 then
|
|
|
- hs:='TRUE'
|
|
|
- else
|
|
|
- hs:='FALSE';
|
|
|
- end;
|
|
|
- constnil :
|
|
|
- hs:='nil';
|
|
|
- constchar :
|
|
|
- hs:=chr(hpc^.value);
|
|
|
- constset :
|
|
|
- hs:='<set>';
|
|
|
+ constord,
|
|
|
+ constpointer :
|
|
|
+ hs:=tostr(hpc^.value);
|
|
|
+ constbool :
|
|
|
+ begin
|
|
|
+ if hpc^.value<>0 then
|
|
|
+ hs:='TRUE'
|
|
|
+ else
|
|
|
+ hs:='FALSE';
|
|
|
+ end;
|
|
|
+ constnil :
|
|
|
+ hs:='nil';
|
|
|
+ constchar :
|
|
|
+ hs:=chr(hpc^.value);
|
|
|
+ constset :
|
|
|
+ hs:='<set>';
|
|
|
end;
|
|
|
- if hs<>'' then
|
|
|
- s:=s+'="'+hs+'"';
|
|
|
- end;
|
|
|
+ if hs<>'' then
|
|
|
+ s:=s+'="'+hs+'"';
|
|
|
+ end;
|
|
|
hp:=pparaitem(hp^.previous);
|
|
|
if assigned(hp) then
|
|
|
s:=s+',';
|
|
@@ -2681,8 +2681,8 @@
|
|
|
{new(localst,loadas(localsymtable));
|
|
|
localst^.defowner:=@self;
|
|
|
parast^.next:=localst;
|
|
|
- localst^.next:=owner;}
|
|
|
-
|
|
|
+ localst^.next:=owner;}
|
|
|
+
|
|
|
forwarddef:=false;
|
|
|
interfacedef:=false;
|
|
|
hasforward:=false;
|
|
@@ -2886,7 +2886,7 @@ Const local_symtable_index : longint = $8001;
|
|
|
oldintfcrc : boolean;
|
|
|
begin
|
|
|
inherited write;
|
|
|
- oldintfcrc:=current_ppu^.do_interface_crc;
|
|
|
+ oldintfcrc:=current_ppu^.do_interface_crc;
|
|
|
current_ppu^.do_interface_crc:=false;
|
|
|
{ set all registers to used for simplified compilation PM }
|
|
|
if simplify_ppu then
|
|
@@ -2913,7 +2913,7 @@ Const local_symtable_index : longint = $8001;
|
|
|
writeword(usedregisters);
|
|
|
{$endif}
|
|
|
{$endif newcg}
|
|
|
- current_ppu^.do_interface_crc:=oldintfcrc;
|
|
|
+ current_ppu^.do_interface_crc:=oldintfcrc;
|
|
|
writestring(mangledname);
|
|
|
writelong(extnumber);
|
|
|
if (proctypeoption<>potype_operator) then
|
|
@@ -2940,22 +2940,22 @@ Const local_symtable_index : longint = $8001;
|
|
|
}
|
|
|
end;
|
|
|
current_ppu^.writeentry(ibprocdef);
|
|
|
-
|
|
|
+
|
|
|
{ Save the para and local symtable, for easier reading
|
|
|
- save both always, they don't influence the interface crc }
|
|
|
+ save both always, they don't influence the interface crc }
|
|
|
oldintfcrc:=current_ppu^.do_interface_crc;
|
|
|
current_ppu^.do_interface_crc:=false;
|
|
|
if not assigned(parast) then
|
|
|
- begin
|
|
|
+ begin
|
|
|
parast:=new(psymtable,init(parasymtable));
|
|
|
- parast^.defowner:=@self;
|
|
|
- end;
|
|
|
+ parast^.defowner:=@self;
|
|
|
+ end;
|
|
|
parast^.writeas;
|
|
|
{if not assigned(localst) then
|
|
|
- begin
|
|
|
+ begin
|
|
|
localst:=new(psymtable,init(localsymtable));
|
|
|
- localst^.defowner:=@self;
|
|
|
- end;
|
|
|
+ localst^.defowner:=@self;
|
|
|
+ end;
|
|
|
localst^.writeas;}
|
|
|
current_ppu^.do_interface_crc:=oldintfcrc;
|
|
|
end;
|
|
@@ -3023,22 +3023,22 @@ Const local_symtable_index : longint = $8001;
|
|
|
|
|
|
procedure tprocdef.deref;
|
|
|
var
|
|
|
- oldsymtablestack,
|
|
|
+ oldsymtablestack,
|
|
|
oldlocalsymtable : psymtable;
|
|
|
begin
|
|
|
inherited deref;
|
|
|
resolvedef(pdef(nextoverloaded));
|
|
|
resolvedef(pdef(_class));
|
|
|
{ parast }
|
|
|
- oldsymtablestack:=symtablestack;
|
|
|
+ oldsymtablestack:=symtablestack;
|
|
|
oldlocalsymtable:=aktlocalsymtable;
|
|
|
aktlocalsymtable:=parast;
|
|
|
parast^.deref;
|
|
|
- {symtablestack:=parast;
|
|
|
+ {symtablestack:=parast;
|
|
|
aktlocalsymtable:=localst;
|
|
|
localst^.deref;}
|
|
|
aktlocalsymtable:=oldlocalsymtable;
|
|
|
- symtablestack:=oldsymtablestack;
|
|
|
+ symtablestack:=oldsymtablestack;
|
|
|
end;
|
|
|
|
|
|
|
|
@@ -4252,7 +4252,12 @@ Const local_symtable_index : longint = $8001;
|
|
|
|
|
|
{
|
|
|
$Log$
|
|
|
- Revision 1.10 2000-08-16 13:06:06 florian
|
|
|
+ Revision 1.11 2000-08-16 18:33:54 peter
|
|
|
+ * splitted namedobjectitem.next into indexnext and listnext so it
|
|
|
+ can be used in both lists
|
|
|
+ * don't allow "word = word" type definitions (merged)
|
|
|
+
|
|
|
+ Revision 1.10 2000/08/16 13:06:06 florian
|
|
|
+ support of 64 bit integer constants
|
|
|
|
|
|
Revision 1.9 2000/08/13 13:06:37 peter
|