001/*
002 *  This file is part of the Jikes RVM project (http://jikesrvm.org).
003 *
004 *  This file is licensed to You under the Eclipse Public License (EPL);
005 *  You may not use this file except in compliance with the License. You
006 *  may obtain a copy of the License at
007 *
008 *      http://www.opensource.org/licenses/eclipse-1.0.php
009 *
010 *  See the COPYRIGHT.txt file distributed with this work for information
011 *  regarding copyright ownership.
012 */
013package org.vmmagic.unboxed;
014
015import org.vmmagic.Unboxed;
016import org.vmmagic.pragma.RawStorage;
017
018/**
019 * Represents a pointer-sized signed integer used for describing an offset in bytes.
020 * Can be used to refer to a field in a type-unsafe way.
021 */
022@Unboxed
023@RawStorage(lengthInWords = true, length = 1)
024public final class Offset {
025
026  public static Offset fromIntSignExtend(int address) {
027    return null;
028  }
029
030  public static Offset fromIntZeroExtend(int address) {
031    return null;
032  }
033
034  public static Offset fromLong(long address) {
035    return null;
036  }
037
038  public static Offset zero() {
039    return null;
040  }
041
042  public static Offset max() {
043    return null;
044  }
045
046  public int toInt() {
047    return 0;
048  }
049
050  public long toLong() {
051    return 0L;
052  }
053
054  public Word toWord() {
055    return null;
056  }
057
058  public Offset plus(int byteSize) {
059    return null;
060  }
061
062  public Offset plus(Offset off2) {
063    return null;
064  }
065
066  public Offset minus(int byteSize) {
067    return null;
068  }
069
070  public Offset minus(Offset off2) {
071    return null;
072  }
073
074  public boolean EQ(Offset off2) {
075    return false;
076  }
077
078  public boolean NE(Offset off2) {
079    return false;
080  }
081
082  public boolean sLT(Offset off2) {
083    return false;
084  }
085
086  public boolean sLE(Offset off2) {
087    return false;
088  }
089
090  public boolean sGT(Offset off2) {
091    return false;
092  }
093
094  public boolean sGE(Offset off2) {
095    return false;
096  }
097
098  public boolean isZero() {
099    return false;
100  }
101
102  public boolean isMax() {
103    return false;
104  }
105}
106