callgraph

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 17, 2021 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type CallstackOfColoredFunctions

type CallstackOfColoredFunctions struct {
	// Stack is functions placed in order, only colored functions.
	Stack Nodes
	// ColorsChain is blended colors of stacked functions, one-by-one.
	ColorsChain []palette.Color
	// IndexSet is quick index for contains(), has the same elements as stack.
	IndexSet map[*Node]struct{}
	// ColorsMask is mask of all colors_chain.
	ColorsMask palette.ColorMask
}

func NewCallstackOfColoredFunctions

func NewCallstackOfColoredFunctions() *CallstackOfColoredFunctions

func (*CallstackOfColoredFunctions) Append

func (c *CallstackOfColoredFunctions) Append(fun *Node)

func (*CallstackOfColoredFunctions) AsVector

func (c *CallstackOfColoredFunctions) AsVector() Nodes

func (*CallstackOfColoredFunctions) Contains

func (c *CallstackOfColoredFunctions) Contains(fun *Node) bool

func (*CallstackOfColoredFunctions) PopBack

func (c *CallstackOfColoredFunctions) PopBack()

func (*CallstackOfColoredFunctions) Size

func (c *CallstackOfColoredFunctions) Size() int

type Graph

type Graph struct {
	Functions Nodes

	Graph    RawGraph
	RevGraph RawGraph
}

func (*Graph) Remove

func (g *Graph) Remove(node *Node)

type Node

type Node struct {
	Function *symbols.Function

	// Next is an array of functions that are called from the current one.
	// Prev is an array of functions that call the current one.
	//
	// All functions are always contained here, in contrast to Graph,
	// where some functions can be deleted.
	// Use these fields only if you need to know if there is a connection,
	// but for other, use the Graph.
	Next Nodes
	Prev Nodes

	// Pointer to a slice containing the
	// following nodes that have colors.
	NextWithColors *Nodes
}

func (*Node) String

func (n *Node) String() string

String method for debugging.

type Nodes

type Nodes []*Node

func (Nodes) Remove

func (n Nodes) Remove(node *Node) Nodes

type RawGraph

type RawGraph map[*Node]Nodes

Jump to

Keyboard shortcuts

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