comparison graal/com.oracle.max.cri/src/com/oracle/max/cri/ri/RiRuntime.java @ 5470:044502e7b5a4

Small clean up on RiRuntime.
author Thomas Wuerthinger <thomas.wuerthinger@oracle.com>
date Fri, 01 Jun 2012 16:31:49 +0200
parents e1f45fcddb49
children 5134cd2f25ed
comparison
equal deleted inserted replaced
5450:e1f45fcddb49 5470:044502e7b5a4
67 67
68 68
69 RiResolvedType getType(Class<?> clazz); 69 RiResolvedType getType(Class<?> clazz);
70 70
71 /** 71 /**
72 * Returns true if the given type is a subtype of java/lang/Throwable.
73 */
74 boolean isExceptionType(RiResolvedType type);
75
76 /**
77 * Used by the canonicalizer to compare objects, since a given runtime might not want to expose the real objects to the compiler. 72 * Used by the canonicalizer to compare objects, since a given runtime might not want to expose the real objects to the compiler.
78 * 73 *
79 * @return true if the two parameters represent the same runtime object, false otherwise 74 * @return true if the two parameters represent the same runtime object, false otherwise
80 */ 75 */
81 boolean areConstantObjectsEqual(CiConstant x, CiConstant y); 76 boolean areConstantObjectsEqual(CiConstant x, CiConstant y);
104 99
105 /** 100 /**
106 * Gets the length of the array that is wrapped in a CiConstant object. 101 * Gets the length of the array that is wrapped in a CiConstant object.
107 */ 102 */
108 int getArrayLength(CiConstant array); 103 int getArrayLength(CiConstant array);
109
110 /**
111 * Converts the given CiConstant object to a object.
112 *
113 * @return {@code null} if the conversion is not possible <b>OR</b> {@code c.isNull() == true}
114 */
115 Object asJavaObject(CiConstant c);
116
117 /**
118 * Converts the given CiConstant object to a {@link Class} object.
119 *
120 * @return {@code null} if the conversion is not possible.
121 */
122 Class<?> asJavaClass(CiConstant c);
123 104
124 /** 105 /**
125 * Performs any runtime-specific conversion on the object used to describe the target of a call. 106 * Performs any runtime-specific conversion on the object used to describe the target of a call.
126 */ 107 */
127 Object asCallTarget(Object target); 108 Object asCallTarget(Object target);