Package dk.brics.xact.analysis.flowgraph.statements

Examples of dk.brics.xact.analysis.flowgraph.statements.ArrayWriteStm


    if (s.getLeftOp() instanceof ArrayRef) {
      // A[X] = B
      ArrayRef array = (ArrayRef)s.getLeftOp();
      if (((ArrayType)array.getBase().getType()).getElementType() instanceof RefLikeType) {
        Variable left = context.getLocal(((Local)array.getBase()).getName());
        cfg.addStatement(new ArrayWriteStm(left, right, context.getCurrentOrigin()));
        // also write possible strings we can get from converting the argument using toString()
        cfg.addStatement(addStringStatement(new ArrayWriteStringStm(left, null, context.getCurrentOrigin()), s.getRightOpBox()));
      } else {
        // ignore..
      }
View Full Code Here


  }
  private void putArrayWrite(Value dest, ValueBox source) {
    hardcodeResult = context.getNothing();
    Variable array = translateExpr(dest);
    Variable src = translateExpr(source.getValue());
    cfg.addStatement(new ArrayWriteStm(array, src, context.getCurrentOrigin()));
    cfg.addStatement(addStringStatement(new ArrayWriteStringStm(array, null, context.getCurrentOrigin()), source));
  }
View Full Code Here

  private void putArrayReadAndWrite(Value arrayValue, ValueBox source) {
      hardcodeResult = makevar();
      Variable array = translateExpr(arrayValue);
      Variable src = translateExpr(source.getValue());
      cfg.addStatement(new ArrayReadStm(hardcodeResult, array, context.getCurrentOrigin()));
        cfg.addStatement(new ArrayWriteStm(array, src, context.getCurrentOrigin()));
        cfg.addStatement(addStringStatement(new ArrayWriteStringStm(array, null, context.getCurrentOrigin()), source));
  }
View Full Code Here

    hardcodeResult = makevar();
    cfg.addStatement(new EmptyStm(hardcodeResult, true, context.getCurrentOrigin()));
  }
  private void putNewArrayWithElement(ValueBox item) {
    hardcodeResult = makevar();
    cfg.addStatement(new ArrayWriteStm(hardcodeResult, translateExpr(item.getValue()), context.getCurrentOrigin()));
    cfg.addStatement(addStringStatement(new ArrayWriteStringStm(hardcodeResult, null, context.getCurrentOrigin()), item));
  }
View Full Code Here

TOP

Related Classes of dk.brics.xact.analysis.flowgraph.statements.ArrayWriteStm

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.