mirror of
https://github.com/i-net-software/JWebAssembly.git
synced 2025-03-25 07:27:52 +01:00
write ValueType codes in signed LEB format
This commit is contained in:
parent
74dcb4dc09
commit
c2c872024b
@ -72,7 +72,7 @@ class WasmOutputStream extends FilterOutputStream {
|
|||||||
* if an I/O error occurs.
|
* if an I/O error occurs.
|
||||||
*/
|
*/
|
||||||
public void writeValueType( ValueType type ) throws IOException {
|
public void writeValueType( ValueType type ) throws IOException {
|
||||||
write( type.getCode() );
|
writeVarint( type.getCode() );
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -21,15 +21,15 @@ import de.inetsoftware.jwebassembly.WasmException;
|
|||||||
* @author Volker Berlin
|
* @author Volker Berlin
|
||||||
*/
|
*/
|
||||||
public enum ValueType {
|
public enum ValueType {
|
||||||
i32(0x7f),
|
i32(-0x01),
|
||||||
i64(0x7e),
|
i64(-0x02),
|
||||||
f32(0x7d),
|
f32(-0x03),
|
||||||
f64(0x7c),
|
f64(-0x04),
|
||||||
anyfunc(0x70),
|
anyfunc(-0x10),
|
||||||
anyref(0x6f),
|
anyref(-0x11),
|
||||||
except_ref(0x68),
|
except_ref(-0x12),
|
||||||
func(0x60),
|
func(-0x20),
|
||||||
empty(0x40), // empty block_type
|
empty(-0x40), // empty block_type
|
||||||
;
|
;
|
||||||
|
|
||||||
private final int code;
|
private final int code;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user