# HG changeset patch # User Christian Wirth # Date 1377589124 -7200 # Node ID be97540098f540507a421380f17f1b53b8562a51 # Parent 6f58979d075582c19e8514128fd459b191a89011 Truffle: Add Byte type to FrameWithoutBoxingSubstitutions diff -r 6f58979d0755 -r be97540098f5 graal/com.oracle.graal.truffle/src/com/oracle/graal/truffle/substitutions/FrameWithoutBoxingSubstitutions.java --- 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); }