(Object op, int arity)
| 7499 | } |
| 7500 | |
| 7501 | static public IFn isInline(Object op, int arity) { |
| 7502 | //no local inlines for now |
| 7503 | if(op instanceof Symbol && referenceLocal((Symbol) op) != null) |
| 7504 | return null; |
| 7505 | if(op instanceof Symbol || op instanceof Var) |
| 7506 | { |
| 7507 | Var v = (op instanceof Var) ? (Var) op : lookupVar((Symbol) op, false); |
| 7508 | if(v != null) |
| 7509 | { |
| 7510 | if(v.ns != currentNS() && !v.isPublic()) |
| 7511 | throw new IllegalStateException("var: " + v + " is not public"); |
| 7512 | IFn ret = (IFn) RT.get(v.meta(), inlineKey); |
| 7513 | if(ret != null) |
| 7514 | { |
| 7515 | IFn arityPred = (IFn) RT.get(v.meta(), inlineAritiesKey); |
| 7516 | if(arityPred == null || RT.booleanCast(arityPred.invoke(arity))) |
| 7517 | return ret; |
| 7518 | } |
| 7519 | } |
| 7520 | } |
| 7521 | return null; |
| 7522 | } |
| 7523 | |
| 7524 | public static boolean namesStaticMember(Symbol sym){ |
| 7525 | return sym.ns != null && namespaceFor(sym) == null; |
no test coverage detected