|
@@ -619,17 +619,27 @@ do_jmp:
|
|
|
|
|
|
begin
|
|
begin
|
|
getlabel(nextonlabel);
|
|
getlabel(nextonlabel);
|
|
|
|
+
|
|
|
|
+ { push the vmt }
|
|
|
|
+ exprasmlist^.concat(new(pai386,op_csymbol(A_PUSH,S_L,
|
|
|
|
+ newcsymbol(p^.excepttype^.vmt_mangledname,0))));
|
|
|
|
+ maybe_concat_external(p^.excepttype^.owner,
|
|
|
|
+ p^.excepttype^.vmt_mangledname);
|
|
|
|
+
|
|
emitcall('FPC_CATCHES',true);
|
|
emitcall('FPC_CATCHES',true);
|
|
exprasmlist^.concat(new(pai386,
|
|
exprasmlist^.concat(new(pai386,
|
|
op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
|
|
op_reg_reg(A_TEST,S_L,R_EAX,R_EAX)));
|
|
emitl(A_JE,nextonlabel);
|
|
emitl(A_JE,nextonlabel);
|
|
ref.symbol:=nil;
|
|
ref.symbol:=nil;
|
|
gettempofsizereference(4,ref);
|
|
gettempofsizereference(4,ref);
|
|
|
|
+
|
|
{ what a hack ! }
|
|
{ what a hack ! }
|
|
- pvarsym(p^.exceptsymtable^.root)^.address:=ref.offset;
|
|
|
|
|
|
+ if assigned(p^.exceptsymtable) then
|
|
|
|
+ pvarsym(p^.exceptsymtable^.root)^.address:=ref.offset;
|
|
|
|
+
|
|
|
|
+ exprasmlist^.concat(new(pai386,op_reg_ref(A_MOV,S_L,
|
|
|
|
+ R_EAX,newreference(ref))));
|
|
|
|
|
|
- emitpushreferenceaddr(exprasmlist,ref);
|
|
|
|
- emitcall('FPC_LOADEXCEPTIONPOINTER',true);
|
|
|
|
if assigned(p^.right) then
|
|
if assigned(p^.right) then
|
|
secondpass(p^.right);
|
|
secondpass(p^.right);
|
|
{ clear some stuff }
|
|
{ clear some stuff }
|
|
@@ -720,7 +730,11 @@ do_jmp:
|
|
end.
|
|
end.
|
|
{
|
|
{
|
|
$Log$
|
|
$Log$
|
|
- Revision 1.7 1998-07-30 11:18:13 florian
|
|
|
|
|
|
+ Revision 1.8 1998-07-30 13:30:32 florian
|
|
|
|
+ * final implemenation of exception support, maybe it needs
|
|
|
|
+ some fixes :)
|
|
|
|
+
|
|
|
|
+ Revision 1.7 1998/07/30 11:18:13 florian
|
|
+ first implementation of try ... except on .. do end;
|
|
+ first implementation of try ... except on .. do end;
|
|
* limitiation of 65535 bytes parameters for cdecl removed
|
|
* limitiation of 65535 bytes parameters for cdecl removed
|
|
|
|
|