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

Method assignIdentifier

src/main/java/net/starlark/java/eval/Eval.java:365–380  ·  view source on GitHub ↗
(StarlarkThread.Frame fr, Identifier id, Object value)

Source from the content-addressed store, hash-verified

363 }
364
365 private static void assignIdentifier(StarlarkThread.Frame fr, Identifier id, Object value) {
366 Resolver.Binding bind = id.getBinding();
367 switch (bind.getScope()) {
368 case LOCAL:
369 fr.locals[bind.getIndex()] = value;
370 break;
371 case CELL:
372 ((StarlarkFunction.Cell) fr.locals[bind.getIndex()]).x = value;
373 break;
374 case GLOBAL:
375 fn(fr).setGlobal(bind.getIndex(), value);
376 break;
377 default:
378 throw new IllegalStateException(bind.getScope().toString());
379 }
380 }
381
382 /**
383 * Recursively assigns an iterable value to a non-empty sequence of assignable expressions. Might

Callers 4

execLoadMethod · 0.95
execMethod · 0.95
assignMethod · 0.95

Calls 6

fnMethod · 0.95
getBindingMethod · 0.80
getScopeMethod · 0.80
getIndexMethod · 0.65
setGlobalMethod · 0.45
toStringMethod · 0.45

Tested by

no test coverage detected