1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
use super::*;
impl ExecutionContext {
pub(crate) fn execute_bytes_instruction(&mut self, opcode: u8) -> Result<bool, RuntimeError> {
match opcode {
0x88 => {
// NEWBUFFER
self.new_buffer()?;
self.instruction_pointer += 1;
}
0x89 => {
// MEMCPY
self.memcpy_bytes()?;
self.instruction_pointer += 1;
}
0x8B => {
// CAT
self.concat_bytes()?;
self.instruction_pointer += 1;
}
0x8C => {
// SUBSTR
self.substr_bytes()?;
self.instruction_pointer += 1;
}
0x8D => {
// LEFT
self.left_bytes()?;
self.instruction_pointer += 1;
}
0x8E => {
// RIGHT
self.right_bytes()?;
self.instruction_pointer += 1;
}
_ => return Ok(false),
}
Ok(true)
}
}