hotspot/src/share/vm/code/compiledIC.cpp
changeset 33160 c59f1676d27e
parent 32466 915d0c3d25aa
child 33593 60764a78fa5c
equal deleted inserted replaced
33159:89b942323bd1 33160:c59f1676d27e
   278   // has been cleaned up
   278   // has been cleaned up
   279   CodeBlob* cb = CodeCache::find_blob_unsafe(ic_destination());
   279   CodeBlob* cb = CodeCache::find_blob_unsafe(ic_destination());
   280   bool is_monomorphic = (cb != NULL && cb->is_nmethod());
   280   bool is_monomorphic = (cb != NULL && cb->is_nmethod());
   281   // Check that the cached_value is a klass for non-optimized monomorphic calls
   281   // Check that the cached_value is a klass for non-optimized monomorphic calls
   282   // This assertion is invalid for compiler1: a call that does not look optimized (no static stub) can be used
   282   // This assertion is invalid for compiler1: a call that does not look optimized (no static stub) can be used
   283   // for calling directly to vep without using the inline cache (i.e., cached_value == NULL)
   283   // for calling directly to vep without using the inline cache (i.e., cached_value == NULL).
       
   284   // For JVMCI this occurs because CHA is only used to improve inlining so call sites which could be optimized
       
   285   // virtuals because there are no currently loaded subclasses of a type are left as virtual call sites.
   284 #ifdef ASSERT
   286 #ifdef ASSERT
   285   CodeBlob* caller = CodeCache::find_blob_unsafe(instruction_address());
   287   CodeBlob* caller = CodeCache::find_blob_unsafe(instruction_address());
   286   bool is_c1_method = caller->is_compiled_by_c1();
   288   bool is_c1_or_jvmci_method = caller->is_compiled_by_c1() || caller->is_compiled_by_jvmci();
   287   assert( is_c1_method ||
   289   assert( is_c1_or_jvmci_method ||
   288          !is_monomorphic ||
   290          !is_monomorphic ||
   289          is_optimized() ||
   291          is_optimized() ||
   290          !caller->is_alive() ||
   292          !caller->is_alive() ||
   291          (cached_metadata() != NULL && cached_metadata()->is_klass()), "sanity check");
   293          (cached_metadata() != NULL && cached_metadata()->is_klass()), "sanity check");
   292 #endif // ASSERT
   294 #endif // ASSERT