Class WasmEmbbeddedCode
java.lang.Object
de.inetsoftware.jwebassembly.module.WasmEmbbeddedCode
Code that will directly embedded in the compiler output. The code can be written in Java or via Wat code. This is not
a replacement of runtime API. It emulate the behavior of the Java VM.
The class should not have any references to classes of the JWebAssembly compiler to prevent that parts of the compiler will be embedded.
-
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescription(package private) static ArithmeticException
Create an ArithmeticException with message "/ by zero"(package private) static int
idiv
(int quotient, int divisor) Integer division that throw an ArithmeticException on a division by zero instead a trap of the WebAssembly engine.(package private) static long
ldiv
(long quotient, long divisor) Long division that throw an ArithmeticException on a division by zero instead a trap of the WebAssembly engine.
-
Constructor Details
-
WasmEmbbeddedCode
WasmEmbbeddedCode()
-
-
Method Details
-
idiv
static int idiv(int quotient, int divisor) Integer division that throw an ArithmeticException on a division by zero instead a trap of the WebAssembly engine.- Parameters:
quotient
- the quotient of the operationdivisor
- the divisor of the operation- Returns:
- the result
-
ldiv
static long ldiv(long quotient, long divisor) Long division that throw an ArithmeticException on a division by zero instead a trap of the WebAssembly engine.- Parameters:
quotient
- the quotientdivisor
- the divisior- Returns:
- the result
-
createDivByZero
Create an ArithmeticException with message "/ by zero"- Returns:
- the exception
-