Package exceptions

Examples of exceptions.InternalException


    ScopeSTE methodSTE = (ScopeSTE)currentSTE;
    if(verbose) System.out.println("PushScope -- " + id);
    mScopeStack.push(methodSTE.getScope());
  }
  else  {
    throw new InternalException("Unable to find method scope");
  }
    }
View Full Code Here


    return null;
  }

  public void insert(STE ste) {
    if ( ( ! (ste instanceof ValueSTE) )  && this.mHashMap.containsKey( ste.getName() ) ) {
      throw new InternalException("Symbol:" + ste.getName() + "has already been defined");
    }
   
    this.mHashMap.put(ste.getName(), ste);
    this.mOrder.add(ste.getName());
  }
View Full Code Here

  private Object[] mRegList;

  // Generate the head of the AVR code file
  public AVRgenVisitor(PrintWriter out, SymTable symTable) {
    if(out==null)   {
      throw new InternalException("unexpected null argument");
    }
    this.out = out;
    this.mCurrentST = symTable;

    this.out.println( fileToString("avrH.rtl.s") );
View Full Code Here

  }

  public void outThisExp(ThisLiteral node) {
    this.out.println();
    if (mCurrentClass == null) {
      throw new InternalException("outThisExp: mCurrentClass==null");
    }
    genLoadThis();
    Reg16 reg1 = new Reg16("r30", "r31");
    genExpStore(node, reg1);
  }
View Full Code Here

      this.out.println("    std    Z+0, " + reg.lo8);
    } else if (varEntry.getType() == Type.INT_ARRAY) {
      this.out.println("    std    Z+0, " + reg.lo8);
      this.out.println("    std    Z+1, " + reg.hi8);
    } else {
      throw new InternalException("Unknown array type.");
    }

    //this.out.flush();
  }
View Full Code Here

      this.out.println("    ldd    " + reg.lo8 + ", Z+0");
    } else if (mCurrentST.getExpType(node.getExp()) == Type.INT_ARRAY) {
      this.out.println("    ldd    " + reg.lo8 + ", Z+0");
      this.out.println("    ldd    " + reg.hi8 + ", Z+1");
    } else {
      throw new InternalException("Unknown array type, " + mCurrentST.getExpType(node).toString());
    }

    genExpStore(node, reg);
    //this.out.flush();
  }
View Full Code Here

  private int mMethod_offset = 1;
  private boolean debug = false;

  public CheckTypes(SymTable st) {
    if(st==null) {
      throw new InternalException("unexpected null argument");
    }
    mCurrentST = st;
  }
View Full Code Here

  }

  public void outThisExp(ThisLiteral node)
  {
    if( mCurrentClass == null )
      throw new InternalException("outThisExp: mCurrentClass==null");
    VarSTE ste = (VarSTE) this.mCurrentST.lookup("this");
    this.mCurrentST.setNodeSTE(node, ste);
    this.mCurrentST.setExpType(node, Type.getClassType(this.mCurrentClass.getName()));
  }
View Full Code Here

TOP

Related Classes of exceptions.InternalException

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.