code: function setStackTop (node, exclude = this.exclude) {
    const childCount = node.children.length
    const nodeIsExcluded = isNodeExcluded(node, exclude)
    let topTotal = node.onStackTop.base
  
    // Will be called many many times in browser, use vanilla for/i for speed
    for (var i = 0; i < childCount; i++) {
      // Add stack top of excluded children and chains of excluded descendents
      topTotal += setStackTop(node.children[i], exclude)
    }
    node.onStackTop.asViewed = nodeIsExcluded ? 0 : topTotal
    return nodeIsExcluded ? topTotal : 0
  }
docs: Functions shared between frontend (visualizer) and backend (analysis)