1.1 --- a/src/share/vm/interpreter/rewriter.hpp Fri Oct 30 10:12:52 2009 -0700 1.2 +++ b/src/share/vm/interpreter/rewriter.hpp Fri Oct 30 16:22:59 2009 -0700 1.3 @@ -43,13 +43,18 @@ 1.4 bool has_cp_cache(int i) { return (uint)i < (uint)_cp_map.length() && _cp_map[i] >= 0; } 1.5 int maybe_add_cp_cache_entry(int i) { return has_cp_cache(i) ? _cp_map[i] : add_cp_cache_entry(i); } 1.6 int add_cp_cache_entry(int cp_index) { 1.7 + assert((cp_index & _secondary_entry_tag) == 0, "bad tag"); 1.8 assert(_cp_map[cp_index] == -1, "not twice on same cp_index"); 1.9 int cache_index = _cp_cache_map.append(cp_index); 1.10 _cp_map.at_put(cp_index, cache_index); 1.11 assert(cp_entry_to_cp_cache(cp_index) == cache_index, ""); 1.12 return cache_index; 1.13 } 1.14 - int add_extra_cp_cache_entry(int main_entry); 1.15 + int add_secondary_cp_cache_entry(int main_cpc_entry) { 1.16 + assert(main_cpc_entry < _cp_cache_map.length(), "must be earlier CP cache entry"); 1.17 + int cache_index = _cp_cache_map.append(main_cpc_entry | _secondary_entry_tag); 1.18 + return cache_index; 1.19 + } 1.20 1.21 // All the work goes in here: 1.22 Rewriter(instanceKlassHandle klass, TRAPS); 1.23 @@ -65,4 +70,8 @@ 1.24 public: 1.25 // Driver routine: 1.26 static void rewrite(instanceKlassHandle klass, TRAPS); 1.27 + 1.28 + enum { 1.29 + _secondary_entry_tag = nth_bit(30) 1.30 + }; 1.31 };