Package org.renjin.gcc.gimple

Examples of org.renjin.gcc.gimple.GimpleCompilationUnit


    List<GimpleCompilationUnit> units = Lists.newArrayList();

    for (String sourceName : sources) {
      File source = new File(getClass().getResource(sourceName).getFile());
      GimpleCompilationUnit unit = gcc.compileToGimple(source);

      CallingConvention callingConvention = CallingConventions.fromFile(source);
      for (GimpleFunction function : unit.getFunctions()) {
        function.setCallingConvention(callingConvention);
      }
      units.add(unit);
    }
View Full Code Here


      gcc.extractPlugin();
      gcc.addIncludeDirectory(unpackIncludes());
      gcc.setGimpleOutputDir(gimpleDirectory);

      for(File sourceFile : sources) {
        GimpleCompilationUnit unit;
        try {
          unit = gcc.compileToGimple(sourceFile, "-std=gnu99");
        } catch(Exception e) {
          throw new GccException("Error compiling " + sourceFile + " to gimple: " + e.getMessage(), e);
        }
View Full Code Here

    LOGGER.info("Executing " + Joiner.on(" ").join(arguments));

    callGcc(arguments);

    GimpleParser parser = new GimpleParser();
    GimpleCompilationUnit unit = parser.parse(gimpleFile);
    for(GimpleFunction fn: unit.getFunctions()) {
      fn.setCallingConvention(CallingConventions.fromFile(source));
    }
    return unit;
  }
View Full Code Here

  @Test
  public void fortranArray() throws Exception {

    GimpleParser parser = new GimpleParser();
    GimpleCompilationUnit unit = parser.parse(getClass().getResource("2darray.f.gcc.4.7.2.gimple"));
    for(GimpleFunction fn : unit.getFunctions()) {
      fn.setCallingConvention(new F77CallingConvention());
    }

    Class clazz = compileGimple("org.renjin.gcc.ArrayTestGcc472", Arrays.asList(unit));
View Full Code Here

TOP

Related Classes of org.renjin.gcc.gimple.GimpleCompilationUnit

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.