src/hotspot/share/classfile/stackMapTable.cpp
changeset 49449 ef5d5d343e2a
parent 47216 71c04702a3d5
child 53838 c8c9bd65c198
equal deleted inserted replaced
49448:b91b558a9076 49449:ef5d5d343e2a
   142     }
   142     }
   143   }
   143   }
   144   str->print_cr(" }");
   144   str->print_cr(" }");
   145 }
   145 }
   146 
   146 
       
   147 StackMapReader::StackMapReader(ClassVerifier* v, StackMapStream* stream, char* code_data,
       
   148                                int32_t code_len, TRAPS) :
       
   149                                _verifier(v), _stream(stream),
       
   150                                _code_data(code_data), _code_length(code_len) {
       
   151   methodHandle m = v->method();
       
   152   if (m->has_stackmap_table()) {
       
   153     _cp = constantPoolHandle(THREAD, m->constants());
       
   154     _frame_count = _stream->get_u2(CHECK);
       
   155   } else {
       
   156     // There's no stackmap table present. Frame count and size are 0.
       
   157     _frame_count = 0;
       
   158   }
       
   159 }
       
   160 
   147 int32_t StackMapReader::chop(
   161 int32_t StackMapReader::chop(
   148     VerificationType* locals, int32_t length, int32_t chops) {
   162     VerificationType* locals, int32_t length, int32_t chops) {
   149   if (locals == NULL) return -1;
   163   if (locals == NULL) return -1;
   150   int32_t pos = length - 1;
   164   int32_t pos = length - 1;
   151   for (int32_t i=0; i<chops; i++) {
   165   for (int32_t i=0; i<chops; i++) {