MCPcopy Index your code
hub / github.com/clojure/clojure / pushThreadBindings

Method pushThreadBindings

src/jvm/clojure/lang/Var.java:319–333  ·  view source on GitHub ↗
(Associative bindings)

Source from the content-addressed store, hash-verified

317}
318
319public static void pushThreadBindings(Associative bindings){
320 Frame f = dvals.get();
321 Associative bmap = f.bindings;
322 for(ISeq bs = bindings.seq(); bs != null; bs = bs.next())
323 {
324 IMapEntry e = (IMapEntry) bs.first();
325 Var v = (Var) e.key();
326 if(!v.dynamic)
327 throw new IllegalStateException(String.format("Can't dynamically bind non-dynamic var: %s/%s", v.ns, v.sym));
328 v.validate(v.getValidator(), e.val());
329 v.threadBound.set(true);
330 bmap = bmap.assoc(v, new TBox(Thread.currentThread(), e.val()));
331 }
332 dvals.set(new Frame(bmap, f));
333}
334
335public static void popThreadBindings(){
336 Frame f = dvals.get().prev;

Callers 15

mainMethod · 0.95
parseMethod · 0.95
parseMethod · 0.95
parseMethod · 0.95
emitConstantsMethod · 0.95
parseMethod · 0.95
doEmitStaticMethod · 0.95
doEmitPrimMethod · 0.95
doEmitMethod · 0.95
emitMethod · 0.95
parseMethod · 0.95
parseMethod · 0.95

Calls 11

nextMethod · 0.95
firstMethod · 0.95
keyMethod · 0.95
valMethod · 0.95
assocMethod · 0.95
formatMethod · 0.80
validateMethod · 0.80
getMethod · 0.65
seqMethod · 0.65
getValidatorMethod · 0.65
setMethod · 0.45

Tested by

no test coverage detected