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

Class StaticInvokeExpr

src/jvm/clojure/lang/Compiler.java:3976–4126  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

3974}
3975
3976static class StaticInvokeExpr implements Expr, MaybePrimitiveExpr{
3977 public final Type target;
3978 public final Class retClass;
3979 public final Class[] paramclasses;
3980 public final Type[] paramtypes;
3981 public final IPersistentVector args;
3982 public final boolean variadic;
3983 public final boolean tailPosition;
3984 public final Object tag;
3985 Class jc;
3986
3987 StaticInvokeExpr(Type target, Class retClass, Class[] paramclasses, Type[] paramtypes, boolean variadic,
3988 IPersistentVector args,Object tag, boolean tailPosition){
3989 this.target = target;
3990 this.retClass = retClass;
3991 this.paramclasses = paramclasses;
3992 this.paramtypes = paramtypes;
3993 this.args = args;
3994 this.variadic = variadic;
3995 this.tailPosition = tailPosition;
3996 this.tag = tag;
3997 }
3998
3999 public Object eval() {
4000 throw new UnsupportedOperationException("Can't eval StaticInvokeExpr");
4001 }
4002
4003 public void emit(C context, ObjExpr objx, GeneratorAdapter gen){
4004 emitUnboxed(context, objx, gen);
4005 if(context != C.STATEMENT)
4006 HostExpr.emitBoxReturn(objx,gen,retClass);
4007 if(context == C.STATEMENT)
4008 {
4009 if(retClass == long.class || retClass == double.class)
4010 gen.pop2();
4011 else
4012 gen.pop();
4013 }
4014 }
4015
4016 public boolean hasJavaClass() {
4017 return true;
4018 }
4019
4020 public Class getJavaClass() {
4021 if(jc == null)
4022 jc =retType((tag!=null)?HostExpr.tagToClass(tag):null, retClass);
4023 return jc;
4024 }
4025
4026 public boolean canEmitPrimitive(){
4027 return retClass.isPrimitive();
4028 }
4029
4030 public void emitUnboxed(C context, ObjExpr objx, GeneratorAdapter gen){
4031 Method ms = new Method("invokeStatic", getReturnType(), paramtypes);
4032 if(variadic)
4033 {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected