Examples of toObjectReference()


Examples of org.vmmagic.unboxed.Address.toObjectReference()

                .getTIB());
        objPtr.store(tibRef, tibOffset);
        objPtr.store((int) 0, flagsOffset);

        // Post allocation
        final Object result = objPtr.toObjectReference().toObject();
        if (false) {
            Unsafe.debug("result=");
            Unsafe.debug(objPtr);
            Unsafe.debug('\n');
        }
View Full Code Here

Examples of org.vmmagic.unboxed.Address.toObjectReference()

                    lsb = statics[idx + 1] & 0xFFFFFFFFL;
                    msb = statics[idx + 0] & 0xFFFFFFFFL;
                }
                ptr = Address.fromLong(lsb | (msb << 32));
            }
            return ptr.toObjectReference().toObject();
        }
    }

    public final void setLong(int idx, long value) {
        if (locked) {
View Full Code Here

Examples of org.vmmagic.unboxed.Address.toObjectReference()

        if (address.isZero()) {
            String exMsg = "Inflated monitor is null????";
            Unsafe.debug(exMsg);
            throw new IllegalMonitorStateException(exMsg);
        }
        return (Monitor) address.toObjectReference().toObject();
    }

    /**
     * Gets the inflated monitor of an object (if any).
     *
 
View Full Code Here

Examples of org.vmmagic.unboxed.Address.toObjectReference()

        heapPtr.store(heapObjSize, sizeOffset);
        heapPtr.store(flags, flagsOffset);
        heapPtr.store(ObjectReference.fromObject(heapClass.getTIB()), vmtOffset);
        helper.clear(heapPtr, heapObjSize.toInt());

        VmDefaultHeap heap = (VmDefaultHeap) heapPtr.toObjectReference().toObject();
        heap.helper = helper;
        return heap;
    }

    /**
 
View Full Code Here

Examples of org.vmmagic.unboxed.Address.toObjectReference()

                final Word flags;

                lock();
                try {
                    final Address ptr = start.add(offset);
                    object = ptr.toObjectReference().toObject();
                    tib = ptr.loadObjectReference(tibOffset);
                    objSize = ptr.loadWord(sizeOffset);
                    flags = (flagsMask.isZero()) ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask);
                } finally {
                    unlock();
View Full Code Here

Examples of org.vmmagic.unboxed.Address.toObjectReference()

                offset = offset.add(objSize).add(headerSize);
            }
        } else {
            while (offset.LT(size)) {
                final Address ptr = start.add(offset);
                final Object object = ptr.toObjectReference().toObject();
                final Object tib = ptr.loadObjectReference(tibOffset);
                final Word objSize = ptr.loadWord(sizeOffset);
                final Word flags = flagsMask.isZero() ? Word.zero() : VmMagic.getObjectFlags(object).and(flagsMask);
                if (tib != FREE) {
                    if (flags.EQ(flagsValue)) {
View Full Code Here

Examples of org.vmmagic.unboxed.Address.toObjectReference()

        final Offset sizeOffset = this.sizeOffset;
        final Word size = Word.fromIntZeroExtend(getSize());
        Word offset = headerSize;
        while (offset.LT(size)) {
            final Address ptr = start.add(offset);
            final Object object = ptr.toObjectReference().toObject();
            final Word flags = VmMagic.getObjectFlags(object).and(flagsMask);
            if (!flags.EQ(flagsValue) || visitor.visit(object)) {
                // Continue
                final Word objSize = ptr.loadWord(sizeOffset);
                offset = offset.add(objSize).add(headerSize);
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.