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

Method getGlobals

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

Returns an immutable mapping containing the global variables of this module. The bindings are returned in a deterministic order (for a given sequence of initial values and updates).

()

Source from the content-addressed store, hash-verified

208 * and updates).
209 */
210 public ImmutableMap<String, Object> getGlobals() {
211 int n = globalIndex.size();
212 ImmutableMap.Builder<String, Object> m = ImmutableMap.builderWithExpectedSize(n);
213 for (Map.Entry<String, Integer> e : globalIndex.entrySet()) {
214 Object v = getGlobalByIndex(e.getValue());
215 if (v != null) {
216 m.put(e.getKey(), v);
217 }
218 }
219 return m.buildOrThrow();
220 }
221
222 /** Implements the resolver's module interface. */
223 @Override

Callers 4

mainMethod · 0.95
execLoadMethod · 0.95
execFileProgramMethod · 0.45
newExprFunctionMethod · 0.45

Calls 6

getGlobalByIndexMethod · 0.95
getValueMethod · 0.65
sizeMethod · 0.45
entrySetMethod · 0.45
putMethod · 0.45
getKeyMethod · 0.45

Tested by 1

mainMethod · 0.76