mirror of
https://gitlab.com/freepascal.org/fpc/source.git
synced 2025-09-28 20:59:27 +02:00
* make current_except_loc also valid while processing the default exception
block, since it can contain an anonymous "raise" statement to reraise the exception git-svn-id: branches/jvmbackend@18526 -
This commit is contained in:
parent
f75a5895d8
commit
e7eb34e3a6
@ -160,15 +160,22 @@ implementation
|
||||
{ here we don't have to reset flowcontrol }
|
||||
{ the default and on flowcontrols are handled equal }
|
||||
|
||||
{ pop the exception object from the stack }
|
||||
{ get the exception object from the stack and store it for use by
|
||||
the exception code (in case of an anonymous "raise") }
|
||||
current_asmdata.CurrAsmList.concat(tai_marker.create(mark_NoLineInfoStart));
|
||||
location_reset_ref(current_except_loc,LOC_REFERENCE,OS_ADDR,4);
|
||||
tg.GetLocal(current_asmdata.CurrAsmList,sizeof(pint),java_jlthrowable,current_except_loc.reference);
|
||||
thlcgjvm(hlcg).incstack(current_asmdata.CurrAsmList,1);
|
||||
current_asmdata.CurrAsmList.concat(taicpu.op_none(a_pop));
|
||||
thlcgjvm(hlcg).decstack(current_asmdata.CurrAsmList,1);
|
||||
thlcgjvm(hlcg).a_load_stack_loc(current_asmdata.CurrAsmList,java_jlthrowable,current_except_loc);
|
||||
current_asmdata.CurrAsmList.concat(tai_marker.create(mark_NoLineInfoEnd));
|
||||
|
||||
{ and generate the exception handling code }
|
||||
secondpass(t1);
|
||||
|
||||
{ free the temp containing the exception and invalidate }
|
||||
tg.UngetLocal(current_asmdata.CurrAsmList,current_except_loc.reference);
|
||||
current_except_loc.loc:=LOC_INVALID;
|
||||
|
||||
exceptflowcontrol:=flowcontrol;
|
||||
end;
|
||||
hlcg.a_label(current_asmdata.CurrAsmList,endexceptlabel);
|
||||
|
Loading…
Reference in New Issue
Block a user