* fix for bug0216

This commit is contained in:
pierre 1999-02-15 13:13:15 +00:00
parent 9f6b250318
commit c881aae7e9
2 changed files with 24 additions and 4 deletions

View File

@ -387,6 +387,13 @@ unit pstatmnt;
symtab^.next:=new(pwithsymtable,init);
symtab:=symtab^.next;
symtab^.root:=obj^.publicsyms^.root;
{$ifndef NODIRECTWITH}
if (p^.treetype=loadn) and
(p^.symtable=aktprocsym^.definition^.localst) then
pwithsymtable(symtab)^.direct_with:=true;
{symtab^.withnode:=p; not yet allocated !! }
pwithsymtable(symtab)^.withrefnode:=p;
{$endif ndef NODIRECTWITH}
symtab^.defowner:=obj;
obj:=obj^.childof;
inc(levelcount);
@ -400,6 +407,13 @@ unit pstatmnt;
withsymtable:=new(pwithsymtable,init);
withsymtable^.root:=symtab^.root;
withsymtable^.next:=symtablestack;
{$ifndef NODIRECTWITH}
if (p^.treetype=loadn) and
(p^.symtable=aktprocsym^.definition^.localst) then
pwithsymtable(withsymtable)^.direct_with:=true;
{symtab^.withnode:=p; not yet allocated !! }
pwithsymtable(withsymtable)^.withrefnode:=p;
{$endif ndef NODIRECTWITH}
withsymtable^.defowner:=obj;
symtablestack:=withsymtable;
end;
@ -1263,7 +1277,10 @@ unit pstatmnt;
end.
{
$Log$
Revision 1.64 1999-02-11 09:46:26 pierre
Revision 1.65 1999-02-15 13:13:15 pierre
* fix for bug0216
Revision 1.64 1999/02/11 09:46:26 pierre
* fix for normal method calls inside static methods :
WARNING there were both parser and codegen errors !!
added static_call boolean to calln tree

View File

@ -62,11 +62,11 @@ implementation
if (p^.symtable^.symtabletype=withsymtable) and
(pwithsymtable(p^.symtable)^.direct_with) then
begin
p1:=getcopy(ptree(pwithsymtable(p^.symtable)^.withnode)^.left);
p1:=getcopy(ptree(pwithsymtable(p^.symtable)^.withrefnode));
p1:=gensubscriptnode(pvarsym(p^.symtableentry),p1);
putnode(p);
p:=p1;
firstpass(p1);
firstpass(p);
exit;
end;
{$endif ndef NODIRECTWITH}
@ -447,7 +447,10 @@ implementation
end.
{
$Log$
Revision 1.14 1999-01-27 00:13:58 florian
Revision 1.15 1999-02-15 13:13:19 pierre
* fix for bug0216
Revision 1.14 1999/01/27 00:13:58 florian
* "procedure of object"-stuff fixed
Revision 1.13 1999/01/21 16:41:07 pierre