Reports all accesses of `eval` (excludes direct calls to eval).

@param {eslint-scope.Scope} globalScope - The global scope.
@returns {void}
165328
function reportAccessingEval(globalScope) {
            const variable = astUtils.getVariableByName(globalScope, "eval");

            if (!variable) {
                return;
            }

            const references = variable.references;

            for (let i = 0; i < references.length; ++i) {
                const reference = references[i];
                const id = reference.identifier;

                if (id.name === "eval" && !astUtils.isCallee(id)) {

                    // Is accessing to eval (excludes direct calls to eval)
                    report(id);
                }
            }
        }
1289121
public Object eval(
        Reader in, NameSpace nameSpace, String sourceFileInfo
            /*, CallStack callstack */ )
        throws EvalError
    {
        Object retVal = null;
        Interpreter.debug("eval: nameSpace = ", nameSpace);

        /*
            Create non-interactive local interpreter for this namespace
            with source from the input stream and out/err same as
            this interpreter.
        */
        Interpreter localInterpreter = new Interpreter(
            in, getOut(), getErr(), false, nameSpace, this, sourceFileInfo  );
        CallStack callstack = new CallStack( nameSpace );

        SimpleNode node = null;
        boolean eof = false;
        while( !eof )
        {
            try
            {
                eof = localInterpreter.readLine();
                if (localInterpreter.get_jjtree().nodeArity() > 0)
                {
                    node = (SimpleNode)localInterpreter.get_jjtree().rootNode();
                    // nodes remember from where they were sourced
                    node.setSourceFile( sourceFileInfo );

                    if ( TRACE )
                        println( "// " +node.getText() );

                    retVal = node.eval( callstack, localInterpreter );

                    // sanity check during development
                    if ( callstack.depth() > 1 )
                        throw new InterpreterError(
                            "Callstack growing: "+callstack);

                    if ( retVal instanceof ReturnControl ) {
                        retVal = ((ReturnControl)retVal).value;
                        break; // non-interactive, return control now
                    }
                }
            } catch(ParseException e) {
                if ( DEBUG.get() )
                    // show extra "expecting..." info
                    error( e.getMessage(DEBUG.get()) );

                // add the source file info and throw again
                e.setErrorSourceFile( sourceFileInfo );
                throw e;
            } catch ( InterpreterError e ) {
                throw new EvalError(
                    "Sourced file: "+sourceFileInfo+" internal Error: "
                    + e.getMessage(), node, callstack, e);
            } catch ( TargetError e ) {
                // failsafe, set the Line as the origin of the error.
                if ( e.getNode()==null )
                    e.setNode( node );
                e.reThrow("Sourced file: "+sourceFileInfo);
            } catch ( EvalError e) {
                if ( DEBUG.get())
                    e.printStackTrace();
                // failsafe, set the Line as the origin of the error.
                if ( e.getNode()==null )
                    e.setNode( node );
                e.reThrow( "Sourced file: "+sourceFileInfo );
            } catch ( Exception e) {
                if ( DEBUG.get())
                    e.printStackTrace();
                throw new EvalError(
                    "Sourced file: "+sourceFileInfo+" unknown error: "
                    + e.getMessage(), node, callstack, e);
            } finally {
                localInterpreter.get_jjtree().reset();

                // reinit the callstack
                if ( callstack.depth() > 1 ) {
                    callstack.clear();
                    callstack.push( nameSpace );
                }
            }
        }
        return Primitive.unwrap( retVal );
    }
1072642
function getGlobalThis() {
    return t.callExpression(
      t.sequenceExpression([t.valueToNode(0), t.identifier("eval")]),
      [t.valueToNode("this")]
    );
  }
1220694
def evaluate_expression(dbg, frame, expression, is_exec):
    '''
    '''
    if frame is None:
        return

    # Not using frame.f_globals because of https://sourceforge.net/tracker2/?func=detail&aid=2541355&group_id=85796&atid=577329
    # (Names not resolved in generator expression in method)
    # See message: http://mail.python.org/pipermail/python-list/2009-January/526522.html
    updated_globals = {}
    updated_globals.update(frame.f_globals)
    updated_globals.update(frame.f_locals)  # locals later because it has precedence over the actual globals

    try:
        expression = str(expression.replace('@LINE@', '\n'))

        if is_exec:
            try:
                # try to make it an eval (if it is an eval we can print it, otherwise we'll exec it and
                # it will have whatever the user actually did)
                compiled = compile(expression, '<string>', 'eval')
            except:
                Exec(expression, updated_globals, frame.f_locals)
                pydevd_save_locals.save_locals(frame)
            else:
                result = eval(compiled, updated_globals, frame.f_locals)
                if result is not None:  # Only print if it's not None (as python does)
                    sys.stdout.write('%s\n' % (result,))
            return

        else:
            return eval_in_context(expression, updated_globals, frame.f_locals)
    finally:
        # Should not be kept alive if an exception happens and this frame is kept in the stack.
        del updated_globals
        del frame
1288264
private boolean isGlobalVarReference(String name, Scope s) {
    Var v = s.getVar(name);
    if (v == null && externsScope != null) {
      v = externsScope.getVar(name);
    }
    return v != null && !v.isLocal();
  }
121653
function globalEval(code) {
        var script;

        code = code.replace(/^\s+/, '').replace(/\s+$/, '');

        if (code) {
            if (code.indexOf('use strict') === 1) {
                script = document.createElement('script');
                script.text = code;
                head.appendChild(script).parentNode.removeChild(script);
            }
            else {
                eval(code);
            }
        }
    }
1087021
function() {

		try {

			for (var i = 0, count = this._debug_all_scopes.length; i < count; i++) {
				this._debug_all_scopes[i].debugAssertClean();
			}

		} catch (e) {

			Lava.logException(e);

		}

	}
