@@ -203,10 +203,6 @@ def_instruction! {
203203 I32FromU8 : [ 1 ] => [ 1 ] ,
204204 /// Converts an interface type `s8` value to a wasm `i32`.
205205 I32FromS8 : [ 1 ] => [ 1 ] ,
206- /// Converts a language-specific `usize` value to a wasm `i32`.
207- I32FromUsize : [ 1 ] => [ 1 ] ,
208- /// Converts a language-specific C `char` value to a wasm `i32`.
209- I32FromChar8 : [ 1 ] => [ 1 ] ,
210206 /// Conversion an interface type `f32` value to a wasm `f32`.
211207 ///
212208 /// This may be a noop for some implementations, but it's here in case the
@@ -252,12 +248,6 @@ def_instruction! {
252248 If32FromF32 : [ 1 ] => [ 1 ] ,
253249 /// Converts a native wasm `f64` to an interface type `f64`.
254250 If64FromF64 : [ 1 ] => [ 1 ] ,
255- /// Converts a native wasm `i32` to a language-specific C `char`.
256- ///
257- /// This will truncate the upper bits of the `i32`.
258- Char8FromI32 : [ 1 ] => [ 1 ] ,
259- /// Converts a native wasm `i32` to a language-specific `usize`.
260- UsizeFromI32 : [ 1 ] => [ 1 ] ,
261251
262252 // Handles
263253
@@ -854,9 +844,7 @@ impl Interface {
854844 | Type :: S32
855845 | Type :: U32
856846 | Type :: Char
857- | Type :: Handle ( _)
858- | Type :: CChar
859- | Type :: Usize => result. push ( WasmType :: I32 ) ,
847+ | Type :: Handle ( _) => result. push ( WasmType :: I32 ) ,
860848
861849 Type :: U64 | Type :: S64 => result. push ( WasmType :: I64 ) ,
862850 Type :: F32 => result. push ( WasmType :: F32 ) ,
@@ -1303,12 +1291,10 @@ impl<'a, B: Bindgen> Generator<'a, B> {
13031291 match * ty {
13041292 Type :: S8 => self . emit ( & I32FromS8 ) ,
13051293 Type :: U8 => self . emit ( & I32FromU8 ) ,
1306- Type :: CChar => self . emit ( & I32FromChar8 ) ,
13071294 Type :: S16 => self . emit ( & I32FromS16 ) ,
13081295 Type :: U16 => self . emit ( & I32FromU16 ) ,
13091296 Type :: S32 => self . emit ( & I32FromS32 ) ,
13101297 Type :: U32 => self . emit ( & I32FromU32 ) ,
1311- Type :: Usize => self . emit ( & I32FromUsize ) ,
13121298 Type :: S64 => self . emit ( & I64FromS64 ) ,
13131299 Type :: U64 => self . emit ( & I64FromU64 ) ,
13141300 Type :: Char => self . emit ( & I32FromChar ) ,
@@ -1478,12 +1464,10 @@ impl<'a, B: Bindgen> Generator<'a, B> {
14781464
14791465 match * ty {
14801466 Type :: S8 => self . emit ( & S8FromI32 ) ,
1481- Type :: CChar => self . emit ( & Char8FromI32 ) ,
14821467 Type :: U8 => self . emit ( & U8FromI32 ) ,
14831468 Type :: S16 => self . emit ( & S16FromI32 ) ,
14841469 Type :: U16 => self . emit ( & U16FromI32 ) ,
14851470 Type :: S32 => self . emit ( & S32FromI32 ) ,
1486- Type :: Usize => self . emit ( & UsizeFromI32 ) ,
14871471 Type :: U32 => self . emit ( & U32FromI32 ) ,
14881472 Type :: S64 => self . emit ( & S64FromI64 ) ,
14891473 Type :: U64 => self . emit ( & U64FromI64 ) ,
@@ -1617,11 +1601,9 @@ impl<'a, B: Bindgen> Generator<'a, B> {
16171601 match * ty {
16181602 // Builtin types need different flavors of storage instructions
16191603 // depending on the size of the value written.
1620- Type :: U8 | Type :: S8 | Type :: CChar => {
1621- self . lower_and_emit ( ty, addr, & I32Store8 { offset } )
1622- }
1604+ Type :: U8 | Type :: S8 => self . lower_and_emit ( ty, addr, & I32Store8 { offset } ) ,
16231605 Type :: U16 | Type :: S16 => self . lower_and_emit ( ty, addr, & I32Store16 { offset } ) ,
1624- Type :: U32 | Type :: S32 | Type :: Usize | Type :: Handle ( _) | Type :: Char => {
1606+ Type :: U32 | Type :: S32 | Type :: Handle ( _) | Type :: Char => {
16251607 self . lower_and_emit ( ty, addr, & I32Store { offset } )
16261608 }
16271609 Type :: U64 | Type :: S64 => self . lower_and_emit ( ty, addr, & I64Store { offset } ) ,
@@ -1729,11 +1711,11 @@ impl<'a, B: Bindgen> Generator<'a, B> {
17291711 use Instruction :: * ;
17301712
17311713 match * ty {
1732- Type :: U8 | Type :: CChar => self . emit_and_lift ( ty, addr, & I32Load8U { offset } ) ,
1714+ Type :: U8 => self . emit_and_lift ( ty, addr, & I32Load8U { offset } ) ,
17331715 Type :: S8 => self . emit_and_lift ( ty, addr, & I32Load8S { offset } ) ,
17341716 Type :: U16 => self . emit_and_lift ( ty, addr, & I32Load16U { offset } ) ,
17351717 Type :: S16 => self . emit_and_lift ( ty, addr, & I32Load16S { offset } ) ,
1736- Type :: U32 | Type :: S32 | Type :: Char | Type :: Usize | Type :: Handle ( _) => {
1718+ Type :: U32 | Type :: S32 | Type :: Char | Type :: Handle ( _) => {
17371719 self . emit_and_lift ( ty, addr, & I32Load { offset } )
17381720 }
17391721 Type :: U64 | Type :: S64 => self . emit_and_lift ( ty, addr, & I64Load { offset } ) ,
0 commit comments