Package org.openquark.cal.internal.machine

Examples of org.openquark.cal.internal.machine.CodeGenerationException


     */
    private static Class<?> getInstanceOfType(final ForeignFunctionInfo.InstanceOf foreignFunctionInfo) throws CodeGenerationException {
        try {
            return foreignFunctionInfo.getInstanceOfType();
        } catch (UnableToResolveForeignEntityException e) {
            throw new CodeGenerationException("Failed to resolve foreign type for foreign instanceof function.", e);
        }
    }
View Full Code Here


     */
    private static Class<?> getInvocationClass(final ForeignFunctionInfo.Invocation foreignFunctionInfo) throws CodeGenerationException {
        try {
            return foreignFunctionInfo.getInvocationClass();
        } catch (UnableToResolveForeignEntityException e) {
            throw new CodeGenerationException("Failed to resolve foreign type containing foreign method, field, or constructor.", e);
        }
    }
View Full Code Here

     */
    private static Class<?> getJavaArgumentType(final ForeignFunctionInfo foreignFunctionInfo, int argN) throws CodeGenerationException {
        try {
            return foreignFunctionInfo.getJavaArgumentType(argN);
        } catch (UnableToResolveForeignEntityException e) {
            throw new CodeGenerationException("Failed to resolve foreign argument type for foreign function.", e);
        }
    }
View Full Code Here

     */
    private static AccessibleObject getJavaProxy(final ForeignFunctionInfo.Invocation foreignFunctionInfo) throws CodeGenerationException {
        try {
            return foreignFunctionInfo.getJavaProxy();
        } catch (UnableToResolveForeignEntityException e) {
            throw new CodeGenerationException("Failed to resolve foreign method, field, or constructor.", e);
        }
    }
View Full Code Here

     */
    private static Class<?> getJavaReturnType(final ForeignFunctionInfo foreignFunctionInfo) throws CodeGenerationException {
        try {
            return foreignFunctionInfo.getJavaReturnType();
        } catch (UnableToResolveForeignEntityException e) {
            throw new CodeGenerationException("Failed to resolve foreign return type for foreign function.", e);
        }
    }
View Full Code Here

     */
    private static int getNArguments(final ForeignFunctionInfo foreignFunctionInfo) throws CodeGenerationException {
        try {
            return foreignFunctionInfo.getNArguments();
        } catch (UnableToResolveForeignEntityException e) {
            throw new CodeGenerationException("Failed to resolve foreign method, field, or constructor.", e);
        }
    }
View Full Code Here

     */
    private static Class<?> getCastType(final Expression.Cast castExpression) throws CodeGenerationException {
        try {
            return castExpression.getCastType();
        } catch (UnableToResolveForeignEntityException e) {
            throw new CodeGenerationException("Failed to resolve foreign type for Expression.Cast.", e);
        }
    }
View Full Code Here

     */
    private static Class<?> getReferentType(final ForeignFunctionInfo.ClassLiteral foreignFunctionInfo) throws CodeGenerationException {
        try {
            return foreignFunctionInfo.getReferentType();
        } catch (UnableToResolveForeignEntityException e) {
            throw new CodeGenerationException("Failed to resolve foreign class literal.", e);
        }
    }
View Full Code Here

                constructorExpression =  new ClassInstanceCreationExpression(JavaTypeName.BIG_INTEGER,
                                                                             LiteralWrapper.make(literal.toString()),
                                                                             JavaTypeName.STRING);
                proposedIdent = literal.toString();
            } else {
                throw new CodeGenerationException ("Unknown literal type: " + literal.toString());
            }

            suggestedIdent = General.validJavaIdentifier(proposedIdent, false, 32);

            String kernelTypeString = CALToJavaNames.fixupClassName(kernelTypeClass.getName());
View Full Code Here

                String javaName = info.getJavaName();

                if (info instanceof VarInfo.LetRec) {
                    JavaExpression boxedVarDef = ((VarInfo.LetRec)info).getLazyVarDef();
                    if (boxedVarDef == null) {
                        throw new CodeGenerationException ("Missing boxed definition for let variable: " + info.getCALName());
                    }

                    LocalVariable letNameVariable = new LocalVariable(javaName, JavaTypeNames.RTINDIRECTION);

                    // RTValue javaName = new RTIndirection();
View Full Code Here

TOP

Related Classes of org.openquark.cal.internal.machine.CodeGenerationException

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.