Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/VirtualFrame.java @ 7530:5e3d1a68664e
applied mx eclipseformat to all Java files
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Wed, 23 Jan 2013 16:34:57 +0100 |
parents | a4b84ba6dc2e |
children | 960a15fea39a |
comparison
equal
deleted
inserted
replaced
7529:4a11124a3563 | 7530:5e3d1a68664e |
---|---|
23 package com.oracle.truffle.api.frame; | 23 package com.oracle.truffle.api.frame; |
24 | 24 |
25 import com.oracle.truffle.api.*; | 25 import com.oracle.truffle.api.*; |
26 | 26 |
27 /** | 27 /** |
28 * Represents a frame containing values of local variables of the guest language. Instances of this type must not be | 28 * Represents a frame containing values of local variables of the guest language. Instances of this |
29 * stored in a field or cast to {@link java.lang.Object}. If this is necessary, the frame must be explicitly converted | 29 * type must not be stored in a field or cast to {@link java.lang.Object}. If this is necessary, the |
30 * into a materialized frame using the {@link VirtualFrame#materialize()} method. Whenever fast access to the local | 30 * frame must be explicitly converted into a materialized frame using the |
31 * variables of a frame is no longer necessary, a virtual frame should be converted into a packed frame using the | 31 * {@link VirtualFrame#materialize()} method. Whenever fast access to the local variables of a frame |
32 * is no longer necessary, a virtual frame should be converted into a packed frame using the | |
32 * {@link VirtualFrame#pack()} method. | 33 * {@link VirtualFrame#pack()} method. |
33 */ | 34 */ |
34 public interface VirtualFrame extends Frame { | 35 public interface VirtualFrame extends Frame { |
35 | 36 |
36 /** | 37 /** |
37 * Converts this virtual frame into a packed frame that has no longer direct access to the local variables. This | 38 * Converts this virtual frame into a packed frame that has no longer direct access to the local |
38 * packing is an important hint to the Truffle optimizer and therefore passing around a {@link PackedFrame} should | 39 * variables. This packing is an important hint to the Truffle optimizer and therefore passing |
39 * be preferred over passing around a {@link VirtualFrame} when the probability that an unpacking will occur is low. | 40 * around a {@link PackedFrame} should be preferred over passing around a {@link VirtualFrame} |
40 * | 41 * when the probability that an unpacking will occur is low. |
42 * | |
41 * @return the packed frame | 43 * @return the packed frame |
42 */ | 44 */ |
43 PackedFrame pack(); | 45 PackedFrame pack(); |
44 | 46 |
45 /** | 47 /** |
46 * Accesses the caller frame passed in via {@link CallTarget#call}. To get full access, it must be first unpacked | 48 * Accesses the caller frame passed in via {@link CallTarget#call}. To get full access, it must |
47 * using {@link PackedFrame#unpack()}. | 49 * be first unpacked using {@link PackedFrame#unpack()}. |
48 * | 50 * |
49 * @return the caller frame or null if this was a root method call | 51 * @return the caller frame or null if this was a root method call |
50 */ | 52 */ |
51 PackedFrame getCaller(); | 53 PackedFrame getCaller(); |
52 | 54 |
53 /** | 55 /** |
54 * Materializes this frame, which allows it to be stored in a field or cast to {@link java.lang.Object}. The frame | 56 * Materializes this frame, which allows it to be stored in a field or cast to |
55 * however looses the ability to be packed or to access the caller frame. | 57 * {@link java.lang.Object}. The frame however looses the ability to be packed or to access the |
56 * | 58 * caller frame. |
59 * | |
57 * @return the new materialized frame | 60 * @return the new materialized frame |
58 */ | 61 */ |
59 MaterializedFrame materialize(); | 62 MaterializedFrame materialize(); |
60 } | 63 } |