Examples of toint()


Examples of org.msgpack.value.NumberValue.toInt()

    @Override
    public Number getNumberValue() throws IOException, JsonParseException {
        NumberValue numberValue = valueHolder.getRef().asNumber();
        if (numberValue.isValidInt()) {
            return numberValue.toInt();
        }
        else if (numberValue.isValidLong()) {
            return numberValue.toLong();
        }
        else {
View Full Code Here

Examples of org.spoutcraft.api.gui.Color.toInt()

      Color c1 = new Color(0, 0, 0);
      double darkness = 0;
      long t = System.currentTimeMillis() % 1000;
      darkness = Math.cos(t * 2 * Math.PI / 1000) * 0.2 + 0.2;
      c1.setBlue(1f - (float)darkness);
      color = c1.toInt();
    }

    font.drawStringWithShadow(r.getFittingText(sMotd, width - 10 - margin2 - marginleft), x + marginleft, y + 11, color);

    GL11.glColor4f(1f, 1f, 1f, 1f);
View Full Code Here

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

     */
    public final void setKernelStack(byte[] stack) {
        this.kernelStack = stack;
        final Address stackBase = VmMagic.getArrayData(stack);
        final Address esp = stackBase.add(stack.length - 4);
        tss[1] = esp.toInt();
    }

    /**
     * Sets the user stack
     *
 
View Full Code Here

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

     */
    public final void setUserStack(byte[] stack) {
        this.userStack = stack;
        final Address stackBase = VmMagic.getArrayData(stack);
        final Address esp = stackBase.add(stack.length - 4);
        tss[14] = esp.toInt();
    }
}
View Full Code Here

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

        final int size = (nrFrames * (RxFDSize + FRAME_SIZE)) + 16;
        this.data = new byte[size];
        this.mem = rm.asMemoryResource(data);

        final Address memAddr = mem.getAddress();
        int addr = memAddr.toInt();
        int offset = 0;
        // Align on 16-byte boundary
        while ((addr & 15) != 0) {
            addr++;
            offset++;
View Full Code Here

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

                if (child != null) {
                    System.out.print(NumberUtils.hex(ptr.toInt()) + " ");
                    if (VmUtils.getVm().getHeapManager().isObject(child)) {
                        System.out.println(child);
                    } else {
                        System.out.println(NumberUtils.hex(child.toInt()));
                    }
                }
                ptr = ptr.sub(slotSize);
            }
View Full Code Here

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

                    System.out.print(NumberUtils.hex(ptr.toInt()) + " Arg" + (i + 1) + " = ");
                    Address child = ptr.loadAddress();
                    if (VmUtils.getVm().getHeapManager().isObject(child)) {
                        System.out.println("Class: " + child.getClass() + " Value: " + child);
                    } else {
                        System.out.println(NumberUtils.hex(child.toInt()));
                    }
                    //System.out.println(NumberUtils.hex(ptr.loadInt()));
                }
            } while ((currFrame = sr.getPrevious(currFrame)) != null);
View Full Code Here

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

                return false;
            }
        } else {
            final Address valuePtr = ObjectReference.fromObject(value).toAddress();
            if (slotLength == 1) {
                statics[idx] = valuePtr.toInt();
            } else {
                final long lvalue = valuePtr.toLong();
                if (lsbFirst) {
                    statics[idx + 0] = (int) (lvalue & 0xFFFFFFFFL);
                    statics[idx + 1] = (int) ((lvalue >>> 32) & 0xFFFFFFFFL);
View Full Code Here

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

    public static void main(String[] args) {
        final Address a1 = Address.fromIntZeroExtend(0x1234);
        final Address a2 = a1.add(5);

        final int i1 = a1.toInt();
        final int i2 = a2.toInt();

        System.out.println("a1 LE a2 " + a1.LE(a2) + " " + (i1 <= i2));
        System.out.println("a1 LT a2 " + a1.LT(a2) + " " + (i1 < i2));
        System.out.println("a1 EQ a2 " + a1.EQ(a2) + " " + (i1 == i2));
        System.out.println("a1 NE a2 " + a1.NE(a2) + " " + (i1 != i2));
View Full Code Here

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

        } else {
            final int physBase = getReg32(SVGA_REG_MEM_START);
            address = Address.fromIntZeroExtend(physBase);
        }

        log.debug("Found FIFO at 0x" + NumberUtils.hex(address.toInt()) + ", size 0x" + NumberUtils.hex(size));

        final MemoryResource res = rm.claimMemoryResource(device, address, size, ResourceManager.MEMMODE_NORMAL);
        final int fifoMin = SVGA_FIFO_NUM_REGS * 4;
        res.setInt(SVGA_FIFO_MIN * 4, fifoMin);
        res.setInt(SVGA_FIFO_MAX * 4, size);
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.