hotspot/src/share/vm/oops/constMethodKlass.cpp
changeset 1894 5c343868d071
parent 1 489c9b5090e2
child 2105 347008ce7984
equal deleted inserted replaced
1893:c82e388e17c5 1894:5c343868d071
    47 bool constMethodKlass::oop_is_parsable(oop obj) const {
    47 bool constMethodKlass::oop_is_parsable(oop obj) const {
    48   assert(obj->is_constMethod(), "must be constMethod oop");
    48   assert(obj->is_constMethod(), "must be constMethod oop");
    49   return constMethodOop(obj)->object_is_parsable();
    49   return constMethodOop(obj)->object_is_parsable();
    50 }
    50 }
    51 
    51 
       
    52 bool constMethodKlass::oop_is_conc_safe(oop obj) const {
       
    53   assert(obj->is_constMethod(), "must be constMethod oop");
       
    54   return constMethodOop(obj)->is_conc_safe();
       
    55 }
       
    56 
    52 constMethodOop constMethodKlass::allocate(int byte_code_size,
    57 constMethodOop constMethodKlass::allocate(int byte_code_size,
    53                                           int compressed_line_number_size,
    58                                           int compressed_line_number_size,
    54                                           int localvariable_table_length,
    59                                           int localvariable_table_length,
    55                                           int checked_exceptions_length,
    60                                           int checked_exceptions_length,
       
    61                                           bool is_conc_safe,
    56                                           TRAPS) {
    62                                           TRAPS) {
    57 
    63 
    58   int size = constMethodOopDesc::object_size(byte_code_size,
    64   int size = constMethodOopDesc::object_size(byte_code_size,
    59                                              compressed_line_number_size,
    65                                              compressed_line_number_size,
    60                                              localvariable_table_length,
    66                                              localvariable_table_length,
    73   cm->set_constMethod_size(size);
    79   cm->set_constMethod_size(size);
    74   cm->set_inlined_tables_length(checked_exceptions_length,
    80   cm->set_inlined_tables_length(checked_exceptions_length,
    75                                 compressed_line_number_size,
    81                                 compressed_line_number_size,
    76                                 localvariable_table_length);
    82                                 localvariable_table_length);
    77   assert(cm->size() == size, "wrong size for object");
    83   assert(cm->size() == size, "wrong size for object");
       
    84   cm->set_is_conc_safe(is_conc_safe);
    78   cm->set_partially_loaded();
    85   cm->set_partially_loaded();
    79   assert(cm->is_parsable(), "Is safely parsable by gc");
    86   assert(cm->is_parsable(), "Is safely parsable by gc");
    80   return cm;
    87   return cm;
    81 }
    88 }
    82 
    89