raven-compiler/src/main/java/org/raven/compiler/Method.java
/**
     * Invoke a virtual function when the type and method is known.
     *
     * @param name   The name of the method
     * @param params The parameters
     * @param method The method handle
     */
Invoke a virtual function when the type and method is known.
@param name   The name of the method
@param params The parameters
@param method The method handle
Invoke a virtual function when the type and method is known . @param name The name of the method @param params The parameters @param method The method handle
private void invokeVirtualFun(final String name, final Expression[] params, final java.lang.reflect.Method method) {
        String desc = Type.getMethodDescriptor(method);
        Arrays.stream(params).forEach(expression -> expression.accept(this));
        visitMethodInsn(INVOKEVIRTUAL, Constants.TOBJ_NAME, name, desc, false);
        Primitive p = Primitive.getUnboxedPrimitive(method.getReturnType());
        if (p != null) {
            p.wrap(this);
        }
        if (!method.getReturnType().isAssignableFrom(TObject.class)) {
            visitMethodInsn(INVOKESTATIC, getName(Intrinsics.class), "wrap", getDesc(Intrinsics.class, "wrap", Object.class), false);
        }
    }
private void invokeVirtualFun ( final String name , final Expression [ ] params , final java . lang . reflect . Method method ) { String desc = Type . getMethodDescriptor ( method ) ; Arrays . stream ( params ) . forEach ( expression -> expression . accept ( this ) ) ; visitMethodInsn ( INVOKEVIRTUAL , Constants . TOBJ_NAME , name , desc , false ) ; Primitive p = Primitive . getUnboxedPrimitive ( method . getReturnType ( ) ) ; if ( p != null ) { p . wrap ( this ) ; } if ( ! method . getReturnType ( ) . isAssignableFrom ( TObject . class ) ) { visitMethodInsn ( INVOKESTATIC , getName ( Intrinsics . class ) , "wrap" , getDesc ( Intrinsics . class , "wrap" , Object . class ) , false ) ; } }
Invoke a virtual function when the type and method is known.
Invoke a virtual function when the type and method is known .