Examples of Offset


Examples of org.vmmagic.unboxed.Offset

    public static void setStaticField(Class<?> clazz, String fieldName,
                                      Object value) {
        final VmStaticField f = (VmStaticField) VmType.fromClass((Class<?>) clazz).getField(
            fieldName);
        final Object staticsTable;
        final Offset offset;
        if (f.isShared()) {
            staticsTable = VmMagic.currentProcessor().getSharedStaticsTable();
            offset = Offset.fromIntZeroExtend(f.getSharedStaticsIndex() << 2);
        } else {
            staticsTable = VmMagic.currentProcessor().getIsolatedStaticsTable();
View Full Code Here

Examples of org.vmmagic.unboxed.Offset

            this.deviceRam =
                    rm.claimMemoryResource(device, Address.fromIntZeroExtend(fbBase), memSize,
                            ResourceManager.MEMMODE_NORMAL);

            // Map MMIO block 0, first test for 8Mb framebuffers.
            Offset block0Ofs = Offset.fromIntZeroExtend(0x7ffc00);
            Extent mmioSize = Extent.fromIntZeroExtend(1024); // 1K
            MemoryResource mmio0 = deviceRam.claimChildResource(block0Ofs, mmioSize, false);
            Mach64VgaIO io = new Mach64VgaIO(deviceRam, mmio0);
            if ((io.getReg32(CONFIG_CHIP_ID) & CFG_CHIP_TYPE) != pciCfg.getDeviceID()) {
                // Try for 4Mb framebuffers.
View Full Code Here

Examples of org.vmmagic.unboxed.Offset

            return false;
        }

        final int offset = addr.toWord().sub(start.toWord()).toInt();
        int bit = offset / ObjectLayout.OBJECT_ALIGN;
        final Offset idx = Offset.fromIntZeroExtend(bit / 8);
        final int mask = 1 << (bit & 7);
        final Address bitmapPtr = this.allocationBitmapPtr;
        final int value = bitmapPtr.loadByte(idx);
        return ((value & mask) == mask);
    }
View Full Code Here

Examples of org.vmmagic.unboxed.Offset

            return;
        }

        final int offset = addr.toWord().sub(start.toWord()).toInt();
        final int bit = offset / ObjectLayout.OBJECT_ALIGN;
        final Offset idx = Offset.fromIntZeroExtend(bit / 8);
        final int mask = 1 << (bit & 7);
        final Address bitmapPtr = this.allocationBitmapPtr;
        int value = bitmapPtr.loadByte(idx);
        if (on) {
            value |= mask;
View Full Code Here

Examples of org.vmmagic.unboxed.Offset

     */
    protected static VmDefaultHeap setupHeap(HeapHelper helper, Address start,
                                             VmNormalClass<VmDefaultHeap> heapClass, int slotSize) {
        final int headerSize = ObjectLayout
            .objectAlign((ObjectLayout.HEADER_SLOTS + 1) * slotSize);
        final Offset vmtOffset = Offset.fromIntSignExtend(ObjectLayout.TIB_SLOT * slotSize);
        final Offset sizeOffset = Offset.fromIntSignExtend(-((ObjectLayout.HEADER_SLOTS + 1) * slotSize));
        final Offset flagsOffset = Offset.fromIntSignExtend(ObjectLayout.FLAGS_SLOT * slotSize);

        // Setup a heap object, so the heap can initialize itself.
        final Address heapPtr = start.add(headerSize);
        final Word heapObjSize = Word.fromIntZeroExtend(ObjectLayout.objectAlign(heapClass
            .getObjectSize()));
View Full Code Here

Examples of org.vmmagic.unboxed.Offset

        if (nextFreePtr.EQ(Address.zero())) { /* This heap is full */
            return null;
        }

        final Offset tibOffset = this.tibOffset;
        final Word headerSize = Word.fromIntZeroExtend(this.headerSize);
        final Offset flagsOffset = this.flagsOffset;
        final Offset sizeOffset = this.sizeOffset;

        Word alignedSizeW = Word.fromIntZeroExtend(alignedSize);
        final Word totalSize = alignedSizeW.add(headerSize);
        final Object tib = vmClass.getTIB();
        if (tib == null) {
View Full Code Here

Examples of org.vmmagic.unboxed.Offset

     */
    protected final void defragment() throws UninterruptiblePragma {
        final Word size = Word.fromIntZeroExtend(getSize());
        final Word headerSize = Word.fromIntZeroExtend(this.headerSize);
        Word offset = headerSize;
        final Offset sizeOffset = this.sizeOffset;
        final Offset tibOffset = this.tibOffset;


        lock();
        try {
            Address firstFreePtr = Address.zero();
View Full Code Here

Examples of org.vmmagic.unboxed.Offset

     */
    protected final void walk(ObjectVisitor visitor, boolean locking,
                              Word flagsMask, Word flagsValue) {
        // Go through the heap and call visit on each object
        final Word headerSize = Word.fromIntZeroExtend(this.headerSize);
        final Offset sizeOffset = this.sizeOffset;
        final Offset tibOffset = this.tibOffset;
        final Object FREE = this.FREE;
        Word offset = headerSize;
        final Word size = Word.fromIntZeroExtend(getSize());

        if (locking) {
View Full Code Here

Examples of org.vmmagic.unboxed.Offset

     *                this heap never changes.
     */
    protected void walk(ObjectVisitor visitor, boolean locking, Word flagsMask, Word flagsValue) {
        // Go through the heap and mark all objects in the allocation bitmap.
        final Word headerSize = Word.fromIntZeroExtend(this.headerSize);
        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();
View Full Code Here

Examples of org.wicketstuff.minis.behavior.tooltipsy.TooltipsyOptions.Offset

    // sample 3
    Label sample3 = new Label("sample3", Model.of("Speech tooltip"));
    add(sample3);
    TooltipsyOptionsBuilder builder3 = new TooltipsyOptionsBuilder();
    builder3.setTooltipsyClassName("bubbletooltip_tip");
    builder3.setOffset(new Offset(0, 10));
    builder3.setShowJavaScript("function (e, $el) { $el.fadeIn(100); }");
    builder3.setHideJavaScript("function (e, $el) { $el.fadeOut(1000); }");
    sample3.add(new TooltipsyBehavior(builder3.getResult()));
  }
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.