comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameUtil.java @ 11638:269e6794e1ec

Truffle: Frame restructuring.
author Andreas Woess <andreas.woess@jku.at>
date Sun, 15 Sep 2013 02:39:07 +0200
parents 51dcddfa25a6
children 139b84d713bc
comparison
equal deleted inserted replaced
11637:126e20d36563 11638:269e6794e1ec
33 * 33 *
34 * @param slot the slot of the local variable 34 * @param slot the slot of the local variable
35 * @param value the new value of the local variable 35 * @param value the new value of the local variable
36 */ 36 */
37 public static void setObjectSafe(Frame frame, FrameSlot slot, Object value) { 37 public static void setObjectSafe(Frame frame, FrameSlot slot, Object value) {
38 if (slot.getKind() != FrameSlotKind.Object) { 38 frame.setObject(slot, value);
39 slot.setKind(FrameSlotKind.Object);
40 }
41 try {
42 frame.setObject(slot, value);
43 } catch (FrameSlotTypeException e) {
44 throw new IllegalStateException();
45 }
46 } 39 }
47 40
48 /** 41 /**
49 * Write access to a local variable of type {@code byte}. 42 * Write access to a local variable of type {@code byte}.
50 * 43 *