mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-11-07 09:59:39 +01:00
* fixed 'with object do' bug
This commit is contained in:
parent
a731c4ac0d
commit
7c8e445400
@ -729,6 +729,7 @@ implementation
|
|||||||
p^.methodpointer:=genzeronode(callparan);
|
p^.methodpointer:=genzeronode(callparan);
|
||||||
p^.methodpointer^.location.loc:=LOC_REGISTER;
|
p^.methodpointer^.location.loc:=LOC_REGISTER;
|
||||||
p^.methodpointer^.location.register:=R_ESI;
|
p^.methodpointer^.location.register:=R_ESI;
|
||||||
|
p^.methodpointer^.resulttype:=p^.symtable^.defowner;
|
||||||
{ make a reference }
|
{ make a reference }
|
||||||
new(r);
|
new(r);
|
||||||
reset_reference(r^);
|
reset_reference(r^);
|
||||||
@ -871,7 +872,8 @@ implementation
|
|||||||
end;
|
end;
|
||||||
|
|
||||||
{ direct call to class constructor, don't allocate memory }
|
{ 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
|
(pobjectdef(p^.methodpointer^.resulttype)^.isclass) then
|
||||||
exprasmlist^.concat(new(pai386,op_const(A_PUSH,S_L,0)))
|
exprasmlist^.concat(new(pai386,op_const(A_PUSH,S_L,0)))
|
||||||
else
|
else
|
||||||
@ -2314,7 +2316,10 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
* changed optimizer switches + cleanup of DestroyRefs in daopt386.pas
|
||||||
|
|
||||||
Revision 1.16 1998/08/18 09:24:36 pierre
|
Revision 1.16 1998/08/18 09:24:36 pierre
|
||||||
|
|||||||
1001
compiler/pexpr.pas
1001
compiler/pexpr.pas
File diff suppressed because it is too large
Load Diff
@ -366,6 +366,7 @@ unit pstatmnt;
|
|||||||
|
|
||||||
withsymtable:=new(psymtable,init(symtable.withsymtable));
|
withsymtable:=new(psymtable,init(symtable.withsymtable));
|
||||||
withsymtable^.root:=obj^.publicsyms^.root;
|
withsymtable^.root:=obj^.publicsyms^.root;
|
||||||
|
withsymtable^.defowner:=obj;
|
||||||
symtab:=withsymtable;
|
symtab:=withsymtable;
|
||||||
levelcount:=1;
|
levelcount:=1;
|
||||||
obj:=obj^.childof;
|
obj:=obj^.childof;
|
||||||
@ -386,6 +387,7 @@ unit pstatmnt;
|
|||||||
withsymtable:=new(psymtable,init(symtable.withsymtable));
|
withsymtable:=new(psymtable,init(symtable.withsymtable));
|
||||||
withsymtable^.root:=symtab^.root;
|
withsymtable^.root:=symtab^.root;
|
||||||
withsymtable^.next:=symtablestack;
|
withsymtable^.next:=symtablestack;
|
||||||
|
withsymtable^.defowner:=obj;
|
||||||
symtablestack:=withsymtable;
|
symtablestack:=withsymtable;
|
||||||
end;
|
end;
|
||||||
else
|
else
|
||||||
@ -1236,7 +1238,10 @@ unit pstatmnt;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$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
|
+ funcret setting in underproc testing
|
||||||
compile with _dTEST_FUNCRET
|
compile with _dTEST_FUNCRET
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user