Examples of GimpleCompiler


Examples of org.renjin.gcc.GimpleCompiler

      }
     
      File jimpleOutput = new File("target/jimple");
      jimpleOutput.mkdirs();

      GimpleCompiler compiler = new GimpleCompiler();
      compiler.setJimpleOutputDirectory(jimpleDirectory);
      compiler.setOutputDirectory(outputDirectory);
   
      compiler.setPackageName(packageName);
      compiler.setClassName(className);
      compiler.addSootClassPaths(classPaths);
      compiler.setVerbose(verbose);

      compiler.getMethodTable().addMathLibrary();

      compiler.getMethodTable().addCallTranslator(new RallocTranslator());

      compiler.getMethodTable().addReferenceClass(Class.forName("org.renjin.appl.Appl"));

      Class distributionsClass = Class.forName("org.renjin.stats.internals.Distributions");
      compiler.getMethodTable().addReferenceClass(distributionsClass);
      compiler.getMethodTable().addMethod("Rf_dbeta",distributionsClass,"dbeta");
      compiler.getMethodTable().addMethod("Rf_pbeta",distributionsClass,"pbeta");

      compiler.getMethodTable().addReferenceClass(RenjinCApi.class);
      compiler.getMethodTable().addReferenceClass(Sort.class);

      compiler.provideType("SEXP_T", new SimpleRecordType(new RealJimpleType(GnuSEXP.class)));

      compiler.compile(units);
    }
  }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.