rm push/pop

This commit is contained in:
2026-02-26 08:13:18 -06:00
parent eb19b18594
commit a1b41d5ecf
59 changed files with 19546 additions and 19265 deletions

View File

@@ -98,7 +98,7 @@ function gather_graph(locator, visited) {
arrfor(array(deps), function(alias) {
var dep_locator = deps[alias]
add_node(dep_locator)
push(edges, { from: locator, to: dep_locator, alias: alias })
edges[] = { from: locator, to: dep_locator, alias: alias }
gather_graph(dep_locator, visited)
})
}
@@ -117,7 +117,7 @@ if (show_world) {
packages = shop.list_packages()
arrfor(packages, function(p) {
if (p != 'core') {
push(roots, p)
roots[] = p
}
})
} else {
@@ -128,7 +128,7 @@ if (show_world) {
target_locator = shop.resolve_locator(target_locator)
push(roots, target_locator)
roots[] = target_locator
}
arrfor(roots, function(root) {
@@ -164,7 +164,7 @@ if (format == 'tree') {
children = []
arrfor(edges, function(e) {
if (e.from == locator) {
push(children, e)
children[] = e
}
})
@@ -180,7 +180,7 @@ if (format == 'tree') {
children = []
arrfor(edges, function(e) {
if (e.from == roots[i]) {
push(children, e)
children[] = e
}
})
@@ -230,7 +230,7 @@ if (format == 'tree') {
}
arrfor(array(nodes), function(id) {
push(output.nodes, nodes[id])
output.nodes[] = nodes[id]
})
output.edges = edges