Package weasel.interpreter.bytecode

Examples of weasel.interpreter.bytecode.WeaselInstructionNewArray


  public WeaselInstructionList compile(WeaselCompiler compiler, WeaselKeyWordCompilerHelper compilerHelper, WeaselGenericClass arrayClass) throws WeaselCompilerException {
    arrayClass = new WeaselGenericClass(arrayClass.getBaseClass().getArrayClass(), arrayClass.getGenerics());
    WeaselInstructionList instructions = new WeaselInstructionList();
    instructions.add(token.line, new WeaselInstructionLoadConstInteger(indexes.size()));
    instructions.add(token.line, new WeaselInstructionNewArray(arrayClass.getBaseClass().getByteName(), 1));
    for(int i=0; i<indexes.size(); i++){
      Object o = indexes.get(i);
      if(o instanceof WeaselArrayInit){
        instructions.addAll(((WeaselArrayInit)o).compile(compiler, compilerHelper, arrayClass));
      }else{
View Full Code Here


              instructions.addAll(wcr.getInstructions(compiler, compiler.baseTypes.intClass));
              sizes++;
            }
          }
         
          instructions.add(token.line, new WeaselInstructionNewArray(className, sizes));
         
        }else{
          instructions.addAll(arrayInit.compile(compiler, compilerHelper, genericClass));
        }
       
View Full Code Here

TOP

Related Classes of weasel.interpreter.bytecode.WeaselInstructionNewArray

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.