Crate hlbc

Source
Expand description

Hashlink bytecode disassembler and analyzer. See Bytecode for an entrypoint to the library.

§Note about safety

We don’t deal with self-references, hence we deal with indexes into structures. Be careful when calling functions on Ref* objects, as no bound checking is done and every index is assumed to be valid.

Modules§

analysis
Analysis functions and callgraph generation
fmt
Formatting code for displaying bytecode. Formatting is handled through the BytecodeFmt trait which permit easy extensibility and re-usability across formatting implementations.
opcodes
Opcodes definitions.
types
Bytecode elements definitions. All the Ref* types in this modules are references to bytecode elements like constants or function. They are required since we cannot use rust references as that would make our structure self-referential. They makes the code look a bit more complicated than it actually is. Every Ref* struct is cheaply copyable.

Structs§

Bytecode
Bytecode structure containing all the information. Every field is public for flexibility, but you aren’t encouraged to modify them.

Enums§

Error

Traits§

Resolve
Like the Index trait but allows returning any type.

Type Aliases§

Result
Str
Cheaply clonable with inline storage