< prev index next >

src/share/vm/classfile/stackMapTable.hpp

Print this page




  29 #include "classfile/verifier.hpp"
  30 #include "memory/allocation.hpp"
  31 #include "oops/constantPool.hpp"
  32 #include "oops/method.hpp"
  33 #include "utilities/globalDefinitions.hpp"
  34 #ifdef TARGET_ARCH_x86
  35 # include "bytes_x86.hpp"
  36 #endif
  37 #ifdef TARGET_ARCH_sparc
  38 # include "bytes_sparc.hpp"
  39 #endif
  40 #ifdef TARGET_ARCH_zero
  41 # include "bytes_zero.hpp"
  42 #endif
  43 #ifdef TARGET_ARCH_arm
  44 # include "bytes_arm.hpp"
  45 #endif
  46 #ifdef TARGET_ARCH_ppc
  47 # include "bytes_ppc.hpp"
  48 #endif



  49 
  50 class StackMapReader;
  51 
  52 // StackMapTable class is the StackMap table used by type checker
  53 class StackMapTable : public StackObj {
  54  private:
  55   // Logically, the _frame_count (as well as many fields in the StackFrame)
  56   // should be a u2, but if we defined the variable as that type it will
  57   // be difficult to detect/recover from overflow or underflow conditions.
  58   // Widening the type and making it signed will help detect these.
  59   int32_t              _code_length;
  60   int32_t              _frame_count;     // Stackmap frame count
  61   StackMapFrame**       _frame_array;
  62 
  63  public:
  64   StackMapTable(StackMapReader* reader, StackMapFrame* init_frame,
  65                 u2 max_locals, u2 max_stack,
  66                 char* code_data, int code_len, TRAPS);
  67 
  68   inline int32_t get_frame_count() const { return _frame_count; }




  29 #include "classfile/verifier.hpp"
  30 #include "memory/allocation.hpp"
  31 #include "oops/constantPool.hpp"
  32 #include "oops/method.hpp"
  33 #include "utilities/globalDefinitions.hpp"
  34 #ifdef TARGET_ARCH_x86
  35 # include "bytes_x86.hpp"
  36 #endif
  37 #ifdef TARGET_ARCH_sparc
  38 # include "bytes_sparc.hpp"
  39 #endif
  40 #ifdef TARGET_ARCH_zero
  41 # include "bytes_zero.hpp"
  42 #endif
  43 #ifdef TARGET_ARCH_arm
  44 # include "bytes_arm.hpp"
  45 #endif
  46 #ifdef TARGET_ARCH_ppc
  47 # include "bytes_ppc.hpp"
  48 #endif
  49 #ifdef TARGET_ARCH_aarch32
  50 # include "bytes_aarch32.hpp"
  51 #endif
  52 
  53 class StackMapReader;
  54 
  55 // StackMapTable class is the StackMap table used by type checker
  56 class StackMapTable : public StackObj {
  57  private:
  58   // Logically, the _frame_count (as well as many fields in the StackFrame)
  59   // should be a u2, but if we defined the variable as that type it will
  60   // be difficult to detect/recover from overflow or underflow conditions.
  61   // Widening the type and making it signed will help detect these.
  62   int32_t              _code_length;
  63   int32_t              _frame_count;     // Stackmap frame count
  64   StackMapFrame**       _frame_array;
  65 
  66  public:
  67   StackMapTable(StackMapReader* reader, StackMapFrame* init_frame,
  68                 u2 max_locals, u2 max_stack,
  69                 char* code_data, int code_len, TRAPS);
  70 
  71   inline int32_t get_frame_count() const { return _frame_count; }


< prev index next >