compile_contracts

Function compile_contracts 

Source
pub fn compile_contracts<'ctx>(
    unit: &TestUnit,
    spec_id: SpecId,
    compiler: &mut EvmCompiler<EvmLlvmBackend<'ctx>>,
) -> Result<CompiledContracts>
Expand description

Compile all contracts in pre-state using JIT

This uses a two-phase approach:

  1. Translate all contracts (before module finalization)
  2. JIT all translated functions (first call finalizes the module)

This is necessary because translate() cannot be called after finalization, but jit_function() can be called multiple times after the module is finalized.