466 class TypeF : public Type {
467 TypeF( float f ) : Type(FloatCon), _f(f) {};
468 public:
469 virtual bool eq( const Type *t ) const;
470 virtual int hash() const; // Type specific hashing
471 virtual bool singleton(void) const; // TRUE if type is a singleton
472 virtual bool empty(void) const; // TRUE if type is vacuous
473 public:
474 const float _f; // Float constant
475
476 static const TypeF *make(float f);
477
478 virtual bool is_finite() const; // Has a finite value
479 virtual bool is_nan() const; // Is not a number (NaN)
480
481 virtual const Type *xmeet( const Type *t ) const;
482 virtual const Type *xdual() const; // Compute dual right now.
483 // Convenience common pre-built types.
484 static const TypeF *ZERO; // positive zero only
485 static const TypeF *ONE;
486 #ifndef PRODUCT
487 virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
488 #endif
489 };
490
491 //------------------------------TypeD------------------------------------------
492 // Class of Double-Constant Types.
493 class TypeD : public Type {
494 TypeD( double d ) : Type(DoubleCon), _d(d) {};
495 public:
496 virtual bool eq( const Type *t ) const;
497 virtual int hash() const; // Type specific hashing
498 virtual bool singleton(void) const; // TRUE if type is a singleton
499 virtual bool empty(void) const; // TRUE if type is vacuous
500 public:
501 const double _d; // Double constant
502
503 static const TypeD *make(double d);
504
505 virtual bool is_finite() const; // Has a finite value
506 virtual bool is_nan() const; // Is not a number (NaN)
507
508 virtual const Type *xmeet( const Type *t ) const;
509 virtual const Type *xdual() const; // Compute dual right now.
510 // Convenience common pre-built types.
511 static const TypeD *ZERO; // positive zero only
512 static const TypeD *ONE;
513 #ifndef PRODUCT
514 virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
515 #endif
516 };
517
518 //------------------------------TypeInt----------------------------------------
519 // Class of integer ranges, the set of integers between a lower bound and an
520 // upper bound, inclusive.
521 class TypeInt : public Type {
522 TypeInt( jint lo, jint hi, int w );
523 protected:
524 virtual const Type *filter_helper(const Type *kills, bool include_speculative) const;
525
526 public:
527 typedef jint NativeType;
528 virtual bool eq( const Type *t ) const;
529 virtual int hash() const; // Type specific hashing
530 virtual bool singleton(void) const; // TRUE if type is a singleton
531 virtual bool empty(void) const; // TRUE if type is vacuous
532 const jint _lo, _hi; // Lower bound, upper bound
|
466 class TypeF : public Type {
467 TypeF( float f ) : Type(FloatCon), _f(f) {};
468 public:
469 virtual bool eq( const Type *t ) const;
470 virtual int hash() const; // Type specific hashing
471 virtual bool singleton(void) const; // TRUE if type is a singleton
472 virtual bool empty(void) const; // TRUE if type is vacuous
473 public:
474 const float _f; // Float constant
475
476 static const TypeF *make(float f);
477
478 virtual bool is_finite() const; // Has a finite value
479 virtual bool is_nan() const; // Is not a number (NaN)
480
481 virtual const Type *xmeet( const Type *t ) const;
482 virtual const Type *xdual() const; // Compute dual right now.
483 // Convenience common pre-built types.
484 static const TypeF *ZERO; // positive zero only
485 static const TypeF *ONE;
486 static const TypeF *POS_INF;
487 static const TypeF *NEG_INF;
488 #ifndef PRODUCT
489 virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
490 #endif
491 };
492
493 //------------------------------TypeD------------------------------------------
494 // Class of Double-Constant Types.
495 class TypeD : public Type {
496 TypeD( double d ) : Type(DoubleCon), _d(d) {};
497 public:
498 virtual bool eq( const Type *t ) const;
499 virtual int hash() const; // Type specific hashing
500 virtual bool singleton(void) const; // TRUE if type is a singleton
501 virtual bool empty(void) const; // TRUE if type is vacuous
502 public:
503 const double _d; // Double constant
504
505 static const TypeD *make(double d);
506
507 virtual bool is_finite() const; // Has a finite value
508 virtual bool is_nan() const; // Is not a number (NaN)
509
510 virtual const Type *xmeet( const Type *t ) const;
511 virtual const Type *xdual() const; // Compute dual right now.
512 // Convenience common pre-built types.
513 static const TypeD *ZERO; // positive zero only
514 static const TypeD *ONE;
515 static const TypeD *POS_INF;
516 static const TypeD *NEG_INF;
517 #ifndef PRODUCT
518 virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
519 #endif
520 };
521
522 //------------------------------TypeInt----------------------------------------
523 // Class of integer ranges, the set of integers between a lower bound and an
524 // upper bound, inclusive.
525 class TypeInt : public Type {
526 TypeInt( jint lo, jint hi, int w );
527 protected:
528 virtual const Type *filter_helper(const Type *kills, bool include_speculative) const;
529
530 public:
531 typedef jint NativeType;
532 virtual bool eq( const Type *t ) const;
533 virtual int hash() const; // Type specific hashing
534 virtual bool singleton(void) const; // TRUE if type is a singleton
535 virtual bool empty(void) const; // TRUE if type is vacuous
536 const jint _lo, _hi; // Lower bound, upper bound
|