Package wyvern.targets.Common.wyvernIL.IL.Expr

Examples of wyvern.targets.Common.wyvernIL.IL.Expr.Expression


   * assumption:
   * dest will always be an Immediate with VarRef or an Inv
   */
  @Override
  public BytecodeContext visit(Assign assign) {
    Expression destExpr = assign.getDest();
    BytecodeRef dest;
    if(destExpr instanceof Inv) {
      Inv inv = (Inv) destExpr;
      BytecodeOperandVisitor opVisitor = new BytecodeOperandVisitor(context);
      BytecodeClass clas = (BytecodeClass) inv.getSource().accept(opVisitor);
View Full Code Here


    return context;
  }

  @Override
  public BytecodeContext visit(Pure pure) {
    Expression expression = pure.getExpression();
    if(expression != null) {
      interperter.setFinalVals(expression.accept(visitor),UNSAVED_MESSAGE);
    }
    return context;
  }
View Full Code Here

      } else if (decl instanceof ValDeclaration) {
        TLFromAST gen = TLFromASTApply(((ValDeclaration) decl).getDefinition());
        if (gen != null) {
          initializer.addAll(gen.getStatements());
        }
        Expression expr = null;
        if (gen != null)
          expr = gen.getExpr();
        ValDef e = new ValDef(decl.getName(), expr, decl.getType());
        initializer.add(new Defn(e));
        if (((ValDeclaration) decl).isClassMember())
          classDefs.add(e);
        else
          definitions.add(e);
      } else if (decl instanceof VarDeclaration) {
        TLFromAST gen = TLFromASTApply(((VarDeclaration) decl).getDefinition());
        if (gen != null) {
          initializer.addAll(gen.getStatements());
        }
        Expression expr = null;
        if (gen != null)
          expr = gen.getExpr();
        VarDef e = new VarDef(decl.getName(), expr, decl.getType());
        initializer.add(new Defn(e));
        if (((VarDeclaration) decl).isClassMember())
View Full Code Here

TOP

Related Classes of wyvern.targets.Common.wyvernIL.IL.Expr.Expression

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.