Closed fengb closed 4 years ago
Core functionality is now done. Still debating on how to communicate into JS.
Input:
u32
— hides intent, upstream byte packing[*]u8
— communicates intent, upstream allocationu8, u8, u8
— communicates intent, lots of args!Output:
struct { [*:0]const u8, inst_length: u32 }
— new data type, temporary storagestruct { [*]const u8, len: u16, inst_length: u16 }
— new data type, temporary storageU8Chunk
— squeeze duration into first char, temporary storagebuf: [*]u8 -> U8Chunk
— squeeze duration into first char, upstream storageI think we need to make a concession on the output format. Since we need to return both a "slice" and an instruction length, there's not a nice way of squeezing both into a u64
.
Mostly complete by 97ceb70deeafb276bc9edad67a82541c024c8ec3. We still need to reenable CB operations.
Also... @tagName(Op.Id)
increases the bundle size by ~15 KB (4 KB gzipped) due to extra string literals + dispatch table. Sad panda.
Now that we have a separate decoder, the disassembler should be much easier.