Mercurial > hg > graal-compiler
comparison graal/com.oracle.truffle.api/src/com/oracle/truffle/api/CompilerDirectives.java @ 18309:d079b2af3a15
Truffle: more explicit warning about isCompilationConstant.
author | Chris Seaton <chris.seaton@oracle.com> |
---|---|
date | Sat, 08 Nov 2014 22:03:36 +0000 |
parents | 4a8dd0fdcc38 |
children | 48dd71b3dc03 |
comparison
equal
deleted
inserted
replaced
18308:7c7930eb4def | 18309:d079b2af3a15 |
---|---|
112 * } | 112 * } |
113 * } | 113 * } |
114 * </code> | 114 * </code> |
115 * </pre> | 115 * </pre> |
116 * | 116 * |
117 * Note that optimizations that a compiler will apply to code that is conditional on | |
118 * <code>isCompilationConstant</code> may be limited. For this reason | |
119 * <code>isCompilationConstant</code> is not recommended for use to select between alternate | |
120 * implementations of functionality depending on whether a value is constant. Instead, it is | |
121 * intended for use as a diagnostic mechanism, such as illustrated above. | |
122 * | |
117 * @param value | 123 * @param value |
118 * @return {@code true} when given value is seen as compilation constant, {@code false} if not | 124 * @return {@code true} when given value is seen as compilation constant, {@code false} if not |
119 * compilation constant. | 125 * compilation constant. |
120 */ | 126 */ |
121 public static boolean isCompilationConstant(Object value) { | 127 public static boolean isCompilationConstant(Object value) { |