mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-27 20:11:02 +02: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^.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
|
||||
|
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^.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
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user