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

Method isInline

src/jvm/clojure/lang/Compiler.java:7501–7522  ·  view source on GitHub ↗
(Object op, int arity)

Source from the content-addressed store, hash-verified

7499}
7500
7501static 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
7524public static boolean namesStaticMember(Symbol sym){
7525 return sym.ns != null && namespaceFor(sym) == null;

Callers 1

analyzeSeqMethod · 0.95

Calls 8

referenceLocalMethod · 0.95
lookupVarMethod · 0.95
currentNSMethod · 0.95
isPublicMethod · 0.95
getMethod · 0.95
booleanCastMethod · 0.95
invokeMethod · 0.95
metaMethod · 0.65

Tested by

no test coverage detected