|
@@ -27,7 +27,7 @@ unit pexpr;
|
|
interface
|
|
interface
|
|
|
|
|
|
uses
|
|
uses
|
|
- symtype,
|
|
|
|
|
|
+ symtype,symdef,
|
|
node,
|
|
node,
|
|
globals,
|
|
globals,
|
|
cpuinfo;
|
|
cpuinfo;
|
|
@@ -46,7 +46,7 @@ interface
|
|
function parse_paras(__colon,in_prop_paras : boolean) : tnode;
|
|
function parse_paras(__colon,in_prop_paras : boolean) : tnode;
|
|
|
|
|
|
{ the ID token has to be consumed before calling this function }
|
|
{ the ID token has to be consumed before calling this function }
|
|
- procedure do_member_read(getaddr : boolean;sym : tsym;var p1 : tnode;var again : boolean;callnflags:tnodeflags);
|
|
|
|
|
|
+ procedure do_member_read(classh:tobjectdef;getaddr : boolean;sym : tsym;var p1 : tnode;var again : boolean;callnflags:tnodeflags);
|
|
|
|
|
|
{$ifdef int64funcresok}
|
|
{$ifdef int64funcresok}
|
|
function get_intconst:TConstExprInt;
|
|
function get_intconst:TConstExprInt;
|
|
@@ -68,7 +68,7 @@ implementation
|
|
globtype,tokens,verbose,
|
|
globtype,tokens,verbose,
|
|
systems,widestr,
|
|
systems,widestr,
|
|
{ symtable }
|
|
{ symtable }
|
|
- symconst,symbase,symdef,symsym,symtable,defutil,defcmp,
|
|
|
|
|
|
+ symconst,symbase,symsym,symtable,defutil,defcmp,
|
|
{ pass 1 }
|
|
{ pass 1 }
|
|
pass_1,htypechk,
|
|
pass_1,htypechk,
|
|
nutils,nmat,nadd,ncal,nmem,nset,ncnv,ninl,ncon,nld,nflw,nbas,
|
|
nutils,nmat,nadd,ncal,nmem,nset,ncnv,ninl,ncon,nld,nflw,nbas,
|
|
@@ -660,7 +660,7 @@ implementation
|
|
|
|
|
|
|
|
|
|
{ reads the parameter for a subroutine call }
|
|
{ reads the parameter for a subroutine call }
|
|
- procedure do_proc_call(sym:tsym;st:tsymtable;getaddr:boolean;var again : boolean;var p1:tnode);
|
|
|
|
|
|
+ procedure do_proc_call(sym:tsym;st:tsymtable;obj:tobjectdef;getaddr:boolean;var again : boolean;var p1:tnode);
|
|
var
|
|
var
|
|
membercall,
|
|
membercall,
|
|
prevafterassn : boolean;
|
|
prevafterassn : boolean;
|
|
@@ -747,7 +747,14 @@ implementation
|
|
consume(_RKLAMMER);
|
|
consume(_RKLAMMER);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
- p1:=ccallnode.create(para,tprocsym(sym),st,p1);
|
|
|
|
|
|
+ if assigned(obj) then
|
|
|
|
+ begin
|
|
|
|
+ if (st.symtabletype<>objectsymtable) then
|
|
|
|
+ internalerror(200310031);
|
|
|
|
+ p1:=ccallnode.create(para,tprocsym(sym),obj.symtable,p1);
|
|
|
|
+ end
|
|
|
|
+ else
|
|
|
|
+ p1:=ccallnode.create(para,tprocsym(sym),st,p1);
|
|
{ indicate if this call was generated by a member and
|
|
{ indicate if this call was generated by a member and
|
|
no explicit self is used, this is needed to determine
|
|
no explicit self is used, this is needed to determine
|
|
how to handle a destructor call (PFV) }
|
|
how to handle a destructor call (PFV) }
|
|
@@ -953,7 +960,7 @@ implementation
|
|
|
|
|
|
|
|
|
|
{ the ID token has to be consumed before calling this function }
|
|
{ the ID token has to be consumed before calling this function }
|
|
- procedure do_member_read(getaddr : boolean;sym : tsym;var p1 : tnode;var again : boolean;callnflags:tnodeflags);
|
|
|
|
|
|
+ procedure do_member_read(classh:tobjectdef;getaddr : boolean;sym : tsym;var p1 : tnode;var again : boolean;callnflags:tnodeflags);
|
|
|
|
|
|
var
|
|
var
|
|
static_name : string;
|
|
static_name : string;
|
|
@@ -990,7 +997,7 @@ implementation
|
|
case sym.typ of
|
|
case sym.typ of
|
|
procsym:
|
|
procsym:
|
|
begin
|
|
begin
|
|
- do_proc_call(sym,sym.owner,
|
|
|
|
|
|
+ do_proc_call(sym,sym.owner,classh,
|
|
(getaddr and not(token in [_CARET,_POINT])),
|
|
(getaddr and not(token in [_CARET,_POINT])),
|
|
again,p1);
|
|
again,p1);
|
|
{ add provided flags }
|
|
{ add provided flags }
|
|
@@ -1236,7 +1243,7 @@ implementation
|
|
srsym:=searchsym_in_class(tobjectdef(htype.def),pattern);
|
|
srsym:=searchsym_in_class(tobjectdef(htype.def),pattern);
|
|
check_hints(srsym);
|
|
check_hints(srsym);
|
|
consume(_ID);
|
|
consume(_ID);
|
|
- do_member_read(false,srsym,p1,again,[]);
|
|
|
|
|
|
+ do_member_read(tobjectdef(htype.def),false,srsym,p1,again,[]);
|
|
end
|
|
end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
@@ -1260,7 +1267,7 @@ implementation
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
consume(_ID);
|
|
consume(_ID);
|
|
- do_member_read(getaddr,srsym,p1,again,[]);
|
|
|
|
|
|
+ do_member_read(tobjectdef(htype.def),getaddr,srsym,p1,again,[]);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
end
|
|
end
|
|
@@ -1284,7 +1291,7 @@ implementation
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
consume(_ID);
|
|
consume(_ID);
|
|
- do_member_read(getaddr,srsym,p1,again,[]);
|
|
|
|
|
|
+ do_member_read(tobjectdef(htype.def),getaddr,srsym,p1,again,[]);
|
|
end;
|
|
end;
|
|
end
|
|
end
|
|
else
|
|
else
|
|
@@ -1366,7 +1373,7 @@ implementation
|
|
not(is_interface(tdef(srsym.owner.defowner))) and
|
|
not(is_interface(tdef(srsym.owner.defowner))) and
|
|
assigned(current_procinfo) and
|
|
assigned(current_procinfo) and
|
|
(po_classmethod in current_procinfo.procdef.procoptions);
|
|
(po_classmethod in current_procinfo.procdef.procoptions);
|
|
- do_proc_call(srsym,srsymtable,
|
|
|
|
|
|
+ do_proc_call(srsym,srsymtable,nil,
|
|
(getaddr and not(token in [_CARET,_POINT])),
|
|
(getaddr and not(token in [_CARET,_POINT])),
|
|
again,p1);
|
|
again,p1);
|
|
{ we need to know which procedure is called }
|
|
{ we need to know which procedure is called }
|
|
@@ -1681,7 +1688,7 @@ implementation
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
consume(_ID);
|
|
consume(_ID);
|
|
- do_member_read(getaddr,hsym,p1,again,[]);
|
|
|
|
|
|
+ do_member_read(classh,getaddr,hsym,p1,again,[]);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1704,7 +1711,7 @@ implementation
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
consume(_ID);
|
|
consume(_ID);
|
|
- do_member_read(getaddr,hsym,p1,again,[]);
|
|
|
|
|
|
+ do_member_read(classh,getaddr,hsym,p1,again,[]);
|
|
end;
|
|
end;
|
|
end;
|
|
end;
|
|
|
|
|
|
@@ -1886,7 +1893,7 @@ implementation
|
|
htype.setdef(classh);
|
|
htype.setdef(classh);
|
|
p1:=ctypenode.create(htype);
|
|
p1:=ctypenode.create(htype);
|
|
end;
|
|
end;
|
|
- do_member_read(false,sym,p1,again,[nf_inherited,nf_anon_inherited]);
|
|
|
|
|
|
+ do_member_read(classh,false,sym,p1,again,[nf_inherited,nf_anon_inherited]);
|
|
end
|
|
end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
@@ -1901,7 +1908,7 @@ implementation
|
|
(sym.typ<>procsym) then
|
|
(sym.typ<>procsym) then
|
|
internalerror(200303171);
|
|
internalerror(200303171);
|
|
p1:=nil;
|
|
p1:=nil;
|
|
- do_proc_call(sym,sym.owner,false,again,p1);
|
|
|
|
|
|
+ do_proc_call(sym,sym.owner,classh,false,again,p1);
|
|
end
|
|
end
|
|
else
|
|
else
|
|
begin
|
|
begin
|
|
@@ -2416,7 +2423,10 @@ implementation
|
|
end.
|
|
end.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.130 2003-10-01 20:34:49 peter
|
|
|
|
|
|
+ Revision 1.131 2003-10-02 21:15:31 peter
|
|
|
|
+ * protected visibility fixes
|
|
|
|
+
|
|
|
|
+ Revision 1.130 2003/10/01 20:34:49 peter
|
|
* procinfo unit contains tprocinfo
|
|
* procinfo unit contains tprocinfo
|
|
* cginfo renamed to cgbase
|
|
* cginfo renamed to cgbase
|
|
* moved cgmessage to verbose
|
|
* moved cgmessage to verbose
|