Examples of JimpleExpr


Examples of org.renjin.gcc.jimple.JimpleExpr

    public JimpleExpr translateToPrimitive(FunctionContext context, ImPrimitiveType type) {
      return elementRefExpr(context);
    }

    private JimpleExpr elementRefExpr(FunctionContext context) {
      JimpleExpr tempIndex = computeIndex(context);
      return new JimpleExpr(name + "[" + tempIndex + "]");
    }
View Full Code Here

Examples of org.renjin.gcc.jimple.JimpleExpr

      return PrimitiveArrayExpr.this.type().componentType();
    }

    @Override
    public void writeAssignment(FunctionContext context, ImExpr rhs) {
      JimpleExpr jimpleRhs = rhs.translateToPrimitive(context, type.componentType());
      context.getBuilder().addAssignment(elementRefExpr(context), jimpleRhs);
    }
View Full Code Here

Examples of org.renjin.gcc.jimple.JimpleExpr

      this.index = index;
    }

    @Override
    public ArrayRef translateToArrayRef(FunctionContext context) {
      JimpleExpr jimpleIndex = index.translateToPrimitive(context, ImPrimitiveType.INT);
      return new ArrayRef(name, jimpleIndex);
    }
View Full Code Here

Examples of org.renjin.gcc.jimple.JimpleExpr

          ((ImFunctionPtrExpr) rhs).invokerReference(context));
    }
  }

  public JimpleExpr getJimpleVariable() {
    return new JimpleExpr(jimpleName);
  }
View Full Code Here

Examples of org.renjin.gcc.jimple.JimpleExpr

    return new JimpleExpr(jimpleName);
  }

  @Override
  public JimpleExpr invokerReference(FunctionContext context) {
    return new JimpleExpr(jimpleName);
  }
View Full Code Here

Examples of org.renjin.gcc.jimple.JimpleExpr

   
    ImPrimitivePtrType type = (ImPrimitivePtrType)lhs.type();

    checkSize(type, size);

    JimpleExpr elementCount = context.resolveExpr(n).translateToPrimitive(context, ImPrimitiveType.INT);
    lhs.writeAssignment(context, new NewArrayExpr(type, elementCount));
  }
View Full Code Here

Examples of org.renjin.gcc.jimple.JimpleExpr

  public void translate(GimpleConditional conditional) {
    Comparison comparison = new Comparison(conditional.getOperator(),
        context.resolveExpr(conditional.getOperands().get(0)),
        context.resolveExpr(conditional.getOperands().get(1)));
       
    JimpleExpr condition = comparison.toCondition(context);
   
    context.getBuilder().addStatement(
        "if " + condition + " goto "
            + label(conditional.getTrueLabel()));
    context.getBuilder().addStatement(new JimpleGoto(label(conditional.getFalseLabel())));
View Full Code Here

Examples of org.renjin.gcc.jimple.JimpleExpr

    context.getBuilder().addStatement(tempWrapper + " = new " + wrapperType);
    context.getBuilder().addStatement(
        "specialinvoke " + tempWrapper + ".<" + wrapperType + ": void <init>("
            + ptr.type().getArrayType() + ", int)>(" + ref.getArrayExpr() + ", " + ref.getIndexExpr() + ")");

    return new JimpleExpr(tempWrapper);
  }
View Full Code Here

Examples of org.renjin.gcc.jimple.JimpleExpr

    return new ArrayRef(backingArray(), backingArrayIndex());
  }


  private JimpleExpr backingArray() {
    return new JimpleExpr(expr + ".<" + wrapperType + ": " + arrayType + " array>");
  }
View Full Code Here

Examples of org.renjin.gcc.jimple.JimpleExpr

  private JimpleExpr backingArray() {
    return new JimpleExpr(expr + ".<" + wrapperType + ": " + arrayType + " array>");
  }

  private JimpleExpr backingArrayIndex() {
    return new JimpleExpr(expr + ".<" + wrapperType + ": int offset>");
  }
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.