Fix unsigned literal emit
This commit is contained in:
parent
a3d43ebe16
commit
bd49fd55a4
@ -66,6 +66,12 @@ impl Driver for MemoryGrow {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
pub fn write_i32(number: i32, w: &mut dyn Write) -> Result<()> {
|
||||||
|
let list = number.to_ne_bytes();
|
||||||
|
|
||||||
|
write!(w, "{} ", u32::from_ne_bytes(list))
|
||||||
|
}
|
||||||
|
|
||||||
fn write_i64(number: i64, w: &mut dyn Write) -> Result<()> {
|
fn write_i64(number: i64, w: &mut dyn Write) -> Result<()> {
|
||||||
match number {
|
match number {
|
||||||
0 => write!(w, "num_K_ZERO "),
|
0 => write!(w, "num_K_ZERO "),
|
||||||
@ -107,7 +113,7 @@ fn write_f64(number: f64, w: &mut dyn Write) -> Result<()> {
|
|||||||
impl Driver for Value {
|
impl Driver for Value {
|
||||||
fn write(&self, _: &mut Manager, w: &mut dyn Write) -> Result<()> {
|
fn write(&self, _: &mut Manager, w: &mut dyn Write) -> Result<()> {
|
||||||
match self {
|
match self {
|
||||||
Self::I32(i) => write!(w, "{i} "),
|
Self::I32(i) => write_i32(*i, w),
|
||||||
Self::I64(i) => write_i64(*i, w),
|
Self::I64(i) => write_i64(*i, w),
|
||||||
Self::F32(f) => write_f32(*f, w),
|
Self::F32(f) => write_f32(*f, w),
|
||||||
Self::F64(f) => write_f64(*f, w),
|
Self::F64(f) => write_f64(*f, w),
|
||||||
|
Loading…
x
Reference in New Issue
Block a user