< prev index next >

src/share/vm/opto/subnode.cpp

Print this page




1516   for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
1517     Node* use = fast_out(i);
1518     if (use->is_CountedLoopEnd()) {
1519       return true;
1520     }
1521   }
1522   return false;
1523 }
1524 
1525 //=============================================================================
1526 //------------------------------Value------------------------------------------
1527 // Compute sqrt
1528 const Type* SqrtDNode::Value(PhaseGVN* phase) const {
1529   const Type *t1 = phase->type( in(1) );
1530   if( t1 == Type::TOP ) return Type::TOP;
1531   if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
1532   double d = t1->getd();
1533   if( d < 0.0 ) return Type::DOUBLE;
1534   return TypeD::make( sqrt( d ) );
1535 }
1536 
1537 //=============================================================================
1538 //------------------------------Value------------------------------------------
1539 // Compute tan
1540 const Type* TanDNode::Value(PhaseGVN* phase) const {
1541   const Type *t1 = phase->type( in(1) );
1542   if( t1 == Type::TOP ) return Type::TOP;
1543   if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
1544   double d = t1->getd();
1545   return TypeD::make( StubRoutines::intrinsic_tan( d ) );
1546 }
1547 
1548 //=============================================================================
1549 //------------------------------Value------------------------------------------
1550 // Compute log10
1551 const Type* Log10DNode::Value(PhaseGVN* phase) const {
1552   const Type *t1 = phase->type( in(1) );
1553   if( t1 == Type::TOP ) return Type::TOP;
1554   if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
1555   double d = t1->getd();
1556   return TypeD::make( StubRoutines::intrinsic_log10( d ) );
1557 }


1516   for( DUIterator_Fast imax, i = fast_outs(imax); i < imax; i++ ) {
1517     Node* use = fast_out(i);
1518     if (use->is_CountedLoopEnd()) {
1519       return true;
1520     }
1521   }
1522   return false;
1523 }
1524 
1525 //=============================================================================
1526 //------------------------------Value------------------------------------------
1527 // Compute sqrt
1528 const Type* SqrtDNode::Value(PhaseGVN* phase) const {
1529   const Type *t1 = phase->type( in(1) );
1530   if( t1 == Type::TOP ) return Type::TOP;
1531   if( t1->base() != Type::DoubleCon ) return Type::DOUBLE;
1532   double d = t1->getd();
1533   if( d < 0.0 ) return Type::DOUBLE;
1534   return TypeD::make( sqrt( d ) );
1535 }






















< prev index next >