wasmtime_environ/gc/
drc.rsuse super::*;
pub const HEADER_SIZE: u32 = 16;
pub const HEADER_ALIGN: u32 = 8;
pub const ARRAY_LENGTH_OFFSET: u32 = HEADER_SIZE;
#[derive(Default)]
pub struct DrcTypeLayouts;
impl GcTypeLayouts for DrcTypeLayouts {
fn array_length_field_offset(&self) -> u32 {
ARRAY_LENGTH_OFFSET
}
fn array_layout(&self, ty: &WasmArrayType) -> GcArrayLayout {
common_array_layout(ty, HEADER_SIZE, HEADER_ALIGN, ARRAY_LENGTH_OFFSET)
}
fn struct_layout(&self, ty: &WasmStructType) -> GcStructLayout {
common_struct_layout(ty, HEADER_SIZE, HEADER_ALIGN)
}
}