Mercurial > hg > graal-compiler
diff src/share/vm/graal/graalCompiler.hpp @ 3577:96c40b338c1a
Added new method that loads and initializes a class that is referenced by a cp entry.
author | Thomas Wuerthinger <thomas.wuerthinger@oracle.com> |
---|---|
date | Tue, 13 Sep 2011 19:59:10 +0200 |
parents | b3f0f8a01ca2 |
children | 5e9645341ec3 |
line wrap: on
line diff
--- a/src/share/vm/graal/graalCompiler.hpp Mon Sep 12 21:20:33 2011 +0200 +++ b/src/share/vm/graal/graalCompiler.hpp Tue Sep 13 19:59:10 2011 +0200 @@ -69,11 +69,13 @@ static BasicType kindToBasicType(jchar ch); static int to_cp_index_u2(int index) { + // Tag. + return to_index_u2(index) + constantPoolOopDesc::CPCACHE_INDEX_TAG; + } + + static int to_index_u2(int index) { // Swap. - index = ((index & 0xFF) << 8) | (index >> 8); - // Tag. - index = index + constantPoolOopDesc::CPCACHE_INDEX_TAG; - return index; + return ((index & 0xFF) << 8) | (index >> 8); } static void initialize_buffer_blob();