comparison src/share/vm/opto/type.cpp @ 293:c3e045194476

6731641: assert(m->adr_type() == mach->adr_type(),"matcher should not change adr type") Summary: fixed few addP node type and narrow oop type problems. Reviewed-by: rasbold, never
author kvn
date Fri, 01 Aug 2008 10:06:45 -0700
parents 02a35ad4adf8
children af945ba2e739
comparison
equal deleted inserted replaced
257:40b69ca33f4b 293:c3e045194476
802 case RawPtr: // reuses local variables 802 case RawPtr: // reuses local variables
803 case OopPtr: 803 case OopPtr:
804 case InstPtr: 804 case InstPtr:
805 case KlassPtr: 805 case KlassPtr:
806 case AryPtr: 806 case AryPtr:
807 case NarrowOop:
807 case Int: 808 case Int:
808 case Long: 809 case Long:
809 case DoubleTop: 810 case DoubleTop:
810 case DoubleCon: 811 case DoubleCon:
811 case DoubleBot: 812 case DoubleBot:
2261 case FloatCon: 2262 case FloatCon:
2262 case FloatBot: 2263 case FloatBot:
2263 case DoubleTop: 2264 case DoubleTop:
2264 case DoubleCon: 2265 case DoubleCon:
2265 case DoubleBot: 2266 case DoubleBot:
2267 case NarrowOop:
2266 case Bottom: // Ye Olde Default 2268 case Bottom: // Ye Olde Default
2267 return Type::BOTTOM; 2269 return Type::BOTTOM;
2268 case Top: 2270 case Top:
2269 return this; 2271 return this;
2270 2272
3463 3465
3464 bool TypeNarrowOop::empty(void) const { 3466 bool TypeNarrowOop::empty(void) const {
3465 return _ooptype->empty(); 3467 return _ooptype->empty();
3466 } 3468 }
3467 3469
3468 //------------------------------meet------------------------------------------- 3470 //------------------------------xmeet------------------------------------------
3469 // Compute the MEET of two types. It returns a new Type object. 3471 // Compute the MEET of two types. It returns a new Type object.
3470 const Type *TypeNarrowOop::xmeet( const Type *t ) const { 3472 const Type *TypeNarrowOop::xmeet( const Type *t ) const {
3471 // Perform a fast test for common case; meeting the same types together. 3473 // Perform a fast test for common case; meeting the same types together.
3472 if( this == t ) return this; // Meeting same type-rep? 3474 if( this == t ) return this; // Meeting same type-rep?
3473 3475
3481 case FloatCon: 3483 case FloatCon:
3482 case FloatBot: 3484 case FloatBot:
3483 case DoubleTop: 3485 case DoubleTop:
3484 case DoubleCon: 3486 case DoubleCon:
3485 case DoubleBot: 3487 case DoubleBot:
3488 case AnyPtr:
3489 case RawPtr:
3490 case OopPtr:
3491 case InstPtr:
3492 case KlassPtr:
3493 case AryPtr:
3494
3486 case Bottom: // Ye Olde Default 3495 case Bottom: // Ye Olde Default
3487 return Type::BOTTOM; 3496 return Type::BOTTOM;
3488 case Top: 3497 case Top:
3489 return this; 3498 return this;
3490 3499
3497 } 3506 }
3498 3507
3499 default: // All else is a mistake 3508 default: // All else is a mistake
3500 typerr(t); 3509 typerr(t);
3501 3510
3502 case RawPtr:
3503 case AnyPtr:
3504 case OopPtr:
3505 case InstPtr:
3506 case KlassPtr:
3507 case AryPtr:
3508 typerr(t);
3509 return Type::BOTTOM;
3510
3511 } // End of switch 3511 } // End of switch
3512
3513 return this;
3512 } 3514 }
3513 3515
3514 const Type *TypeNarrowOop::xdual() const { // Compute dual right now. 3516 const Type *TypeNarrowOop::xdual() const { // Compute dual right now.
3515 const TypePtr* odual = _ooptype->dual()->is_ptr(); 3517 const TypePtr* odual = _ooptype->dual()->is_ptr();
3516 return new TypeNarrowOop(odual); 3518 return new TypeNarrowOop(odual);
3700 case FloatCon: 3702 case FloatCon:
3701 case FloatBot: 3703 case FloatBot:
3702 case DoubleTop: 3704 case DoubleTop:
3703 case DoubleCon: 3705 case DoubleCon:
3704 case DoubleBot: 3706 case DoubleBot:
3707 case NarrowOop:
3705 case Bottom: // Ye Olde Default 3708 case Bottom: // Ye Olde Default
3706 return Type::BOTTOM; 3709 return Type::BOTTOM;
3707 case Top: 3710 case Top:
3708 return this; 3711 return this;
3709 3712