Examples of WeaselInstructionLoadConstBoolean


Examples of weasel.interpreter.bytecode.WeaselInstructionLoadConstBoolean

 
  public WeaselCompilerReturnConstant(WeaselCompiler compiler, int line, Object constant) throws WeaselCompilerException{
    this.constant = constant;
    if(constant instanceof Boolean){
      returnType = new WeaselGenericClass(compiler.baseTypes.booleanClass);
      instructionList.add(line, new WeaselInstructionLoadConstBoolean((Boolean)constant));
    }else if(constant instanceof Character){
      returnType = new WeaselGenericClass(compiler.baseTypes.charClass);
      instructionList.add(line, new WeaselInstructionLoadConstChar((Character)constant));
    }else if(constant instanceof Byte){
      returnType = new WeaselGenericClass(compiler.baseTypes.byteClass);
View Full Code Here

Examples of weasel.interpreter.bytecode.WeaselInstructionLoadConstBoolean

    WeaselInstructionList instructionList = new WeaselInstructionList();
    int line = this.instructionList.getLine();
    try{
      switch(primitiveID){
      case WeaselPrimitive.BOOLEAN:
        instructionList.add(line, new WeaselInstructionLoadConstBoolean(WeaselPrimitive.getBoolean(constant)));
        break;
      case WeaselPrimitive.CHAR:
        instructionList.add(line, new WeaselInstructionLoadConstChar(WeaselPrimitive.getChar(constant)));
        break;
      case WeaselPrimitive.BYTE:
View Full Code Here

Examples of weasel.interpreter.bytecode.WeaselInstructionLoadConstBoolean

      WeaselClass wc = compiler.getWeaselClass("O"+wit.className+";");
      WeaselGenericClass wgc = new WeaselGenericClass(wc);
      wcr = compileOperator(compiler, compilerHelper, write, wgc, elementParent, isVariable, i-1);
      if(wcr.getReturnType().canCastTo(wgc)){
        instructions = new WeaselInstructionList();
        instructions.add(operator.line, new WeaselInstructionLoadConstBoolean(true));
      }else{
        if(wcr.getReturnType().getBaseClass().isPrimitive())
          throw new WeaselCompilerException(operator.line, "can't use implements for primitives");
        instructions = wcr.getInstructions();
        instructions.add(operator.line, new WeaselInstructionInstanceof(wc.getByteName()));
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.