hotspot/src/share/vm/memory/oopFactory.cpp
changeset 13282 9872915dd78d
parent 12587 8f819769ca1b
child 13728 882756847a04
equal deleted inserted replaced
13102:7342fd50f8d7 13282:9872915dd78d
   138 
   138 
   139 
   139 
   140 constMethodOop oopFactory::new_constMethod(int byte_code_size,
   140 constMethodOop oopFactory::new_constMethod(int byte_code_size,
   141                                            int compressed_line_number_size,
   141                                            int compressed_line_number_size,
   142                                            int localvariable_table_length,
   142                                            int localvariable_table_length,
       
   143                                            int exception_table_length,
   143                                            int checked_exceptions_length,
   144                                            int checked_exceptions_length,
   144                                            bool is_conc_safe,
   145                                            bool is_conc_safe,
   145                                            TRAPS) {
   146                                            TRAPS) {
   146   klassOop cmkObj = Universe::constMethodKlassObj();
   147   klassOop cmkObj = Universe::constMethodKlassObj();
   147   constMethodKlass* cmk = constMethodKlass::cast(cmkObj);
   148   constMethodKlass* cmk = constMethodKlass::cast(cmkObj);
   148   return cmk->allocate(byte_code_size, compressed_line_number_size,
   149   return cmk->allocate(byte_code_size, compressed_line_number_size,
   149                        localvariable_table_length, checked_exceptions_length,
   150                        localvariable_table_length, exception_table_length,
   150                        is_conc_safe,
   151                        checked_exceptions_length, is_conc_safe,
   151                        CHECK_NULL);
   152                        CHECK_NULL);
   152 }
   153 }
   153 
   154 
   154 
   155 
   155 methodOop oopFactory::new_method(int byte_code_size, AccessFlags access_flags,
   156 methodOop oopFactory::new_method(int byte_code_size, AccessFlags access_flags,
   156                                  int compressed_line_number_size,
   157                                  int compressed_line_number_size,
   157                                  int localvariable_table_length,
   158                                  int localvariable_table_length,
       
   159                                  int exception_table_length,
   158                                  int checked_exceptions_length,
   160                                  int checked_exceptions_length,
   159                                  bool is_conc_safe,
   161                                  bool is_conc_safe,
   160                                  TRAPS) {
   162                                  TRAPS) {
   161   methodKlass* mk = methodKlass::cast(Universe::methodKlassObj());
   163   methodKlass* mk = methodKlass::cast(Universe::methodKlassObj());
   162   assert(!access_flags.is_native() || byte_code_size == 0,
   164   assert(!access_flags.is_native() || byte_code_size == 0,
   163          "native methods should not contain byte codes");
   165          "native methods should not contain byte codes");
   164   constMethodOop cm = new_constMethod(byte_code_size,
   166   constMethodOop cm = new_constMethod(byte_code_size,
   165                                       compressed_line_number_size,
   167                                       compressed_line_number_size,
   166                                       localvariable_table_length,
   168                                       localvariable_table_length,
       
   169                                       exception_table_length,
   167                                       checked_exceptions_length,
   170                                       checked_exceptions_length,
   168                                       is_conc_safe, CHECK_NULL);
   171                                       is_conc_safe, CHECK_NULL);
   169   constMethodHandle rw(THREAD, cm);
   172   constMethodHandle rw(THREAD, cm);
   170   return mk->allocate(rw, access_flags, CHECK_NULL);
   173   return mk->allocate(rw, access_flags, CHECK_NULL);
   171 }
   174 }