Skip to main content

codesize

Function codesize 

Source
fn codesize<'a>(
    evm_version: &EVMVersion,
    contract: &'a Contract,
    macro_def: &MacroDefinition,
    scope_mgr: &mut ScopeManager<'a>,
    offset: &mut usize,
    bf: &BuiltinFunctionCall,
    relax_jumps: bool,
) -> Result<(usize, Bytes), CodegenError>
Expand description

Generates bytecode for the __codesize builtin function

Returns a tuple of (byte_offset, Bytes variant) containing the size of the specified macro. Handles circular references by creating a CircularCodesizePlaceholder that’s filled in later.