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 */
013 package org.vmmagic.unboxed;
014
015 import org.vmmagic.Unboxed;
016 import 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)
024 public 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 zero() {
035 return null;
036 }
037
038 public static Offset max() {
039 return null;
040 }
041
042 public int toInt() {
043 return 0;
044 }
045
046 public long toLong() {
047 return 0L;
048 }
049
050 public Word toWord() {
051 return null;
052 }
053
054 public Offset plus(int byteSize) {
055 return null;
056 }
057
058 public Offset minus(int byteSize) {
059 return null;
060 }
061
062 public Offset minus(Offset off2) {
063 return null;
064 }
065
066 public boolean EQ(Offset off2) {
067 return false;
068 }
069
070 public boolean NE(Offset off2) {
071 return false;
072 }
073
074 public boolean sLT(Offset off2) {
075 return false;
076 }
077
078 public boolean sLE(Offset off2) {
079 return false;
080 }
081
082 public boolean sGT(Offset off2) {
083 return false;
084 }
085
086 public boolean sGE(Offset off2) {
087 return false;
088 }
089
090 public boolean isZero() {
091 return false;
092 }
093
094 public boolean isMax() {
095 return false;
096 }
097 }
098