< prev index next >

src/hotspot/share/classfile/stackMapTableFormat.hpp

Print this page


   1 /*
   2  * Copyright (c) 2010, 2017, 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  *


 133             (address)this < end &&
 134             (bci_addr() + sizeof(u2) <= end ||
 135              (!is_object() && !is_uninitialized())));
 136   }
 137 
 138   void print_on(outputStream* st) {
 139     switch (tag()) {
 140       case ITEM_Top: st->print("Top"); break;
 141       case ITEM_Integer: st->print("Integer"); break;
 142       case ITEM_Float: st->print("Float"); break;
 143       case ITEM_Double: st->print("Double"); break;
 144       case ITEM_Long: st->print("Long"); break;
 145       case ITEM_Null: st->print("Null"); break;
 146       case ITEM_UninitializedThis:
 147         st->print("UninitializedThis"); break;
 148       case ITEM_Uninitialized:
 149         st->print("Uninitialized[#%d]", bci()); break;
 150       case ITEM_Object:
 151         st->print("Object[#%d]", cpool_index()); break;
 152       default:
 153         assert(false, "Bad verification_type_info");
 154     }
 155   }
 156 };
 157 
 158 #define FOR_EACH_STACKMAP_FRAME_TYPE(macro, arg1, arg2) \
 159   macro(same_frame, arg1, arg2) \
 160   macro(same_frame_extended, arg1, arg2) \
 161   macro(same_locals_1_stack_item_frame, arg1, arg2) \
 162   macro(same_locals_1_stack_item_extended, arg1, arg2) \
 163   macro(chop_frame, arg1, arg2) \
 164   macro(append_frame, arg1, arg2) \
 165   macro(full_frame, arg1, arg2)
 166 
 167 #define SM_FORWARD_DECL(type, arg1, arg2) class type;
 168 FOR_EACH_STACKMAP_FRAME_TYPE(SM_FORWARD_DECL, x, x)
 169 #undef SM_FORWARD_DECL
 170 
 171 class stack_map_frame {
 172  protected:
 173   address frame_type_addr() const { return (address)this; }


   1 /*
   2  * Copyright (c) 2010, 2018, 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  *


 133             (address)this < end &&
 134             (bci_addr() + sizeof(u2) <= end ||
 135              (!is_object() && !is_uninitialized())));
 136   }
 137 
 138   void print_on(outputStream* st) {
 139     switch (tag()) {
 140       case ITEM_Top: st->print("Top"); break;
 141       case ITEM_Integer: st->print("Integer"); break;
 142       case ITEM_Float: st->print("Float"); break;
 143       case ITEM_Double: st->print("Double"); break;
 144       case ITEM_Long: st->print("Long"); break;
 145       case ITEM_Null: st->print("Null"); break;
 146       case ITEM_UninitializedThis:
 147         st->print("UninitializedThis"); break;
 148       case ITEM_Uninitialized:
 149         st->print("Uninitialized[#%d]", bci()); break;
 150       case ITEM_Object:
 151         st->print("Object[#%d]", cpool_index()); break;
 152       default:
 153         st->print("BAD:%d", tag()); break;
 154     }
 155   }
 156 };
 157 
 158 #define FOR_EACH_STACKMAP_FRAME_TYPE(macro, arg1, arg2) \
 159   macro(same_frame, arg1, arg2) \
 160   macro(same_frame_extended, arg1, arg2) \
 161   macro(same_locals_1_stack_item_frame, arg1, arg2) \
 162   macro(same_locals_1_stack_item_extended, arg1, arg2) \
 163   macro(chop_frame, arg1, arg2) \
 164   macro(append_frame, arg1, arg2) \
 165   macro(full_frame, arg1, arg2)
 166 
 167 #define SM_FORWARD_DECL(type, arg1, arg2) class type;
 168 FOR_EACH_STACKMAP_FRAME_TYPE(SM_FORWARD_DECL, x, x)
 169 #undef SM_FORWARD_DECL
 170 
 171 class stack_map_frame {
 172  protected:
 173   address frame_type_addr() const { return (address)this; }


< prev index next >