(Associative bindings)
| 317 | } |
| 318 | |
| 319 | public 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 | |
| 335 | public static void popThreadBindings(){ |
| 336 | Frame f = dvals.get().prev; |
no test coverage detected