| 2075 | } |
| 2076 | |
| 2077 | fn list_element_info(ty: &Type) -> (usize, &'static str) { |
| 2078 | match ty { |
| 2079 | Type::S8 => (1, "sbyte"), |
| 2080 | Type::S16 => (2, "short"), |
| 2081 | Type::S32 => (4, "int"), |
| 2082 | Type::S64 => (8, "long"), |
| 2083 | Type::U8 => (1, "byte"), |
| 2084 | Type::U16 => (2, "ushort"), |
| 2085 | Type::U32 => (4, "uint"), |
| 2086 | Type::U64 => (8, "ulong"), |
| 2087 | Type::F32 => (4, "float"), |
| 2088 | Type::F64 => (8, "double"), |
| 2089 | _ => unreachable!(), |
| 2090 | } |
| 2091 | } |
| 2092 | |
| 2093 | fn perform_cast(op: &String, cast: &Bitcast) -> String { |
| 2094 | match cast { |