hotspot/src/share/vm/c1/c1_ValueType.cpp
changeset 13391 30245956af37
parent 7397 5b173b4ca846
child 13728 882756847a04
equal deleted inserted replaced
13309:50c604cb0d5f 13391:30245956af37
    99 ciObject* ObjectConstant::constant_value() const                   { return _value; }
    99 ciObject* ObjectConstant::constant_value() const                   { return _value; }
   100 ciObject* ArrayConstant::constant_value() const                    { return _value; }
   100 ciObject* ArrayConstant::constant_value() const                    { return _value; }
   101 ciObject* InstanceConstant::constant_value() const                 { return _value; }
   101 ciObject* InstanceConstant::constant_value() const                 { return _value; }
   102 ciObject* ClassConstant::constant_value() const                    { return _value; }
   102 ciObject* ClassConstant::constant_value() const                    { return _value; }
   103 
   103 
       
   104 ciType* ObjectConstant::exact_type() const {
       
   105   ciObject* c = constant_value();
       
   106   return (c != NULL && !c->is_null_object()) ? c->klass() : NULL;
       
   107 }
       
   108 ciType* ArrayConstant::exact_type() const {
       
   109   ciObject* c = constant_value();
       
   110   return (c != NULL && !c->is_null_object()) ? c->klass() : NULL;
       
   111 }
       
   112 ciType* InstanceConstant::exact_type() const {
       
   113   ciObject* c = constant_value();
       
   114   return (c != NULL && !c->is_null_object()) ? c->klass() : NULL;
       
   115 }
       
   116 ciType* ClassConstant::exact_type() const {
       
   117   ciObject* c = constant_value();
       
   118   return (c != NULL && !c->is_null_object()) ? c->klass() : NULL;
       
   119 }
       
   120 
   104 
   121 
   105 ValueType* as_ValueType(BasicType type) {
   122 ValueType* as_ValueType(BasicType type) {
   106   switch (type) {
   123   switch (type) {
   107     case T_VOID   : return voidType;
   124     case T_VOID   : return voidType;
   108     case T_BYTE   : // fall through
   125     case T_BYTE   : // fall through