Make ConstantData a container for any-size constant values
Previously, ConstantData was a type alias for `Vec<u8>` which prevented it from having an implementation; this meant that `V128Imm` and `&[u8; 16]` were used in places that otherwise could have accepted types of different byte lengths.
This commit is contained in:
@@ -508,9 +508,8 @@ pub fn write_operands(
|
||||
UnaryConst {
|
||||
constant_handle, ..
|
||||
} => {
|
||||
let data = dfg.constants.get(constant_handle);
|
||||
let v128 = V128Imm::from(&data[..]);
|
||||
write!(w, " {}", v128)
|
||||
let constant_data = dfg.constants.get(constant_handle);
|
||||
write!(w, " {}", constant_data)
|
||||
}
|
||||
Shuffle { mask, args, .. } => {
|
||||
let data = dfg.immediates.get(mask).expect(
|
||||
|
||||
Reference in New Issue
Block a user