Mercurial > hg > graal-jvmci-8
comparison src/share/vm/oops/cpCache.hpp @ 13056:41cb10cbfb3c
8025937: assert(existing_f1 == NULL || existing_f1 == f1) failed: illegal field change
Summary: Create extra constant pool cache entries for invokespecial/InterfaceMethodref to hold the alternate resolution.
Reviewed-by: jrose, lfoltan, hseigel
author | coleenp |
---|---|
date | Wed, 13 Nov 2013 16:42:24 -0500 |
parents | b2e698d2276c |
children | 3205e78d8193 |
comparison
equal
deleted
inserted
replaced
13055:fce21ac5968d | 13056:41cb10cbfb3c |
---|---|
28 #include "interpreter/bytecodes.hpp" | 28 #include "interpreter/bytecodes.hpp" |
29 #include "memory/allocation.hpp" | 29 #include "memory/allocation.hpp" |
30 #include "utilities/array.hpp" | 30 #include "utilities/array.hpp" |
31 | 31 |
32 class PSPromotionManager; | 32 class PSPromotionManager; |
33 | |
34 // The ConstantPoolCache is not a cache! It is the resolution table that the | |
35 // interpreter uses to avoid going into the runtime and a way to access resolved | |
36 // values. | |
33 | 37 |
34 // A ConstantPoolCacheEntry describes an individual entry of the constant | 38 // A ConstantPoolCacheEntry describes an individual entry of the constant |
35 // pool cache. There's 2 principal kinds of entries: field entries for in- | 39 // pool cache. There's 2 principal kinds of entries: field entries for in- |
36 // stance & static field access, and method entries for invokes. Some of | 40 // stance & static field access, and method entries for invokes. Some of |
37 // the entry layout is shared and looks as follows: | 41 // the entry layout is shared and looks as follows: |
390 class ConstantPoolCache: public MetaspaceObj { | 394 class ConstantPoolCache: public MetaspaceObj { |
391 friend class VMStructs; | 395 friend class VMStructs; |
392 friend class MetadataFactory; | 396 friend class MetadataFactory; |
393 private: | 397 private: |
394 int _length; | 398 int _length; |
395 ConstantPool* _constant_pool; // the corresponding constant pool | 399 ConstantPool* _constant_pool; // the corresponding constant pool |
396 | 400 |
397 // Sizing | 401 // Sizing |
398 debug_only(friend class ClassVerifier;) | 402 debug_only(friend class ClassVerifier;) |
399 | 403 |
400 // Constructor | 404 // Constructor |
401 ConstantPoolCache(int length, const intStack& inverse_index_map, | 405 ConstantPoolCache(int length, |
406 const intStack& inverse_index_map, | |
407 const intStack& invokedynamic_inverse_index_map, | |
402 const intStack& invokedynamic_references_map) : | 408 const intStack& invokedynamic_references_map) : |
403 _length(length), _constant_pool(NULL) { | 409 _length(length), |
404 initialize(inverse_index_map, invokedynamic_references_map); | 410 _constant_pool(NULL) { |
411 initialize(inverse_index_map, invokedynamic_inverse_index_map, | |
412 invokedynamic_references_map); | |
405 for (int i = 0; i < length; i++) { | 413 for (int i = 0; i < length; i++) { |
406 assert(entry_at(i)->is_f1_null(), "Failed to clear?"); | 414 assert(entry_at(i)->is_f1_null(), "Failed to clear?"); |
407 } | 415 } |
408 } | 416 } |
409 | 417 |
410 // Initialization | 418 // Initialization |
411 void initialize(const intArray& inverse_index_map, const intArray& invokedynamic_references_map); | 419 void initialize(const intArray& inverse_index_map, |
420 const intArray& invokedynamic_inverse_index_map, | |
421 const intArray& invokedynamic_references_map); | |
412 public: | 422 public: |
413 static ConstantPoolCache* allocate(ClassLoaderData* loader_data, int length, | 423 static ConstantPoolCache* allocate(ClassLoaderData* loader_data, |
414 const intStack& inverse_index_map, | 424 const intStack& cp_cache_map, |
425 const intStack& invokedynamic_cp_cache_map, | |
415 const intStack& invokedynamic_references_map, TRAPS); | 426 const intStack& invokedynamic_references_map, TRAPS); |
416 bool is_constantPoolCache() const { return true; } | 427 bool is_constantPoolCache() const { return true; } |
417 | 428 |
418 int length() const { return _length; } | 429 int length() const { return _length; } |
419 private: | 430 private: |