equal
deleted
inserted
replaced
402 friend class MetadataFactory; |
402 friend class MetadataFactory; |
403 private: |
403 private: |
404 int _length; |
404 int _length; |
405 ConstantPool* _constant_pool; // the corresponding constant pool |
405 ConstantPool* _constant_pool; // the corresponding constant pool |
406 |
406 |
|
407 // The following fields need to be modified at runtime, so they cannot be |
|
408 // stored in the ConstantPool, which is read-only. |
|
409 // Array of resolved objects from the constant pool and map from resolved |
|
410 // object index to original constant pool index |
|
411 jobject _resolved_references; |
|
412 Array<u2>* _reference_map; |
|
413 |
407 // Sizing |
414 // Sizing |
408 debug_only(friend class ClassVerifier;) |
415 debug_only(friend class ClassVerifier;) |
409 |
416 |
410 // Constructor |
417 // Constructor |
411 ConstantPoolCache(int length, |
418 ConstantPoolCache(int length, |
431 const intStack& invokedynamic_cp_cache_map, |
438 const intStack& invokedynamic_cp_cache_map, |
432 const intStack& invokedynamic_references_map, TRAPS); |
439 const intStack& invokedynamic_references_map, TRAPS); |
433 bool is_constantPoolCache() const { return true; } |
440 bool is_constantPoolCache() const { return true; } |
434 |
441 |
435 int length() const { return _length; } |
442 int length() const { return _length; } |
|
443 |
|
444 jobject resolved_references() { return _resolved_references; } |
|
445 void set_resolved_references(jobject s) { _resolved_references = s; } |
|
446 Array<u2>* reference_map() const { return _reference_map; } |
|
447 void set_reference_map(Array<u2>* o) { _reference_map = o; } |
|
448 |
|
449 // Assembly code support |
|
450 static int resolved_references_offset_in_bytes() { return offset_of(ConstantPoolCache, _resolved_references); } |
|
451 |
436 private: |
452 private: |
437 void set_length(int length) { _length = length; } |
453 void set_length(int length) { _length = length; } |
438 |
454 |
439 static int header_size() { return sizeof(ConstantPoolCache) / wordSize; } |
455 static int header_size() { return sizeof(ConstantPoolCache) / wordSize; } |
440 static int size(int length) { return align_metadata_size(header_size() + length * in_words(ConstantPoolCacheEntry::size())); } |
456 static int size(int length) { return align_metadata_size(header_size() + length * in_words(ConstantPoolCacheEntry::size())); } |