@@ -203,10 +203,6 @@ def_instruction! {
203
203
I32FromU8 : [ 1 ] => [ 1 ] ,
204
204
/// Converts an interface type `s8` value to a wasm `i32`.
205
205
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 ] ,
210
206
/// Conversion an interface type `f32` value to a wasm `f32`.
211
207
///
212
208
/// This may be a noop for some implementations, but it's here in case the
@@ -252,12 +248,6 @@ def_instruction! {
252
248
If32FromF32 : [ 1 ] => [ 1 ] ,
253
249
/// Converts a native wasm `f64` to an interface type `f64`.
254
250
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 ] ,
261
251
262
252
// Handles
263
253
@@ -854,9 +844,7 @@ impl Interface {
854
844
| Type :: S32
855
845
| Type :: U32
856
846
| Type :: Char
857
- | Type :: Handle ( _)
858
- | Type :: CChar
859
- | Type :: Usize => result. push ( WasmType :: I32 ) ,
847
+ | Type :: Handle ( _) => result. push ( WasmType :: I32 ) ,
860
848
861
849
Type :: U64 | Type :: S64 => result. push ( WasmType :: I64 ) ,
862
850
Type :: F32 => result. push ( WasmType :: F32 ) ,
@@ -1303,12 +1291,10 @@ impl<'a, B: Bindgen> Generator<'a, B> {
1303
1291
match * ty {
1304
1292
Type :: S8 => self . emit ( & I32FromS8 ) ,
1305
1293
Type :: U8 => self . emit ( & I32FromU8 ) ,
1306
- Type :: CChar => self . emit ( & I32FromChar8 ) ,
1307
1294
Type :: S16 => self . emit ( & I32FromS16 ) ,
1308
1295
Type :: U16 => self . emit ( & I32FromU16 ) ,
1309
1296
Type :: S32 => self . emit ( & I32FromS32 ) ,
1310
1297
Type :: U32 => self . emit ( & I32FromU32 ) ,
1311
- Type :: Usize => self . emit ( & I32FromUsize ) ,
1312
1298
Type :: S64 => self . emit ( & I64FromS64 ) ,
1313
1299
Type :: U64 => self . emit ( & I64FromU64 ) ,
1314
1300
Type :: Char => self . emit ( & I32FromChar ) ,
@@ -1478,12 +1464,10 @@ impl<'a, B: Bindgen> Generator<'a, B> {
1478
1464
1479
1465
match * ty {
1480
1466
Type :: S8 => self . emit ( & S8FromI32 ) ,
1481
- Type :: CChar => self . emit ( & Char8FromI32 ) ,
1482
1467
Type :: U8 => self . emit ( & U8FromI32 ) ,
1483
1468
Type :: S16 => self . emit ( & S16FromI32 ) ,
1484
1469
Type :: U16 => self . emit ( & U16FromI32 ) ,
1485
1470
Type :: S32 => self . emit ( & S32FromI32 ) ,
1486
- Type :: Usize => self . emit ( & UsizeFromI32 ) ,
1487
1471
Type :: U32 => self . emit ( & U32FromI32 ) ,
1488
1472
Type :: S64 => self . emit ( & S64FromI64 ) ,
1489
1473
Type :: U64 => self . emit ( & U64FromI64 ) ,
@@ -1617,11 +1601,9 @@ impl<'a, B: Bindgen> Generator<'a, B> {
1617
1601
match * ty {
1618
1602
// Builtin types need different flavors of storage instructions
1619
1603
// 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 } ) ,
1623
1605
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 => {
1625
1607
self . lower_and_emit ( ty, addr, & I32Store { offset } )
1626
1608
}
1627
1609
Type :: U64 | Type :: S64 => self . lower_and_emit ( ty, addr, & I64Store { offset } ) ,
@@ -1729,11 +1711,11 @@ impl<'a, B: Bindgen> Generator<'a, B> {
1729
1711
use Instruction :: * ;
1730
1712
1731
1713
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 } ) ,
1733
1715
Type :: S8 => self . emit_and_lift ( ty, addr, & I32Load8S { offset } ) ,
1734
1716
Type :: U16 => self . emit_and_lift ( ty, addr, & I32Load16U { offset } ) ,
1735
1717
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 ( _) => {
1737
1719
self . emit_and_lift ( ty, addr, & I32Load { offset } )
1738
1720
}
1739
1721
Type :: U64 | Type :: S64 => self . emit_and_lift ( ty, addr, & I64Load { offset } ) ,
0 commit comments