Remove some more proxies

This commit is contained in:
Rerumu 2022-06-30 14:09:36 -04:00
parent d775739581
commit e5fb05b706
2 changed files with 2 additions and 6 deletions

View File

@ -322,8 +322,6 @@ do
trunc.i32_f32 = truncate
trunc.i32_f64 = truncate
trunc.u32_f32 = math_floor
trunc.u32_f64 = math_floor
trunc.i64_f32 = i64
trunc.i64_f64 = i64
trunc.u64_f32 = i64
@ -398,8 +396,6 @@ do
return (to_number(u32(num)))
end
convert.f32_i64 = to_number
function convert.f32_u64(num)
return (to_number(u64(num)))
end
@ -412,8 +408,6 @@ do
return (to_number(u32(num)))
end
convert.f64_i64 = to_number
function convert.f64_u64(num)
return (to_number(u64(num)))
end

View File

@ -227,6 +227,8 @@ fn write_local_operation(head: &str, tail: &str, w: &mut dyn Write) -> Result<()
("shr", "u32" | "u64") => write!(w, "bit.rshift "),
("rotl", _) => write!(w, "bit.rol "),
("rotr", _) => write!(w, "bit.ror "),
("trunc", "u32_f32" | "u32_f64") => write!(w, "math.floor "),
("convert", "f32_i64" | "f64_i64") => write!(w, "tonumber "),
_ => write!(w, "rt.{head}.{tail} "),
}
}