Try it Live
Run Bytecode examples in the interactive playground
- C
Complex CFG Analysis
TypeScript implementation only. Control flow graph analysis with block detection is complex and not yet ported to C.BasicBlock Type
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
Edge Cases
PC Not in Any Block
PC in Middle of PUSH Data
Invalid Bytecode
See Also
- analyzeBlocks - Complete basic block analysis
- getNextPc - Get next program counter
- isValidJumpDest - Check JUMPDEST validity
- parseInstructions - Get all instructions

