src/cpu/zero/vm/cppInterpreter_zero.cpp

Print this page




 480   ZeroStack *stack = thread->zero_stack();
 481   intptr_t *locals = stack->sp();
 482 
 483   // Drop into the slow path if we need a safepoint check
 484   if (SafepointSynchronize::do_call_back()) {
 485     return normal_entry(method, 0, THREAD);
 486   }
 487 
 488   // Load the object pointer and drop into the slow path
 489   // if we have a NullPointerException
 490   oop object = LOCALS_OBJECT(0);
 491   if (object == NULL) {
 492     return normal_entry(method, 0, THREAD);
 493   }
 494 
 495   // Read the field index from the bytecode, which looks like this:
 496   //  0:  aload_0
 497   //  1:  getfield
 498   //  2:    index
 499   //  3:    index
 500   //  4:  ireturn/areturn
 501   // NB this is not raw bytecode: index is in machine order
 502   u1 *code = method->code_base();
 503   assert(code[0] == Bytecodes::_aload_0 &&
 504          code[1] == Bytecodes::_getfield &&
 505          (code[4] == Bytecodes::_ireturn ||



 506           code[4] == Bytecodes::_areturn), "should do");
 507   u2 index = Bytes::get_native_u2(&code[2]);
 508 
 509   // Get the entry from the constant pool cache, and drop into
 510   // the slow path if it has not been resolved
 511   ConstantPoolCache* cache = method->constants()->cache();
 512   ConstantPoolCacheEntry* entry = cache->entry_at(index);
 513   if (!entry->is_resolved(Bytecodes::_getfield)) {
 514     return normal_entry(method, 0, THREAD);
 515   }
 516 
 517   // Get the result and push it onto the stack
 518   switch (entry->flag_state()) {
 519   case ltos:
 520   case dtos:
 521     stack->overflow_check(1, CHECK_0);
 522     stack->alloc(wordSize);
 523     break;
 524   }
 525   if (entry->is_volatile()) {




 480   ZeroStack *stack = thread->zero_stack();
 481   intptr_t *locals = stack->sp();
 482 
 483   // Drop into the slow path if we need a safepoint check
 484   if (SafepointSynchronize::do_call_back()) {
 485     return normal_entry(method, 0, THREAD);
 486   }
 487 
 488   // Load the object pointer and drop into the slow path
 489   // if we have a NullPointerException
 490   oop object = LOCALS_OBJECT(0);
 491   if (object == NULL) {
 492     return normal_entry(method, 0, THREAD);
 493   }
 494 
 495   // Read the field index from the bytecode, which looks like this:
 496   //  0:  aload_0
 497   //  1:  getfield
 498   //  2:    index
 499   //  3:    index
 500   //  4:  ireturn/areturn/freturn/lreturn/dreturn
 501   // NB this is not raw bytecode: index is in machine order
 502   u1 *code = method->code_base();
 503   assert(code[0] == Bytecodes::_aload_0 &&
 504          code[1] == Bytecodes::_getfield &&
 505          (code[4] == Bytecodes::_ireturn ||
 506           code[4] == Bytecodes::_freturn ||
 507           code[4] == Bytecodes::_lreturn ||
 508           code[4] == Bytecodes::_dreturn ||
 509           code[4] == Bytecodes::_areturn), "should do");
 510   u2 index = Bytes::get_native_u2(&code[2]);
 511 
 512   // Get the entry from the constant pool cache, and drop into
 513   // the slow path if it has not been resolved
 514   ConstantPoolCache* cache = method->constants()->cache();
 515   ConstantPoolCacheEntry* entry = cache->entry_at(index);
 516   if (!entry->is_resolved(Bytecodes::_getfield)) {
 517     return normal_entry(method, 0, THREAD);
 518   }
 519 
 520   // Get the result and push it onto the stack
 521   switch (entry->flag_state()) {
 522   case ltos:
 523   case dtos:
 524     stack->overflow_check(1, CHECK_0);
 525     stack->alloc(wordSize);
 526     break;
 527   }
 528   if (entry->is_volatile()) {