* fixed 'with object do' bug

This commit is contained in:
peter 1998-08-20 21:36:38 +00:00
parent a731c4ac0d
commit 7c8e445400
3 changed files with 524 additions and 493 deletions

View File

@ -729,6 +729,7 @@ implementation
p^.methodpointer:=genzeronode(callparan);
p^.methodpointer^.location.loc:=LOC_REGISTER;
p^.methodpointer^.location.register:=R_ESI;
p^.methodpointer^.resulttype:=p^.symtable^.defowner;
{ make a reference }
new(r);
reset_reference(r^);
@ -871,7 +872,8 @@ implementation
end;
{ direct call to class constructor, don't allocate memory }
if is_con_or_destructor and (p^.methodpointer^.resulttype^.deftype=objectdef) and
if is_con_or_destructor and
(p^.methodpointer^.resulttype^.deftype=objectdef) and
(pobjectdef(p^.methodpointer^.resulttype)^.isclass) then
exprasmlist^.concat(new(pai386,op_const(A_PUSH,S_L,0)))
else
@ -2314,7 +2316,10 @@ implementation
end.
{
$Log$
Revision 1.17 1998-08-19 16:07:36 jonas
Revision 1.18 1998-08-20 21:36:38 peter
* fixed 'with object do' bug
Revision 1.17 1998/08/19 16:07:36 jonas
* changed optimizer switches + cleanup of DestroyRefs in daopt386.pas
Revision 1.16 1998/08/18 09:24:36 pierre

File diff suppressed because it is too large Load Diff

View File

@ -366,6 +366,7 @@ unit pstatmnt;
withsymtable:=new(psymtable,init(symtable.withsymtable));
withsymtable^.root:=obj^.publicsyms^.root;
withsymtable^.defowner:=obj;
symtab:=withsymtable;
levelcount:=1;
obj:=obj^.childof;
@ -386,6 +387,7 @@ unit pstatmnt;
withsymtable:=new(psymtable,init(symtable.withsymtable));
withsymtable^.root:=symtab^.root;
withsymtable^.next:=symtablestack;
withsymtable^.defowner:=obj;
symtablestack:=withsymtable;
end;
else
@ -1236,7 +1238,10 @@ unit pstatmnt;
end.
{
$Log$
Revision 1.35 1998-08-20 09:26:42 pierre
Revision 1.36 1998-08-20 21:36:41 peter
* fixed 'with object do' bug
Revision 1.35 1998/08/20 09:26:42 pierre
+ funcret setting in underproc testing
compile with _dTEST_FUNCRET