Expand description
§revmc-codegen
EVM bytecode compiler frontend and code generation pipeline.
This crate contains the bytecode parser and analysis passes, the generic compiler driver, linker helpers, and test utilities for producing JIT and AOT artifacts through compiler backends such as revmc-llvm.
For the runtime worker pool and hot-code lookup backend, see revmc-runtime. For the umbrella crate, see revmc.
Modules§
- bytecode 🔒
- Internal EVM bytecode and opcode representation.
- compiler 🔒
- EVM bytecode compiler implementation.
- linker 🔒
- simple_
revm_ evm - Generic
revmJIT EVM fromrevmc-context. - tests
__fuzzing - Internal tests and testing utilities. Not public API.
Structs§
- Compile
Timings - Per-phase timing breakdown from a compilation.
- EvmCompiler
- EVM bytecode compiler.
- Linker
- EVM bytecode compiler linker.
- Opcode
- An opcode and its immediate data. Returned by
OpcodesIter. - Opcode
Info - Opcode information.
- Opcodes
Iter - An iterator that yields opcodes and their immediate data.
- Opcodes
Iter With Pc - A bytecode iterator that yields opcodes and their immediate data, alongside the program counter.
Enums§
- EvmCompiler
Input EvmCompilerinput.
Constants§
- ABI_
VERSION - ABI version of compiled artifacts. Bump when the calling convention changes.
Functions§
- decode_
pair - Decodes an EXCHANGE immediate byte into a pair of stack indices
(n, m). - decode_
single - Decodes a DUPN/SWAPN immediate byte into a stack index.
- encode_
pair - Encodes a pair of stack indices into an EXCHANGE immediate byte.
- encode_
single - Encodes a stack index into a DUPN/SWAPN immediate byte.
- format_
bytecode - Returns a string representation of the given bytecode.
- format_
bytecode_ to - Formats an EVM bytecode to the given writer.
- min_
imm_ len - Returns the length of the immediate data for the given opcode, or
0if none. - op_
info_ map - Returns the static info map for the given
SpecId. - parse_
asm - Parse EVM assembly from a string into bytecode.
- shared_
library_ path - Returns the path for a platform-native shared library filename.
- stack_
io - Returns the number of input and output stack elements of the given opcode.