comparison src/share/vm/prims/jvmtiClassFileReconstituter.cpp @ 5922:ff29ce866f23

7118280: The gbyc00102 JCK7 test causes an assert in JVM 7.0 fastdebug mode Summary: Assert doesn't respect invokedynamic opcode Reviewed-by: dcubed, phh
author dsamersoff
date Thu, 01 Mar 2012 12:41:13 +0400
parents c01e115b095e
children f7c4174b33ba
comparison
equal deleted inserted replaced
5899:205573af962c 5922:ff29ce866f23
1 /* 1 /*
2 * Copyright (c) 2005, 2011, Oracle and/or its affiliates. All rights reserved. 2 * Copyright (c) 2005, 2012, Oracle and/or its affiliates. All rights reserved.
3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER. 3 * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
4 * 4 *
5 * This code is free software; you can redistribute it and/or modify it 5 * This code is free software; you can redistribute it and/or modify it
6 * under the terms of the GNU General Public License version 2 only, as 6 * under the terms of the GNU General Public License version 2 only, as
7 * published by the Free Software Foundation. 7 * published by the Free Software Foundation.
725 case Bytecodes::_invokevirtual : // fall through 725 case Bytecodes::_invokevirtual : // fall through
726 case Bytecodes::_invokespecial : // fall through 726 case Bytecodes::_invokespecial : // fall through
727 case Bytecodes::_invokestatic : // fall through 727 case Bytecodes::_invokestatic : // fall through
728 case Bytecodes::_invokedynamic : // fall through 728 case Bytecodes::_invokedynamic : // fall through
729 case Bytecodes::_invokeinterface : 729 case Bytecodes::_invokeinterface :
730 assert(len == 3 || (code == Bytecodes::_invokeinterface && len ==5), 730 assert(len == 3 ||
731 (code == Bytecodes::_invokeinterface && len == 5) ||
732 (code == Bytecodes::_invokedynamic && len == 5),
731 "sanity check"); 733 "sanity check");
734
732 int cpci = Bytes::get_native_u2(bcp+1); 735 int cpci = Bytes::get_native_u2(bcp+1);
733 bool is_invokedynamic = (EnableInvokeDynamic && code == Bytecodes::_invokedynamic); 736 bool is_invokedynamic = (EnableInvokeDynamic && code == Bytecodes::_invokedynamic);
734 if (is_invokedynamic) 737 if (is_invokedynamic)
735 cpci = Bytes::get_native_u4(bcp+1); 738 cpci = Bytes::get_native_u4(bcp+1);
736 // cache cannot be pre-fetched since some classes won't have it yet 739 // cache cannot be pre-fetched since some classes won't have it yet