**********************************
Top Level Functions
**********************************
162966
function makeMoment(input, format, lang, strict, utc) {
    if (typeof lang === "boolean") {
        utc = strict;
        strict = lang;
        lang = undefined;
    }
    var itsJalaliDate = (isJalali(this));
    if(input && (typeof input === "string") && !format && itsJalaliDate && !moment.useGregorianParser) {
        input = input.replace(/\//g,"-");
        if(/\d{4}\-\d{2}\-\d{2}/.test(input)) {
            format = "jYYYY-jMM-jDD";
        } else if (/\d{4}\-\d{2}\-\d{1}/.test(input)) {
            format = "jYYYY-jMM-jD";
        } else if (/\d{4}\-\d{1}\-\d{1}/.test(input)) {
            format = "jYYYY-jM-jD";
        } else if (/\d{4}\-\d{1}\-\d{2}/.test(input)) {
            format = "jYYYY-jM-jDD";
        } else if (/\d{4}\-W\d{2}\-\d{2}/.test(input)) {
            format = "jYYYY-jW-jDD";
        } else if (/\d{4}\-\d{3}/.test(input)) {
            format = "jYYYY-jDDD";
        } else if (/\d{8}/.test(input)) {
            format = "jYYYYjMMjDD";
        } else if (/\d{4}W\d{2}\d{1}/.test(input)) {
            format = "jYYYYjWWjD";
        } else if (/\d{4}W\d{2}/.test(input)) {
            format = "jYYYYjWW";
        } else if (/\d{4}\d{3}/.test(input)) {
            format = "jYYYYjDDD";
        }
    }
    if (format && itsJalaliDate){
        format = toJalaliFormat(format);
    }
    if (format && typeof format === "string"){
        format = fixFormat(format, moment);
    }

    var config =
        { _i: input
            , _f: format
            , _l: lang
            , _strict: strict
            , _isUTC: utc
        }
        , date
        , m
        , jm
        , origInput = input
        , origFormat = format;
    if (format) {
        if (isArray(format)) {
            return makeDateFromStringAndArray(config, utc);
        } else {
            date = makeDateFromStringAndFormat(config);
            removeParsedTokens(config);
            format = "YYYY-MM-DD-" + config._f;
            input = leftZeroFill(date[0], 4) + "-"
                + leftZeroFill(date[1] + 1, 2) + "-"
                + leftZeroFill(date[2], 2) + "-"
                + config._i;
        }
    }
    if (utc){
        m = moment.utc(input, format, lang, strict);
    }
    else{
        m = moment(input, format, lang, strict);
    }
    if (config._isValid === false || (input && input._isAMomentObject && !input._isValid)){
        m._isValid = false;
    }
    m._jDiff = config._jDiff || 0;
    jm = objectCreate(jMoment.fn);
    extend(jm, m);
    if (strict && jm.isValid()) {
        jm._isValid = jm.format(origFormat) === origInput;
    }
    if (input && input.calSystem) {
        jm.calSystem = input.calSystem;
    }
    return jm;
}
881752
function Function_(types) {
    var tuples = Z.reduce (function(tuples, t) {
      tuples.push (['$' + show (tuples.length + 1), K ([]), t]);
      return tuples;
    }, [], types);

    function format(outer, inner) {
      return when (tuples.length !== 2)
                  (parenthesize (outer))
                  (joinWith (outer (', '),
                             Z.map (function(tuple) {
                               return when (tuple[2].type === FUNCTION)
                                           (parenthesize (outer))
                                           (inner (tuple[0])
                                                  (show (tuple[2])));
                             }, init (tuples)))) +
             outer (' -> ') +
             inner ((last (tuples))[0])
                   (show ((last (tuples))[2]));
    }

    return _Type (FUNCTION,
                  '',
                  '',
                  types.length,
                  format,
                  [AnyFunction],
                  K (K (true)),
                  tuples);
  }
1280444
function computeTopLevelExpressions(ast) {
        var exprDepth = 0;
        var exprDepthStack = [];
        var topLevelExprs = [];
        var visitorIdentifyTopLevelExprPre = {
            "CallExpression":function (node) {
                if (node.callee.type === 'MemberExpression' &&
                    node.callee.object.type === 'Identifier' &&
                    node.callee.object.name === JALANGI_VAR) {
                    var funName = node.callee.property.name;
                    if ((exprDepth === 0 &&
                        (funName === 'A' ||
                            funName === 'P' ||
                            funName === 'G' ||
                            funName === 'R' ||
                            funName === 'W' ||
                            funName === 'H' ||
                            funName === 'T' ||
                            funName === 'Rt' ||
                            funName === 'B' ||
                            funName === 'U' ||
                            funName === 'C' ||
                            funName === 'C1' ||
                            funName === 'C2'
                            )) ||
                        (exprDepth === 1 &&
                            (funName === 'F' ||
                                funName === 'M'))) {
                        topLevelExprs.push(node.arguments[0].value);
                    }
                    exprDepth++;
                } else if (node.callee.type === 'CallExpression' &&
                    node.callee.callee.type === 'MemberExpression' &&
                    node.callee.callee.object.type === 'Identifier' &&
                    node.callee.callee.object.name === JALANGI_VAR &&
                    (node.callee.callee.property.name === 'F' ||
                        node.callee.callee.property.name === 'M')) {
                    exprDepth++;
                }
            },
            "FunctionExpression":function (node, context) {
                exprDepthStack.push(exprDepth);
                exprDepth = 0;
            },
            "FunctionDeclaration":function (node) {
                exprDepthStack.push(exprDepth);
                exprDepth = 0;
            }

        };

        var visitorIdentifyTopLevelExprPost = {
            "CallExpression":function (node) {
                if (node.callee.type === 'MemberExpression' &&
                    node.callee.object.type === 'Identifier' &&
                    node.callee.object.name === JALANGI_VAR) {
                    exprDepth--;
                } else if (node.callee.type === 'CallExpression' &&
                    node.callee.callee.type === 'MemberExpression' &&
                    node.callee.callee.object.type === 'Identifier' &&
                    node.callee.callee.object.name === JALANGI_VAR &&
                    (node.callee.callee.property.name === 'F' ||
                        node.callee.callee.property.name === 'M')) {
                    exprDepth--;
                }
                return node;
            },
            "FunctionExpression":function (node, context) {
                exprDepth = exprDepthStack.pop();
                return node;
            },
            "FunctionDeclaration":function (node) {
                exprDepth = exprDepthStack.pop();
                return node;
            }
        };
        transformAst(ast, visitorIdentifyTopLevelExprPost, visitorIdentifyTopLevelExprPre, CONTEXT.RHS);
        return topLevelExprs;
    }
392544
public void visitTopLevel(JCCompilationUnit tree) {
        tree.pid = translate(tree.pid);
        tree.defs = translate(tree.defs);
        result = tree;
    }
539835
function nextLevel(selection, data) {
    if (!selection.select('.childlist').size()) {
      selection.append('ul')
        .classed('childlist', true)
        .style('list-style-type', 'none');
    }
    const items = selection.select('.childlist')
      .selectAll('li')
        .data(data, keyDef);
    items.exit().remove();
    items.enter()
      .append('li')
        .each(function (d) {
          d3.select(this).call(nodeEnterFactory, d.data);
        })
      .merge(items)
        .each(function (d) {
          const node = d3.select(this);
          node.call(nodeMergeFactory, d.data);
          if (d.hasOwnProperty('children')) {
            node.call(nextLevel, d.children)
              .select('.arrow')
                .text(d => d.depth - 1 >= defaultLevel ? '▶ ' : '▼ ')
                .on('click', function () {  // Collapse on click
                  const childList = node.select('.childlist');
                  const expanded = childList.style('display') !== 'none';
                  d3.select(this).text(expanded ? '▶ ' : '▼ ');
                  childList.style('display', expanded ? 'none' : 'inherit');
                });
            node.select('.childlist')
                .style('display',
                  d => d.depth - 1 >= defaultLevel ? 'none' : 'inherit');
          } else {
            node.select('.childlist').remove();
          }
        });
  }
747236
function above (_super) {
    return function (n) {
      if ('undefined' !== typeof this._obj.__spy) {
        new Assertion(this._obj).to.be.spy;

        this.assert(
            this._obj.__spy.calls.length > n
          , 'expected ' + this._obj + ' to have been called more than #{exp} times but got #{act}'
          , 'expected ' + this._obj + ' to have been called at most #{exp} times but got #{act}'
          , n
          , this._obj.__spy.calls.length
        );
      } else {
        _super.apply(this, arguments);
      }
    }
  }
297768
def top_level
      @top_level ||= begin
        t = toplevel_listeners.first
        t.controller ? t.controller : t if t
      end
    end
1308396
function display_body(body, is_toplevel, output) {
        var last = body.length - 1;
        body.forEach(function(stmt, i){
            if (!(stmt instanceof AST_EmptyStatement)) {
                output.indent();
                stmt.print(output);
                if (!(i == last && is_toplevel)) {
                    output.newline();
                    if (is_toplevel) output.newline();
                }
            }
        });
    }
79964
function inherits(subClass, superClass) {
  // if (typeof superClass !== "function" && superClass !== null) {
  //   throw new TypeError(
  //     "Super expression must either be null or a function, not " +
  //       typeof superClass
  //   );
  // }
  subClass.prototype = Object.create(superClass && superClass.prototype, {
    constructor: {
      value: subClass,
      enumerable: false,
      writable: true,
      configurable: true,
    },
  });
  // if (superClass)
  //   Object.setPrototypeOf
  //     ? Object.setPrototypeOf(subClass, superClass)
  //     : (subClass.__proto__ = superClass);
}
923766
static function get_global_level () {
		$e = 0;
		$types = array_keys( self::$stack );
		foreach( $types as $t ) {
			$e |= $t;
		}
		return $e;
	}
288486
function nest(t, x, node, func, end) {
        x.stmtStack.push(node);
        var n = func(t, x);
        x.stmtStack.pop();
        end && t.mustMatch(end);
        return n;
    }
288373
function applyStack(chain, stack) {
			// console.log("apply stack ", stack)
			var stacki = stack[0],
				i = 0,
				tmp,
				topSheets = [];
			while (stacki) {
				tmp = [];
				while (stacki && !stacki._deep_sheet_ && typeof stacki !== 'function') {
					if (stacki._transformations)
						topSheets = topSheets.concat(stacki._transformations);
					tmp.unshift(stacki);
					stacki = stack[++i];
				}
				if (tmp.length > 0) {
					chain.done(function(entry) {
						// console.log("apply stack will apply non sheets", tmp, " on ", entry.path, entry.value)
						entry.value = compiler.upFromArgs(entry.value, tmp, {
							excludeGrounds: true
						});
						return entry;
					});
				}
				if (!stacki)
					break;
				var sheets = [];
				while (stacki && (stacki._deep_sheet_ || typeof stacki === 'function')) {
					sheets.push(stacki);
					stacki = stack[++i];
				}
				chain.done(function(entry) {
					var s = entry.value;
					if (!s || !sheets.length)
						return entry;
					this.done(function(res) {
						if (res)
							if (res._deep_query_node_)
								entry.value = res.value;
							else
								entry.value = res;
						return entry;
					})
					sheets.unshift(entry);
					return nodes.sheet.apply(nodes, sheets);
				});
				//.log("flatten applyStack done")
			}
			return topSheets;
		}
1350854
function toplevel (text) {
  var state = 0;
  var bracecount = 0;
  var section = new TopLevel ();
  for (var i = 0;  i < text.length;  i++) {
    if (state === 0) {
      // Toplevel.
      if (text[i] === '{' && text[i+1] && text[i+1] === '{') {
        if (text[i+2] !== '[') {
          // The trigger matches; we enter a control zone.
          //
          //   outer {{ control zone }} outer
          //         ^-----------------^
          section.zone = new ControlZone ();
          section.zone.from = i;
          state = 1;
          i += 1;     // Counting the for loop, i will be just after the curly.
        } else {
          // This is an escape.
          // {{[ needs to be converted to {{.
          section.escapes.push (i, i + 3, 0);
          i += 2;     // Counting the for loop, i will be just after the [.
        }
      } else if (text[i] === ']' && text[i+1] && text[i+1] === '}'
          && text[i+2] && text[i+2] === '}') {
        // This is an escape.
        // ]}} needs to be converted to }}.
        section.escapes.push (i, i + 3, 1);
        i += 2;     // Counting the for loop, i will be just after the curly.
      }
    } else if (state === 1) {
      // Inside the control zone.
      if (text[i] === '}' && text[i+1] && text[i+1] === '}') {
        if (bracecount > 0) {
          bracecount -= 1;
          i += 1;
        } else {
          // We leave the control zone.
          section.zone.to = i + 2;
          return section;
        }
      } else if (text[i] === ']' && text[i+1] && text[i+1] == '}'
          && text[i+2] && text[i+2] === '}') {
        // This is an escape.
        // ]}} needs to be converted to }}.
        section.zone.escapes.push (i, i + 3, 1);
        i += 2;
      } else if (text[i] === '{' && text[i+1] && text[i+1] == '{') {
        // Opening a subsection.
        if (text[i+2] && text[i+2] !== '[') {
          bracecount += 1;
          i += 1;
        } else {
          // This is an escape.
          // {{[ needs to be converted to {{.
          section.zone.escapes.push (i, i + 3, 0);
          i += 2;
        }
      }
    }
  }
  return section;
}
889705
function topLevelNodeAt(node, top) {
    while (node && node.parentNode != top)
      node = node.parentNode;
    return node;
  }
1332042
function() {
      this.haveTopLevelSlicesBeenBuilt = true;
      this.createSubSlicesImpl_();
      if (this.parentContainer.timeSlices)
        this.addCpuTimeToSubslices_(this.parentContainer.timeSlices);
      this.slices.forEach(function(slice) {
        var selfTime = slice.duration;
        for (var i = 0; i < slice.subSlices.length; i++)
          selfTime -= slice.subSlices[i].duration;
        slice.selfTime = selfTime;

        if (slice.cpuDuration === undefined)
          return;

        var cpuSelfTime = slice.cpuDuration;
        for (var i = 0; i < slice.subSlices.length; i++) {
          if (slice.subSlices[i].cpuDuration !== undefined)
            cpuSelfTime -= slice.subSlices[i].cpuDuration;
        }
        slice.cpuSelfTime = cpuSelfTime;
      });
    }
1191438
function(child, parent) {
  var ctor = function(){ };
  ctor.prototype = parent.prototype;
  child.__super__ = parent.prototype;
  child.prototype = new ctor();
  child.prototype.constructor = child;
  child.fn = child.prototype
}
797171
function processFunction(funcNode) {
            const node = isEmbedded(funcNode) ? funcNode.parent : funcNode;

            if (!IIFEs && isIIFE(node)) {
                return;
            }
            let lineCount = 0;

            for (let i = node.loc.start.line - 1; i < node.loc.end.line; ++i) {
                const line = lines[i];

                if (skipComments) {
                    if (commentLineNumbers.has(i + 1) && isFullLineComment(line, i + 1, commentLineNumbers.get(i + 1))) {
                        continue;
                    }
                }

                if (skipBlankLines) {
                    if (line.match(/^\s*$/u)) {
                        continue;
                    }
                }

                lineCount++;
            }

            if (lineCount > maxLines) {
                const name = astUtils.getFunctionNameWithKind(funcNode);

                context.report({
                    node,
                    messageId: "exceed",
                    data: { name, lineCount, maxLines }
                });
            }
        }