690670
function makeGlobal(shouldDeprecate) {
        /*global ender:false */
        if (typeof ender !== 'undefined') {
            return;
        }
        oldGlobalMoment = globalScope.moment;
        if (shouldDeprecate) {
            globalScope.moment = deprecate(
                    "Accessing Moment through the global scope is " +
                    "deprecated, and will be removed in an upcoming " +
                    "release.",
                    moment);
        } else {
            globalScope.moment = moment;
        }
    }
219922
function evalIteration(result, context, node, vars) {
    var iter = new Ruleset(scopeSelector, vars),
        push = true;

    if (node.condition) {
        var frames = context.frames;
        iter.functionRegistry = frames[0].functionRegistry;
        // ^ fixme: dirty kludge, not sure if it's related 
        // to #3054 - maybe there's more mistery (needs research)
        frames.unshift(iter);
        push = node.condition.eval(context);
        frames.shift();
    }

    if (push) {
        pushArray.apply(iter.rules, node.rules);
        result.push(iter);
    }
}
648964
function main() {
	// TODO: move loading of inputs into main function
	check(lookupQType(typeDecl.global,[]), {key: snapshot.global}, '', false, null, '<global>');
	if (program.missing) {
		findSuggestions()
	}
	if (program.coverage) {
		printCoverage();
	}
	if (program.stats) {
		console.log("# heap objects = " + snapshot.heap.length)
		console.log("# call signatures = " + num_callsigs_analyzed)
	}
}
512725
function evalTasks (funcs, task) {
  /**
  * Evaluate a single task and inject it.
  *
  * @param {String} taskKey
  */

  function inject (taskKey) {
    var taskName = task[taskKey]

    try {
      var e = eval(taskName) // eslint-disable-line

      if (typeof e === 'function') {
        funcs[taskName] = e
      } else {
        funcs[taskName] = function () { return e }
      }
    } catch (err) {
      var msg = 'Task not compiled: ' + taskName + ' [' + taskKey + ']' + err
      throw new Error(msg)
    }
  }

  Object.keys(task)
    .filter(reserved(task))
    .filter(dflowDSL(task))
    .filter(alreadyDefined(funcs, task))
    .forEach(inject)
}
1008246
public static void onGlobalEnd ()
  {
    s_aGlobalLock.locked ( () -> {
      /**
       * This code removes all attributes set for the global context. This is
       * necessary, since the attributes would survive a Tomcat servlet context
       * reload if we don't kill them manually.<br>
       * Global scope variable may be null if onGlobalBegin() was never called!
       */
      if (s_aGlobalScope != null)
      {
        // Invoke SPI
        ScopeSPIManager.getInstance ().onGlobalScopeEnd (s_aGlobalScope);

        // Destroy and invalidate scope
        final String sDestroyedScopeID = s_aGlobalScope.getID ();
        s_aGlobalScope.destroyScope ();
        s_aGlobalScope = null;

        // done
        if (ScopeHelper.debugGlobalScopeLifeCycle (LOGGER))
          LOGGER.info ("Global scope '" + sDestroyedScopeID + "' shut down!", ScopeHelper.getDebugStackTrace ());
      }
      else
        LOGGER.warn ("No global scope present that could be shut down!");
    });
  }
1223891
function runInPage(code,callback,errorCallback){
  errorCallback = errorCallback || function(err){ alert(errorMessage+err); };
  chrome.devtools.inspectedWindow["eval"](
    code,
    function(result, isException) {
     if (isException)
       errorCallback(isException);
     else{
       callback(result);
     }
  });
}
537519
function Scope(node, parent, scope, state) {
    // check if this scope has a local binding that will shadow the rest parameter
    if (!scope.bindingIdentifierEquals(state.name, state.outerBinding)) {
      this.skip();
    }
  }
1133954
def for_scope(self, scope, inherit_from_enclosing_scope=True):
    

    # First get enclosing scope's option values, if any.
    if scope == GLOBAL_SCOPE or not inherit_from_enclosing_scope:
      values = OptionValueContainer()
    else:
      values = copy.copy(self.for_scope(enclosing_scope(scope)))

    # Now add our values.
    flags_in_scope = self._scope_to_flags.get(scope, [])
    self._parser_hierarchy.get_parser_by_scope(scope).parse_args(flags_in_scope, values)

    # Check for any deprecation conditions, which are evaluated using `self._flag_matchers`.
    if inherit_from_enclosing_scope:
      self._check_and_apply_deprecations(scope, values)

    return values
335612
def GLOBAL(self, node):
        
        global_scope_index = 1 if self._in_doctest() else 0
        global_scope = self.scopeStack[global_scope_index]

        # Ignore 'global' statement in global scope.
        if self.scope is not global_scope:

            # One 'global' statement can bind multiple (comma-delimited) names.
            for node_name in node.names:
                node_value = Assignment(node_name, node)

                # Remove UndefinedName messages already reported for this name.
                # TODO: if the global is not used in this scope, it does not
                # become a globally defined name.  See test_unused_global.
                self.messages = [
                    m for m in self.messages if not
                    isinstance(m, messages.UndefinedName) or
                    m.message_args[0] != node_name]

                # Bind name to global scope if it doesn't exist already.
                global_scope.setdefault(node_name, node_value)

                # Bind name to non-global scopes, but as already "used".
                node_value.used = (global_scope, node)
                for scope in self.scopeStack[global_scope_index + 1:]:
                    scope[node_name] = node_value
376569
function getEnclosingFunctionScope(scope) {
    let currentScope = scope;

    while (currentScope.type !== "function" && currentScope.type !== "global") {
        currentScope = currentScope.upper;
    }
    return currentScope;
}