Examples of JArrayRef


Examples of com.google.gwt.dev.jjs.ast.JArrayRef

    // @Override
    public boolean visit(JArrayRef x, Context ctx) {
      JExpression newInstance = possiblyReplace(x.getInstance());
      JExpression newIndexExpr = possiblyReplace(x.getIndexExpr());
      if (newInstance != x.getInstance() || newIndexExpr != x.getIndexExpr()) {
        JArrayRef newExpr = new JArrayRef(program, x.getSourceInfo(),
            newInstance, newIndexExpr);
        ctx.replaceMe(newExpr);
      }
      return false;
    }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JArrayRef

      JExpression instance = x.getInstance();
      if (instance.getType() == typeNull) {
        if (!instance.hasSideEffects()) {
          instance = program.getLiteralNull();
        }
        JArrayRef arrayRef = new JArrayRef(program, x.getSourceInfo(),
            instance, program.getLiteralInt(0));
        ctx.replaceMe(arrayRef);
      }
    }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JArrayRef

      return JNewArray.createInitializers(program, info, type, initializers);
    }

    JExpression processExpression(ArrayReference x) {
      SourceInfo info = makeSourceInfo(x);
      JArrayRef arrayRef = new JArrayRef(info,
          dispProcessExpression(x.receiver), dispProcessExpression(x.position));
      return arrayRef;
    }
View Full Code Here

Examples of com.google.gwt.dev.jjs.ast.JArrayRef

            1);
        increments.add(new JPrefixOperation(info, JUnaryOperator.INC,
            createVariableRef(info, indexVar)).makeStatement());

        // T elementVar = i$array[i$index];
        elementDecl.initializer = new JArrayRef(info, createVariableRef(info,
            arrayVar), createVariableRef(info, indexVar));
        body.addStmt(0, elementDecl);

        result = new JForStatement(info, initializers, condition, increments,
            body);
View Full Code Here

Examples of soot.jimple.internal.JArrayRef

                        skipAnalysis = true;
                        break;
                    }
                } else if (!skipAnalysis
                        && jAssignStmt.getLeftOp() instanceof JArrayRef) {
                    JArrayRef jArrayRef = (JArrayRef) jAssignStmt.getLeftOp();
                    if (jArrayRef.getBase().equals(varArgs)) {
                        // assigning to the varArg array values. Compute
                        // the type at the assigned position. This will always
                        // happen after the varargs instantiation!

                        if (jArrayRef.getIndex() instanceof IntConstant) {
                            IntConstant intConstant = (IntConstant) jArrayRef
                                    .getIndex();
                            int index = intConstant.value;
                            Type oldType = varArgTypes[index];
                            Type type = jAssignStmt.getRightOp().getType();
                            if (oldType instanceof RefType
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.