mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
throw an exception for old byte code instructions
This commit is contained in:
parent
8f4a3cdd3a
commit
7ce99bec72
@ -514,8 +514,10 @@ class JavaMethodWasmCodeBuilder extends WasmCodeBuilder {
|
|||||||
branchManager.addGotoOperator( codePos, offset, byteCode.getCodePosition(), byteCode.getLineNumber() );
|
branchManager.addGotoOperator( codePos, offset, byteCode.getCodePosition(), byteCode.getLineNumber() );
|
||||||
addNopInstruction( codePos ); // marker of the line number for the branch manager
|
addNopInstruction( codePos ); // marker of the line number for the branch manager
|
||||||
break;
|
break;
|
||||||
//TODO case 168: // jsr
|
case 168: // jsr
|
||||||
//TODO case 169: // ret
|
case 169: // ret
|
||||||
|
case 201: // jsr_w
|
||||||
|
throw new WasmException( "Finally block of Java 5 or older is not supported. Compile the sources with a Java SE 6 or newer: " + op, byteCode.getLineNumber() );
|
||||||
case 170: // tableswitch
|
case 170: // tableswitch
|
||||||
case 171: // lookupswitch
|
case 171: // lookupswitch
|
||||||
writeSwitchCode( byteCode, op == 171 );
|
writeSwitchCode( byteCode, op == 171 );
|
||||||
@ -636,7 +638,6 @@ class JavaMethodWasmCodeBuilder extends WasmCodeBuilder {
|
|||||||
branchManager.addGotoOperator( codePos, offset, byteCode.getCodePosition(), byteCode.getLineNumber() );
|
branchManager.addGotoOperator( codePos, offset, byteCode.getCodePosition(), byteCode.getLineNumber() );
|
||||||
addNopInstruction( codePos ); // marker of the line number for the branch manager
|
addNopInstruction( codePos ); // marker of the line number for the branch manager
|
||||||
break;
|
break;
|
||||||
//TODO case 201: // jsr_w
|
|
||||||
default:
|
default:
|
||||||
throw new WasmException( "Unimplemented Java byte code operation: " + op, byteCode.getLineNumber() );
|
throw new WasmException( "Unimplemented Java byte code operation: " + op, byteCode.getLineNumber() );
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user