Skip to main content

Module anchors

Module anchors 

Source

Re-exportsยง

use super::CoverageItemKind; ๐Ÿ”’
use super::ExecutionAnchor; ๐Ÿ”’
use super::ExecutionAnchorKind; ๐Ÿ”’
use super::ItemAnchor; ๐Ÿ”’
use super::ItemAnchors; ๐Ÿ”’
use super::SourceLocation; ๐Ÿ”’
use crate::analysis::EmptySpecialFunctionKind; ๐Ÿ”’
use crate::analysis::SourceAnalysis; ๐Ÿ”’
use alloy_primitives::map::rustc_hash::FxHashSet; ๐Ÿ”’
use eyre::ensure; ๐Ÿ”’
use foundry_compilers::artifacts::sourcemap::SourceElement; ๐Ÿ”’
use foundry_compilers::artifacts::sourcemap::SourceMap; ๐Ÿ”’
use foundry_evm_core::bytecode::InstIter; ๐Ÿ”’
use foundry_evm_core::ic::IcPcMap; ๐Ÿ”’
use revm::bytecode::opcode; ๐Ÿ”’

Structsยง

AnchorIndex ๐Ÿ”’
Source map and branch lookups precomputed once per bytecode.

Functionsยง

find_anchors
Attempts to find anchors for the given items using the given source map and bytecode.
find_execution_anchors
Finds execution-based anchors for empty constructors, receive functions, and fallbacks in a contract.
is_in_source_range ๐Ÿ”’
Calculates whether element is within the range of the target location.