Skip to main content

Try it Live

Run Bytecode examples in the interactive playground

Complex CFG Analysis

TypeScript implementation only. Control flow graph analysis with block detection is complex and not yet ported to C.

BasicBlock Type

See analyzeBlocks for full type details.

Usage Patterns

Debug Specific Instruction

Trace Execution Path

Jump Target Validation

Gas Profiling by Block

Coverage Analysis

Performance

getBlock() internally caches block analysis results:
  • First call: O(n) to analyze all blocks
  • Subsequent calls: O(log n) binary search through cached blocks
Block analysis results are cached per bytecode instance. Multiple getBlock() calls on the same bytecode are efficient.

Edge Cases

PC Not in Any Block

PC in Middle of PUSH Data

Invalid Bytecode

See Also