Package org.renjin.gcc.jimple

Examples of org.renjin.gcc.jimple.JimpleType


      return new ObjectMarshaller(type);
    }
  }

  public static JimpleExpr marshallReturnValue(FunctionContext context, ImExpr returnValue) {
    JimpleType returnType = context.getBuilder().getReturnType();
    return marshall(context, returnValue, returnType);
  }
View Full Code Here


    return null;
  }

  private MethodRef asRef(GimpleFunction function) {
   
    JimpleType returnType;
    if(function.getReturnType() instanceof GimpleVoidType) {
      returnType = JimpleType.VOID;
    } else {
      returnType = resolveType(function.getReturnType()).returnType();
    }
View Full Code Here

  public FunPtrTable(TranslationContext context) {
    this.context = context;
  }

  public ImFunctionType resolveFunctionType(GimpleFunctionType type) {
    JimpleType returnType = context.resolveType(type.getReturnType()).returnType();
    List<JimpleType> paramTypes = Lists.newArrayList();
    for (GimpleType paramType : type.getArgumentTypes()) {
      paramTypes.add(context.resolveType(paramType).paramType());
    }
    return new ImFunctionType(returnType, paramTypes);
View Full Code Here

public class PtrWrapperUtils {

  public static JimpleExpr wrapPointer(FunctionContext context, ImIndirectExpr ptr) {
    ArrayRef ref = ptr.translateToArrayRef(context);
    JimpleType wrapperType = ptr.type().getWrapperType();

    String tempWrapper = context.declareTemp(wrapperType);
    context.getBuilder().addStatement(tempWrapper + " = new " + wrapperType);
    context.getBuilder().addStatement(
        "specialinvoke " + tempWrapper + ".<" + wrapperType + ": void <init>("
View Full Code Here

      return ImFunctionExpr.this;
    }

    @Override
    public JimpleExpr invokerReference(FunctionContext context) {
      JimpleType invokerType = context.getTranslationContext().getInvokerType(getMethodRef());
      String ptr = context.declareTemp(invokerType);
      context.getBuilder().addStatement(ptr + " = new " + invokerType);
      context.getBuilder().addStatement("specialinvoke " + ptr + ".<" + invokerType + ": void <init>()>()");
      return new JimpleExpr(ptr);
    }
View Full Code Here

TOP

Related Classes of org.renjin.gcc.jimple.JimpleType

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.