equal
deleted
inserted
replaced
30 instanceKlassHandle _klass; |
30 instanceKlassHandle _klass; |
31 constantPoolHandle _pool; |
31 constantPoolHandle _pool; |
32 objArrayHandle _methods; |
32 objArrayHandle _methods; |
33 intArray _cp_map; |
33 intArray _cp_map; |
34 intStack _cp_cache_map; |
34 intStack _cp_cache_map; |
|
35 bool _have_invoke_dynamic; |
35 |
36 |
36 void init_cp_map(int length) { |
37 void init_cp_map(int length) { |
37 _cp_map.initialize(length, -1); |
38 _cp_map.initialize(length, -1); |
38 // Choose an initial value large enough that we don't get frequent |
39 // Choose an initial value large enough that we don't get frequent |
39 // calls to grow(). |
40 // calls to grow(). |
54 assert(main_cpc_entry < _cp_cache_map.length(), "must be earlier CP cache entry"); |
55 assert(main_cpc_entry < _cp_cache_map.length(), "must be earlier CP cache entry"); |
55 int cache_index = _cp_cache_map.append(main_cpc_entry | _secondary_entry_tag); |
56 int cache_index = _cp_cache_map.append(main_cpc_entry | _secondary_entry_tag); |
56 return cache_index; |
57 return cache_index; |
57 } |
58 } |
58 |
59 |
|
60 // Access the contents of _cp_cache_map to determine CP cache layout. |
|
61 int cp_cache_entry_pool_index(int cache_index) { |
|
62 int cp_index = _cp_cache_map[cache_index]; |
|
63 if ((cp_index & _secondary_entry_tag) != 0) |
|
64 return -1; |
|
65 else |
|
66 return cp_index; |
|
67 } |
|
68 int cp_cache_secondary_entry_main_index(int cache_index) { |
|
69 int cp_index = _cp_cache_map[cache_index]; |
|
70 if ((cp_index & _secondary_entry_tag) == 0) |
|
71 return -1; |
|
72 else |
|
73 return (cp_index - _secondary_entry_tag); |
|
74 } |
|
75 |
59 // All the work goes in here: |
76 // All the work goes in here: |
60 Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS); |
77 Rewriter(instanceKlassHandle klass, constantPoolHandle cpool, objArrayHandle methods, TRAPS); |
61 |
78 |
62 void compute_index_maps(); |
79 void compute_index_maps(); |
63 void make_constant_pool_cache(TRAPS); |
80 void make_constant_pool_cache(TRAPS); |