* tp7 fix

This commit is contained in:
peter 2000-03-19 08:17:36 +00:00
parent c7cd8edaf2
commit ffab53c30f
3 changed files with 37 additions and 5 deletions

View File

@ -672,7 +672,8 @@ implementation
{ constructor call via classreference => allocate memory }
if (p^.procdefinition^.proctypeoption=potype_constructor) and
(p^.methodpointer^.resulttype^.deftype=classrefdef) and
(pobjectdef(pclassrefdef(p^.methodpointer^.resulttype)^.pointertype.def)^.is_class) then
(pobjectdef(pclassrefdef(p^.methodpointer^.resulttype)^.
pointertype.def)^.is_class) then
emit_const(A_PUSH,S_L,1);
emit_reg(A_PUSH,S_L,R_ESI);
end;
@ -1408,7 +1409,10 @@ implementation
end.
{
$Log$
Revision 1.128 2000-03-16 15:18:13 pierre
Revision 1.129 2000-03-19 08:17:36 peter
* tp7 fix
Revision 1.128 2000/03/16 15:18:13 pierre
* avoid wrong ungetpersistanttemp
Revision 1.127 2000/03/01 00:03:11 pierre

View File

@ -95,6 +95,7 @@ unit cgai386;
procedure loadansistring(p : ptree);
procedure finalize(t : pdef;const ref : treference;is_already_ref : boolean);
procedure incrstringref(t : pdef;const ref : treference);
procedure decrstringref(t : pdef;const ref : treference);
function maybe_push(needed : byte;p : ptree;isint64 : boolean) : boolean;
@ -911,6 +912,27 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
end;
procedure incrstringref(t : pdef;const ref : treference);
var
pushedregs : tpushed;
begin
pushusedregisters(pushedregs,$ff);
emitpushreferenceaddr(ref);
if is_ansistring(t) then
begin
emitcall('FPC_ANSISTR_INCR_REF');
end
else if is_widestring(t) then
begin
emitcall('FPC_WIDESTR_INCR_REF');
end
else internalerror(1859);
popusedregisters(pushedregs);
end;
procedure decrstringref(t : pdef;const ref : treference);
var
@ -3811,7 +3833,10 @@ procedure mov_reg_to_dest(p : ptree; s : topsize; reg : tregister);
end.
{
$Log$
Revision 1.86 2000-03-01 15:36:11 florian
Revision 1.87 2000-03-19 08:17:36 peter
* tp7 fix
Revision 1.86 2000/03/01 15:36:11 florian
* some new stuff for the new cg
Revision 1.85 2000/03/01 12:35:44 pierre

View File

@ -155,7 +155,7 @@ implementation
ait_label :
begin
{ regenerate the labels by setting altsymbol }
ReLabel(pai_label(hp2)^.l);
ReLabel(pasmsymbol(pai_label(hp2)^.l));
end;
ait_const_rva,
ait_const_symbol :
@ -835,7 +835,10 @@ implementation
end.
{
$Log$
Revision 1.59 2000-03-01 00:01:14 pierre
Revision 1.60 2000-03-19 08:17:36 peter
* tp7 fix
Revision 1.59 2000/03/01 00:01:14 pierre
Use $GOTO ON
Revision 1.58 2000/02/20 20:49:45 florian