< prev index next >

src/hotspot/share/interpreter/interpreterRuntime.cpp

roman_version

190   case 2: guarantee(bytecode == Bytecodes::_ldc2_w, ""); break;                                                                      
191   case 1: guarantee(bytecode != Bytecodes::_ldc2_w, ""); break;                                                                      
192   default: ShouldNotReachHere();                                                                                                     
193   }                                                                                                                                  
194 
195   // Resolve the constant.  This does not do unboxing.                                                                               
196   // But it does replace Universe::the_null_sentinel by null.                                                                        
197   oop result = ldc.resolve_constant(CHECK);                                                                                          
198   assert(result != NULL || is_fast_aldc, "null result only valid for fast_aldc");                                                    
199 
200 #ifdef ASSERT                                                                                                                        
201   {                                                                                                                                  
202     // The bytecode wrappers aren't GC-safe so construct a new one                                                                   
203     Bytecode_loadconstant ldc2(m, last_frame.bci());                                                                                 
204     int rindex = ldc2.cache_index();                                                                                                 
205     if (rindex < 0)                                                                                                                  
206       rindex = m->constants()->cp_to_object_index(ldc2.pool_index());                                                                
207     if (rindex >= 0) {                                                                                                               
208       oop coop = m->constants()->resolved_references()->obj_at(rindex);                                                              
209       oop roop = (result == NULL ? Universe::the_null_sentinel() : result);                                                          
210       assert(roop == coop, "expected result for assembly code");                                                                     
211     }                                                                                                                                
212   }                                                                                                                                  
213 #endif                                                                                                                               
214   thread->set_vm_result(result);                                                                                                     
215   if (!is_fast_aldc) {                                                                                                               
216     // Tell the interpreter how to unbox the primitive.                                                                              
217     guarantee(java_lang_boxing_object::is_instance(result, type), "");                                                               
218     int offset = java_lang_boxing_object::value_offset_in_bytes(type);                                                               
219     intptr_t flags = ((as_TosState(type) << ConstantPoolCacheEntry::tos_state_shift)                                                 
220                       | (offset & ConstantPoolCacheEntry::field_index_mask));                                                        
221     thread->set_vm_result_2((Metadata*)flags);                                                                                       
222   }                                                                                                                                  
223 }                                                                                                                                    
224 IRT_END                                                                                                                              
225 
226 
227 //------------------------------------------------------------------------------------------------------------------------           
228 // Allocation                                                                                                                        
229 

190   case 2: guarantee(bytecode == Bytecodes::_ldc2_w, ""); break;
191   case 1: guarantee(bytecode != Bytecodes::_ldc2_w, ""); break;
192   default: ShouldNotReachHere();
193   }
194 
195   // Resolve the constant.  This does not do unboxing.
196   // But it does replace Universe::the_null_sentinel by null.
197   oop result = ldc.resolve_constant(CHECK);
198   assert(result != NULL || is_fast_aldc, "null result only valid for fast_aldc");
199 
200 #ifdef ASSERT
201   {
202     // The bytecode wrappers aren't GC-safe so construct a new one
203     Bytecode_loadconstant ldc2(m, last_frame.bci());
204     int rindex = ldc2.cache_index();
205     if (rindex < 0)
206       rindex = m->constants()->cp_to_object_index(ldc2.pool_index());
207     if (rindex >= 0) {
208       oop coop = m->constants()->resolved_references()->obj_at(rindex);
209       oop roop = (result == NULL ? Universe::the_null_sentinel() : result);
210       assert(oopDesc::equals(roop, coop), "expected result for assembly code");
211     }
212   }
213 #endif
214   thread->set_vm_result(result);
215   if (!is_fast_aldc) {
216     // Tell the interpreter how to unbox the primitive.
217     guarantee(java_lang_boxing_object::is_instance(result, type), "");
218     int offset = java_lang_boxing_object::value_offset_in_bytes(type);
219     intptr_t flags = ((as_TosState(type) << ConstantPoolCacheEntry::tos_state_shift)
220                       | (offset & ConstantPoolCacheEntry::field_index_mask));
221     thread->set_vm_result_2((Metadata*)flags);
222   }
223 }
224 IRT_END
225 
226 
227 //------------------------------------------------------------------------------------------------------------------------
228 // Allocation
229 
< prev index next >