Package serp.bytecode

Examples of serp.bytecode.Code.calculateMaxStack()


            && (fieldFlag & PersistenceCapable.MEDIATE_READ) == 0) {
            loadManagedInstance(code, true);
            addGetManagedValueCode(code, fmd);
            code.xreturn().setType(fmd.getDeclaredType());

            code.calculateMaxStack();
            code.calculateMaxLocals();
            return;
        }

        // if (inst.pcStateManager == null) return inst.<field>;
View Full Code Here


            new Class[]{ int.class });
        loadManagedInstance(code, true);
        addGetManagedValueCode(code, fmd);
        code.xreturn().setType(fmd.getDeclaredType());

        code.calculateMaxStack();
        code.calculateMaxLocals();
    }

    /**
     * Adds a static setter method for the given field.
View Full Code Here

        code.constant().setValue(0);
        code.invokeinterface().setMethod(getStateManagerMethod
            (fmd.getDeclaredType(), "setting", false, true));
        code.vreturn();

        code.calculateMaxStack();
        code.calculateMaxLocals();
    }

    /**
     * Determines which attach / detach methods to use.
View Full Code Here

                name);
        } else
            code.constant().setNull();
        code.areturn();
        code.calculateMaxLocals();
        code.calculateMaxStack();

        // public void pcSetDetachedState (Object state)
        method = _pc.declareMethod(PRE + "SetDetachedState",
            void.class, new Class []{ Object.class });
        method.setAccessFlags(access);
View Full Code Here

            code.aload().setParam(0);
            putfield(code, _managedType.getProject().loadClass(declarer),
                name, Object.class);
        }
        code.vreturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
    }

    /**
     * Adds to <code>code</code> the instructions to get field
View Full Code Here

        code = m.getCode(true);
        code.anew().setType(bc);
        code.dup();
        code.invokespecial().setMethod("<init>", void.class, null);
        code.areturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
    }

    /**
     * Implement the methods in the {@link ProxyCalendar} interface.
View Full Code Here

        for (Iterator itr = unmgd.iterator(); itr.hasNext();) {
            field = (BCField) itr.next();
            writeExternal(code, field.getName(), field.getType(), null);
        }
        code.vreturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
    }

    /**
     * Helper method to write a field to an externalization output stream.
View Full Code Here

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

    /**
     * Return the concrete type for the given class, i.e. impl for managed
View Full Code Here

        Code code = method.getCode(true);
       
        code.classconstant().setClass(getType(_meta));
        code.areturn();
       
        code.calculateMaxStack();
        code.calculateMaxLocals();
    }
   
    /**
     * This static public worker method detects and logs any Entities that may have been enhanced at build time by
View Full Code Here

                TimeZone.class, null);
            code.invokevirtual().setMethod(type, "setTimeZone", void.class,
                new Class[] { TimeZone.class });
        }
        code.areturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();

        // new instance factory
        m = bc.declareMethod("newInstance", ProxyCalendar.class, null);
        m.makePublic();
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.