< prev index next >

src/share/vm/memory/oopFactory.cpp

Print this page
rev 4134 : 7178145: Change constMethodOop::_exception_table to optionally inlined u2 table.
Summary: Change constMethodOop::_exception_table to optionally inlined u2 table.
Reviewed-by: bdelsart, coleenp, kamg


 119 
 120 constantPoolCacheOop oopFactory::new_constantPoolCache(int length,
 121                                                        TRAPS) {
 122   constantPoolCacheKlass* ck = constantPoolCacheKlass::cast(Universe::constantPoolCacheKlassObj());
 123   return ck->allocate(length, CHECK_NULL);
 124 }
 125 
 126 
 127 klassOop oopFactory::new_instanceKlass(Symbol* name, int vtable_len, int itable_len,
 128                                        int static_field_size,
 129                                        unsigned int nonstatic_oop_map_count,
 130                                        ReferenceType rt, TRAPS) {
 131   instanceKlassKlass* ikk = instanceKlassKlass::cast(Universe::instanceKlassKlassObj());
 132   return ikk->allocate_instance_klass(name, vtable_len, itable_len, static_field_size, nonstatic_oop_map_count, rt, CHECK_NULL);
 133 }
 134 
 135 
 136 constMethodOop oopFactory::new_constMethod(int byte_code_size,
 137                                            int compressed_line_number_size,
 138                                            int localvariable_table_length,

 139                                            int checked_exceptions_length,
 140                                            bool is_conc_safe,
 141                                            TRAPS) {
 142   klassOop cmkObj = Universe::constMethodKlassObj();
 143   constMethodKlass* cmk = constMethodKlass::cast(cmkObj);
 144   return cmk->allocate(byte_code_size, compressed_line_number_size,
 145                        localvariable_table_length, checked_exceptions_length,
 146                        is_conc_safe,
 147                        CHECK_NULL);
 148 }
 149 
 150 
 151 methodOop oopFactory::new_method(int byte_code_size, AccessFlags access_flags,
 152                                  int compressed_line_number_size,
 153                                  int localvariable_table_length,

 154                                  int checked_exceptions_length,
 155                                  bool is_conc_safe,
 156                                  TRAPS) {
 157   methodKlass* mk = methodKlass::cast(Universe::methodKlassObj());
 158   assert(!access_flags.is_native() || byte_code_size == 0,
 159          "native methods should not contain byte codes");
 160   constMethodOop cm = new_constMethod(byte_code_size,
 161                                       compressed_line_number_size,
 162                                       localvariable_table_length,

 163                                       checked_exceptions_length,
 164                                       is_conc_safe, CHECK_NULL);
 165   constMethodHandle rw(THREAD, cm);
 166   return mk->allocate(rw, access_flags, CHECK_NULL);
 167 }
 168 
 169 
 170 methodDataOop oopFactory::new_methodData(methodHandle method, TRAPS) {
 171   methodDataKlass* mdk = methodDataKlass::cast(Universe::methodDataKlassObj());
 172   return mdk->allocate(method, CHECK_NULL);
 173 }
 174 
 175 
 176 compiledICHolderOop oopFactory::new_compiledICHolder(methodHandle method, KlassHandle klass, TRAPS) {
 177   compiledICHolderKlass* ck = (compiledICHolderKlass*) Universe::compiledICHolderKlassObj()->klass_part();
 178   compiledICHolderOop c = ck->allocate(CHECK_NULL);
 179   c->set_holder_method(method());
 180   c->set_holder_klass(klass());
 181   return c;
 182 }


 119 
 120 constantPoolCacheOop oopFactory::new_constantPoolCache(int length,
 121                                                        TRAPS) {
 122   constantPoolCacheKlass* ck = constantPoolCacheKlass::cast(Universe::constantPoolCacheKlassObj());
 123   return ck->allocate(length, CHECK_NULL);
 124 }
 125 
 126 
 127 klassOop oopFactory::new_instanceKlass(Symbol* name, int vtable_len, int itable_len,
 128                                        int static_field_size,
 129                                        unsigned int nonstatic_oop_map_count,
 130                                        ReferenceType rt, TRAPS) {
 131   instanceKlassKlass* ikk = instanceKlassKlass::cast(Universe::instanceKlassKlassObj());
 132   return ikk->allocate_instance_klass(name, vtable_len, itable_len, static_field_size, nonstatic_oop_map_count, rt, CHECK_NULL);
 133 }
 134 
 135 
 136 constMethodOop oopFactory::new_constMethod(int byte_code_size,
 137                                            int compressed_line_number_size,
 138                                            int localvariable_table_length,
 139                                            int exception_table_length,
 140                                            int checked_exceptions_length,
 141                                            bool is_conc_safe,
 142                                            TRAPS) {
 143   klassOop cmkObj = Universe::constMethodKlassObj();
 144   constMethodKlass* cmk = constMethodKlass::cast(cmkObj);
 145   return cmk->allocate(byte_code_size, compressed_line_number_size,
 146                        localvariable_table_length, exception_table_length,
 147                        checked_exceptions_length, is_conc_safe,
 148                        CHECK_NULL);
 149 }
 150 
 151 
 152 methodOop oopFactory::new_method(int byte_code_size, AccessFlags access_flags,
 153                                  int compressed_line_number_size,
 154                                  int localvariable_table_length,
 155                                  int exception_table_length,
 156                                  int checked_exceptions_length,
 157                                  bool is_conc_safe,
 158                                  TRAPS) {
 159   methodKlass* mk = methodKlass::cast(Universe::methodKlassObj());
 160   assert(!access_flags.is_native() || byte_code_size == 0,
 161          "native methods should not contain byte codes");
 162   constMethodOop cm = new_constMethod(byte_code_size,
 163                                       compressed_line_number_size,
 164                                       localvariable_table_length,
 165                                       exception_table_length,
 166                                       checked_exceptions_length,
 167                                       is_conc_safe, CHECK_NULL);
 168   constMethodHandle rw(THREAD, cm);
 169   return mk->allocate(rw, access_flags, CHECK_NULL);
 170 }
 171 
 172 
 173 methodDataOop oopFactory::new_methodData(methodHandle method, TRAPS) {
 174   methodDataKlass* mdk = methodDataKlass::cast(Universe::methodDataKlassObj());
 175   return mdk->allocate(method, CHECK_NULL);
 176 }
 177 
 178 
 179 compiledICHolderOop oopFactory::new_compiledICHolder(methodHandle method, KlassHandle klass, TRAPS) {
 180   compiledICHolderKlass* ck = (compiledICHolderKlass*) Universe::compiledICHolderKlassObj()->klass_part();
 181   compiledICHolderOop c = ck->allocate(CHECK_NULL);
 182   c->set_holder_method(method());
 183   c->set_holder_klass(klass());
 184   return c;
 185 }
< prev index next >