< prev index next >

src/hotspot/share/interpreter/bytecodeInterpreter.cpp

Print this page
rev 50962 : [mq]: 8207011


 477 #endif
 478 
 479   static int _compiling;  // (UseCompiler || CountCompiledCalls)
 480 
 481 #ifdef ASSERT
 482   if (istate->_msg != initialize) {
 483     assert(labs(istate->_stack_base - istate->_stack_limit) == (istate->_method->max_stack() + 1), "bad stack limit");
 484     IA32_ONLY(assert(istate->_stack_limit == istate->_thread->last_Java_sp() + 1, "wrong"));
 485   }
 486   // Verify linkages.
 487   interpreterState l = istate;
 488   do {
 489     assert(l == l->_self_link, "bad link");
 490     l = l->_prev_link;
 491   } while (l != NULL);
 492   // Screwups with stack management usually cause us to overwrite istate
 493   // save a copy so we can verify it.
 494   interpreterState orig = istate;
 495 #endif
 496 
 497   register intptr_t*        topOfStack = (intptr_t *)istate->stack(); /* access with STACK macros */
 498   register address          pc = istate->bcp();
 499   register jubyte opcode;
 500   register intptr_t*        locals = istate->locals();
 501   register ConstantPoolCache*    cp = istate->constants(); // method()->constants()->cache()
 502 #ifdef LOTS_OF_REGS
 503   register JavaThread*      THREAD = istate->thread();
 504 #else
 505 #undef THREAD
 506 #define THREAD istate->thread()
 507 #endif
 508 
 509 #ifdef USELABELS
 510   const static void* const opclabels_data[256] = {
 511 /* 0x00 */ &&opc_nop,     &&opc_aconst_null,&&opc_iconst_m1,&&opc_iconst_0,
 512 /* 0x04 */ &&opc_iconst_1,&&opc_iconst_2,   &&opc_iconst_3, &&opc_iconst_4,
 513 /* 0x08 */ &&opc_iconst_5,&&opc_lconst_0,   &&opc_lconst_1, &&opc_fconst_0,
 514 /* 0x0C */ &&opc_fconst_1,&&opc_fconst_2,   &&opc_dconst_0, &&opc_dconst_1,
 515 
 516 /* 0x10 */ &&opc_bipush, &&opc_sipush, &&opc_ldc,    &&opc_ldc_w,
 517 /* 0x14 */ &&opc_ldc2_w, &&opc_iload,  &&opc_lload,  &&opc_fload,
 518 /* 0x18 */ &&opc_dload,  &&opc_aload,  &&opc_iload_0,&&opc_iload_1,
 519 /* 0x1C */ &&opc_iload_2,&&opc_iload_3,&&opc_lload_0,&&opc_lload_1,
 520 
 521 /* 0x20 */ &&opc_lload_2,&&opc_lload_3,&&opc_fload_0,&&opc_fload_1,
 522 /* 0x24 */ &&opc_fload_2,&&opc_fload_3,&&opc_dload_0,&&opc_dload_1,
 523 /* 0x28 */ &&opc_dload_2,&&opc_dload_3,&&opc_aload_0,&&opc_aload_1,


 572 /* 0xC4 */ &&opc_wide,        &&opc_multianewarray, &&opc_ifnull,       &&opc_ifnonnull,
 573 /* 0xC8 */ &&opc_goto_w,      &&opc_jsr_w,          &&opc_breakpoint,   &&opc_default,
 574 /* 0xCC */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 575 
 576 /* 0xD0 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 577 /* 0xD4 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 578 /* 0xD8 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 579 /* 0xDC */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 580 
 581 /* 0xE0 */ &&opc_default,     &&opc_default,        &&opc_default,         &&opc_default,
 582 /* 0xE4 */ &&opc_default,     &&opc_default,        &&opc_fast_aldc,    &&opc_fast_aldc_w,
 583 /* 0xE8 */ &&opc_return_register_finalizer,
 584                               &&opc_invokehandle,   &&opc_default,      &&opc_default,
 585 /* 0xEC */ &&opc_default,     &&opc_default,        &&opc_default,         &&opc_default,
 586 
 587 /* 0xF0 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 588 /* 0xF4 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 589 /* 0xF8 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 590 /* 0xFC */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default
 591   };
 592   register uintptr_t *dispatch_table = (uintptr_t*)&opclabels_data[0];
 593 #endif /* USELABELS */
 594 
 595 #ifdef ASSERT
 596   // this will trigger a VERIFY_OOP on entry
 597   if (istate->msg() != initialize && ! METHOD->is_static()) {
 598     oop rcvr = LOCALS_OBJECT(0);
 599     VERIFY_OOP(rcvr);
 600   }
 601 #endif
 602 
 603   /* QQQ this should be a stack method so we don't know actual direction */
 604   guarantee(istate->msg() == initialize ||
 605          topOfStack >= istate->stack_limit() &&
 606          topOfStack < istate->stack_base(),
 607          "Stack top out of range");
 608 
 609 #ifdef CC_INTERP_PROFILE
 610   // MethodData's last branch taken count.
 611   uint mdo_last_branch_taken_count = 0;
 612 #else




 477 #endif
 478 
 479   static int _compiling;  // (UseCompiler || CountCompiledCalls)
 480 
 481 #ifdef ASSERT
 482   if (istate->_msg != initialize) {
 483     assert(labs(istate->_stack_base - istate->_stack_limit) == (istate->_method->max_stack() + 1), "bad stack limit");
 484     IA32_ONLY(assert(istate->_stack_limit == istate->_thread->last_Java_sp() + 1, "wrong"));
 485   }
 486   // Verify linkages.
 487   interpreterState l = istate;
 488   do {
 489     assert(l == l->_self_link, "bad link");
 490     l = l->_prev_link;
 491   } while (l != NULL);
 492   // Screwups with stack management usually cause us to overwrite istate
 493   // save a copy so we can verify it.
 494   interpreterState orig = istate;
 495 #endif
 496 
 497   intptr_t*        topOfStack = (intptr_t *)istate->stack(); /* access with STACK macros */
 498   address          pc = istate->bcp();
 499   jubyte opcode;
 500   intptr_t*        locals = istate->locals();
 501   ConstantPoolCache*    cp = istate->constants(); // method()->constants()->cache()
 502 #ifdef LOTS_OF_REGS
 503   JavaThread*      THREAD = istate->thread();
 504 #else
 505 #undef THREAD
 506 #define THREAD istate->thread()
 507 #endif
 508 
 509 #ifdef USELABELS
 510   const static void* const opclabels_data[256] = {
 511 /* 0x00 */ &&opc_nop,     &&opc_aconst_null,&&opc_iconst_m1,&&opc_iconst_0,
 512 /* 0x04 */ &&opc_iconst_1,&&opc_iconst_2,   &&opc_iconst_3, &&opc_iconst_4,
 513 /* 0x08 */ &&opc_iconst_5,&&opc_lconst_0,   &&opc_lconst_1, &&opc_fconst_0,
 514 /* 0x0C */ &&opc_fconst_1,&&opc_fconst_2,   &&opc_dconst_0, &&opc_dconst_1,
 515 
 516 /* 0x10 */ &&opc_bipush, &&opc_sipush, &&opc_ldc,    &&opc_ldc_w,
 517 /* 0x14 */ &&opc_ldc2_w, &&opc_iload,  &&opc_lload,  &&opc_fload,
 518 /* 0x18 */ &&opc_dload,  &&opc_aload,  &&opc_iload_0,&&opc_iload_1,
 519 /* 0x1C */ &&opc_iload_2,&&opc_iload_3,&&opc_lload_0,&&opc_lload_1,
 520 
 521 /* 0x20 */ &&opc_lload_2,&&opc_lload_3,&&opc_fload_0,&&opc_fload_1,
 522 /* 0x24 */ &&opc_fload_2,&&opc_fload_3,&&opc_dload_0,&&opc_dload_1,
 523 /* 0x28 */ &&opc_dload_2,&&opc_dload_3,&&opc_aload_0,&&opc_aload_1,


 572 /* 0xC4 */ &&opc_wide,        &&opc_multianewarray, &&opc_ifnull,       &&opc_ifnonnull,
 573 /* 0xC8 */ &&opc_goto_w,      &&opc_jsr_w,          &&opc_breakpoint,   &&opc_default,
 574 /* 0xCC */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 575 
 576 /* 0xD0 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 577 /* 0xD4 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 578 /* 0xD8 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 579 /* 0xDC */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 580 
 581 /* 0xE0 */ &&opc_default,     &&opc_default,        &&opc_default,         &&opc_default,
 582 /* 0xE4 */ &&opc_default,     &&opc_default,        &&opc_fast_aldc,    &&opc_fast_aldc_w,
 583 /* 0xE8 */ &&opc_return_register_finalizer,
 584                               &&opc_invokehandle,   &&opc_default,      &&opc_default,
 585 /* 0xEC */ &&opc_default,     &&opc_default,        &&opc_default,         &&opc_default,
 586 
 587 /* 0xF0 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 588 /* 0xF4 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 589 /* 0xF8 */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default,
 590 /* 0xFC */ &&opc_default,     &&opc_default,        &&opc_default,      &&opc_default
 591   };
 592   uintptr_t *dispatch_table = (uintptr_t*)&opclabels_data[0];
 593 #endif /* USELABELS */
 594 
 595 #ifdef ASSERT
 596   // this will trigger a VERIFY_OOP on entry
 597   if (istate->msg() != initialize && ! METHOD->is_static()) {
 598     oop rcvr = LOCALS_OBJECT(0);
 599     VERIFY_OOP(rcvr);
 600   }
 601 #endif
 602 
 603   /* QQQ this should be a stack method so we don't know actual direction */
 604   guarantee(istate->msg() == initialize ||
 605          topOfStack >= istate->stack_limit() &&
 606          topOfStack < istate->stack_base(),
 607          "Stack top out of range");
 608 
 609 #ifdef CC_INTERP_PROFILE
 610   // MethodData's last branch taken count.
 611   uint mdo_last_branch_taken_count = 0;
 612 #else


< prev index next >