< prev index next >

src/hotspot/share/opto/connode.cpp

Print this page




  33 #include "opto/phaseX.hpp"
  34 #include "opto/subnode.hpp"
  35 #include "runtime/sharedRuntime.hpp"
  36 
  37 // Optimization - Graph Style
  38 
  39 //=============================================================================
  40 //------------------------------hash-------------------------------------------
  41 uint ConNode::hash() const {
  42   return (uintptr_t)in(TypeFunc::Control) + _type->hash();
  43 }
  44 
  45 //------------------------------make-------------------------------------------
  46 ConNode *ConNode::make(const Type *t) {
  47   switch( t->basic_type() ) {
  48   case T_INT:         return new ConINode( t->is_int() );
  49   case T_LONG:        return new ConLNode( t->is_long() );
  50   case T_FLOAT:       return new ConFNode( t->is_float_constant() );
  51   case T_DOUBLE:      return new ConDNode( t->is_double_constant() );
  52   case T_VOID:        return new ConNode ( Type::TOP );
  53   case T_VALUETYPEPTR:
  54   case T_OBJECT:      return new ConPNode( t->is_ptr() );
  55   case T_ARRAY:       return new ConPNode( t->is_aryptr() );
  56   case T_ADDRESS:     return new ConPNode( t->is_ptr() );
  57   case T_NARROWOOP:   return new ConNNode( t->is_narrowoop() );
  58   case T_NARROWKLASS: return new ConNKlassNode( t->is_narrowklass() );
  59   case T_METADATA:    return new ConPNode( t->is_ptr() );
  60     // Expected cases:  TypePtr::NULL_PTR, any is_rawptr()
  61     // Also seen: AnyPtr(TopPTR *+top); from command line:
  62     //   r -XX:+PrintOpto -XX:CIStart=285 -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=660
  63     // %%%% Stop using TypePtr::NULL_PTR to represent nulls:  use either TypeRawPtr::NULL_PTR
  64     // or else TypeOopPtr::NULL_PTR.  Then set Type::_basic_type[AnyPtr] = T_ILLEGAL
  65   default:
  66     ShouldNotReachHere();
  67     return NULL;
  68   }
  69 }


  33 #include "opto/phaseX.hpp"
  34 #include "opto/subnode.hpp"
  35 #include "runtime/sharedRuntime.hpp"
  36 
  37 // Optimization - Graph Style
  38 
  39 //=============================================================================
  40 //------------------------------hash-------------------------------------------
  41 uint ConNode::hash() const {
  42   return (uintptr_t)in(TypeFunc::Control) + _type->hash();
  43 }
  44 
  45 //------------------------------make-------------------------------------------
  46 ConNode *ConNode::make(const Type *t) {
  47   switch( t->basic_type() ) {
  48   case T_INT:         return new ConINode( t->is_int() );
  49   case T_LONG:        return new ConLNode( t->is_long() );
  50   case T_FLOAT:       return new ConFNode( t->is_float_constant() );
  51   case T_DOUBLE:      return new ConDNode( t->is_double_constant() );
  52   case T_VOID:        return new ConNode ( Type::TOP );

  53   case T_OBJECT:      return new ConPNode( t->is_ptr() );
  54   case T_ARRAY:       return new ConPNode( t->is_aryptr() );
  55   case T_ADDRESS:     return new ConPNode( t->is_ptr() );
  56   case T_NARROWOOP:   return new ConNNode( t->is_narrowoop() );
  57   case T_NARROWKLASS: return new ConNKlassNode( t->is_narrowklass() );
  58   case T_METADATA:    return new ConPNode( t->is_ptr() );
  59     // Expected cases:  TypePtr::NULL_PTR, any is_rawptr()
  60     // Also seen: AnyPtr(TopPTR *+top); from command line:
  61     //   r -XX:+PrintOpto -XX:CIStart=285 -XX:+CompileTheWorld -XX:CompileTheWorldStartAt=660
  62     // %%%% Stop using TypePtr::NULL_PTR to represent nulls:  use either TypeRawPtr::NULL_PTR
  63     // or else TypeOopPtr::NULL_PTR.  Then set Type::_basic_type[AnyPtr] = T_ILLEGAL
  64   default:
  65     ShouldNotReachHere();
  66     return NULL;
  67   }
  68 }
< prev index next >