hotspot/src/share/vm/memory/oopFactory.hpp
changeset 27680 8ecc0871c18e
parent 18025 b7bcf7497f93
child 46257 3e95288ce4ca
equal deleted inserted replaced
27679:06b3a53d7781 27680:8ecc0871c18e
    39 class vframeArray;
    39 class vframeArray;
    40 
    40 
    41 class oopFactory: AllStatic {
    41 class oopFactory: AllStatic {
    42  public:
    42  public:
    43   // Basic type leaf array allocation
    43   // Basic type leaf array allocation
    44   static typeArrayOop    new_boolArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::boolArrayKlassObj  ())->allocate(length, CHECK_NULL); }
    44   static typeArrayOop    new_boolArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::boolArrayKlassObj  ())->allocate(length, THREAD); }
    45   static typeArrayOop    new_charArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::charArrayKlassObj  ())->allocate(length, CHECK_NULL); }
    45   static typeArrayOop    new_charArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::charArrayKlassObj  ())->allocate(length, THREAD); }
    46   static typeArrayOop    new_singleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::singleArrayKlassObj())->allocate(length, CHECK_NULL); }
    46   static typeArrayOop    new_singleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::singleArrayKlassObj())->allocate(length, THREAD); }
    47   static typeArrayOop    new_doubleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::doubleArrayKlassObj())->allocate(length, CHECK_NULL); }
    47   static typeArrayOop    new_doubleArray(int length, TRAPS) { return TypeArrayKlass::cast(Universe::doubleArrayKlassObj())->allocate(length, THREAD); }
    48   static typeArrayOop    new_byteArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::byteArrayKlassObj  ())->allocate(length, CHECK_NULL); }
    48   static typeArrayOop    new_byteArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::byteArrayKlassObj  ())->allocate(length, THREAD); }
    49   static typeArrayOop    new_shortArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::shortArrayKlassObj ())->allocate(length, CHECK_NULL); }
    49   static typeArrayOop    new_shortArray (int length, TRAPS) { return TypeArrayKlass::cast(Universe::shortArrayKlassObj ())->allocate(length, THREAD); }
    50   static typeArrayOop    new_intArray   (int length, TRAPS) { return TypeArrayKlass::cast(Universe::intArrayKlassObj   ())->allocate(length, CHECK_NULL); }
    50   static typeArrayOop    new_intArray   (int length, TRAPS) { return TypeArrayKlass::cast(Universe::intArrayKlassObj   ())->allocate(length, THREAD); }
    51   static typeArrayOop    new_longArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::longArrayKlassObj  ())->allocate(length, CHECK_NULL); }
    51   static typeArrayOop    new_longArray  (int length, TRAPS) { return TypeArrayKlass::cast(Universe::longArrayKlassObj  ())->allocate(length, THREAD); }
    52 
    52 
    53   // create java.lang.Object[]
    53   // create java.lang.Object[]
    54   static objArrayOop     new_objectArray(int length, TRAPS)  {
    54   static objArrayOop     new_objectArray(int length, TRAPS)  {
    55     assert(Universe::objectArrayKlassObj() != NULL, "Too early?");
    55     assert(Universe::objectArrayKlassObj() != NULL, "Too early?");
    56     return ObjArrayKlass::
    56     return ObjArrayKlass::
    57       cast(Universe::objectArrayKlassObj())->allocate(length, CHECK_NULL);
    57       cast(Universe::objectArrayKlassObj())->allocate(length, THREAD);
    58   }
    58   }
    59 
    59 
    60   static typeArrayOop    new_charArray           (const char* utf8_str,  TRAPS);
    60   static typeArrayOop    new_charArray           (const char* utf8_str,  TRAPS);
    61   static typeArrayOop    new_tenured_charArray(int length, TRAPS);
    61   static typeArrayOop    new_tenured_charArray(int length, TRAPS);
    62 
    62