reprospect.test.sass.controlflow.block module

class reprospect.test.sass.controlflow.block.BasicBlockMatcher(matcher: InstructionMatcher | SequenceMatcher)View on GitHub

Bases: BasicBlockMatcherBase

Match the first block that matches matcher.

Note

It is not decorated with dataclasses.dataclass() because of https://github.com/mypyc/mypyc/issues/1061.

__init__(matcher: InstructionMatcher | SequenceMatcher) NoneView on GitHub
explain(cfg: Graph) strView on GitHub
match(cfg: Graph) tuple[BasicBlock, list[InstructionMatch]] | NoneView on GitHub
matcher: Final[SequenceMatcher]
class reprospect.test.sass.controlflow.block.BasicBlockMatcherBaseView on GitHub

Bases: ABC

Base class for matchers that find blocks in a reprospect.tools.sass.controlflow.Graph.

final assert_matches(cfg: Graph) tuple[BasicBlock, list[InstructionMatch]]View on GitHub
explain(cfg: Graph) strView on GitHub
abstractmethod match(cfg: Graph) tuple[BasicBlock, list[InstructionMatch]] | NoneView on GitHub
class reprospect.test.sass.controlflow.block.BasicBlockWithParentMatcher(matcher: InstructionMatcher | SequenceMatcher, parent: BasicBlock)View on GitHub

Bases: BasicBlockMatcherBase

Match the first block of a reprospect.tools.sass.controlflow.Graph that matches matcher and has an incoming edge from parent.

Note

It is not decorated with dataclasses.dataclass() because of https://github.com/mypyc/mypyc/issues/1061.

__init__(matcher: InstructionMatcher | SequenceMatcher, parent: BasicBlock) NoneView on GitHub
explain(cfg: Graph) strView on GitHub
match(cfg: Graph) tuple[BasicBlock, list[InstructionMatch]] | NoneView on GitHub
matcher: Final[SequenceMatcher]
parent: Final[BasicBlock]