mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-08-13 12:39:09 +02:00
* final implemenation of exception support, maybe it needs
some fixes :)
This commit is contained in:
parent
4fc8eb51af
commit
a1f903d4b1
@ -2290,7 +2290,11 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.11 1998-07-24 22:16:52 florian
|
Revision 1.12 1998-07-30 13:30:31 florian
|
||||||
|
* final implemenation of exception support, maybe it needs
|
||||||
|
some fixes :)
|
||||||
|
|
||||||
|
Revision 1.11 1998/07/24 22:16:52 florian
|
||||||
* internal error 10 together with array access fixed. I hope
|
* internal error 10 together with array access fixed. I hope
|
||||||
that's the final fix.
|
that's the final fix.
|
||||||
|
|
||||||
|
@ -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 ! }
|
||||||
|
if assigned(p^.exceptsymtable) then
|
||||||
pvarsym(p^.exceptsymtable^.root)^.address:=ref.offset;
|
pvarsym(p^.exceptsymtable^.root)^.address:=ref.offset;
|
||||||
|
|
||||||
emitpushreferenceaddr(exprasmlist,ref);
|
exprasmlist^.concat(new(pai386,op_reg_ref(A_MOV,S_L,
|
||||||
emitcall('FPC_LOADEXCEPTIONPOINTER',true);
|
R_EAX,newreference(ref))));
|
||||||
|
|
||||||
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
|
||||||
|
|
||||||
|
@ -142,7 +142,13 @@ implementation
|
|||||||
if symtabletype=unitsymtable then
|
if symtabletype=unitsymtable then
|
||||||
concat_external(p^.symtableentry^.mangledname,EXT_NEAR);
|
concat_external(p^.symtableentry^.mangledname,EXT_NEAR);
|
||||||
end;
|
end;
|
||||||
objectsymtable : begin
|
stt_exceptsymtable:
|
||||||
|
begin
|
||||||
|
p^.location.reference.base:=procinfo.framepointer;
|
||||||
|
p^.location.reference.offset:=pvarsym(p^.symtableentry)^.address;
|
||||||
|
end;
|
||||||
|
objectsymtable:
|
||||||
|
begin
|
||||||
if (pvarsym(p^.symtableentry)^.properties and sp_static)<>0 then
|
if (pvarsym(p^.symtableentry)^.properties and sp_static)<>0 then
|
||||||
begin
|
begin
|
||||||
stringdispose(p^.location.reference.symbol);
|
stringdispose(p^.location.reference.symbol);
|
||||||
@ -559,7 +565,11 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.6 1998-07-26 21:58:57 florian
|
Revision 1.7 1998-07-30 13:30:33 florian
|
||||||
|
* final implemenation of exception support, maybe it needs
|
||||||
|
some fixes :)
|
||||||
|
|
||||||
|
Revision 1.6 1998/07/26 21:58:57 florian
|
||||||
+ better support for switch $H
|
+ better support for switch $H
|
||||||
+ index access to ansi strings added
|
+ index access to ansi strings added
|
||||||
+ assigment of data (records/arrays) containing ansi strings
|
+ assigment of data (records/arrays) containing ansi strings
|
||||||
|
@ -224,8 +224,9 @@ implementation
|
|||||||
secondcontinuen,second_while_repeatn,second_while_repeatn,secondfor,
|
secondcontinuen,second_while_repeatn,second_while_repeatn,secondfor,
|
||||||
secondexitn,secondwith,secondcase,secondlabel,
|
secondexitn,secondwith,secondcase,secondlabel,
|
||||||
secondgoto,secondsimplenewdispose,secondtryexcept,
|
secondgoto,secondsimplenewdispose,secondtryexcept,
|
||||||
secondon,secondraise,
|
secondraise,
|
||||||
secondnothing,secondtryfinally,secondis,secondas,seconderror,
|
secondnothing,secondtryfinally,secondon,secondis,
|
||||||
|
secondas,seconderror,
|
||||||
secondfail,secondadd,secondprocinline,
|
secondfail,secondadd,secondprocinline,
|
||||||
secondnothing,secondloadvmt);
|
secondnothing,secondloadvmt);
|
||||||
var
|
var
|
||||||
@ -506,7 +507,11 @@ implementation
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.44 1998-07-30 11:18:15 florian
|
Revision 1.45 1998-07-30 13:30:34 florian
|
||||||
|
* final implemenation of exception support, maybe it needs
|
||||||
|
some fixes :)
|
||||||
|
|
||||||
|
Revision 1.44 1998/07/30 11:18:15 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
|
||||||
|
|
||||||
|
@ -5084,8 +5084,8 @@ unit pass_1;
|
|||||||
firstnothing,first_while_repeat,first_while_repeat,firstfor,
|
firstnothing,first_while_repeat,first_while_repeat,firstfor,
|
||||||
firstexitn,firstwith,firstcase,firstlabel,
|
firstexitn,firstwith,firstcase,firstlabel,
|
||||||
firstgoto,firstsimplenewdispose,firsttryexcept,
|
firstgoto,firstsimplenewdispose,firsttryexcept,
|
||||||
firstonn,firstraise,
|
firstraise,firstnothing,firsttryfinally,
|
||||||
firstnothing,firsttryfinally,firstis,firstas,firstadd,
|
firstonn,firstis,firstas,firstadd,
|
||||||
firstnothing,firstadd,firstprocinline,firstnothing,firstloadvmt);
|
firstnothing,firstadd,firstprocinline,firstnothing,firstloadvmt);
|
||||||
|
|
||||||
var
|
var
|
||||||
@ -5173,7 +5173,11 @@ unit pass_1;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.47 1998-07-30 11:18:17 florian
|
Revision 1.48 1998-07-30 13:30:35 florian
|
||||||
|
* final implemenation of exception support, maybe it needs
|
||||||
|
some fixes :)
|
||||||
|
|
||||||
|
Revision 1.47 1998/07/30 11:18:17 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
|
||||||
|
|
||||||
|
@ -547,6 +547,7 @@ unit pstatmnt;
|
|||||||
sym:=new(pvarsym,init(pattern,nil));
|
sym:=new(pvarsym,init(pattern,nil));
|
||||||
exceptsymtable:=new(psymtable,init(stt_exceptsymtable));
|
exceptsymtable:=new(psymtable,init(stt_exceptsymtable));
|
||||||
exceptsymtable^.insert(sym);
|
exceptsymtable^.insert(sym);
|
||||||
|
consume(ID);
|
||||||
consume(COLON);
|
consume(COLON);
|
||||||
getsym(pattern,false);
|
getsym(pattern,false);
|
||||||
consume(ID);
|
consume(ID);
|
||||||
@ -568,7 +569,7 @@ unit pstatmnt;
|
|||||||
sym^.definition:=ot;
|
sym^.definition:=ot;
|
||||||
{ insert the exception symtable stack }
|
{ insert the exception symtable stack }
|
||||||
exceptsymtable^.next:=symtablestack;
|
exceptsymtable^.next:=symtablestack;
|
||||||
symtablestack^.next:=exceptsymtable;
|
symtablestack:=exceptsymtable;
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
begin
|
begin
|
||||||
@ -595,7 +596,6 @@ unit pstatmnt;
|
|||||||
else
|
else
|
||||||
consume(ID);
|
consume(ID);
|
||||||
consume(_DO);
|
consume(_DO);
|
||||||
statement;
|
|
||||||
if p_specific=nil then
|
if p_specific=nil then
|
||||||
begin
|
begin
|
||||||
last:=gennode(onn,nil,statement);
|
last:=gennode(onn,nil,statement);
|
||||||
@ -1242,7 +1242,11 @@ unit pstatmnt;
|
|||||||
end.
|
end.
|
||||||
{
|
{
|
||||||
$Log$
|
$Log$
|
||||||
Revision 1.28 1998-07-30 11:18:18 florian
|
Revision 1.29 1998-07-30 13:30:37 florian
|
||||||
|
* final implemenation of exception support, maybe it needs
|
||||||
|
some fixes :)
|
||||||
|
|
||||||
|
Revision 1.28 1998/07/30 11:18:18 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
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user