analyse

package
v0.1.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Mar 20, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func SliceCount

func SliceCount[E comparable](s []E, v E) int

Types

type FlowPermutation

type FlowPermutation struct {
	Blocks []*ProgBlock
	Return []*ProgBlock
}

func FlowPermutations

func FlowPermutations(entryBlock *ProgBlock) []FlowPermutation

func (FlowPermutation) Copy

func (fp FlowPermutation) Copy() FlowPermutation

func (FlowPermutation) Last

func (fp FlowPermutation) Last() *ProgBlock

func (FlowPermutation) String

func (fp FlowPermutation) String() string

type ProgBlock

type ProgBlock struct {
	Index int
	// The current block of code
	Block asm.Instructions

	// The next block of we don't branch
	NoBranch *ProgBlock
	// The next block if we do branch
	Branch *ProgBlock
}

func ProgramBlocks

func ProgramBlocks(prog asm.Instructions) []*ProgBlock

func (*ProgBlock) String

func (pb *ProgBlock) String() string

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL