mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 15:37:52 +01:00
Does not unbox if exception handling is not supported.
This commit is contained in:
parent
f04369fac5
commit
fd27656b65
@ -1044,6 +1044,11 @@ class BranchManger {
|
|||||||
private void addUnboxExnref( BranchNode catchNode ) {
|
private void addUnboxExnref( BranchNode catchNode ) {
|
||||||
// unboxing the exnref on the stack to a reference of the exception
|
// unboxing the exnref on the stack to a reference of the exception
|
||||||
int catchPos = catchNode.startPos;
|
int catchPos = catchNode.startPos;
|
||||||
|
if( !options.useEH() ) {
|
||||||
|
BranchNode unBoxing = new BranchNode( catchPos, catchPos, WasmBlockOperator.UNREACHABLE, null );
|
||||||
|
catchNode.add( 0, unBoxing );
|
||||||
|
return;
|
||||||
|
}
|
||||||
BranchNode unBoxing = new BranchNode( catchPos, catchPos, WasmBlockOperator.BLOCK, WasmBlockOperator.END, options.getCatchType() );
|
BranchNode unBoxing = new BranchNode( catchPos, catchPos, WasmBlockOperator.BLOCK, WasmBlockOperator.END, options.getCatchType() );
|
||||||
catchNode.add( 0, unBoxing );
|
catchNode.add( 0, unBoxing );
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user