hotspot/src/share/vm/c1/c1_ValueType.cpp
changeset 5707 6c66849ed24e
parent 5547 f4b087cbb361
child 7397 5b173b4ca846
equal deleted inserted replaced
5706:0c91076143f9 5707:6c66849ed24e
    44 IntConstant*    intZero      = NULL;
    44 IntConstant*    intZero      = NULL;
    45 IntConstant*    intOne       = NULL;
    45 IntConstant*    intOne       = NULL;
    46 ObjectConstant* objectNull   = NULL;
    46 ObjectConstant* objectNull   = NULL;
    47 
    47 
    48 
    48 
    49 void ValueType::initialize() {
    49 void ValueType::initialize(Arena* arena) {
    50   // Note: Must initialize all types for each compilation
    50   // Note: Must initialize all types for each compilation
    51   //       as they are allocated within a ResourceMark!
    51   //       as they are allocated within a ResourceMark!
    52 
    52 
    53   // types
    53   // types
    54   voidType     = new VoidType();
    54   voidType     = new (arena) VoidType();
    55   intType      = new IntType();
    55   intType      = new (arena) IntType();
    56   longType     = new LongType();
    56   longType     = new (arena) LongType();
    57   floatType    = new FloatType();
    57   floatType    = new (arena) FloatType();
    58   doubleType   = new DoubleType();
    58   doubleType   = new (arena) DoubleType();
    59   objectType   = new ObjectType();
    59   objectType   = new (arena) ObjectType();
    60   arrayType    = new ArrayType();
    60   arrayType    = new (arena) ArrayType();
    61   instanceType = new InstanceType();
    61   instanceType = new (arena) InstanceType();
    62   classType    = new ClassType();
    62   classType    = new (arena) ClassType();
    63   addressType  = new AddressType();
    63   addressType  = new (arena) AddressType();
    64   illegalType  = new IllegalType();
    64   illegalType  = new (arena) IllegalType();
    65 
    65 
    66   // constants
    66   intZero     = new (arena) IntConstant(0);
    67   intZero     = new IntConstant(0);
    67   intOne      = new (arena) IntConstant(1);
    68   intOne      = new IntConstant(1);
    68   objectNull  = new (arena) ObjectConstant(ciNullObject::make());
    69   objectNull  = new ObjectConstant(ciNullObject::make());
       
    70 };
    69 };
    71 
    70 
    72 
    71 
    73 ValueType* ValueType::meet(ValueType* y) const {
    72 ValueType* ValueType::meet(ValueType* y) const {
    74   // incomplete & conservative solution for now - fix this!
    73   // incomplete & conservative solution for now - fix this!