We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent be1a2a4 commit 7f979c4Copy full SHA for 7f979c4
src/processor/instructions.rs
@@ -8,7 +8,7 @@ pub enum Instruction {
8
LoadConst(usize),
9
LoadName(usize),
10
LoadFast(u16),
11
- CallFunction(u16),
+ CallFunction(u8, u8),
12
}
13
14
#[derive(Debug)]
@@ -24,9 +24,8 @@ impl<I> InstructionDecoder<I> where I: Iterator {
24
25
impl<'a, I> InstructionDecoder<I> where I: Iterator<Item=&'a u8> {
26
fn read_byte(&mut self) -> u8 {
27
- match (self.bytestream.next(), self.bytestream.next()) {
28
- (Some(b1), Some(b2)) => {
29
- ((*b2 as u16) << 8) + (*b1 as u16)},
+ match self.bytestream.next() {
+ Some(b) => *b,
30
_ => panic!("End of stream in the middle of an instruction."),
31
32
0 commit comments