Package serp.bytecode

Examples of serp.bytecode.Code.calculateMaxLocals()


        code.putfield().setField(changeTracker);

        ifins.setTarget(code.aload().setLocal(ret));
        code.areturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
    }

    /**
     * Return whether the given collection type allows duplicates.
     */
 
View Full Code Here


            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
     * <code>attrName</code> declared in type <code>declarer</code>
View Full Code Here

        Code code = m.getCode(true);
        code.aload().setThis();
        code.getfield().setField(changeTracker);
        code.areturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();

        // map copy
        Constructor cons = findCopyConstructor(type);
        if (cons == null && SortedMap.class.isAssignableFrom(type))
            cons = findComparatorConstructor(type);
View Full Code Here

        code.invokevirtual().setMethod("readExternalFields",
            void.class, inargs);

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

    private void addReadExternalFields() throws NoSuchMethodException {
        Class<?>[] inargs = new Class[]{ ObjectInput.class };
        BCMethod meth = _pc.declareMethod("readExternalFields", void.class, inargs);
View Full Code Here

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

        // key type
        BCField keyType = bc.declareField("keyType", Class.class);
        keyType.setTransient(true);
        m = bc.declareMethod("getKeyType", Class.class, null);
View Full Code Here

        code = m.getCode(true);
        code.aload().setThis();
        code.getfield().setField(keyType);
        code.areturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();

        // value type
        BCField valueType = bc.declareField("valueType", Class.class);
        valueType.setTransient(true);
        m = bc.declareMethod("getValueType", Class.class, null);
View Full Code Here

            }
        }

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

    /**
     * Read unmanaged fields from the stream (pcReadUnmanaged).
     */
 
View Full Code Here

        code = m.getCode(true);
        code.aload().setThis();
        code.getfield().setField(valueType);
        code.areturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();

        // new instance factory
        m = bc.declareMethod("newInstance", ProxyMap.class,
            new Class[] { Class.class, Class.class, Comparator.class,
            boolean.class,boolean.class });
View Full Code Here

            field = (BCField) itr.next();
            readExternal(code, field.getName(), field.getType(), null);
        }
        code.vreturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
    }

    /**
     * Helper method to read a field from an externalization input stream.
     */
 
View Full Code Here

        code.putfield().setField(changeTracker);

        ifins.setTarget(code.aload().setLocal(ret));
        code.areturn();
        code.calculateMaxStack();
        code.calculateMaxLocals();
    }

    /**
     * Implement the methods in the {@link ProxyDate} interface.
     */
 
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.