luaur-bytecode 0.1.1

Luau bytecode format and builder (Rust).
Documentation
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
use crate::records::bytecode_builder::BytecodeBuilder;
use crate::records::debug_local_bytecode_builder::DebugLocal;
use crate::records::string_ref::StringRef;

impl BytecodeBuilder {
    pub fn push_debug_local(&mut self, name: StringRef, reg: u8, startpc: u32, endpc: u32) {
        let index = self.add_string_table_entry(name);

        let local = DebugLocal {
            name: index,
            reg,
            startpc,
            endpc,
        };

        self.debug_locals.push(local);
    }
}