Lines Matching refs:label

290  * Calculates a top down profile for a node with the specified label.
293 * @param {string} opt_label Node label.
301 * Calculates a bottom up profile for a node with the specified label.
304 * @param {string} opt_label Node label.
315 * @param {string} opt_label Node label.
331 * the specified label. If no name specified, starts from the root.
333 * @param {string} opt_label Starting node label.
345 if (!(node.label in precs)) {
346 precs[node.label] = 0;
348 var nodeLabelIsRootLabel = node.label == rootLabel;
354 var rec = root.findOrAddChild(node.label);
356 if (nodeLabelIsRootLabel || precs[node.label] == 0) {
360 precs[node.label]++;
364 if (node.label == rootLabel || precs[rootLabel] > 0) {
365 precs[node.label]--;
533 * The label of the root node.
572 * label, creates a child node if necessary. If a parent node isn't
575 * @param {string} label Child node label.
577 CallTree.prototype.findOrAddChild = function(label) {
578 return this.root_.findOrAddChild(label);
584 * with a given label. E.g. cloning the following call tree on label 'A'
596 * @param {string} label The label of the new root node.
598 CallTree.prototype.cloneSubtree = function(label) {
601 if (!parent && node.label != label) {
604 var child = (parent ? parent : subTree).findOrAddChild(node.label);
675 * @param {string} label Node label.
678 CallTree.Node = function(label, opt_parent) {
679 this.label = label;
703 * @param {string} label Child node label.
705 CallTree.Node.prototype.addChild = function(label) {
706 var child = new CallTree.Node(label, this);
707 this.children[label] = child;
735 * Finds an immediate child with the specified label.
737 * @param {string} label Child node label.
739 CallTree.Node.prototype.findChild = function(label) {
740 return this.children[label] || null;
745 * Finds an immediate child with the specified label, creates a child
748 * @param {string} label Child node label.
750 CallTree.Node.prototype.findOrAddChild = function(label) {
751 return this.findChild(label) || this.addChild(label);