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

Method eval

src/jvm/clojure/lang/Compiler.java:2228–2249  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

2226 }
2227
2228 public Object eval() {
2229 try
2230 {
2231 Object[] argvals = new Object[args.count()];
2232 for(int i = 0; i < args.count(); i++)
2233 argvals[i] = ((Expr) args.nth(i)).eval();
2234 if(method != null)
2235 {
2236 LinkedList ms = new LinkedList();
2237 ms.add(method);
2238 return Reflector.invokeMatchingMethod(methodName, ms, null, argvals);
2239 }
2240 return Reflector.invokeStaticMethod(c, methodName, argvals);
2241 }
2242 catch(Throwable e)
2243 {
2244 if(!(e instanceof CompilerException))
2245 throw new CompilerException(source, line, column, null, CompilerException.PHASE_EXECUTION, e);
2246 else
2247 throw (CompilerException) e;
2248 }
2249 }
2250
2251 public boolean canEmitPrimitive(){
2252 return method != null && Util.isPrimitive(method.getReturnType());

Callers

nothing calls this directly

Calls 6

invokeMatchingMethodMethod · 0.95
invokeStaticMethodMethod · 0.95
countMethod · 0.65
evalMethod · 0.65
nthMethod · 0.65
addMethod · 0.65

Tested by

no test coverage detected