< prev index next >

src/hotspot/share/interpreter/bytecodeInterpreter.cpp

roman_version

2417         u2 index;                                                                                                                    
2418         int incr;                                                                                                                    
2419         if (opcode == Bytecodes::_fast_aldc) {                                                                                       
2420           index = pc[1];                                                                                                             
2421           incr = 2;                                                                                                                  
2422         } else {                                                                                                                     
2423           index = Bytes::get_native_u2(pc+1);                                                                                        
2424           incr = 3;                                                                                                                  
2425         }                                                                                                                            
2426 
2427         // We are resolved if the resolved_references array contains a non-null object (CallSite, etc.)                              
2428         // This kind of CP cache entry does not need to match the flags byte, because                                                
2429         // there is a 1-1 relation between bytecode type and CP entry type.                                                          
2430         ConstantPool* constants = METHOD->constants();                                                                               
2431         oop result = constants->resolved_references()->obj_at(index);                                                                
2432         if (result == NULL) {                                                                                                        
2433           CALL_VM(InterpreterRuntime::resolve_ldc(THREAD, (Bytecodes::Code) opcode),                                                 
2434                   handle_exception);                                                                                                 
2435           result = THREAD->vm_result();                                                                                              
2436         }                                                                                                                            
2437         if (result == Universe::the_null_sentinel())                                                                                 
2438           result = NULL;                                                                                                             
2439 
2440         VERIFY_OOP(result);                                                                                                          
2441         SET_STACK_OBJECT(result, 0);                                                                                                 
2442         UPDATE_PC_AND_TOS_AND_CONTINUE(incr, 1);                                                                                     
2443       }                                                                                                                              
2444 
2445       CASE(_invokedynamic): {                                                                                                        
2446 
2447         u4 index = Bytes::get_native_u4(pc+1);                                                                                       
2448         ConstantPoolCacheEntry* cache = cp->constant_pool()->invokedynamic_cp_cache_entry_at(index);                                 
2449 
2450         // We are resolved if the resolved_references array contains a non-null object (CallSite, etc.)                              
2451         // This kind of CP cache entry does not need to match the flags byte, because                                                
2452         // there is a 1-1 relation between bytecode type and CP entry type.                                                          
2453         if (! cache->is_resolved((Bytecodes::Code) opcode)) {                                                                        
2454           CALL_VM(InterpreterRuntime::resolve_from_cache(THREAD, (Bytecodes::Code)opcode),                                           
2455                   handle_exception);                                                                                                 
2456           cache = cp->constant_pool()->invokedynamic_cp_cache_entry_at(index);                                                       

2417         u2 index;
2418         int incr;
2419         if (opcode == Bytecodes::_fast_aldc) {
2420           index = pc[1];
2421           incr = 2;
2422         } else {
2423           index = Bytes::get_native_u2(pc+1);
2424           incr = 3;
2425         }
2426 
2427         // We are resolved if the resolved_references array contains a non-null object (CallSite, etc.)
2428         // This kind of CP cache entry does not need to match the flags byte, because
2429         // there is a 1-1 relation between bytecode type and CP entry type.
2430         ConstantPool* constants = METHOD->constants();
2431         oop result = constants->resolved_references()->obj_at(index);
2432         if (result == NULL) {
2433           CALL_VM(InterpreterRuntime::resolve_ldc(THREAD, (Bytecodes::Code) opcode),
2434                   handle_exception);
2435           result = THREAD->vm_result();
2436         }
2437         if (oopDesc::equals(result, Universe::the_null_sentinel()))
2438           result = NULL;
2439 
2440         VERIFY_OOP(result);
2441         SET_STACK_OBJECT(result, 0);
2442         UPDATE_PC_AND_TOS_AND_CONTINUE(incr, 1);
2443       }
2444 
2445       CASE(_invokedynamic): {
2446 
2447         u4 index = Bytes::get_native_u4(pc+1);
2448         ConstantPoolCacheEntry* cache = cp->constant_pool()->invokedynamic_cp_cache_entry_at(index);
2449 
2450         // We are resolved if the resolved_references array contains a non-null object (CallSite, etc.)
2451         // This kind of CP cache entry does not need to match the flags byte, because
2452         // there is a 1-1 relation between bytecode type and CP entry type.
2453         if (! cache->is_resolved((Bytecodes::Code) opcode)) {
2454           CALL_VM(InterpreterRuntime::resolve_from_cache(THREAD, (Bytecodes::Code)opcode),
2455                   handle_exception);
2456           cache = cp->constant_pool()->invokedynamic_cp_cache_entry_at(index);
< prev index next >