comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/Frame.java @ 7711:960a15fea39a

Make materialized frame also being usable as a packed frame.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Tue, 05 Feb 2013 15:19:17 +0100
parents 5e3d1a68664e
children 1a2d258d481a
comparison
equal deleted inserted replaced
7668:d19837d236e5 7711:960a15fea39a
130 * @param value the new value of the local variable 130 * @param value the new value of the local variable
131 */ 131 */
132 void setDouble(FrameSlot slot, double value); 132 void setDouble(FrameSlot slot, double value);
133 133
134 void updateToLatestVersion(); 134 void updateToLatestVersion();
135
136 /**
137 * Converts this virtual frame into a packed frame that has no longer direct access to the local
138 * variables. This packing is an important hint to the Truffle optimizer and therefore passing
139 * around a {@link PackedFrame} should be preferred over passing around a {@link VirtualFrame}
140 * when the probability that an unpacking will occur is low.
141 *
142 * @return the packed frame
143 */
144 PackedFrame pack();
145
146 /**
147 * Materializes this frame, which allows it to be stored in a field or cast to
148 * {@link java.lang.Object}. The frame however looses the ability to be packed or to access the
149 * caller frame.
150 *
151 * @return the new materialized frame
152 */
153 MaterializedFrame materialize();
135 } 154 }