@@ -349,7 +349,7 @@ macro_rules! instructions {
349
349
} ) => (
350
350
/// A listing of all WebAssembly instructions that can be in a module
351
351
/// that this crate currently parses.
352
- #[ derive( Debug ) ]
352
+ #[ derive( Debug , Clone ) ]
353
353
#[ allow( missing_docs) ]
354
354
pub enum Instruction <' a> {
355
355
$(
@@ -1120,7 +1120,7 @@ impl<'a> Instruction<'a> {
1120
1120
///
1121
1121
/// This is used to label blocks and also annotate what types are expected for
1122
1122
/// the block.
1123
- #[ derive( Debug ) ]
1123
+ #[ derive( Debug , Clone ) ]
1124
1124
#[ allow( missing_docs) ]
1125
1125
pub struct BlockType < ' a > {
1126
1126
pub label : Option < Id < ' a > > ,
@@ -1140,7 +1140,7 @@ impl<'a> Parse<'a> for BlockType<'a> {
1140
1140
}
1141
1141
}
1142
1142
1143
- #[ derive( Debug ) ]
1143
+ #[ derive( Debug , Clone ) ]
1144
1144
#[ allow( missing_docs) ]
1145
1145
pub struct TryTable < ' a > {
1146
1146
pub block : Box < BlockType < ' a > > ,
@@ -1184,7 +1184,7 @@ impl<'a> Parse<'a> for TryTable<'a> {
1184
1184
}
1185
1185
}
1186
1186
1187
- #[ derive( Debug ) ]
1187
+ #[ derive( Debug , Clone ) ]
1188
1188
#[ allow( missing_docs) ]
1189
1189
pub enum TryTableCatchKind < ' a > {
1190
1190
// Catch a tagged exception, do not capture an exnref.
@@ -1207,7 +1207,7 @@ impl<'a> TryTableCatchKind<'a> {
1207
1207
}
1208
1208
}
1209
1209
1210
- #[ derive( Debug ) ]
1210
+ #[ derive( Debug , Clone ) ]
1211
1211
#[ allow( missing_docs) ]
1212
1212
pub struct TryTableCatch < ' a > {
1213
1213
pub kind : TryTableCatchKind < ' a > ,
@@ -1216,7 +1216,7 @@ pub struct TryTableCatch<'a> {
1216
1216
1217
1217
/// Extra information associated with the `br_table` instruction.
1218
1218
#[ allow( missing_docs) ]
1219
- #[ derive( Debug ) ]
1219
+ #[ derive( Debug , Clone ) ]
1220
1220
pub struct BrTableIndices < ' a > {
1221
1221
pub labels : Vec < Index < ' a > > ,
1222
1222
pub default : Index < ' a > ,
@@ -1234,7 +1234,7 @@ impl<'a> Parse<'a> for BrTableIndices<'a> {
1234
1234
}
1235
1235
1236
1236
/// Payload for lane-related instructions. Unsigned with no + prefix.
1237
- #[ derive( Debug ) ]
1237
+ #[ derive( Debug , Clone ) ]
1238
1238
pub struct LaneArg {
1239
1239
/// The lane argument.
1240
1240
pub lane : u8 ,
@@ -1262,7 +1262,7 @@ impl<'a> Parse<'a> for LaneArg {
1262
1262
1263
1263
/// Payload for memory-related instructions indicating offset/alignment of
1264
1264
/// memory accesses.
1265
- #[ derive( Debug ) ]
1265
+ #[ derive( Debug , Clone ) ]
1266
1266
pub struct MemArg < ' a > {
1267
1267
/// The alignment of this access.
1268
1268
///
@@ -1337,7 +1337,7 @@ impl<'a> MemArg<'a> {
1337
1337
}
1338
1338
1339
1339
/// Extra data associated with the `loadN_lane` and `storeN_lane` instructions.
1340
- #[ derive( Debug ) ]
1340
+ #[ derive( Debug , Clone ) ]
1341
1341
pub struct LoadOrStoreLane < ' a > {
1342
1342
/// The memory argument for this instruction.
1343
1343
pub memarg : MemArg < ' a > ,
@@ -1391,7 +1391,7 @@ impl<'a> LoadOrStoreLane<'a> {
1391
1391
}
1392
1392
1393
1393
/// Extra data associated with the `call_indirect` instruction.
1394
- #[ derive( Debug ) ]
1394
+ #[ derive( Debug , Clone ) ]
1395
1395
pub struct CallIndirect < ' a > {
1396
1396
/// The table that this call is going to be indexing.
1397
1397
pub table : Index < ' a > ,
@@ -1412,7 +1412,7 @@ impl<'a> Parse<'a> for CallIndirect<'a> {
1412
1412
}
1413
1413
1414
1414
/// Extra data associated with the `table.init` instruction
1415
- #[ derive( Debug ) ]
1415
+ #[ derive( Debug , Clone ) ]
1416
1416
pub struct TableInit < ' a > {
1417
1417
/// The index of the table we're copying into.
1418
1418
pub table : Index < ' a > ,
@@ -1434,7 +1434,7 @@ impl<'a> Parse<'a> for TableInit<'a> {
1434
1434
}
1435
1435
1436
1436
/// Extra data associated with the `table.copy` instruction.
1437
- #[ derive( Debug ) ]
1437
+ #[ derive( Debug , Clone ) ]
1438
1438
pub struct TableCopy < ' a > {
1439
1439
/// The index of the destination table to copy into.
1440
1440
pub dst : Index < ' a > ,
@@ -1456,7 +1456,7 @@ impl<'a> Parse<'a> for TableCopy<'a> {
1456
1456
}
1457
1457
1458
1458
/// Extra data associated with unary table instructions.
1459
- #[ derive( Debug ) ]
1459
+ #[ derive( Debug , Clone ) ]
1460
1460
pub struct TableArg < ' a > {
1461
1461
/// The index of the table argument.
1462
1462
pub dst : Index < ' a > ,
@@ -1474,7 +1474,7 @@ impl<'a> Parse<'a> for TableArg<'a> {
1474
1474
}
1475
1475
1476
1476
/// Extra data associated with unary memory instructions.
1477
- #[ derive( Debug ) ]
1477
+ #[ derive( Debug , Clone ) ]
1478
1478
pub struct MemoryArg < ' a > {
1479
1479
/// The index of the memory space.
1480
1480
pub mem : Index < ' a > ,
@@ -1492,7 +1492,7 @@ impl<'a> Parse<'a> for MemoryArg<'a> {
1492
1492
}
1493
1493
1494
1494
/// Extra data associated with the `memory.init` instruction
1495
- #[ derive( Debug ) ]
1495
+ #[ derive( Debug , Clone ) ]
1496
1496
pub struct MemoryInit < ' a > {
1497
1497
/// The index of the data segment we're copying into memory.
1498
1498
pub data : Index < ' a > ,
@@ -1514,7 +1514,7 @@ impl<'a> Parse<'a> for MemoryInit<'a> {
1514
1514
}
1515
1515
1516
1516
/// Extra data associated with the `memory.copy` instruction
1517
- #[ derive( Debug ) ]
1517
+ #[ derive( Debug , Clone ) ]
1518
1518
pub struct MemoryCopy < ' a > {
1519
1519
/// The index of the memory we're copying from.
1520
1520
pub src : Index < ' a > ,
@@ -1536,7 +1536,7 @@ impl<'a> Parse<'a> for MemoryCopy<'a> {
1536
1536
}
1537
1537
1538
1538
/// Extra data associated with the `struct.get/set` instructions
1539
- #[ derive( Debug ) ]
1539
+ #[ derive( Debug , Clone ) ]
1540
1540
pub struct StructAccess < ' a > {
1541
1541
/// The index of the struct type we're accessing.
1542
1542
pub r#struct : Index < ' a > ,
@@ -1554,7 +1554,7 @@ impl<'a> Parse<'a> for StructAccess<'a> {
1554
1554
}
1555
1555
1556
1556
/// Extra data associated with the `array.fill` instruction
1557
- #[ derive( Debug ) ]
1557
+ #[ derive( Debug , Clone ) ]
1558
1558
pub struct ArrayFill < ' a > {
1559
1559
/// The index of the array type we're filling.
1560
1560
pub array : Index < ' a > ,
@@ -1569,7 +1569,7 @@ impl<'a> Parse<'a> for ArrayFill<'a> {
1569
1569
}
1570
1570
1571
1571
/// Extra data associated with the `array.copy` instruction
1572
- #[ derive( Debug ) ]
1572
+ #[ derive( Debug , Clone ) ]
1573
1573
pub struct ArrayCopy < ' a > {
1574
1574
/// The index of the array type we're copying to.
1575
1575
pub dest_array : Index < ' a > ,
@@ -1587,7 +1587,7 @@ impl<'a> Parse<'a> for ArrayCopy<'a> {
1587
1587
}
1588
1588
1589
1589
/// Extra data associated with the `array.init_[data/elem]` instruction
1590
- #[ derive( Debug ) ]
1590
+ #[ derive( Debug , Clone ) ]
1591
1591
pub struct ArrayInit < ' a > {
1592
1592
/// The index of the array type we're initializing.
1593
1593
pub array : Index < ' a > ,
@@ -1605,7 +1605,7 @@ impl<'a> Parse<'a> for ArrayInit<'a> {
1605
1605
}
1606
1606
1607
1607
/// Extra data associated with the `array.new_fixed` instruction
1608
- #[ derive( Debug ) ]
1608
+ #[ derive( Debug , Clone ) ]
1609
1609
pub struct ArrayNewFixed < ' a > {
1610
1610
/// The index of the array type we're accessing.
1611
1611
pub array : Index < ' a > ,
@@ -1623,7 +1623,7 @@ impl<'a> Parse<'a> for ArrayNewFixed<'a> {
1623
1623
}
1624
1624
1625
1625
/// Extra data associated with the `array.new_data` instruction
1626
- #[ derive( Debug ) ]
1626
+ #[ derive( Debug , Clone ) ]
1627
1627
pub struct ArrayNewData < ' a > {
1628
1628
/// The index of the array type we're accessing.
1629
1629
pub array : Index < ' a > ,
@@ -1641,7 +1641,7 @@ impl<'a> Parse<'a> for ArrayNewData<'a> {
1641
1641
}
1642
1642
1643
1643
/// Extra data associated with the `array.new_elem` instruction
1644
- #[ derive( Debug ) ]
1644
+ #[ derive( Debug , Clone ) ]
1645
1645
pub struct ArrayNewElem < ' a > {
1646
1646
/// The index of the array type we're accessing.
1647
1647
pub array : Index < ' a > ,
@@ -1659,7 +1659,7 @@ impl<'a> Parse<'a> for ArrayNewElem<'a> {
1659
1659
}
1660
1660
1661
1661
/// Extra data associated with the `ref.cast` instruction
1662
- #[ derive( Debug ) ]
1662
+ #[ derive( Debug , Clone ) ]
1663
1663
pub struct RefCast < ' a > {
1664
1664
/// The type to cast to.
1665
1665
pub r#type : RefType < ' a > ,
@@ -1674,7 +1674,7 @@ impl<'a> Parse<'a> for RefCast<'a> {
1674
1674
}
1675
1675
1676
1676
/// Extra data associated with the `ref.test` instruction
1677
- #[ derive( Debug ) ]
1677
+ #[ derive( Debug , Clone ) ]
1678
1678
pub struct RefTest < ' a > {
1679
1679
/// The type to test for.
1680
1680
pub r#type : RefType < ' a > ,
@@ -1689,7 +1689,7 @@ impl<'a> Parse<'a> for RefTest<'a> {
1689
1689
}
1690
1690
1691
1691
/// Extra data associated with the `br_on_cast` instruction
1692
- #[ derive( Debug ) ]
1692
+ #[ derive( Debug , Clone ) ]
1693
1693
pub struct BrOnCast < ' a > {
1694
1694
/// The label to branch to.
1695
1695
pub label : Index < ' a > ,
@@ -1710,7 +1710,7 @@ impl<'a> Parse<'a> for BrOnCast<'a> {
1710
1710
}
1711
1711
1712
1712
/// Extra data associated with the `br_on_cast_fail` instruction
1713
- #[ derive( Debug ) ]
1713
+ #[ derive( Debug , Clone ) ]
1714
1714
pub struct BrOnCastFail < ' a > {
1715
1715
/// The label to branch to.
1716
1716
pub label : Index < ' a > ,
@@ -1897,7 +1897,7 @@ impl<'a> Parse<'a> for V128Const {
1897
1897
}
1898
1898
1899
1899
/// Lanes being shuffled in the `i8x16.shuffle` instruction
1900
- #[ derive( Debug ) ]
1900
+ #[ derive( Debug , Clone ) ]
1901
1901
pub struct I8x16Shuffle {
1902
1902
#[ allow( missing_docs) ]
1903
1903
pub lanes : [ u8 ; 16 ] ,
@@ -1929,7 +1929,7 @@ impl<'a> Parse<'a> for I8x16Shuffle {
1929
1929
}
1930
1930
1931
1931
/// Payload of the `select` instructions
1932
- #[ derive( Debug ) ]
1932
+ #[ derive( Debug , Clone ) ]
1933
1933
pub struct SelectTypes < ' a > {
1934
1934
#[ allow( missing_docs) ]
1935
1935
pub tys : Option < Vec < ValType < ' a > > > ,
0 commit comments