Mercurial > hg > graal-compiler
diff graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java @ 11322:760e838b3560
Add parameter to CompilerDirectives.unsafeCast.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Fri, 16 Aug 2013 14:23:16 +0200 |
parents | f0c8303cf88e |
children | 3662471dcfaa |
line wrap: on
line diff
--- a/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Fri Aug 16 12:09:36 2013 +0200 +++ b/graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java Fri Aug 16 14:23:16 2013 +0200 @@ -147,7 +147,7 @@ */ @Unsafe public static <T> T unsafeCast(Object value, Class<T> clazz) { - return unsafeCast(value, clazz, null); + return unsafeCast(value, clazz, null, null); } /** @@ -168,12 +168,13 @@ * * @param value the value that is known to have the specified type * @param clazz the specified type of the value + * @param receiver the receiver on which the custom type is tested * @param customType the custom type that if present on a value makes this unsafe cast safe * @return the value */ @SuppressWarnings("unchecked") @Unsafe - public static <T> T unsafeCast(Object value, Class<T> clazz, Object customType) { + public static <T> T unsafeCast(Object value, Class<T> clazz, Object receiver, Object customType) { return (T) value; }