Mercurial > hg > graal-compiler
diff src/share/vm/code/relocInfo.hpp @ 2455:479b4b4b6950
6777083: assert(target != __null,"must not be null")
Reviewed-by: iveresov, kvn
author | never |
---|---|
date | Tue, 05 Apr 2011 00:31:09 -0700 |
parents | d673ef06fe96 |
children | 6c97c830fb6f |
line wrap: on
line diff
--- a/src/share/vm/code/relocInfo.hpp Mon Apr 04 22:17:15 2011 -0700 +++ b/src/share/vm/code/relocInfo.hpp Tue Apr 05 00:31:09 2011 -0700 @@ -703,6 +703,10 @@ assert(datalen()==0 || type()==relocInfo::none, "no data here"); } + static bool is_reloc_index(intptr_t index) { + return 0 < index && index < os::vm_page_size(); + } + protected: // Helper functions for pack_data_to() and unpack_data(). @@ -1127,6 +1131,12 @@ return rh; } + // Some address looking values aren't safe to treat as relocations + // and should just be treated as constants. + static bool can_be_relocated(address target) { + return target != NULL && !is_reloc_index((intptr_t)target); + } + private: address _target; // address in runtime