Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/FrameUtil.java @ 12646:0046afcda972
remove obsolete FrameUtil.set<Type>Safe methods.
author | Andreas Woess <andreas.woess@jku.at> |
---|---|
date | Wed, 30 Oct 2013 19:59:48 +0100 |
parents | 60c32ab6eb39 |
children | 1cde96b96673 |
comparison
equal
deleted
inserted
replaced
12645:60c32ab6eb39 | 12646:0046afcda972 |
---|---|
23 * questions. | 23 * questions. |
24 */ | 24 */ |
25 package com.oracle.truffle.api.frame; | 25 package com.oracle.truffle.api.frame; |
26 | 26 |
27 public final class FrameUtil { | 27 public final class FrameUtil { |
28 | |
29 /** | |
30 * Write access to a local variable of type {@link Object}. | |
31 * | |
32 * Sets the frame slot type to {@link Object} if it isn't already. | |
33 * | |
34 * @param slot the slot of the local variable | |
35 * @param value the new value of the local variable | |
36 */ | |
37 public static void setObjectSafe(Frame frame, FrameSlot slot, Object value) { | |
38 frame.setObject(slot, value); | |
39 } | |
40 | |
41 /** | |
42 * Write access to a local variable of type {@code byte}. | |
43 * | |
44 * Sets the frame slot type to {@code byte} if it isn't already. | |
45 * | |
46 * @param slot the slot of the local variable | |
47 * @param value the new value of the local variable | |
48 */ | |
49 public static void setByteSafe(Frame frame, FrameSlot slot, byte value) { | |
50 frame.setByte(slot, value); | |
51 } | |
52 | |
53 /** | |
54 * Write access to a local variable of type {@code boolean}. | |
55 * | |
56 * Sets the frame slot type to {@code boolean} if it isn't already. | |
57 * | |
58 * @param slot the slot of the local variable | |
59 * @param value the new value of the local variable | |
60 */ | |
61 public static void setBooleanSafe(Frame frame, FrameSlot slot, boolean value) { | |
62 frame.setBoolean(slot, value); | |
63 } | |
64 | |
65 /** | |
66 * Write access to a local variable of type {@code int}. | |
67 * | |
68 * Sets the frame slot type to {@code int} if it isn't already. | |
69 * | |
70 * @param slot the slot of the local variable | |
71 * @param value the new value of the local variable | |
72 */ | |
73 public static void setIntSafe(Frame frame, FrameSlot slot, int value) { | |
74 frame.setInt(slot, value); | |
75 } | |
76 | |
77 /** | |
78 * Write access to a local variable of type {@code long}. | |
79 * | |
80 * Sets the frame slot type to {@code long} if it isn't already. | |
81 * | |
82 * @param slot the slot of the local variable | |
83 * @param value the new value of the local variable | |
84 */ | |
85 public static void setLongSafe(Frame frame, FrameSlot slot, long value) { | |
86 frame.setLong(slot, value); | |
87 } | |
88 | |
89 /** | |
90 * Write access to a local variable of type {@code float}. | |
91 * | |
92 * Sets the frame slot type to {@code float} if it isn't already. | |
93 * | |
94 * @param slot the slot of the local variable | |
95 * @param value the new value of the local variable | |
96 */ | |
97 public static void setFloatSafe(Frame frame, FrameSlot slot, float value) { | |
98 frame.setFloat(slot, value); | |
99 } | |
100 | |
101 /** | |
102 * Write access to a local variable of type {@code double}. | |
103 * | |
104 * Sets the frame slot type to {@code double} if it isn't already. | |
105 * | |
106 * @param slot the slot of the local variable | |
107 * @param value the new value of the local variable | |
108 */ | |
109 public static void setDoubleSafe(Frame frame, FrameSlot slot, double value) { | |
110 frame.setDouble(slot, value); | |
111 } | |
112 | |
113 /** | 28 /** |
114 * Read a frame slot that is guaranteed to be of the desired kind (either previously checked by | 29 * Read a frame slot that is guaranteed to be of the desired kind (either previously checked by |
115 * a guard or statically known). | 30 * a guard or statically known). |
116 * | 31 * |
117 * @param frameSlot the slot of the variable | 32 * @param frameSlot the slot of the variable |