Mercurial > hg > graal-compiler
changeset 11429:be97540098f5
Truffle: Add Byte type to FrameWithoutBoxingSubstitutions
author | Christian Wirth <christian.wirth@oracle.com> |
---|---|
date | Tue, 27 Aug 2013 09:38:44 +0200 |
parents | 6f58979d0755 |
children | 3ceffcb771e5 |
files | graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/FrameWithoutBoxingSubstitutions.java |
diffstat | 1 files changed, 22 insertions(+), 0 deletions(-) [+] |
line wrap: on
line diff
--- a/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/FrameWithoutBoxingSubstitutions.java Tue Aug 27 09:34:55 2013 +0200 +++ b/graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/FrameWithoutBoxingSubstitutions.java Tue Aug 27 09:38:44 2013 +0200 @@ -80,6 +80,18 @@ } @MethodSubstitution(isStatic = false, forced = true) + public static byte getByte(FrameWithoutBoxing frame, FrameSlot slot) { + verifyGet(frame, slot, FrameSlotKind.Byte); + return getByteUnsafe(frame, slot); + } + + @MethodSubstitution(isStatic = false, forced = true) + public static void setByte(FrameWithoutBoxing frame, FrameSlot slot, byte value) { + verifySet(frame, slot, FrameSlotKind.Byte); + setByteUnsafe(frame, slot, value); + } + + @MethodSubstitution(isStatic = false, forced = true) public static float getFloat(FrameWithoutBoxing frame, FrameSlot slot) { verifyGet(frame, slot, FrameSlotKind.Float); return getFloatUnsafe(frame, slot); @@ -148,6 +160,16 @@ } @MethodSubstitution(isStatic = false) + public static byte getByteUnsafe(FrameWithoutBoxing frame, FrameSlot slot) { + return FrameGetNode.get(Kind.Byte, frame, slot, PRIMITIVELOCALS_FIELD); + } + + @MethodSubstitution(isStatic = false) + public static void setByteUnsafe(FrameWithoutBoxing frame, FrameSlot slot, byte value) { + FrameSetNode.set(Kind.Byte, frame, slot, value, PRIMITIVELOCALS_FIELD); + } + + @MethodSubstitution(isStatic = false) public static int getIntUnsafe(FrameWithoutBoxing frame, FrameSlot slot) { return FrameGetNode.get(Kind.Int, frame, slot, PRIMITIVELOCALS_FIELD); }