Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/frame/Frame.java @ 9330:e162d9e32830
Added a clazz parameter to Frame.getArguments in order to allow unsafe access to the arguments object (i.e., avoiding the null check and the type cast).
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 26 Apr 2013 17:15:10 +0200 |
parents | 07f8d136a05e |
children | 0fccad3ce40d |
comparison
equal
deleted
inserted
replaced
9329:fa188fbfe3fe | 9330:e162d9e32830 |
---|---|
34 * @return the object describing the layout of this frame | 34 * @return the object describing the layout of this frame |
35 */ | 35 */ |
36 FrameDescriptor getFrameDescriptor(); | 36 FrameDescriptor getFrameDescriptor(); |
37 | 37 |
38 /** | 38 /** |
39 * Retrieves the arguments object from this frame. The runtime assumes that the arguments object | |
40 * is never null. Additionally, the runtime may assume that the given parameter indicating the | |
41 * class of the arguments object is correct. The runtime is not required to actually check the | |
42 * type of the arguments object. The parameter must be a value that can be reduced to a compile | |
43 * time constant. | |
44 * | |
45 * @param clazz the known type of the arguments object as a compile time constant | |
39 * @return the arguments used when calling this method | 46 * @return the arguments used when calling this method |
40 */ | 47 */ |
41 Arguments getArguments(); | 48 <T extends Arguments> T getArguments(Class<T> clazz); |
42 | 49 |
43 /** | 50 /** |
44 * Read access to a local variable of type {@link Object}. | 51 * Read access to a local variable of type {@link Object}. |
45 * | 52 * |
46 * @param slot the slot of the local variable | 53 * @param slot the slot of the local variable |