MCPcopy Index your code
hub / github.com/bazelbuild/bazel / getGlobal

Method getGlobal

src/main/java/net/starlark/java/eval/Module.java:258–262  ·  view source on GitHub ↗

Returns the value of the specified global variable, or null if not bound. Does not look in the predeclared environment.

(String name)

Source from the content-addressed store, hash-verified

256 * predeclared environment.
257 */
258 @Nullable
259 public Object getGlobal(String name) {
260 Integer i = globalIndex.get(name);
261 return i != null ? globals[i] : null;
262 }
263
264 /**
265 * Sets the value of a global variable based on its index in this module ({@see

Callers 8

testExecMethod · 0.95
testTopLevelRebindingMethod · 0.95
execLoadMethod · 0.95
lookupMethod · 0.45
execStatementsMethod · 0.45
evalIdentifierMethod · 0.45

Calls 1

getMethod · 0.65

Tested by 5

testExecMethod · 0.76
testTopLevelRebindingMethod · 0.76
lookupMethod · 0.36