337 */ |
337 */ |
338 #undef CHECK_NULL |
338 #undef CHECK_NULL |
339 #define CHECK_NULL(obj_) \ |
339 #define CHECK_NULL(obj_) \ |
340 if ((obj_) == NULL) { \ |
340 if ((obj_) == NULL) { \ |
341 VM_JAVA_ERROR(vmSymbols::java_lang_NullPointerException(), ""); \ |
341 VM_JAVA_ERROR(vmSymbols::java_lang_NullPointerException(), ""); \ |
342 } |
342 } \ |
|
343 VERIFY_OOP(obj_) |
343 |
344 |
344 #define VMdoubleConstZero() 0.0 |
345 #define VMdoubleConstZero() 0.0 |
345 #define VMdoubleConstOne() 1.0 |
346 #define VMdoubleConstOne() 1.0 |
346 #define VMlongConstZero() (max_jlong-max_jlong) |
347 #define VMlongConstZero() (max_jlong-max_jlong) |
347 #define VMlongConstOne() ((max_jlong-max_jlong)+1) |
348 #define VMlongConstOne() ((max_jlong-max_jlong)+1) |
507 /* 0xA8 */ &&opc_jsr, &&opc_ret, &&opc_tableswitch,&&opc_lookupswitch, |
508 /* 0xA8 */ &&opc_jsr, &&opc_ret, &&opc_tableswitch,&&opc_lookupswitch, |
508 /* 0xAC */ &&opc_ireturn, &&opc_lreturn, &&opc_freturn, &&opc_dreturn, |
509 /* 0xAC */ &&opc_ireturn, &&opc_lreturn, &&opc_freturn, &&opc_dreturn, |
509 |
510 |
510 /* 0xB0 */ &&opc_areturn, &&opc_return, &&opc_getstatic, &&opc_putstatic, |
511 /* 0xB0 */ &&opc_areturn, &&opc_return, &&opc_getstatic, &&opc_putstatic, |
511 /* 0xB4 */ &&opc_getfield, &&opc_putfield, &&opc_invokevirtual,&&opc_invokespecial, |
512 /* 0xB4 */ &&opc_getfield, &&opc_putfield, &&opc_invokevirtual,&&opc_invokespecial, |
512 /* 0xB8 */ &&opc_invokestatic,&&opc_invokeinterface,NULL, &&opc_new, |
513 /* 0xB8 */ &&opc_invokestatic,&&opc_invokeinterface,&&opc_default, &&opc_new, |
513 /* 0xBC */ &&opc_newarray, &&opc_anewarray, &&opc_arraylength, &&opc_athrow, |
514 /* 0xBC */ &&opc_newarray, &&opc_anewarray, &&opc_arraylength, &&opc_athrow, |
514 |
515 |
515 /* 0xC0 */ &&opc_checkcast, &&opc_instanceof, &&opc_monitorenter, &&opc_monitorexit, |
516 /* 0xC0 */ &&opc_checkcast, &&opc_instanceof, &&opc_monitorenter, &&opc_monitorexit, |
516 /* 0xC4 */ &&opc_wide, &&opc_multianewarray, &&opc_ifnull, &&opc_ifnonnull, |
517 /* 0xC4 */ &&opc_wide, &&opc_multianewarray, &&opc_ifnull, &&opc_ifnonnull, |
517 /* 0xC8 */ &&opc_goto_w, &&opc_jsr_w, &&opc_breakpoint, &&opc_default, |
518 /* 0xC8 */ &&opc_goto_w, &&opc_jsr_w, &&opc_breakpoint, &&opc_default, |
537 |
538 |
538 #ifdef ASSERT |
539 #ifdef ASSERT |
539 // this will trigger a VERIFY_OOP on entry |
540 // this will trigger a VERIFY_OOP on entry |
540 if (istate->msg() != initialize && ! METHOD->is_static()) { |
541 if (istate->msg() != initialize && ! METHOD->is_static()) { |
541 oop rcvr = LOCALS_OBJECT(0); |
542 oop rcvr = LOCALS_OBJECT(0); |
|
543 VERIFY_OOP(rcvr); |
542 } |
544 } |
543 #endif |
545 #endif |
544 // #define HACK |
546 // #define HACK |
545 #ifdef HACK |
547 #ifdef HACK |
546 bool interesting = false; |
548 bool interesting = false; |
547 #endif // HACK |
549 #endif // HACK |
548 |
550 |
549 /* QQQ this should be a stack method so we don't know actual direction */ |
551 /* QQQ this should be a stack method so we don't know actual direction */ |
550 assert(istate->msg() == initialize || |
552 guarantee(istate->msg() == initialize || |
551 topOfStack >= istate->stack_limit() && |
553 topOfStack >= istate->stack_limit() && |
552 topOfStack < istate->stack_base(), |
554 topOfStack < istate->stack_base(), |
553 "Stack top out of range"); |
555 "Stack top out of range"); |
554 |
556 |
555 switch (istate->msg()) { |
557 switch (istate->msg()) { |
611 oop rcvr; |
613 oop rcvr; |
612 if (METHOD->is_static()) { |
614 if (METHOD->is_static()) { |
613 rcvr = METHOD->constants()->pool_holder()->klass_part()->java_mirror(); |
615 rcvr = METHOD->constants()->pool_holder()->klass_part()->java_mirror(); |
614 } else { |
616 } else { |
615 rcvr = LOCALS_OBJECT(0); |
617 rcvr = LOCALS_OBJECT(0); |
|
618 VERIFY_OOP(rcvr); |
616 } |
619 } |
617 // The initial monitor is ours for the taking |
620 // The initial monitor is ours for the taking |
618 BasicObjectLock* mon = &istate->monitor_base()[-1]; |
621 BasicObjectLock* mon = &istate->monitor_base()[-1]; |
619 oop monobj = mon->obj(); |
622 oop monobj = mon->obj(); |
620 assert(mon->obj() == rcvr, "method monitor mis-initialized"); |
623 assert(mon->obj() == rcvr, "method monitor mis-initialized"); |
733 } |
736 } |
734 |
737 |
735 case popping_frame: { |
738 case popping_frame: { |
736 // returned from a java call to pop the frame, restart the call |
739 // returned from a java call to pop the frame, restart the call |
737 // clear the message so we don't confuse ourselves later |
740 // clear the message so we don't confuse ourselves later |
|
741 ShouldNotReachHere(); // we don't return this. |
738 assert(THREAD->pop_frame_in_process(), "wrong frame pop state"); |
742 assert(THREAD->pop_frame_in_process(), "wrong frame pop state"); |
739 istate->set_msg(no_request); |
743 istate->set_msg(no_request); |
740 THREAD->clr_pop_frame_in_process(); |
744 THREAD->clr_pop_frame_in_process(); |
741 goto run; |
745 goto run; |
742 } |
746 } |
799 } |
803 } |
800 case got_monitors: { |
804 case got_monitors: { |
801 // continue locking now that we have a monitor to use |
805 // continue locking now that we have a monitor to use |
802 // we expect to find newly allocated monitor at the "top" of the monitor stack. |
806 // we expect to find newly allocated monitor at the "top" of the monitor stack. |
803 oop lockee = STACK_OBJECT(-1); |
807 oop lockee = STACK_OBJECT(-1); |
|
808 VERIFY_OOP(lockee); |
804 // derefing's lockee ought to provoke implicit null check |
809 // derefing's lockee ought to provoke implicit null check |
805 // find a free monitor |
810 // find a free monitor |
806 BasicObjectLock* entry = (BasicObjectLock*) istate->stack_base(); |
811 BasicObjectLock* entry = (BasicObjectLock*) istate->stack_base(); |
807 assert(entry->obj() == NULL, "Frame manager didn't allocate the monitor"); |
812 assert(entry->obj() == NULL, "Frame manager didn't allocate the monitor"); |
808 entry->set_obj(lockee); |
813 entry->set_obj(lockee); |
909 UPDATE_PC_AND_TOS_AND_CONTINUE(3, 1); |
914 UPDATE_PC_AND_TOS_AND_CONTINUE(3, 1); |
910 |
915 |
911 /* load from local variable */ |
916 /* load from local variable */ |
912 |
917 |
913 CASE(_aload): |
918 CASE(_aload): |
|
919 VERIFY_OOP(LOCALS_OBJECT(pc[1])); |
914 SET_STACK_OBJECT(LOCALS_OBJECT(pc[1]), 0); |
920 SET_STACK_OBJECT(LOCALS_OBJECT(pc[1]), 0); |
915 UPDATE_PC_AND_TOS_AND_CONTINUE(2, 1); |
921 UPDATE_PC_AND_TOS_AND_CONTINUE(2, 1); |
916 |
922 |
917 CASE(_iload): |
923 CASE(_iload): |
918 CASE(_fload): |
924 CASE(_fload): |
928 UPDATE_PC_AND_TOS_AND_CONTINUE(2, 2); |
934 UPDATE_PC_AND_TOS_AND_CONTINUE(2, 2); |
929 |
935 |
930 #undef OPC_LOAD_n |
936 #undef OPC_LOAD_n |
931 #define OPC_LOAD_n(num) \ |
937 #define OPC_LOAD_n(num) \ |
932 CASE(_aload_##num): \ |
938 CASE(_aload_##num): \ |
|
939 VERIFY_OOP(LOCALS_OBJECT(num)); \ |
933 SET_STACK_OBJECT(LOCALS_OBJECT(num), 0); \ |
940 SET_STACK_OBJECT(LOCALS_OBJECT(num), 0); \ |
934 UPDATE_PC_AND_TOS_AND_CONTINUE(1, 1); \ |
941 UPDATE_PC_AND_TOS_AND_CONTINUE(1, 1); \ |
935 \ |
942 \ |
936 CASE(_iload_##num): \ |
943 CASE(_iload_##num): \ |
937 CASE(_fload_##num): \ |
944 CASE(_fload_##num): \ |
973 uint16_t reg = Bytes::get_Java_u2(pc + 2); |
980 uint16_t reg = Bytes::get_Java_u2(pc + 2); |
974 |
981 |
975 opcode = pc[1]; |
982 opcode = pc[1]; |
976 switch(opcode) { |
983 switch(opcode) { |
977 case Bytecodes::_aload: |
984 case Bytecodes::_aload: |
|
985 VERIFY_OOP(LOCALS_OBJECT(reg)); |
978 SET_STACK_OBJECT(LOCALS_OBJECT(reg), 0); |
986 SET_STACK_OBJECT(LOCALS_OBJECT(reg), 0); |
979 UPDATE_PC_AND_TOS_AND_CONTINUE(4, 1); |
987 UPDATE_PC_AND_TOS_AND_CONTINUE(4, 1); |
980 |
988 |
981 case Bytecodes::_iload: |
989 case Bytecodes::_iload: |
982 case Bytecodes::_fload: |
990 case Bytecodes::_fload: |
1097 #undef OPC_INT_BINARY |
1105 #undef OPC_INT_BINARY |
1098 #define OPC_INT_BINARY(opcname, opname, test) \ |
1106 #define OPC_INT_BINARY(opcname, opname, test) \ |
1099 CASE(_i##opcname): \ |
1107 CASE(_i##opcname): \ |
1100 if (test && (STACK_INT(-1) == 0)) { \ |
1108 if (test && (STACK_INT(-1) == 0)) { \ |
1101 VM_JAVA_ERROR(vmSymbols::java_lang_ArithmeticException(), \ |
1109 VM_JAVA_ERROR(vmSymbols::java_lang_ArithmeticException(), \ |
1102 "/ by int zero"); \ |
1110 "/ by zero"); \ |
1103 } \ |
1111 } \ |
1104 SET_STACK_INT(VMint##opname(STACK_INT(-2), \ |
1112 SET_STACK_INT(VMint##opname(STACK_INT(-2), \ |
1105 STACK_INT(-1)), \ |
1113 STACK_INT(-1)), \ |
1106 -2); \ |
1114 -2); \ |
1107 UPDATE_PC_AND_TOS_AND_CONTINUE(1, -1); \ |
1115 UPDATE_PC_AND_TOS_AND_CONTINUE(1, -1); \ |
1275 CASE(_f2d): /* convert top of stack float to double */ |
1283 CASE(_f2d): /* convert top of stack float to double */ |
1276 { |
1284 { |
1277 jfloat f; |
1285 jfloat f; |
1278 jdouble r; |
1286 jdouble r; |
1279 f = STACK_FLOAT(-1); |
1287 f = STACK_FLOAT(-1); |
|
1288 #ifdef IA64 |
|
1289 // IA64 gcc bug |
|
1290 r = ( f == 0.0f ) ? (jdouble) f : (jdouble) f + ia64_double_zero; |
|
1291 #else |
1280 r = (jdouble) f; |
1292 r = (jdouble) f; |
|
1293 #endif |
1281 MORE_STACK(-1); // POP |
1294 MORE_STACK(-1); // POP |
1282 SET_STACK_DOUBLE(r, 1); |
1295 SET_STACK_DOUBLE(r, 1); |
1283 UPDATE_PC_AND_TOS_AND_CONTINUE(1, 2); |
1296 UPDATE_PC_AND_TOS_AND_CONTINUE(1, 2); |
1284 } |
1297 } |
1285 |
1298 |
1559 /* |
1573 /* |
1560 * This one looks different because of the assignability check |
1574 * This one looks different because of the assignability check |
1561 */ |
1575 */ |
1562 CASE(_aastore): { |
1576 CASE(_aastore): { |
1563 oop rhsObject = STACK_OBJECT(-1); |
1577 oop rhsObject = STACK_OBJECT(-1); |
|
1578 VERIFY_OOP(rhsObject); |
1564 ARRAY_INTRO( -3); |
1579 ARRAY_INTRO( -3); |
1565 // arrObj, index are set |
1580 // arrObj, index are set |
1566 if (rhsObject != NULL) { |
1581 if (rhsObject != NULL) { |
1567 /* Check assignability of rhsObject into arrObj */ |
1582 /* Check assignability of rhsObject into arrObj */ |
1568 klassOop rhsKlassOop = rhsObject->klass(); // EBX (subclass) |
1583 klassOop rhsKlassOop = rhsObject->klass(); // EBX (subclass) |
1726 // |
1742 // |
1727 TosState tos_type = cache->flag_state(); |
1743 TosState tos_type = cache->flag_state(); |
1728 int field_offset = cache->f2(); |
1744 int field_offset = cache->f2(); |
1729 if (cache->is_volatile()) { |
1745 if (cache->is_volatile()) { |
1730 if (tos_type == atos) { |
1746 if (tos_type == atos) { |
|
1747 VERIFY_OOP(obj->obj_field_acquire(field_offset)); |
1731 SET_STACK_OBJECT(obj->obj_field_acquire(field_offset), -1); |
1748 SET_STACK_OBJECT(obj->obj_field_acquire(field_offset), -1); |
1732 } else if (tos_type == itos) { |
1749 } else if (tos_type == itos) { |
1733 SET_STACK_INT(obj->int_field_acquire(field_offset), -1); |
1750 SET_STACK_INT(obj->int_field_acquire(field_offset), -1); |
1734 } else if (tos_type == ltos) { |
1751 } else if (tos_type == ltos) { |
1735 SET_STACK_LONG(obj->long_field_acquire(field_offset), 0); |
1752 SET_STACK_LONG(obj->long_field_acquire(field_offset), 0); |
1746 SET_STACK_DOUBLE(obj->double_field_acquire(field_offset), 0); |
1763 SET_STACK_DOUBLE(obj->double_field_acquire(field_offset), 0); |
1747 MORE_STACK(1); |
1764 MORE_STACK(1); |
1748 } |
1765 } |
1749 } else { |
1766 } else { |
1750 if (tos_type == atos) { |
1767 if (tos_type == atos) { |
|
1768 VERIFY_OOP(obj->obj_field(field_offset)); |
1751 SET_STACK_OBJECT(obj->obj_field(field_offset), -1); |
1769 SET_STACK_OBJECT(obj->obj_field(field_offset), -1); |
1752 } else if (tos_type == itos) { |
1770 } else if (tos_type == itos) { |
1753 SET_STACK_INT(obj->int_field(field_offset), -1); |
1771 SET_STACK_INT(obj->int_field(field_offset), -1); |
1754 } else if (tos_type == ltos) { |
1772 } else if (tos_type == ltos) { |
1755 SET_STACK_LONG(obj->long_field(field_offset), 0); |
1773 SET_STACK_LONG(obj->long_field(field_offset), 0); |
1835 int field_offset = cache->f2(); |
1854 int field_offset = cache->f2(); |
1836 if (cache->is_volatile()) { |
1855 if (cache->is_volatile()) { |
1837 if (tos_type == itos) { |
1856 if (tos_type == itos) { |
1838 obj->release_int_field_put(field_offset, STACK_INT(-1)); |
1857 obj->release_int_field_put(field_offset, STACK_INT(-1)); |
1839 } else if (tos_type == atos) { |
1858 } else if (tos_type == atos) { |
|
1859 VERIFY_OOP(STACK_OBJECT(-1)); |
1840 obj->release_obj_field_put(field_offset, STACK_OBJECT(-1)); |
1860 obj->release_obj_field_put(field_offset, STACK_OBJECT(-1)); |
1841 OrderAccess::release_store(&BYTE_MAP_BASE[(uintptr_t)obj >> CardTableModRefBS::card_shift], 0); |
1861 OrderAccess::release_store(&BYTE_MAP_BASE[(uintptr_t)obj >> CardTableModRefBS::card_shift], 0); |
1842 } else if (tos_type == btos) { |
1862 } else if (tos_type == btos) { |
1843 obj->release_byte_field_put(field_offset, STACK_INT(-1)); |
1863 obj->release_byte_field_put(field_offset, STACK_INT(-1)); |
1844 } else if (tos_type == ltos) { |
1864 } else if (tos_type == ltos) { |
1855 OrderAccess::storeload(); |
1875 OrderAccess::storeload(); |
1856 } else { |
1876 } else { |
1857 if (tos_type == itos) { |
1877 if (tos_type == itos) { |
1858 obj->int_field_put(field_offset, STACK_INT(-1)); |
1878 obj->int_field_put(field_offset, STACK_INT(-1)); |
1859 } else if (tos_type == atos) { |
1879 } else if (tos_type == atos) { |
|
1880 VERIFY_OOP(STACK_OBJECT(-1)); |
1860 obj->obj_field_put(field_offset, STACK_OBJECT(-1)); |
1881 obj->obj_field_put(field_offset, STACK_OBJECT(-1)); |
1861 OrderAccess::release_store(&BYTE_MAP_BASE[(uintptr_t)obj >> CardTableModRefBS::card_shift], 0); |
1882 OrderAccess::release_store(&BYTE_MAP_BASE[(uintptr_t)obj >> CardTableModRefBS::card_shift], 0); |
1862 } else if (tos_type == btos) { |
1883 } else if (tos_type == btos) { |
1863 obj->byte_field_put(field_offset, STACK_INT(-1)); |
1884 obj->byte_field_put(field_offset, STACK_INT(-1)); |
1864 } else if (tos_type == ltos) { |
1885 } else if (tos_type == ltos) { |
1959 THREAD->set_vm_result(NULL); |
1980 THREAD->set_vm_result(NULL); |
1960 UPDATE_PC_AND_TOS_AND_CONTINUE(4, -(dims-1)); |
1981 UPDATE_PC_AND_TOS_AND_CONTINUE(4, -(dims-1)); |
1961 } |
1982 } |
1962 CASE(_checkcast): |
1983 CASE(_checkcast): |
1963 if (STACK_OBJECT(-1) != NULL) { |
1984 if (STACK_OBJECT(-1) != NULL) { |
|
1985 VERIFY_OOP(STACK_OBJECT(-1)); |
1964 u2 index = Bytes::get_Java_u2(pc+1); |
1986 u2 index = Bytes::get_Java_u2(pc+1); |
1965 if (ProfileInterpreter) { |
1987 if (ProfileInterpreter) { |
1966 // needs Profile_checkcast QQQ |
1988 // needs Profile_checkcast QQQ |
1967 ShouldNotReachHere(); |
1989 ShouldNotReachHere(); |
1968 } |
1990 } |
1997 |
2019 |
1998 CASE(_instanceof): |
2020 CASE(_instanceof): |
1999 if (STACK_OBJECT(-1) == NULL) { |
2021 if (STACK_OBJECT(-1) == NULL) { |
2000 SET_STACK_INT(0, -1); |
2022 SET_STACK_INT(0, -1); |
2001 } else { |
2023 } else { |
|
2024 VERIFY_OOP(STACK_OBJECT(-1)); |
2002 u2 index = Bytes::get_Java_u2(pc+1); |
2025 u2 index = Bytes::get_Java_u2(pc+1); |
2003 // Constant pool may have actual klass or unresolved klass. If it is |
2026 // Constant pool may have actual klass or unresolved klass. If it is |
2004 // unresolved we must resolve it |
2027 // unresolved we must resolve it |
2005 if (METHOD->constants()->tag_at(index).is_unresolved_klass()) { |
2028 if (METHOD->constants()->tag_at(index).is_unresolved_klass()) { |
2006 CALL_VM(InterpreterRuntime::quicken_io_cc(THREAD), handle_exception); |
2029 CALL_VM(InterpreterRuntime::quicken_io_cc(THREAD), handle_exception); |
2042 case JVM_CONSTANT_Float: |
2065 case JVM_CONSTANT_Float: |
2043 SET_STACK_FLOAT(constants->float_at(index), 0); |
2066 SET_STACK_FLOAT(constants->float_at(index), 0); |
2044 break; |
2067 break; |
2045 |
2068 |
2046 case JVM_CONSTANT_String: |
2069 case JVM_CONSTANT_String: |
|
2070 VERIFY_OOP(constants->resolved_string_at(index)); |
2047 SET_STACK_OBJECT(constants->resolved_string_at(index), 0); |
2071 SET_STACK_OBJECT(constants->resolved_string_at(index), 0); |
2048 break; |
2072 break; |
2049 |
2073 |
2050 case JVM_CONSTANT_Class: |
2074 case JVM_CONSTANT_Class: |
|
2075 VERIFY_OOP(constants->resolved_klass_at(index)->klass_part()->java_mirror()); |
2051 SET_STACK_OBJECT(constants->resolved_klass_at(index)->klass_part()->java_mirror(), 0); |
2076 SET_STACK_OBJECT(constants->resolved_klass_at(index)->klass_part()->java_mirror(), 0); |
2052 break; |
2077 break; |
2053 |
2078 |
2054 case JVM_CONSTANT_UnresolvedString: |
2079 case JVM_CONSTANT_UnresolvedString: |
2055 case JVM_CONSTANT_UnresolvedClass: |
2080 case JVM_CONSTANT_UnresolvedClass: |
2056 case JVM_CONSTANT_UnresolvedClassInError: |
2081 case JVM_CONSTANT_UnresolvedClassInError: |
2057 CALL_VM(InterpreterRuntime::ldc(THREAD, wide), handle_exception); |
2082 CALL_VM(InterpreterRuntime::ldc(THREAD, wide), handle_exception); |
2058 SET_STACK_OBJECT(THREAD->vm_result(), 0); |
2083 SET_STACK_OBJECT(THREAD->vm_result(), 0); |
2059 THREAD->set_vm_result(NULL); |
2084 THREAD->set_vm_result(NULL); |
2060 break; |
2085 break; |
2061 |
|
2062 #if 0 |
|
2063 CASE(_fast_igetfield): |
|
2064 CASE(_fastagetfield): |
|
2065 CASE(_fast_aload_0): |
|
2066 CASE(_fast_iaccess_0): |
|
2067 CASE(__fast_aaccess_0): |
|
2068 CASE(_fast_linearswitch): |
|
2069 CASE(_fast_binaryswitch): |
|
2070 fatal("unsupported fast bytecode"); |
|
2071 #endif |
|
2072 |
2086 |
2073 default: ShouldNotReachHere(); |
2087 default: ShouldNotReachHere(); |
2074 } |
2088 } |
2075 UPDATE_PC_AND_TOS_AND_CONTINUE(incr, 1); |
2089 UPDATE_PC_AND_TOS_AND_CONTINUE(incr, 1); |
2076 } |
2090 } |
2120 callee = (methodOop) cache->f2(); |
2134 callee = (methodOop) cache->f2(); |
2121 } else { |
2135 } else { |
2122 // get receiver |
2136 // get receiver |
2123 int parms = cache->parameter_size(); |
2137 int parms = cache->parameter_size(); |
2124 // Same comments as invokevirtual apply here |
2138 // Same comments as invokevirtual apply here |
|
2139 VERIFY_OOP(STACK_OBJECT(-parms)); |
2125 instanceKlass* rcvrKlass = (instanceKlass*) |
2140 instanceKlass* rcvrKlass = (instanceKlass*) |
2126 STACK_OBJECT(-parms)->klass()->klass_part(); |
2141 STACK_OBJECT(-parms)->klass()->klass_part(); |
2127 callee = (methodOop) rcvrKlass->start_of_vtable()[ cache->f2()]; |
2142 callee = (methodOop) rcvrKlass->start_of_vtable()[ cache->f2()]; |
2128 } |
2143 } |
2129 istate->set_callee(callee); |
2144 istate->set_callee(callee); |
2203 // methodOop callee = rcvr->klass()->klass_part()->vtable()->method_at(cache->f2()); |
2218 // methodOop callee = rcvr->klass()->klass_part()->vtable()->method_at(cache->f2()); |
2204 // |
2219 // |
2205 // this fails with an assert |
2220 // this fails with an assert |
2206 // instanceKlass* rcvrKlass = instanceKlass::cast(STACK_OBJECT(-parms)->klass()); |
2221 // instanceKlass* rcvrKlass = instanceKlass::cast(STACK_OBJECT(-parms)->klass()); |
2207 // but this works |
2222 // but this works |
|
2223 VERIFY_OOP(STACK_OBJECT(-parms)); |
2208 instanceKlass* rcvrKlass = (instanceKlass*) STACK_OBJECT(-parms)->klass()->klass_part(); |
2224 instanceKlass* rcvrKlass = (instanceKlass*) STACK_OBJECT(-parms)->klass()->klass_part(); |
2209 /* |
2225 /* |
2210 Executing this code in java.lang.String: |
2226 Executing this code in java.lang.String: |
2211 public String(char value[]) { |
2227 public String(char value[]) { |
2212 this.count = value.length; |
2228 this.count = value.length; |
2649 // |
2665 // |
2650 THREAD->popframe_preserve_args(in_ByteSize(METHOD->size_of_parameters() * wordSize), |
2666 THREAD->popframe_preserve_args(in_ByteSize(METHOD->size_of_parameters() * wordSize), |
2651 LOCALS_SLOT(METHOD->size_of_parameters() - 1)); |
2667 LOCALS_SLOT(METHOD->size_of_parameters() - 1)); |
2652 THREAD->set_popframe_condition_bit(JavaThread::popframe_force_deopt_reexecution_bit); |
2668 THREAD->set_popframe_condition_bit(JavaThread::popframe_force_deopt_reexecution_bit); |
2653 } |
2669 } |
2654 UPDATE_PC_AND_RETURN(1); |
2670 THREAD->clr_pop_frame_in_process(); |
2655 } else { |
|
2656 // Normal return |
|
2657 // Advance the pc and return to frame manager |
|
2658 istate->set_msg(return_from_method); |
|
2659 istate->set_return_kind((Bytecodes::Code)opcode); |
|
2660 UPDATE_PC_AND_RETURN(1); |
|
2661 } |
2671 } |
|
2672 |
|
2673 // Normal return |
|
2674 // Advance the pc and return to frame manager |
|
2675 istate->set_msg(return_from_method); |
|
2676 istate->set_return_kind((Bytecodes::Code)opcode); |
|
2677 UPDATE_PC_AND_RETURN(1); |
2662 } /* handle_return: */ |
2678 } /* handle_return: */ |
2663 |
2679 |
2664 // This is really a fatal error return |
2680 // This is really a fatal error return |
2665 |
2681 |
2666 finish: |
2682 finish: |