/*
* DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
*
* under the terms of the GNU General Public License version 2 only, as
* published by the Free Software Foundation.
*
* This code is distributed in the hope that it will be useful, but WITHOUT
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
* FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
* version 2 for more details (a copy is included in the LICENSE file that
* accompanied this code).
*
* You should have received a copy of the GNU General Public License version
* 2 along with this work; if not, write to the Free Software Foundation,
* Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
*
* Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
* or visit www.oracle.com if you need additional information or have any
* questions.
*
*/
#include "precompiled.hpp"
#include "classfile/stackMapTable.hpp"
#include "classfile/verifier.hpp"
#include "memory/resourceArea.hpp"
#include "oops/oop.inline.hpp"
#include "runtime/fieldType.hpp"
#include "runtime/handles.inline.hpp"
if (_frame_count > 0) {
for (int32_t i = 0; i < _frame_count; i++) {
_frame_array[i] = frame;
"StackMapTable error: bad offset");
return;
}
}
}
}
// This method is only called by method in StackMapTable.
int i = 0;
for (; i < _frame_count; i++) {
return i;
}
}
return i; // frame with offset doesn't exist in the array
}
}
// specified offset and frame index. Return true if the two frames match.
//
// The values of match and update are: _match__update_
//
// linear bytecode verification following an
// unconditional branch: false true
// linear bytecode verification not following an
// unconditional branch: true true
return false;
}
bool result = true;
if (match) {
// when checking handler target, match == true && update == false
// Has direct control flow from last instruction, need to match the two
// frames.
}
if (update) {
// Use the frame in stackmap table as current frame
// Make sure unused type array items are all _bogus_type.
}
}
return result;
}
"Inconsistent stackmap frames at branch target %d", target);
return;
}
// check if uninitialized objects exist on backward branches
}
"Uninitialized object exists on backward branch %d", target);
return;
}
}
{
for (int32_t i = 0; i < _frame_count; ++i) {
}
}
}
pos -= 2;
} else {
pos --;
}
}
return pos+1;
}
}
if (tag == ITEM_Object) {
return VerificationType::bogus_type();
}
}
if (tag == ITEM_UninitializedThis) {
*flags |= FLAG_THIS_UNINIT;
}
return VerificationType::uninitialized_this_type();
}
if (tag == ITEM_Uninitialized) {
if (offset >= _code_length ||
"StackMapTable format error: bad offset for Uninitialized");
return VerificationType::bogus_type();
}
}
return VerificationType::bogus_type();
}
int offset;
if (frame_type < 64) {
// same_frame
if (first) {
offset = frame_type;
// Can't share the locals array since that is updated by the verifier.
if (pre_frame->locals_size() > 0) {
}
} else {
}
frame = new StackMapFrame(
}
return frame;
}
if (frame_type < 128) {
// same_locals_1_stack_item_frame
if (first) {
// Can't share the locals array since that is updated by the verifier.
if (pre_frame->locals_size() > 0) {
}
} else {
}
if (stack[0].is_category2()) {
stack_size = 2;
}
frame = new StackMapFrame(
}
return frame;
}
// reserved frame types
}
if (frame_type == SAME_LOCALS_1_STACK_ITEM_EXTENDED) {
// same_locals_1_stack_item_frame_extended
if (first) {
// Can't share the locals array since that is updated by the verifier.
if (pre_frame->locals_size() > 0) {
}
} else {
}
if (stack[0].is_category2()) {
stack_size = 2;
}
frame = new StackMapFrame(
}
return frame;
}
if (frame_type <= SAME_EXTENDED) {
// chop_frame or same_frame_extended
if (chops != 0) {
// Recompute flags since uninitializedThis could have been chopped.
flags = 0;
for (int i=0; i<new_length; i++) {
if (locals[i].is_uninitialized_this()) {
break;
}
}
}
if (first) {
// Can't share the locals array since that is updated by the verifier.
if (new_length > 0) {
} else {
}
} else {
}
frame = new StackMapFrame(
}
return frame;
// append_frame
int i;
for (i=0; i<pre_frame->locals_size(); i++) {
locals[i] = pre_locals[i];
}
for (i=0; i<appends; i++) {
++real_length;
}
++real_length;
}
if (first) {
} else {
}
frame = new StackMapFrame(
return frame;
}
if (frame_type == FULL) {
// full_frame
int real_locals_size = 0;
if (locals_size > 0) {
}
int i;
for (i=0; i<locals_size; i++) {
}
}
int real_stack_size = 0;
if (stack_size > 0) {
}
for (i=0; i<stack_size; i++) {
}
}
if (first) {
} else {
}
frame = new StackMapFrame(
return frame;
}
return NULL;
}