Package anvil.codec

Examples of anvil.codec.Code.iconst()


    code.iconst(n);
    code.anewarray("java/lang/String");
    for(int i=0; i<n; i++) {
      InterfaceType interfacetype = _interfaces[i].getInterfaceType();
      code.dup();
      code.iconst(i);
      code.astring(interfacetype.getDescriptor().replace('/', '.'));
      code.aastore();
    }
    code.putstatic(bases);
View Full Code Here


    context.compileArgumentList(function, CAST_P1_NODE, 2);
    code.invokevirtual(function.getTypeRef(pool));
    code.invokevirtual(pool.addMethodRef(context.TYPE_ANY, "toBoolean", "()Z"));
    code.ireturn();
    isfalse.bind();
    code.iconst(false);
    code.ireturn();
    context.popCode();
  }
 
View Full Code Here

  {
    super.compile(context, GET);
    Code code = context.getCode();
    code.invokevirtual(code.getPool().addMethodRef(context.TYPE_OBJECT,
      "equals", "(Ljava/lang/Object;)Z"));
    code.iconst(1);
    code.ixor();
    if (operation != GET_BOOLEAN) {
      context.boolean2any();
    }
  }
View Full Code Here

        "getLocal", "(II)Lanvil/core/Any;"));
      context.any2boolean();
      break;

    case DELETE:
      code.iconst(false);
      break;
    }
  }

}
View Full Code Here

    super.compile(context, GET_BOOLEAN);
    Code code = context.getCode();
    ConstantPool pool = code.getPool();
    Source notequal = code.if_icmpne();
    if (operation == GET_BOOLEAN) {
      code.iconst(false);
    } else {
      code.getstatic(pool.addFieldRef(context.TYPE_ANY, "FALSE", "Lanvil/core/Any;"));
    }
    Source toend = code.go_to();
    notequal.bind();
View Full Code Here

    ConstantPool pool = code.getPool();
    if (_expression.needLineNumbers()) {
      context.location(_expression.getLocation());
    }
    code.aload(function.getFrameIndex());
    code.iconst(_state);
    code.invokevirtual(pool.addMethodRef("anvil/script/Generator", "setState", "(I)V"));
    _expression.compile(context, Expression.GET);
    code.areturn();
    function.bindYieldState(_state);
    /*Code code = context.getCode();
View Full Code Here

      code.getstatic(pool.addFieldRef(context.TYPE_ANY, "FALSE", "Lanvil/core/Any;"));
    }
    Source toend = code.go_to();
    notequal.bind();
    if (operation == GET_BOOLEAN) {
      code.iconst(true);
    } else {
      code.getstatic(pool.addFieldRef(context.TYPE_ANY, "TRUE", "Lanvil/core/Any;"));
    }
    toend.bind();
  }
View Full Code Here

      default:
        code.go_to(isfalse);
      }
    }
    code.pop();
    code.iconst(true);
    Source toend = code.go_to();
    isfalse.bind();
    code.pop();
    code.iconst(false);
    toend.bind();
View Full Code Here

    code.pop();
    code.iconst(true);
    Source toend = code.go_to();
    isfalse.bind();
    code.pop();
    code.iconst(false);
    toend.bind();
    if (operation != GET_BOOLEAN) {
      context.boolean2any();
    }
  }
View Full Code Here

  public void compile(ByteCompiler context, int operation)
  {
    Code code = context.getCode();
    if (operation == GET_BOOLEAN) {
      _child.compile(context, GET_BOOLEAN);
      code.iconst(1);
      code.ixor();
    } else {
      _child.compile(context, GET);
      code.invokevirtual(code.getPool().addMethodRef(context.TYPE_ANY,
        "not", "()Lanvil/core/Any;"));
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.