Examples of checkcast()


Examples of anvil.codec.Code.checkcast()

    boolean ismethod = (function.getType() == Type.METHOD);
    Scope parent = function.getParent();
    int parent_ref = parent.getTypeRef(pool);
    if (ismethod) {
      code.aload(2);
      code.checkcast(parent_ref);
    }
    code.aload(1);
    code.aload(3);
    int method_ref = pool.addMethodRef(
        parent_ref, "h_"+function.getName(), "(Lanvil/script/Context;Lanvil/script/Generator;)Lanvil/core/Any;");
View Full Code Here

Examples of anvil.codec.Code.checkcast()

  {
    _child.compile(context, GET);
    Code code = context.getCode();
    code.invokevirtual(code.getPool().addMethodRef(context.TYPE_ANY, "clone",
      "()Ljava/lang/Object;"));
    code.checkcast(context.TYPE_ANY);
    if (operation == GET_BOOLEAN) {
      context.any2boolean();
    }
  }
View Full Code Here

Examples of anvil.codec.Code.checkcast()

   
    public void compile(ByteCompiler context, int operation)
    {
      Code code = context.getCode();
      code.aload(_local);
      code.checkcast(context.TYPE_ANY);
    }
   
  }
 
  protected static class IndexToSymbol extends Node
View Full Code Here

Examples of clojure.asm.commons.GeneratorAdapter.checkCast()

    if(constants.count() > 0)
      {
//    clinitgen.mark(begin);
      clinitgen.visitLdcInsn(fntype);
      clinitgen.invokeVirtual(CLASS_TYPE, getClassLoaderMethod);
      clinitgen.checkCast(DYNAMIC_CLASSLOADER_TYPE);
      clinitgen.push(constantsID);
      clinitgen.invokeVirtual(DYNAMIC_CLASSLOADER_TYPE, getConstantsMethod);

      for(int i = 0; i < constants.count(); i++)
        {
View Full Code Here

Examples of cn.wensiqun.asmsupport.asm.InstructionHelper.checkCast()

        if(allocateDims != null){
            log.debug("start new a array!");
            InstructionHelper ih = block.getInsnHelper();
            if(allocateDims == null || allocateDims.length == 0){
                ih.push(arrayCls.getType());
                ih.checkCast(arrayCls.getType());
                return;
            }
           
            if(allocateDims.length == 1){
                allocateDims[0].loadToStack(block);
View Full Code Here

Examples of com.facebook.presto.byteCode.Block.checkCast()

            // unbox
            Class<?> targetType = getType().getPrimitiveType();
            return block.invokeVirtual(wrap(targetType), targetType.getSimpleName() + "Value", targetType);
        }
        else {
            block.checkCast(getType());
        }
        return block;
    }

    private static Block castPrimitiveToPrimitive(Block block, Class<?> sourceType, Class<?> targetType)
View Full Code Here

Examples of net.sf.cglib.core.CodeEmitter.checkcast()

/* 57 */       declare_field(2, getFieldName(i), type, null, null);
/* 58 */       e.load_this();
/* 59 */       e.load_arg(0);
/* 60 */       e.push(i);
/* 61 */       e.aaload();
/* 62 */       e.checkcast(type);
/* 63 */       e.putfield(getFieldName(i));
/*    */     }
/* 65 */     e.return_value();
/* 66 */     e.end_method();
/*    */   }
View Full Code Here

Examples of org.aspectj.org.eclipse.jdt.internal.compiler.codegen.CodeStream.checkcast()

    TypeBinding returnType = binding.returnType;
    if (returnType.isBaseType()) {
      codeStream.invokestatic(AjTypeConstants.getConversionMethodFromObject(classScope, returnType));
    } else {
      codeStream.checkcast(returnType);
    }
    AstUtil.generateReturn(returnType, codeStream);
    codeStream.recordPositionsFrom(0, 1);
    classFile.completeCodeAttribute(codeAttributeOffset);
    attributeNumber++;
View Full Code Here

Examples of org.cojen.classfile.CodeBuilder.checkCast()

            break;
        }

        if (beanVar != null) {
            b.loadLocal(beanVar);
            b.checkCast(TypeDesc.forClass(beanType));
            b.storeLocal(beanVar);
        }

        if (properties.length > 0) {
            int[] cases = new int[hashCapacity(properties.length)];
View Full Code Here

Examples of org.cojen.classfile.CodeBuilder.checkCast()

                    }
                    case WRITE_METHOD: case TRY_WRITE_METHOD: {
                        b.loadLocal(beanVar);
                        b.loadLocal(valueVar);
                        TypeDesc type = TypeDesc.forClass(bp.getType());
                        b.checkCast(type.toObjectType());
                        b.convert(type.toObjectType(), type);
                        b.invoke(bp.getWriteMethod());
                        if (methodType == WRITE_METHOD) {
                            b.returnVoid();
                        } else {
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.