< prev index next >

src/share/vm/opto/type.cpp

Print this page




2193   return (intptr_t)_vk;
2194 }
2195 
2196 //------------------------------singleton--------------------------------------
2197 // TRUE if Type is a singleton type, FALSE otherwise. Singletons are simple constants.
2198 bool TypeValueType::singleton(void) const {
2199   // FIXME
2200   return false;
2201 }
2202 
2203 //------------------------------empty------------------------------------------
2204 // TRUE if Type is a type with no values, FALSE otherwise.
2205 bool TypeValueType::empty(void) const {
2206   // FIXME
2207   return false;
2208 }
2209 
2210 //------------------------------dump2------------------------------------------
2211 #ifndef PRODUCT
2212 void TypeValueType::dump2(Dict &d, uint depth, outputStream* st) const {
2213   st->print("valuetype[%d]:{", _vk->field_count());
2214   st->print("%s", type2name(_vk->get_field_type_by_index(0)));
2215   for (int i = 1; i < _vk->field_count(); ++i) {
2216     st->print(", %s", type2name(_vk->get_field_type_by_index(i)));
2217   }
2218   st->print("}");
2219 }
2220 #endif
2221 
2222 //==============================TypeVect=======================================
2223 // Convenience common pre-built types.
2224 const TypeVect *TypeVect::VECTS = NULL; //  32-bit vectors
2225 const TypeVect *TypeVect::VECTD = NULL; //  64-bit vectors
2226 const TypeVect *TypeVect::VECTX = NULL; // 128-bit vectors
2227 const TypeVect *TypeVect::VECTY = NULL; // 256-bit vectors
2228 const TypeVect *TypeVect::VECTZ = NULL; // 512-bit vectors
2229 
2230 //------------------------------make-------------------------------------------
2231 const TypeVect* TypeVect::make(const Type *elem, uint length) {
2232   BasicType elem_bt = elem->array_element_basic_type();
2233   assert(is_java_primitive(elem_bt), "only primitive types in vector");
2234   assert(length > 1 && is_power_of_2(length), "vector length is power of 2");
2235   assert(Matcher::vector_size_supported(elem_bt, length), "length in range");
2236   int size = length * type2aelembytes(elem_bt);




2193   return (intptr_t)_vk;
2194 }
2195 
2196 //------------------------------singleton--------------------------------------
2197 // TRUE if Type is a singleton type, FALSE otherwise. Singletons are simple constants.
2198 bool TypeValueType::singleton(void) const {
2199   // FIXME
2200   return false;
2201 }
2202 
2203 //------------------------------empty------------------------------------------
2204 // TRUE if Type is a type with no values, FALSE otherwise.
2205 bool TypeValueType::empty(void) const {
2206   // FIXME
2207   return false;
2208 }
2209 
2210 //------------------------------dump2------------------------------------------
2211 #ifndef PRODUCT
2212 void TypeValueType::dump2(Dict &d, uint depth, outputStream* st) const {
2213   st->print("valuetype[%d]:{", _vk->param_count());
2214   st->print("%s", _vk->get_field_type_by_index(0)->name());
2215   for (int i = 1; i < _vk->param_count(); ++i) {
2216     st->print(", %s", _vk->get_field_type_by_index(i)->name());
2217   }
2218   st->print("}");
2219 }
2220 #endif
2221 
2222 //==============================TypeVect=======================================
2223 // Convenience common pre-built types.
2224 const TypeVect *TypeVect::VECTS = NULL; //  32-bit vectors
2225 const TypeVect *TypeVect::VECTD = NULL; //  64-bit vectors
2226 const TypeVect *TypeVect::VECTX = NULL; // 128-bit vectors
2227 const TypeVect *TypeVect::VECTY = NULL; // 256-bit vectors
2228 const TypeVect *TypeVect::VECTZ = NULL; // 512-bit vectors
2229 
2230 //------------------------------make-------------------------------------------
2231 const TypeVect* TypeVect::make(const Type *elem, uint length) {
2232   BasicType elem_bt = elem->array_element_basic_type();
2233   assert(is_java_primitive(elem_bt), "only primitive types in vector");
2234   assert(length > 1 && is_power_of_2(length), "vector length is power of 2");
2235   assert(Matcher::vector_size_supported(elem_bt, length), "length in range");
2236   int size = length * type2aelembytes(elem_bt);


< prev index next >