Removes duplicate code in src/obj.rs, crates/obj and crates/jit/object.rs (#1993)
Changes: - Moves object creation code from crates/jit/object.rs to the creates/obj (as ObjectBuilder) - Removes legacy crates/obj/function.rs - Removes write_debugsections
This commit is contained in:
@@ -87,3 +87,28 @@ pub(crate) fn reference_type(
|
||||
_ => panic!("unsupported Wasm reference type"),
|
||||
}
|
||||
}
|
||||
|
||||
/// Iterates through all `LibCall` members and all runtime exported functions.
|
||||
#[macro_export]
|
||||
macro_rules! for_each_libcall {
|
||||
($op:ident) => {
|
||||
$op![
|
||||
(UdivI64, wasmtime_i64_udiv),
|
||||
(UdivI64, wasmtime_i64_udiv),
|
||||
(SdivI64, wasmtime_i64_sdiv),
|
||||
(UremI64, wasmtime_i64_urem),
|
||||
(SremI64, wasmtime_i64_srem),
|
||||
(IshlI64, wasmtime_i64_ishl),
|
||||
(UshrI64, wasmtime_i64_ushr),
|
||||
(SshrI64, wasmtime_i64_sshr),
|
||||
(CeilF32, wasmtime_f32_ceil),
|
||||
(FloorF32, wasmtime_f32_floor),
|
||||
(TruncF32, wasmtime_f32_trunc),
|
||||
(NearestF32, wasmtime_f32_nearest),
|
||||
(CeilF64, wasmtime_f64_ceil),
|
||||
(FloorF64, wasmtime_f64_floor),
|
||||
(TruncF64, wasmtime_f64_trunc),
|
||||
(NearestF64, wasmtime_f64_nearest)
|
||||
];
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user