Code
Hub
Workspaces
Following
Trending
Connect
MCP
copy
Create free account
hub
/
github.com/adonovan/spaghetti
/ functions
Functions
24 in github.com/adonovan/spaghetti
⨍
Functions
24
◇
Types & classes
5
↓ 3 callers
Function
recompute
recompute redoes all the graph algorithms each time the graph is updated.
spaghetti.go:131
↓ 3 callers
Function
remove
remove destructively removes all occurrences of x from slice, sorts it, and returns it.
spaghetti.go:393
↓ 3 callers
Function
sortNodes
(nodes []*node)
spaghetti.go:197
↓ 2 callers
Method
Idom
Dominator tree construction This file was plundered from golang.org/x/tools/go/ssa/dom.go and modified to support a different graph representation, m
dom.go:55
↓ 2 callers
Function
addImports
(select, packageIDs)
code.js:126
↓ 2 callers
Method
eval
eval implements the EVAL part of the LT algorithm.
dom.go:100
↓ 2 callers
Method
id
id returns the entry's DOM element ID in the jsTree.
spaghetti.go:210
↓ 2 callers
Method
link
link implements the LINK part of the LT algorithm.
dom.go:111
↓ 1 callers
Function
buildDomTree
buildDomTree computes the dominator tree of f using the LT algorithm. The first node is the distinguished root node.
dom.go:117
↓ 1 callers
Method
dfs
dfs implements the depth-first search part of the LT algorithm.
dom.go:84
↓ 1 callers
Function
getDirent
getDirent returns the dirent for a given slash-separated path. TODO explain module behavior.
spaghetti.go:225
↓ 1 callers
Function
numberDomTree
numberDomTree sets the pre- and post-order numbers of a depth-first traversal of the dominator tree rooted at v. These are used to answer dominance q
dom.go:229
↓ 1 callers
Function
selectPkg
(json)
code.js:74
Method
Dominates
Dominates reports whether b dominates c.
dom.go:62
Method
Dominees
Dominees returns the list of blocks that b immediately dominates: its children in the dominator tree.
dom.go:59
Function
breakedge
(i, j, all)
code.js:114
Function
main
TODO: - select the initial nodes initially in the dir tree. - need more rigor with IDs. Test on a project with multiple versioned modules. - support g
spaghetti.go:31
Function
onBreak
onBreak handles the /break (from, to int, all bool) endpoint.
spaghetti.go:360
Function
onData
(data)
code.js:12
Function
onData
onData handles the /data endpoint. It emits all the server's state as JSON: the list of root packages, the directory tree of packages in jsTree form,
spaghetti.go:259
Function
onLoad
()
code.js:6
Function
onSelectImport
(sel)
code.js:142
Function
onUnbreak
onUnbreak handles the /unbreak (from, to int) endpoint.
spaghetti.go:407
Function
unbreak
(i, j)
code.js:119