private void createFunctionsAndCallsites(Node jsRoot,
final DefinitionProvider provider) {
// Create fake function representing global execution
mainFunction = createFunction(jsRoot);
NodeTraversal.traverse(compiler, jsRoot, new AbstractPostOrderCallback() {
@Override
public void visit(NodeTraversal t, Node n, Node parent) {
int nodeType = n.getType();
if (nodeType == Token.CALL || nodeType == Token.NEW) {