Package org.cojen.classfile

Examples of org.cojen.classfile.LocalVariable


            List subNodes = node.mSubNodes;

            mBuilder.mapLineNumber(++mReferenceLine);

            if (c == '*') {
                LocalVariable savedIndex;
               
                if (mTempLocals.isEmpty()) {
                    savedIndex =
                        mBuilder.createLocalVariable("temp", mIntType);
                } else {
View Full Code Here


            if (node == null) {
                mBuilder.loadConstant('\uffff');
                mBuilder.ifComparisonBranch(loopEnd, "==");
            } else {
                LocalVariable tempChar;
                if (mTempLocals.isEmpty()) {
                    tempChar =
                        mBuilder.createLocalVariable("temp", mIntType);
                } else {
                    tempChar = (LocalVariable)mTempLocals.pop();
View Full Code Here

            final Location endLocation = new FixedLocation(end_pc);

            final Set<LocationRange> ranges = Collections
                .singleton((LocationRange) new LocationRangeImpl(startLocation, endLocation));

            LocalVariable localVar = new LocalVariable() {
                private String mName;
                private TypeDesc mType;

                {
                    mName = varName == null ? null : varName.getValue();
View Full Code Here

    }

    public LocalVariable getLocalVariable(int useLocation, int number) {
        // TODO: Build some sort of index to improve performance.
        for (Entry entry : mEntries) {
            LocalVariable var = entry.mLocalVar;
            if (var.getNumber() == number) {
                for (LocationRange range : var.getLocationRangeSet()) {
                    int start = range.getStartLocation().getLocation();
                    int end = range.getEndLocation().getLocation();
                    if (start >= 0 && end >= 0) {
                        if (start <= useLocation && useLocation < end) {
                            return var;
View Full Code Here

        dout.writeShort(mRangeCount);

        int size = mCleanEntries.size();
        for (int i=0; i<size; i++) {
            Entry entry = mCleanEntries.get(i);
            LocalVariable localVar = entry.mLocalVar;

            Set<LocationRange> ranges = localVar.getLocationRangeSet();
            if (ranges == null) {
                continue;
            }

            int name_index = entry.mName.getIndex();
            int descriptor_index = entry.mDescriptor.getIndex();
            int index = localVar.getNumber();

            check("local variable table entry name index", name_index);
            check("local variable table entry descriptor index", descriptor_index);
            check("local variable table entry index", index);
View Full Code Here

        mCleanEntries = new ArrayList<Entry>(size);
        mRangeCount = 0;

        outer: for (int i=0; i<size; i++) {
            Entry entry = mEntries.get(i);
            LocalVariable localVar = entry.mLocalVar;

            Set<LocationRange> ranges = localVar.getLocationRangeSet();
            if (ranges == null || ranges.size() == 0) {
                continue;
            }

            for (LocationRange range : ranges) {
View Full Code Here

        }

        mi.markSynthetic();
        CodeBuilder b = new CodeBuilder(mi);

        LocalVariable beanVar, propertyVar, valueVar;

        switch (methodType) {
        case READ_METHOD: case TRY_READ_METHOD: default:
            beanVar = b.getParameter(0);
            propertyVar = b.getParameter(1);
View Full Code Here

        }

        mi.markSynthetic();
        CodeBuilder b = new CodeBuilder(mi);

        LocalVariable beanVar = b.getParameter(0);
        b.loadLocal(beanVar);
        b.checkCast(TypeDesc.forClass(beanType));
        b.storeLocal(beanVar);

        LocalVariable valueVar = b.getParameter(1);

        // If search value is null, only check properties which might be null.
        b.loadLocal(valueVar);
        Label searchNotNull = b.createLabel();
        b.ifNullBranch(searchNotNull, false);
View Full Code Here

TOP

Related Classes of org.cojen.classfile.LocalVariable

Copyright © 2018 www.massapicom. 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.