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

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


  public Variable caseNullConstant(NullConstant v, Object question) {
    Variable dest = makevar();
    //cfg.addStatement(new EmptyStm(dest, false, context.getCurrentOrigin()));
    TemplateConstant cnst = new TemplateConstant("", new HashMap<String,String>(), context.getCurrentOrigin());
    cnst.setXML(parseXML(cnst.getTemplate(), context.getCurrentOrigin()));
    cfg.addStatement(new ConstStm(dest, cnst, context.getCurrentOrigin()));
    return dest;
  }
View Full Code Here


    return translateExpr(v.getOp());
  }
  @Override
  public Variable caseNewArrayExpr(NewArrayExpr v, Object question) {
    Variable var = makevar();
    cfg.addStatement(new ConstStm(var, emptyConstant, context.getCurrentOrigin()));
    return var;
  }
View Full Code Here

    return var;
  }
  @Override
  public Variable caseNewMultiArrayExpr(NewMultiArrayExpr v, Object question) {
    Variable var = makevar();
    cfg.addStatement(new ConstStm(var, emptyConstant, context.getCurrentOrigin()));
    return var;
  }
View Full Code Here

  }

  private void putCopyOfArray(Value arg) {
    hardcodeResult = translateExpr(arg);
    cfg.startBranch();
    cfg.addStatement(new ConstStm(hardcodeResult, emptyConstant, context.getCurrentOrigin()));
    cfg.useBranch();
    cfg.useBranch();
    cfg.endBranch();
  }
View Full Code Here

    hardcodeResult = makevar();
    TemplateConstant cnst = new TemplateConstant(template, context.getNamespaces(), origin);
    XML x = parseXML(cnst.getTemplate(), origin);
    if (x != null) {
        cnst.setXML(x);
        cfg.addStatement(new ConstStm(hardcodeResult,
            cnst,
            origin));
    } else {
        // error recovery: just let result be undefined (ie bottom)
    }
View Full Code Here

          // just return uninitialized variable
          hardcodeResult = var;
          return;
        }
      }
      cfg.addStatement(new ConstStm(var,
          emptyConstant,
          context.getCurrentOrigin()));
      for (int i=0; i<info.contents.length; i++) {
        Variable var2 = makevar();
        Variable val = translateExpr(info.contents[i].getValue());
View Full Code Here

TOP

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

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.