mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-12 12:26:02 +02:00
* splitted namedobjectitem.next into indexnext and listnext so it
can be used in both lists * don't allow "word = word" type definitions (merged)
This commit is contained in:
parent
244fc53520
commit
7eaac1706d
@ -1085,7 +1085,7 @@ uses
|
|||||||
reset;
|
reset;
|
||||||
inusedlist:=false;
|
inusedlist:=false;
|
||||||
end;
|
end;
|
||||||
hp:=pasmsymbol(hp^.next);
|
hp:=pasmsymbol(hp^.listnext);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1102,7 +1102,7 @@ uses
|
|||||||
altsymbol:=nil;
|
altsymbol:=nil;
|
||||||
inusedlist:=false;
|
inusedlist:=false;
|
||||||
end;
|
end;
|
||||||
hp:=pasmsymbol(hp^.next);
|
hp:=pasmsymbol(hp^.listnext);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1121,7 +1121,7 @@ uses
|
|||||||
not(bind in [AB_EXTERNAL,AB_COMMON]) then
|
not(bind in [AB_EXTERNAL,AB_COMMON]) then
|
||||||
Message1(asmw_e_undefined_label,name);
|
Message1(asmw_e_undefined_label,name);
|
||||||
end;
|
end;
|
||||||
hp:=pasmsymbol(hp^.next);
|
hp:=pasmsymbol(hp^.listnext);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1180,7 +1180,12 @@ uses
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2000-08-12 19:14:58 peter
|
Revision 1.9 2000-08-16 18:33:53 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.8 2000/08/12 19:14:58 peter
|
||||||
* ELF writer works now also with -g
|
* ELF writer works now also with -g
|
||||||
* ELF writer is default again for linux
|
* ELF writer is default again for linux
|
||||||
|
|
||||||
@ -1203,4 +1208,4 @@ end.
|
|||||||
Revision 1.2 2000/07/13 11:32:28 michael
|
Revision 1.2 2000/07/13 11:32:28 michael
|
||||||
+ removed logs
|
+ removed logs
|
||||||
|
|
||||||
}
|
}
|
@ -1254,10 +1254,10 @@ end;
|
|||||||
end;
|
end;
|
||||||
if assigned(dc^.paratype.def) then
|
if assigned(dc^.paratype.def) then
|
||||||
CurName:=CurName+GetDefinitionStr(dc^.paratype.def);
|
CurName:=CurName+GetDefinitionStr(dc^.paratype.def);
|
||||||
if dc^.next<>nil then
|
if dc^.indexnext<>nil then
|
||||||
CurName:=', '+CurName;
|
CurName:=', '+CurName;
|
||||||
Name:=CurName+Name;
|
Name:=CurName+Name;
|
||||||
dc:=pparaitem(dc^.next);
|
dc:=pparaitem(dc^.indexnext);
|
||||||
Inc(Count);
|
Inc(Count);
|
||||||
end;
|
end;
|
||||||
GetAbsProcParmDefStr:=Name;
|
GetAbsProcParmDefStr:=Name;
|
||||||
@ -1571,7 +1571,7 @@ end;
|
|||||||
end;
|
end;
|
||||||
if Assigned(Symbol) then
|
if Assigned(Symbol) then
|
||||||
Owner^.Insert(Symbol);
|
Owner^.Insert(Symbol);
|
||||||
sym:=psym(sym^.next);
|
sym:=psym(sym^.indexnext);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2094,7 +2094,12 @@ begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 2000-07-13 12:08:24 michael
|
Revision 1.4 2000-08-16 18:33:53 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.3 2000/07/13 12:08:24 michael
|
||||||
+ patched to 1.1.0 with former 1.09patch from peter
|
+ patched to 1.1.0 with former 1.09patch from peter
|
||||||
|
|
||||||
Revision 1.2 2000/07/13 11:32:32 michael
|
Revision 1.2 2000/07/13 11:32:32 michael
|
||||||
|
@ -220,11 +220,15 @@ unit cobjects;
|
|||||||
{ namedindexobject for use with dictionary and indexarray }
|
{ namedindexobject for use with dictionary and indexarray }
|
||||||
Pnamedindexobject=^Tnamedindexobject;
|
Pnamedindexobject=^Tnamedindexobject;
|
||||||
Tnamedindexobject=object
|
Tnamedindexobject=object
|
||||||
|
{ indexarray }
|
||||||
indexnr : longint;
|
indexnr : longint;
|
||||||
|
indexnext : Pnamedindexobject;
|
||||||
|
{ dictionary }
|
||||||
_name : Pstring;
|
_name : Pstring;
|
||||||
next,
|
|
||||||
left,right : Pnamedindexobject;
|
left,right : Pnamedindexobject;
|
||||||
speedvalue : longint;
|
speedvalue : longint;
|
||||||
|
{ singlelist }
|
||||||
|
listnext : Pnamedindexobject;
|
||||||
constructor init;
|
constructor init;
|
||||||
constructor initname(const n:string);
|
constructor initname(const n:string);
|
||||||
destructor done;virtual;
|
destructor done;virtual;
|
||||||
@ -1325,24 +1329,28 @@ constructor Tnamedindexobject.init;
|
|||||||
begin
|
begin
|
||||||
{ index }
|
{ index }
|
||||||
indexnr:=-1;
|
indexnr:=-1;
|
||||||
next:=nil;
|
indexnext:=nil;
|
||||||
{ dictionary }
|
{ dictionary }
|
||||||
left:=nil;
|
left:=nil;
|
||||||
right:=nil;
|
right:=nil;
|
||||||
_name:=nil;
|
_name:=nil;
|
||||||
speedvalue:=-1;
|
speedvalue:=-1;
|
||||||
|
{ list }
|
||||||
|
listnext:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
constructor Tnamedindexobject.initname(const n:string);
|
constructor Tnamedindexobject.initname(const n:string);
|
||||||
begin
|
begin
|
||||||
{ index }
|
{ index }
|
||||||
indexnr:=-1;
|
indexnr:=-1;
|
||||||
next:=nil;
|
indexnext:=nil;
|
||||||
{ dictionary }
|
{ dictionary }
|
||||||
left:=nil;
|
left:=nil;
|
||||||
right:=nil;
|
right:=nil;
|
||||||
speedvalue:=-1;
|
speedvalue:=-1;
|
||||||
_name:=stringdup(n);
|
_name:=stringdup(n);
|
||||||
|
{ list }
|
||||||
|
listnext:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
destructor Tnamedindexobject.done;
|
destructor Tnamedindexobject.done;
|
||||||
@ -1801,7 +1809,7 @@ end;
|
|||||||
while assigned(hp) do
|
while assigned(hp) do
|
||||||
begin
|
begin
|
||||||
hp2:=hp;
|
hp2:=hp;
|
||||||
hp:=hp^.next;
|
hp:=hp^.listnext;
|
||||||
dispose(hp2,done);
|
dispose(hp2,done);
|
||||||
end;
|
end;
|
||||||
first:=nil;
|
first:=nil;
|
||||||
@ -1814,9 +1822,9 @@ end;
|
|||||||
if not assigned(first) then
|
if not assigned(first) then
|
||||||
first:=p
|
first:=p
|
||||||
else
|
else
|
||||||
last^.next:=p;
|
last^.listnext:=p;
|
||||||
last:=p;
|
last:=p;
|
||||||
p^.next:=nil;
|
p^.listnext:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -2036,16 +2044,16 @@ end;
|
|||||||
dec(i);
|
dec(i);
|
||||||
if (i>0) and assigned(data^[i]) then
|
if (i>0) and assigned(data^[i]) then
|
||||||
begin
|
begin
|
||||||
data^[i]^.next:=data^[p^.indexnr]^.next;
|
data^[i]^.indexnext:=data^[p^.indexnr]^.indexnext;
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if i=0 then
|
if i=0 then
|
||||||
first:=p^.next;
|
first:=p^.indexnext;
|
||||||
data^[p^.indexnr]:=nil;
|
data^[p^.indexnr]:=nil;
|
||||||
{ clear entry }
|
{ clear entry }
|
||||||
p^.indexnr:=-1;
|
p^.indexnr:=-1;
|
||||||
p^.next:=nil;
|
p^.indexnext:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -2078,7 +2086,7 @@ end;
|
|||||||
dec(i);
|
dec(i);
|
||||||
if (i>0) and assigned(data^[i]) then
|
if (i>0) and assigned(data^[i]) then
|
||||||
begin
|
begin
|
||||||
data^[i]^.next:=p;
|
data^[i]^.indexnext:=p;
|
||||||
break;
|
break;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
@ -2091,12 +2099,12 @@ end;
|
|||||||
inc(i);
|
inc(i);
|
||||||
if (i<=count) and assigned(data^[i]) then
|
if (i<=count) and assigned(data^[i]) then
|
||||||
begin
|
begin
|
||||||
p^.next:=data^[i];
|
p^.indexnext:=data^[i];
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
if i>count then
|
if i>count then
|
||||||
p^.next:=nil;
|
p^.indexnext:=nil;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -2484,7 +2492,12 @@ end;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2000-08-13 08:41:57 peter
|
Revision 1.9 2000-08-16 18:33:53 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.8 2000/08/13 08:41:57 peter
|
||||||
* fixed typo in tsinglelist.clear (merged)
|
* fixed typo in tsinglelist.clear (merged)
|
||||||
|
|
||||||
Revision 1.7 2000/08/12 15:34:22 peter
|
Revision 1.7 2000/08/12 15:34:22 peter
|
||||||
|
@ -713,7 +713,7 @@ implementation
|
|||||||
if tok2node[i].tok=optoken then
|
if tok2node[i].tok=optoken then
|
||||||
begin
|
begin
|
||||||
ld:=pvarsym(pf^.parast^.symindex^.first)^.vartype.def;
|
ld:=pvarsym(pf^.parast^.symindex^.first)^.vartype.def;
|
||||||
rd:=pvarsym(pf^.parast^.symindex^.first^.next)^.vartype.def;
|
rd:=pvarsym(pf^.parast^.symindex^.first^.indexnext)^.vartype.def;
|
||||||
dd:=pf^.rettype.def;
|
dd:=pf^.rettype.def;
|
||||||
isoperatoracceptable:=
|
isoperatoracceptable:=
|
||||||
tok2node[i].op_overloading_supported and
|
tok2node[i].op_overloading_supported and
|
||||||
@ -1132,7 +1132,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 2000-08-07 11:31:04 jonas
|
Revision 1.4 2000-08-16 18:33:53 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.3 2000/08/07 11:31:04 jonas
|
||||||
* fixed bug in type conversions between enum subranges (it didn't take
|
* fixed bug in type conversions between enum subranges (it didn't take
|
||||||
the packenum directive into account)
|
the packenum directive into account)
|
||||||
+ define PACKENUMFIXED symbol in options.pas
|
+ define PACKENUMFIXED symbol in options.pas
|
||||||
@ -1141,4 +1146,4 @@ end.
|
|||||||
Revision 1.2 2000/07/13 11:32:41 michael
|
Revision 1.2 2000/07/13 11:32:41 michael
|
||||||
+ removed logs
|
+ removed logs
|
||||||
|
|
||||||
}
|
}
|
@ -267,7 +267,7 @@ unit pdecl;
|
|||||||
if not sc^.empty then
|
if not sc^.empty then
|
||||||
Comment(V_Error,'default value only allowed for one parameter');
|
Comment(V_Error,'default value only allowed for one parameter');
|
||||||
sc^.insert_with_tokeninfo(s,hpos);
|
sc^.insert_with_tokeninfo(s,hpos);
|
||||||
{ prefix 'def' to the parameter name }
|
{ prefix 'def' to the parameter name }
|
||||||
pdefaultvalue:=ReadConstant('def'+s,hpos);
|
pdefaultvalue:=ReadConstant('def'+s,hpos);
|
||||||
if assigned(pdefaultvalue) then
|
if assigned(pdefaultvalue) then
|
||||||
pprocdef(aktprocdef)^.parast^.insert(pdefaultvalue);
|
pprocdef(aktprocdef)^.parast^.insert(pdefaultvalue);
|
||||||
@ -839,8 +839,8 @@ unit pdecl;
|
|||||||
begin
|
begin
|
||||||
consume(_EQUAL);
|
consume(_EQUAL);
|
||||||
sym:=readconstant(name,filepos);
|
sym:=readconstant(name,filepos);
|
||||||
if assigned(sym) then
|
if assigned(sym) then
|
||||||
symtablestack^.insert(sym);
|
symtablestack^.insert(sym);
|
||||||
consume(_SEMICOLON);
|
consume(_SEMICOLON);
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1084,12 +1084,19 @@ unit pdecl;
|
|||||||
{ no old type reused ? Then insert this new type }
|
{ no old type reused ? Then insert this new type }
|
||||||
if not assigned(newtype) then
|
if not assigned(newtype) then
|
||||||
begin
|
begin
|
||||||
read_type(tt,typename);
|
{ insert the new type first with an errordef, so that
|
||||||
|
referencing the type before it's really set it
|
||||||
|
will give an error (PFV) }
|
||||||
|
tt.setdef(generrordef);
|
||||||
storetokenpos:=tokenpos;
|
storetokenpos:=tokenpos;
|
||||||
tokenpos:=defpos;
|
|
||||||
newtype:=new(ptypesym,init(typename,tt));
|
newtype:=new(ptypesym,init(typename,tt));
|
||||||
symtablestack^.insert(newtype);
|
symtablestack^.insert(newtype);
|
||||||
|
tokenpos:=defpos;
|
||||||
tokenpos:=storetokenpos;
|
tokenpos:=storetokenpos;
|
||||||
|
{ read the type definition }
|
||||||
|
read_type(tt,typename);
|
||||||
|
{ update the definition of the type }
|
||||||
|
newtype^.restype:=tt;
|
||||||
end;
|
end;
|
||||||
if assigned(newtype^.restype.def) and
|
if assigned(newtype^.restype.def) and
|
||||||
(newtype^.restype.def^.deftype=procvardef) then
|
(newtype^.restype.def^.deftype=procvardef) then
|
||||||
@ -1275,7 +1282,12 @@ unit pdecl;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2000-08-13 13:11:28 peter
|
Revision 1.9 2000-08-16 18:33:53 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.8 2000/08/13 13:11:28 peter
|
||||||
* put defaultpara values in parast and changed the name to
|
* put defaultpara values in parast and changed the name to
|
||||||
'def<Parameter name>'
|
'def<Parameter name>'
|
||||||
|
|
||||||
@ -1297,4 +1309,4 @@ end.
|
|||||||
Revision 1.2 2000/07/13 11:32:44 michael
|
Revision 1.2 2000/07/13 11:32:44 michael
|
||||||
+ removed logs
|
+ removed logs
|
||||||
|
|
||||||
}
|
}
|
@ -579,7 +579,7 @@ unit pexpr;
|
|||||||
else
|
else
|
||||||
hs1:=hs;
|
hs1:=hs;
|
||||||
p2:=gencallparanode(genloadnode(hs1,hs1^.owner),p2);
|
p2:=gencallparanode(genloadnode(hs1,hs1^.owner),p2);
|
||||||
hs:=pvarsym(hs^.next);
|
hs:=pvarsym(hs^.indexnext);
|
||||||
end;
|
end;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
@ -2208,7 +2208,12 @@ _LECKKLAMMER : begin
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.4 2000-08-16 13:06:06 florian
|
Revision 1.5 2000-08-16 18:33:53 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.4 2000/08/16 13:06:06 florian
|
||||||
+ support of 64 bit integer constants
|
+ support of 64 bit integer constants
|
||||||
|
|
||||||
Revision 1.3 2000/08/04 22:00:52 peter
|
Revision 1.3 2000/08/04 22:00:52 peter
|
||||||
|
@ -688,8 +688,8 @@ begin
|
|||||||
while assigned(parast^.symindex^.first) and (lastps<>psym(parast^.symindex^.first)) do
|
while assigned(parast^.symindex^.first) and (lastps<>psym(parast^.symindex^.first)) do
|
||||||
begin
|
begin
|
||||||
ps:=psym(parast^.symindex^.first);
|
ps:=psym(parast^.symindex^.first);
|
||||||
while assigned(ps^.next) and (psym(ps^.next)<>lastps) do
|
while assigned(ps^.indexnext) and (psym(ps^.indexnext)<>lastps) do
|
||||||
ps:=psym(ps^.next);
|
ps:=psym(ps^.indexnext);
|
||||||
ps^.owner:=st;
|
ps^.owner:=st;
|
||||||
{ recalculate the corrected offset }
|
{ recalculate the corrected offset }
|
||||||
{ the really_insert_in_data procedure
|
{ the really_insert_in_data procedure
|
||||||
@ -2087,7 +2087,12 @@ end.
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.8 2000-08-13 12:54:56 peter
|
Revision 1.9 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.8 2000/08/13 12:54:56 peter
|
||||||
* class member decl wrong then no other error after it
|
* class member decl wrong then no other error after it
|
||||||
* -vb has now also line numbering
|
* -vb has now also line numbering
|
||||||
* -vb is also used for interface/implementation different decls and
|
* -vb is also used for interface/implementation different decls and
|
||||||
|
@ -172,12 +172,21 @@ uses
|
|||||||
tt.setdef(generrordef);
|
tt.setdef(generrordef);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
{ type sym ? }
|
||||||
if (srsym^.typ<>typesym) then
|
if (srsym^.typ<>typesym) then
|
||||||
begin
|
begin
|
||||||
Message(type_e_type_id_expected);
|
Message(type_e_type_id_expected);
|
||||||
tt.setdef(generrordef);
|
tt.setdef(generrordef);
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
|
{ Types are first defined with an error def before assigning
|
||||||
|
the real type so check if it's an errordef. if so then
|
||||||
|
give an error }
|
||||||
|
if (ptypesym(srsym)^.restype.def=generrordef) then
|
||||||
|
begin
|
||||||
|
Message(sym_e_error_in_type_def);
|
||||||
|
exit;
|
||||||
|
end;
|
||||||
{ Only use the definitions for system/current unit, becuase
|
{ Only use the definitions for system/current unit, becuase
|
||||||
they can be refered from the parameters and symbols are not
|
they can be refered from the parameters and symbols are not
|
||||||
loaded at that time. A symbol reference to an other unit
|
loaded at that time. A symbol reference to an other unit
|
||||||
@ -1597,7 +1606,12 @@ uses
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.5 2000-08-06 14:17:15 peter
|
Revision 1.6 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.5 2000/08/06 14:17:15 peter
|
||||||
* overload fixes (merged)
|
* overload fixes (merged)
|
||||||
|
|
||||||
Revision 1.4 2000/07/30 17:04:43 peter
|
Revision 1.4 2000/07/30 17:04:43 peter
|
||||||
|
@ -73,8 +73,8 @@
|
|||||||
|
|
||||||
constructor tdef.load;
|
constructor tdef.load;
|
||||||
begin
|
begin
|
||||||
|
inherited init;
|
||||||
deftype:=abstractdef;
|
deftype:=abstractdef;
|
||||||
next := nil;
|
|
||||||
owner := nil;
|
owner := nil;
|
||||||
has_rtti:=false;
|
has_rtti:=false;
|
||||||
has_inittable:=false;
|
has_inittable:=false;
|
||||||
@ -2427,17 +2427,17 @@
|
|||||||
procedure tabstractprocdef.write;
|
procedure tabstractprocdef.write;
|
||||||
var
|
var
|
||||||
hp : pparaitem;
|
hp : pparaitem;
|
||||||
oldintfcrc : boolean;
|
oldintfcrc : boolean;
|
||||||
begin
|
begin
|
||||||
inherited write;
|
inherited write;
|
||||||
rettype.write;
|
rettype.write;
|
||||||
oldintfcrc:=current_ppu^.do_interface_crc;
|
oldintfcrc:=current_ppu^.do_interface_crc;
|
||||||
current_ppu^.do_interface_crc:=false;
|
current_ppu^.do_interface_crc:=false;
|
||||||
writebyte(fpu_used);
|
writebyte(fpu_used);
|
||||||
writelong(ord(proctypeoption));
|
writelong(ord(proctypeoption));
|
||||||
writesmallset(proccalloptions);
|
writesmallset(proccalloptions);
|
||||||
writesmallset(procoptions);
|
writesmallset(procoptions);
|
||||||
current_ppu^.do_interface_crc:=oldintfcrc;
|
current_ppu^.do_interface_crc:=oldintfcrc;
|
||||||
writeword(maxparacount);
|
writeword(maxparacount);
|
||||||
hp:=pparaitem(para^.first);
|
hp:=pparaitem(para^.first);
|
||||||
while assigned(hp) do
|
while assigned(hp) do
|
||||||
@ -2480,7 +2480,7 @@
|
|||||||
var
|
var
|
||||||
hs,s : string;
|
hs,s : string;
|
||||||
hp : pparaitem;
|
hp : pparaitem;
|
||||||
hpc : pconstsym;
|
hpc : pconstsym;
|
||||||
begin
|
begin
|
||||||
s:='(';
|
s:='(';
|
||||||
hp:=pparaitem(para^.last);
|
hp:=pparaitem(para^.last);
|
||||||
@ -2494,37 +2494,37 @@
|
|||||||
s:=s+'const'
|
s:=s+'const'
|
||||||
else if hp^.paratyp=vs_out then
|
else if hp^.paratyp=vs_out then
|
||||||
s:=s+'out';
|
s:=s+'out';
|
||||||
{ default value }
|
{ default value }
|
||||||
if assigned(hp^.defaultvalue) then
|
if assigned(hp^.defaultvalue) then
|
||||||
begin
|
begin
|
||||||
hpc:=pconstsym(hp^.defaultvalue);
|
hpc:=pconstsym(hp^.defaultvalue);
|
||||||
hs:='';
|
hs:='';
|
||||||
case hpc^.consttyp of
|
case hpc^.consttyp of
|
||||||
conststring,
|
conststring,
|
||||||
constresourcestring :
|
constresourcestring :
|
||||||
hs:=+strpas(pchar(tpointerord(hpc^.value)));
|
hs:=+strpas(pchar(tpointerord(hpc^.value)));
|
||||||
constreal :
|
constreal :
|
||||||
str(pbestreal(tpointerord(hpc^.value))^,hs);
|
str(pbestreal(tpointerord(hpc^.value))^,hs);
|
||||||
constord,
|
constord,
|
||||||
constpointer :
|
constpointer :
|
||||||
hs:=tostr(hpc^.value);
|
hs:=tostr(hpc^.value);
|
||||||
constbool :
|
constbool :
|
||||||
begin
|
begin
|
||||||
if hpc^.value<>0 then
|
if hpc^.value<>0 then
|
||||||
hs:='TRUE'
|
hs:='TRUE'
|
||||||
else
|
else
|
||||||
hs:='FALSE';
|
hs:='FALSE';
|
||||||
end;
|
end;
|
||||||
constnil :
|
constnil :
|
||||||
hs:='nil';
|
hs:='nil';
|
||||||
constchar :
|
constchar :
|
||||||
hs:=chr(hpc^.value);
|
hs:=chr(hpc^.value);
|
||||||
constset :
|
constset :
|
||||||
hs:='<set>';
|
hs:='<set>';
|
||||||
end;
|
end;
|
||||||
if hs<>'' then
|
if hs<>'' then
|
||||||
s:=s+'="'+hs+'"';
|
s:=s+'="'+hs+'"';
|
||||||
end;
|
end;
|
||||||
hp:=pparaitem(hp^.previous);
|
hp:=pparaitem(hp^.previous);
|
||||||
if assigned(hp) then
|
if assigned(hp) then
|
||||||
s:=s+',';
|
s:=s+',';
|
||||||
@ -2681,8 +2681,8 @@
|
|||||||
{new(localst,loadas(localsymtable));
|
{new(localst,loadas(localsymtable));
|
||||||
localst^.defowner:=@self;
|
localst^.defowner:=@self;
|
||||||
parast^.next:=localst;
|
parast^.next:=localst;
|
||||||
localst^.next:=owner;}
|
localst^.next:=owner;}
|
||||||
|
|
||||||
forwarddef:=false;
|
forwarddef:=false;
|
||||||
interfacedef:=false;
|
interfacedef:=false;
|
||||||
hasforward:=false;
|
hasforward:=false;
|
||||||
@ -2886,7 +2886,7 @@ Const local_symtable_index : longint = $8001;
|
|||||||
oldintfcrc : boolean;
|
oldintfcrc : boolean;
|
||||||
begin
|
begin
|
||||||
inherited write;
|
inherited write;
|
||||||
oldintfcrc:=current_ppu^.do_interface_crc;
|
oldintfcrc:=current_ppu^.do_interface_crc;
|
||||||
current_ppu^.do_interface_crc:=false;
|
current_ppu^.do_interface_crc:=false;
|
||||||
{ set all registers to used for simplified compilation PM }
|
{ set all registers to used for simplified compilation PM }
|
||||||
if simplify_ppu then
|
if simplify_ppu then
|
||||||
@ -2913,7 +2913,7 @@ Const local_symtable_index : longint = $8001;
|
|||||||
writeword(usedregisters);
|
writeword(usedregisters);
|
||||||
{$endif}
|
{$endif}
|
||||||
{$endif newcg}
|
{$endif newcg}
|
||||||
current_ppu^.do_interface_crc:=oldintfcrc;
|
current_ppu^.do_interface_crc:=oldintfcrc;
|
||||||
writestring(mangledname);
|
writestring(mangledname);
|
||||||
writelong(extnumber);
|
writelong(extnumber);
|
||||||
if (proctypeoption<>potype_operator) then
|
if (proctypeoption<>potype_operator) then
|
||||||
@ -2940,22 +2940,22 @@ Const local_symtable_index : longint = $8001;
|
|||||||
}
|
}
|
||||||
end;
|
end;
|
||||||
current_ppu^.writeentry(ibprocdef);
|
current_ppu^.writeentry(ibprocdef);
|
||||||
|
|
||||||
{ Save the para and local symtable, for easier reading
|
{ 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;
|
oldintfcrc:=current_ppu^.do_interface_crc;
|
||||||
current_ppu^.do_interface_crc:=false;
|
current_ppu^.do_interface_crc:=false;
|
||||||
if not assigned(parast) then
|
if not assigned(parast) then
|
||||||
begin
|
begin
|
||||||
parast:=new(psymtable,init(parasymtable));
|
parast:=new(psymtable,init(parasymtable));
|
||||||
parast^.defowner:=@self;
|
parast^.defowner:=@self;
|
||||||
end;
|
end;
|
||||||
parast^.writeas;
|
parast^.writeas;
|
||||||
{if not assigned(localst) then
|
{if not assigned(localst) then
|
||||||
begin
|
begin
|
||||||
localst:=new(psymtable,init(localsymtable));
|
localst:=new(psymtable,init(localsymtable));
|
||||||
localst^.defowner:=@self;
|
localst^.defowner:=@self;
|
||||||
end;
|
end;
|
||||||
localst^.writeas;}
|
localst^.writeas;}
|
||||||
current_ppu^.do_interface_crc:=oldintfcrc;
|
current_ppu^.do_interface_crc:=oldintfcrc;
|
||||||
end;
|
end;
|
||||||
@ -3023,22 +3023,22 @@ Const local_symtable_index : longint = $8001;
|
|||||||
|
|
||||||
procedure tprocdef.deref;
|
procedure tprocdef.deref;
|
||||||
var
|
var
|
||||||
oldsymtablestack,
|
oldsymtablestack,
|
||||||
oldlocalsymtable : psymtable;
|
oldlocalsymtable : psymtable;
|
||||||
begin
|
begin
|
||||||
inherited deref;
|
inherited deref;
|
||||||
resolvedef(pdef(nextoverloaded));
|
resolvedef(pdef(nextoverloaded));
|
||||||
resolvedef(pdef(_class));
|
resolvedef(pdef(_class));
|
||||||
{ parast }
|
{ parast }
|
||||||
oldsymtablestack:=symtablestack;
|
oldsymtablestack:=symtablestack;
|
||||||
oldlocalsymtable:=aktlocalsymtable;
|
oldlocalsymtable:=aktlocalsymtable;
|
||||||
aktlocalsymtable:=parast;
|
aktlocalsymtable:=parast;
|
||||||
parast^.deref;
|
parast^.deref;
|
||||||
{symtablestack:=parast;
|
{symtablestack:=parast;
|
||||||
aktlocalsymtable:=localst;
|
aktlocalsymtable:=localst;
|
||||||
localst^.deref;}
|
localst^.deref;}
|
||||||
aktlocalsymtable:=oldlocalsymtable;
|
aktlocalsymtable:=oldlocalsymtable;
|
||||||
symtablestack:=oldsymtablestack;
|
symtablestack:=oldsymtablestack;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
|
|
||||||
@ -4252,7 +4252,12 @@ Const local_symtable_index : longint = $8001;
|
|||||||
|
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
+ support of 64 bit integer constants
|
||||||
|
|
||||||
Revision 1.9 2000/08/13 13:06:37 peter
|
Revision 1.9 2000/08/13 13:06:37 peter
|
||||||
|
@ -1590,7 +1590,7 @@ implementation
|
|||||||
while assigned(pd) do
|
while assigned(pd) do
|
||||||
begin
|
begin
|
||||||
pd^.write;
|
pd^.write;
|
||||||
pd:=pdef(pd^.next);
|
pd:=pdef(pd^.indexnext);
|
||||||
end;
|
end;
|
||||||
{ write end of definitions }
|
{ write end of definitions }
|
||||||
current_ppu^.writeentry(ibenddefs);
|
current_ppu^.writeentry(ibenddefs);
|
||||||
@ -1612,7 +1612,7 @@ implementation
|
|||||||
while assigned(pd) do
|
while assigned(pd) do
|
||||||
begin
|
begin
|
||||||
pd^.write;
|
pd^.write;
|
||||||
pd:=psym(pd^.next);
|
pd:=psym(pd^.indexnext);
|
||||||
end;
|
end;
|
||||||
{ end of symbols }
|
{ end of symbols }
|
||||||
current_ppu^.writeentry(ibendsyms);
|
current_ppu^.writeentry(ibendsyms);
|
||||||
@ -1629,21 +1629,21 @@ implementation
|
|||||||
while assigned(hs) do
|
while assigned(hs) do
|
||||||
begin
|
begin
|
||||||
hs^.prederef;
|
hs^.prederef;
|
||||||
hs:=psym(hs^.next);
|
hs:=psym(hs^.indexnext);
|
||||||
end;
|
end;
|
||||||
{ deref the definitions }
|
{ deref the definitions }
|
||||||
hp:=pdef(defindex^.first);
|
hp:=pdef(defindex^.first);
|
||||||
while assigned(hp) do
|
while assigned(hp) do
|
||||||
begin
|
begin
|
||||||
hp^.deref;
|
hp^.deref;
|
||||||
hp:=pdef(hp^.next);
|
hp:=pdef(hp^.indexnext);
|
||||||
end;
|
end;
|
||||||
{ deref the symbols }
|
{ deref the symbols }
|
||||||
hs:=psym(symindex^.first);
|
hs:=psym(symindex^.first);
|
||||||
while assigned(hs) do
|
while assigned(hs) do
|
||||||
begin
|
begin
|
||||||
hs^.deref;
|
hs^.deref;
|
||||||
hs:=psym(hs^.next);
|
hs:=psym(hs^.indexnext);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -1667,9 +1667,9 @@ implementation
|
|||||||
{ this is used to insert case variant into the main
|
{ this is used to insert case variant into the main
|
||||||
record }
|
record }
|
||||||
psymt^.datasize:=ps^.address+offset;
|
psymt^.datasize:=ps^.address+offset;
|
||||||
nps:=pvarsym(ps^.next);
|
nps:=pvarsym(ps^.indexnext);
|
||||||
symindex^.deleteindex(ps);
|
symindex^.deleteindex(ps);
|
||||||
ps^.next:=nil;
|
ps^.indexnext:=nil;
|
||||||
ps^.left:=nil;
|
ps^.left:=nil;
|
||||||
ps^.right:=nil;
|
ps^.right:=nil;
|
||||||
psymt^.insert(ps);
|
psymt^.insert(ps);
|
||||||
@ -1678,9 +1678,9 @@ implementation
|
|||||||
pd:=pdef(defindex^.first);
|
pd:=pdef(defindex^.first);
|
||||||
while assigned(pd) do
|
while assigned(pd) do
|
||||||
begin
|
begin
|
||||||
npd:=pdef(pd^.next);
|
npd:=pdef(pd^.indexnext);
|
||||||
defindex^.deleteindex(pd);
|
defindex^.deleteindex(pd);
|
||||||
pd^.next:=nil;
|
pd^.indexnext:=nil;
|
||||||
pd^.left:=nil;
|
pd^.left:=nil;
|
||||||
pd^.right:=nil;
|
pd^.right:=nil;
|
||||||
psymt^.registerdef(pd);
|
psymt^.registerdef(pd);
|
||||||
@ -2244,7 +2244,7 @@ implementation
|
|||||||
l:=sym^.getpushsize;
|
l:=sym^.getpushsize;
|
||||||
sym^.address:=datasize;
|
sym^.address:=datasize;
|
||||||
datasize:=align(datasize+l,dataalignment);
|
datasize:=align(datasize+l,dataalignment);
|
||||||
sym:=pvarsym(sym^.next);
|
sym:=pvarsym(sym^.indexnext);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2265,7 +2265,7 @@ implementation
|
|||||||
find_at_offset:=sym;
|
find_at_offset:=sym;
|
||||||
exit;
|
exit;
|
||||||
end;
|
end;
|
||||||
sym:=pvarsym(sym^.next);
|
sym:=pvarsym(sym^.indexnext);
|
||||||
end;
|
end;
|
||||||
end;
|
end;
|
||||||
|
|
||||||
@ -2980,7 +2980,12 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.3 2000-08-08 19:28:57 peter
|
Revision 1.4 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.3 2000/08/08 19:28:57 peter
|
||||||
* memdebug/memory patches (merged)
|
* memdebug/memory patches (merged)
|
||||||
* only once illegal directive (merged)
|
* only once illegal directive (merged)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user