src/share/vm/classfile/stackMapFrame.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File bug_8046233_7 Sdiff src/share/vm/classfile

src/share/vm/classfile/stackMapFrame.hpp

Print this page


   1 /*
   2  * Copyright (c) 2003, 2012, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 138   // Set locals and stack types to bogus
 139   inline void reset() {
 140     int32_t i;
 141     for (i = 0; i < _max_locals; i++) {
 142       _locals[i] = VerificationType::bogus_type();
 143     }
 144     for (i = 0; i < _max_stack; i++) {
 145       _stack[i] = VerificationType::bogus_type();
 146     }
 147   }
 148 
 149   // Return a StackMapFrame with the same local variable array and empty stack.
 150   // Stack array is allocate with unused one element.
 151   StackMapFrame* frame_in_exception_handler(u1 flags);
 152 
 153   // Set local variable type array based on m's signature.
 154   VerificationType set_locals_from_arg(
 155     const methodHandle m, VerificationType thisKlass, TRAPS);
 156 
 157   // Search local variable type array and stack type array.
 158   // Return true if an uninitialized object is found.
 159   bool has_new_object() const;

 160 
 161   // Search local variable type array and stack type array.
 162   // Set every element with type of old_object to new_object.
 163   void initialize_object(
 164     VerificationType old_object, VerificationType new_object);
 165 
 166   // Copy local variable type array in src into this local variable type array.
 167   void copy_locals(const StackMapFrame* src);
 168 
 169   // Copy stack type array in src into this stack type array.
 170   void copy_stack(const StackMapFrame* src);
 171 
 172   // Return true if this stack map frame is assignable to target.
 173   bool is_assignable_to(
 174       const StackMapFrame* target, bool is_exception_handler,
 175       ErrorContext* ctx, TRAPS) const;
 176 
 177   inline void set_mark() {
 178 #ifdef DEBUG
 179     // Put bogus type to indicate it's no longer valid.


   1 /*
   2  * Copyright (c) 2003, 2014, Oracle and/or its affiliates. All rights reserved.
   3  * DO NOT ALTER OR REMOVE COPYRIGHT NOTICES OR THIS FILE HEADER.
   4  *
   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
   7  * published by the Free Software Foundation.
   8  *
   9  * This code is distributed in the hope that it will be useful, but WITHOUT
  10  * ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or
  11  * FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
  12  * version 2 for more details (a copy is included in the LICENSE file that
  13  * accompanied this code).
  14  *
  15  * You should have received a copy of the GNU General Public License version
  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  *


 138   // Set locals and stack types to bogus
 139   inline void reset() {
 140     int32_t i;
 141     for (i = 0; i < _max_locals; i++) {
 142       _locals[i] = VerificationType::bogus_type();
 143     }
 144     for (i = 0; i < _max_stack; i++) {
 145       _stack[i] = VerificationType::bogus_type();
 146     }
 147   }
 148 
 149   // Return a StackMapFrame with the same local variable array and empty stack.
 150   // Stack array is allocate with unused one element.
 151   StackMapFrame* frame_in_exception_handler(u1 flags);
 152 
 153   // Set local variable type array based on m's signature.
 154   VerificationType set_locals_from_arg(
 155     const methodHandle m, VerificationType thisKlass, TRAPS);
 156 
 157   // Search local variable type array and stack type array.
 158   // Return true if an uninitialized object is found that is
 159   // not equal to the corresponding object on the target frame.
 160   bool has_unique_new_object(const StackMapFrame *target_frame) const;
 161 
 162   // Search local variable type array and stack type array.
 163   // Set every element with type of old_object to new_object.
 164   void initialize_object(
 165     VerificationType old_object, VerificationType new_object);
 166 
 167   // Copy local variable type array in src into this local variable type array.
 168   void copy_locals(const StackMapFrame* src);
 169 
 170   // Copy stack type array in src into this stack type array.
 171   void copy_stack(const StackMapFrame* src);
 172 
 173   // Return true if this stack map frame is assignable to target.
 174   bool is_assignable_to(
 175       const StackMapFrame* target, bool is_exception_handler,
 176       ErrorContext* ctx, TRAPS) const;
 177 
 178   inline void set_mark() {
 179 #ifdef DEBUG
 180     // Put bogus type to indicate it's no longer valid.


src/share/vm/classfile/stackMapFrame.hpp
Index Unified diffs Context diffs Sdiffs Wdiffs Patch New Old Previous File Next File