From a91a67f75bd60a4035975aa0ba53ea9d123b77ba Mon Sep 17 00:00:00 2001 From: florian Date: Sat, 9 Dec 2000 10:45:40 +0000 Subject: [PATCH] * AfterConstructor isn't called anymore when a constructor failed --- compiler/i386/n386cal.pas | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/compiler/i386/n386cal.pas b/compiler/i386/n386cal.pas index 9dacdbb2f0..64695d1fbb 100644 --- a/compiler/i386/n386cal.pas +++ b/compiler/i386/n386cal.pas @@ -270,6 +270,7 @@ implementation pop_esp : boolean; pop_allowed : boolean; regs_to_push : byte; + constructorfailed : pasmlabel; label dont_call; @@ -1121,6 +1122,8 @@ implementation assigned(methodpointer) and (methodpointer.nodetype<>typen) then begin + getlabel(constructorfailed); + emitjmp(C_Z,constructorfailed); emit_reg(A_PUSH,S_L,R_ESI); new(r); reset_reference(r^); @@ -1134,6 +1137,7 @@ implementation emit_ref(A_CALL,S_NO,r); ungetregister32(R_EDI); exprasmlist^.concat(new(pairegalloc,alloc(R_EAX))); + emitlab(constructorfailed); emit_reg_reg(A_MOV,S_L,R_ESI,R_EAX); end; @@ -1588,7 +1592,10 @@ begin end. { $Log$ - Revision 1.14 2000-12-07 17:19:46 jonas + Revision 1.15 2000-12-09 10:45:40 florian + * AfterConstructor isn't called anymore when a constructor failed + + Revision 1.14 2000/12/07 17:19:46 jonas * new constant handling: from now on, hex constants >$7fffffff are parsed as unsigned constants (otherwise, $80000000 got sign extended and became $ffffffff80000000), all constants in the longint range