Package serp.bytecode

Examples of serp.bytecode.Code.ireturn()


        m = bc.declareMethod("getOwnerField", int.class, null);
        m.makePublic();
        code = m.getCode(true);
        code.aload().setThis();
        code.getfield().setField(field);
        code.ireturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();

        /*
         * clone (return detached proxy object)
View Full Code Here


        // ... else return false;
        JumpInstruction go2 = code.go2();
        Instruction flse = code.constant().setValue(0);
        ifneg.setTarget(flse);
        ifnexp.setTarget(flse);
        go2.setTarget(code.ireturn());

        code.calculateMaxStack();
        code.calculateMaxLocals();
    }
View Full Code Here

        code.iload().setParam(0);
        code.invokespecial().setMethod(AbstractPCData.class, "isLoaded",
            boolean.class, new Class[]{ int.class });
        code.calculateMaxLocals();
        code.calculateMaxStack();
        code.ireturn();
    }

    /**
     * Simple interface to give access to expiration time.
     */
 
View Full Code Here

     */
    private void addFieldCount(BCClass bc, int[] types, int objectCount) {
        BCMethod method = bc.declareMethod("getFieldCount", int.class, null);
        Code code = method.getCode(true);
        code.constant().setValue(types.length);
        code.ireturn();
        code.calculateMaxLocals();
        code.calculateMaxStack();

        method = bc.declareMethod("getObjectCount", int.class, null);
        code = method.getCode(true);
View Full Code Here

        code.calculateMaxStack();

        method = bc.declareMethod("getObjectCount", int.class, null);
        code = method.getCode(true);
        code.constant().setValue(objectCount);
        code.ireturn();
        code.calculateMaxLocals();
        code.calculateMaxStack();
    }

    /**
 
View Full Code Here

        method = _pc.declareMethod(ISDETACHEDSTATEDEFINITIVE, boolean.class,
            null);
        method.makePrivate();
        code = method.getCode(true);
        code.constant().setValue(false);
        code.ireturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
    }

    /**
 
View Full Code Here

        BCMethod method = _pc.declareMethod(PRE +
                "GetEnhancementContractVersion", int.class, null);
        method.makePublic();
        Code code = method.getCode(true);
        code.constant().setValue(ENHANCER_VERSION);
        code.ireturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
    }

    /**
 
View Full Code Here

        BCMethod method = _pc.declareMethod(PRE +
                "GetEnhancementContractVersion", int.class, null);
        method.makePublic();
        Code code = method.getCode(true);
        code.constant().setValue(ENHANCER_VERSION);
        code.ireturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
    }

    /**
 
View Full Code Here

        method = _pc.declareMethod(ISDETACHEDSTATEDEFINITIVE, boolean.class,
            null);
        method.makePrivate();
        code = method.getCode(true);
        code.constant().setValue(false);
        code.ireturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
    }

    /**
 
View Full Code Here

                superClass.getName();
            code.invokestatic().setMethod(superName,
                PRE + "GetManagedFieldCount", int.class.getName(), null);
            code.iadd();
        }
        code.ireturn();
        code.calculateMaxStack();
    }

    /**
     * Adds the {@link PersistenceCapable#pcProvideField} and
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.