< prev index next >

src/hotspot/share/classfile/verifier.cpp

Print this page




1790         {
1791           index = bcs.get_index_u2();
1792           verify_cp_class_type(bci, index, cp, CHECK_VERIFY(this));
1793           current_frame.pop_stack(object_type(), CHECK_VERIFY(this));
1794           VerificationType klass_type = cp_index_to_type(
1795             index, cp, CHECK_VERIFY(this));
1796           current_frame.push_stack(klass_type, CHECK_VERIFY(this));
1797           no_control_flow = false; break;
1798         }
1799         case Bytecodes::_instanceof : {
1800           index = bcs.get_index_u2();
1801           verify_cp_class_type(bci, index, cp, CHECK_VERIFY(this));
1802           current_frame.pop_stack(object_type(), CHECK_VERIFY(this));
1803           current_frame.push_stack(
1804             VerificationType::integer_type(), CHECK_VERIFY(this));
1805           no_control_flow = false; break;
1806         }
1807         case Bytecodes::_monitorenter :
1808         case Bytecodes::_monitorexit : {
1809           VerificationType ref = current_frame.pop_stack(
1810             VerificationType::reference_check(), CHECK_VERIFY(this));
1811           no_control_flow = false; break;
1812         }
1813         case Bytecodes::_multianewarray :
1814         {
1815           index = bcs.get_index_u2();
1816           u2 dim = *(bcs.bcp()+3);
1817           verify_cp_class_type(bci, index, cp, CHECK_VERIFY(this));
1818           VerificationType new_array_type =
1819             cp_index_to_type(index, cp, CHECK_VERIFY(this));
1820           if (!new_array_type.is_array()) {
1821             verify_error(ErrorContext::bad_type(bci,
1822                 TypeOrigin::cp(index, new_array_type)),
1823                 "Illegal constant pool index in multianewarray instruction");
1824             return;
1825           }
1826           if (dim < 1 || new_array_type.dimensions() < dim) {
1827             verify_error(ErrorContext::bad_code(bci),
1828                 "Illegal dimension in multianewarray instruction: %d", dim);
1829             return;
1830           }




1790         {
1791           index = bcs.get_index_u2();
1792           verify_cp_class_type(bci, index, cp, CHECK_VERIFY(this));
1793           current_frame.pop_stack(object_type(), CHECK_VERIFY(this));
1794           VerificationType klass_type = cp_index_to_type(
1795             index, cp, CHECK_VERIFY(this));
1796           current_frame.push_stack(klass_type, CHECK_VERIFY(this));
1797           no_control_flow = false; break;
1798         }
1799         case Bytecodes::_instanceof : {
1800           index = bcs.get_index_u2();
1801           verify_cp_class_type(bci, index, cp, CHECK_VERIFY(this));
1802           current_frame.pop_stack(object_type(), CHECK_VERIFY(this));
1803           current_frame.push_stack(
1804             VerificationType::integer_type(), CHECK_VERIFY(this));
1805           no_control_flow = false; break;
1806         }
1807         case Bytecodes::_monitorenter :
1808         case Bytecodes::_monitorexit : {
1809           VerificationType ref = current_frame.pop_stack(
1810             VerificationType::nonscalar_check(), CHECK_VERIFY(this));
1811           no_control_flow = false; break;
1812         }
1813         case Bytecodes::_multianewarray :
1814         {
1815           index = bcs.get_index_u2();
1816           u2 dim = *(bcs.bcp()+3);
1817           verify_cp_class_type(bci, index, cp, CHECK_VERIFY(this));
1818           VerificationType new_array_type =
1819             cp_index_to_type(index, cp, CHECK_VERIFY(this));
1820           if (!new_array_type.is_array()) {
1821             verify_error(ErrorContext::bad_type(bci,
1822                 TypeOrigin::cp(index, new_array_type)),
1823                 "Illegal constant pool index in multianewarray instruction");
1824             return;
1825           }
1826           if (dim < 1 || new_array_type.dimensions() < dim) {
1827             verify_error(ErrorContext::bad_code(bci),
1828                 "Illegal dimension in multianewarray instruction: %d", dim);
1829             return;
1830           }


< prev index next >