* problem with "index X"-properties solved

* typed constants of class references are now allowed
This commit is contained in:
florian 1999-11-08 14:02:16 +00:00
parent 6dac8462c5
commit 7265215469
5 changed files with 51 additions and 11 deletions

View File

@ -644,7 +644,7 @@ unit pexpr;
{ indexed property }
if (ppo_indexed in ppropertysym(sym)^.propoptions) then
begin
p2:=genordinalconstnode(ppropertysym(sym)^.index,s32bitdef);
p2:=genordinalconstnode(ppropertysym(sym)^.index,ppropertysym(sym)^.indexdef);
paras:=gencallparanode(p2,paras);
end;
end;
@ -2113,7 +2113,11 @@ _LECKKLAMMER : begin
end.
{
$Log$
Revision 1.156 1999-11-07 23:21:30 florian
Revision 1.157 1999-11-08 14:02:16 florian
* problem with "index X"-properties solved
* typed constants of class references are now allowed
Revision 1.156 1999/11/07 23:21:30 florian
* previous fix for 517 was imcomplete: there was a problem if the property
had only an index

View File

@ -193,6 +193,24 @@ unit ptconst;
end;
disposetree(p);
end;
classrefdef:
begin
p:=comp_expr(true);
do_firstpass(p);
case p^.treetype of
loadvmtn:
begin
if not(pobjectdef(pclassrefdef(p^.resulttype)^.definition)^.is_related(
pobjectdef(pclassrefdef(def)^.definition))) then
Message(cg_e_illegal_expression);
curconstsegment^.concat(new(pai_const_symbol,init(newasmsymbol(pobjectdef(
pclassrefdef(p^.resulttype)^.definition)^.vmt_mangledname))));
end;
niln:
curconstsegment^.concat(new(pai_const,init_32bit(0)));
else Message(cg_e_illegal_expression);
end;
end;
pointerdef:
begin
p:=comp_expr(true);
@ -745,7 +763,11 @@ unit ptconst;
end.
{
$Log$
Revision 1.55 1999-11-06 14:34:23 peter
Revision 1.56 1999-11-08 14:02:16 florian
* problem with "index X"-properties solved
* typed constants of class references are now allowed
Revision 1.55 1999/11/06 14:34:23 peter
* truncated log to 20 revs
Revision 1.54 1999/10/14 14:57:54 florian

View File

@ -451,11 +451,8 @@ uses
is_64bitint(pt^.resulttype) then
Message(parser_e_invalid_property_index_value);
p^.index:=pt^.value;
{$ifdef INCLUDEOK}
p^.indexdef:=pt^.resulttype;
include(p^.propoptions,ppo_indexed);
{$else}
p^.propoptions:=p^.propoptions+[ppo_indexed];
{$endif}
{ concat a longint to the para template }
new(hp2,init);
hp2^.paratyp:=vs_value;
@ -483,6 +480,7 @@ uses
p^.writeaccessdef:=ppropertysym(overriden)^.writeaccessdef;
p^.readaccessdef:=ppropertysym(overriden)^.readaccessdef;
p^.storeddef:=ppropertysym(overriden)^.storeddef;
p^.indexdef:=ppropertysym(overriden)^.indexdef;
p^.default:=ppropertysym(overriden)^.default;
end
else
@ -1600,7 +1598,11 @@ uses
end.
{
$Log$
Revision 1.6 1999-11-07 23:16:49 florian
Revision 1.7 1999-11-08 14:02:16 florian
* problem with "index X"-properties solved
* typed constants of class references are now allowed
Revision 1.6 1999/11/07 23:16:49 florian
* finally bug 517 solved ...
Revision 1.5 1999/10/27 16:04:06 peter

View File

@ -578,6 +578,7 @@
writeaccesssym:=nil;
storedsym:=nil;
storeddef:=nil;
indexdef:=nil;
index:=0;
default:=0;
@ -644,6 +645,7 @@
readaccessdef:=readdefref;
writeaccessdef:=readdefref;
storeddef:=readdefref;
indexdef:=readdefref;
end;
procedure tpropertysym.deref;
@ -662,6 +664,7 @@
resolvedef(readaccessdef);
resolvedef(writeaccessdef);
resolvedef(storeddef);
resolvedef(indexdef);
resolvepropsymlist(readaccesssym);
resolvepropsymlist(writeaccesssym);
resolvepropsymlist(storedsym);
@ -697,6 +700,7 @@
writedefref(readaccessdef);
writedefref(writeaccessdef);
writedefref(storeddef);
writedefref(indexdef);
current_ppu^.writeentry(ibpropertysym);
end;
@ -2139,7 +2143,11 @@
{
$Log$
Revision 1.124 1999-11-06 14:34:27 peter
Revision 1.125 1999-11-08 14:02:17 florian
* problem with "index X"-properties solved
* typed constants of class references are now allowed
Revision 1.124 1999/11/06 14:34:27 peter
* truncated log to 20 revs
Revision 1.123 1999/11/05 17:18:03 pierre

View File

@ -202,7 +202,7 @@
propoptions : tpropertyoptions;
proptype : pdef;
readaccesssym,writeaccesssym,storedsym : ppropsymlist;
readaccessdef,writeaccessdef,storeddef : pdef;
readaccessdef,writeaccessdef,storeddef,indexdef : pdef;
index,default : longint;
constructor init(const n : string);
destructor done;virtual;
@ -328,7 +328,11 @@
{
$Log$
Revision 1.37 1999-11-06 14:34:28 peter
Revision 1.38 1999-11-08 14:02:17 florian
* problem with "index X"-properties solved
* typed constants of class references are now allowed
Revision 1.37 1999/11/06 14:34:28 peter
* truncated log to 20 revs
Revision 1.36 1999/10/01 08:02:48 peter