Throw instruction

This commit is contained in:
Andrew Morris
2023-03-21 14:16:23 +11:00
parent cfb72fdbcd
commit 8b535f4f03
6 changed files with 81 additions and 52 deletions

View File

@@ -44,6 +44,9 @@ pub enum InstructionByte {
UnaryPlus = 0x29,
UnaryMinus = 0x2a,
New = 0x2b,
Throw = 0x2c,
Import = 0x2d,
ImportStar = 0x2e,
}
impl InstructionByte {
@@ -95,6 +98,9 @@ impl InstructionByte {
0x29 => UnaryPlus,
0x2a => UnaryMinus,
0x2b => New,
0x2c => Throw,
0x2d => Import,
0x2e => ImportStar,
_ => panic!("Unrecognized instruction: {}", byte),
};