aboutsummaryrefslogtreecommitdiff
path: root/patio-to-cranelift/src/patio/values.rs
diff options
context:
space:
mode:
authorMichael Williamson <mike@zwobble.org>2026-07-31 14:45:04 +0100
committerMichael Williamson <mike@zwobble.org>2026-07-31 15:22:40 +0100
commit91860485774924e82da9b0774179d4c3c8da810a (patch)
treee06f52f147502e80aea139c20adac706479cb7ea /patio-to-cranelift/src/patio/values.rs
parent410fff7b7ecf6f36a0a46ab1d90553169e3728f1 (diff)
Use transient-0 instead of flatbuffersmain
Diffstat (limited to 'patio-to-cranelift/src/patio/values.rs')
-rw-r--r--patio-to-cranelift/src/patio/values.rs55
1 files changed, 0 insertions, 55 deletions
diff --git a/patio-to-cranelift/src/patio/values.rs b/patio-to-cranelift/src/patio/values.rs
deleted file mode 100644
index fe511437..00000000
--- a/patio-to-cranelift/src/patio/values.rs
+++ /dev/null
@@ -1,55 +0,0 @@
-use crate::patio::types::PatioDataLayout;
-
-pub(crate) enum PatioDataValue {
- Array {
- element_layout: PatioDataLayout,
- elements: Vec<PatioDataValue>,
- },
- Bool(bool),
- Byte(u8),
- DataPtr(PatioDataPtrValue),
- Int(PatioIntValue),
- Int32(PatioIntValue),
- Struct {
- elements: Vec<PatioDataValue>,
- },
-}
-
-impl PatioDataValue {
- pub(crate) fn layout(&self) -> PatioDataLayout {
- match self {
- PatioDataValue::Array {
- element_layout,
- elements,
- } => PatioDataLayout::array(element_layout.clone(), elements.len().try_into().unwrap()),
- PatioDataValue::Bool(_) => PatioDataLayout::Bool,
- PatioDataValue::Byte(_) => PatioDataLayout::Byte,
- PatioDataValue::DataPtr(_) => PatioDataLayout::DataPtr,
- PatioDataValue::Int(_) => PatioDataLayout::Int,
- PatioDataValue::Int32(_) => PatioDataLayout::Int32,
- PatioDataValue::Struct { elements } => {
- PatioDataLayout::struct_(elements.iter().map(|element| element.layout()).collect())
- }
- }
- }
-}
-
-#[derive(Debug)]
-pub(crate) enum PatioDataPtrValue {
- DataElement { name: String },
- Null,
-}
-
-#[derive(Debug)]
-pub(crate) enum PatioIntValue {
- ByteOffsetOf {
- layout: PatioDataLayout,
- element_offsets: Vec<u32>,
- },
- ByteSizeOf {
- layout: PatioDataLayout,
- },
- Literal {
- value: i32,
- },
-}