src/share/vm/opto/type.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File hs-comp-bmi1 Sdiff src/share/vm/opto

src/share/vm/opto/type.hpp

Print this page




 472 
 473   virtual const Type *xmeet( const Type *t ) const;
 474   virtual const Type *xdual() const;    // Compute dual right now.
 475   // Convenience common pre-built types.
 476   static const TypeD *ZERO; // positive zero only
 477   static const TypeD *ONE;
 478 #ifndef PRODUCT
 479   virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
 480 #endif
 481 };
 482 
 483 //------------------------------TypeInt----------------------------------------
 484 // Class of integer ranges, the set of integers between a lower bound and an
 485 // upper bound, inclusive.
 486 class TypeInt : public Type {
 487   TypeInt( jint lo, jint hi, int w );
 488 protected:
 489   virtual const Type *filter_helper(const Type *kills, bool include_speculative) const;
 490 
 491 public:

 492   virtual bool eq( const Type *t ) const;
 493   virtual int  hash() const;             // Type specific hashing
 494   virtual bool singleton(void) const;    // TRUE if type is a singleton
 495   virtual bool empty(void) const;        // TRUE if type is vacuous
 496   const jint _lo, _hi;          // Lower bound, upper bound
 497   const short _widen;           // Limit on times we widen this sucker
 498 
 499   static const TypeInt *make(jint lo);
 500   // must always specify w
 501   static const TypeInt *make(jint lo, jint hi, int w);
 502 
 503   // Check for single integer
 504   int is_con() const { return _lo==_hi; }
 505   bool is_con(int i) const { return is_con() && _lo == i; }
 506   jint get_con() const { assert( is_con(), "" );  return _lo; }
 507 
 508   virtual bool        is_finite() const;  // Has a finite value
 509 
 510   virtual const Type *xmeet( const Type *t ) const;
 511   virtual const Type *xdual() const;    // Compute dual right now.


 514   // Do not kill _widen bits.
 515   // Convenience common pre-built types.
 516   static const TypeInt *MINUS_1;
 517   static const TypeInt *ZERO;
 518   static const TypeInt *ONE;
 519   static const TypeInt *BOOL;
 520   static const TypeInt *CC;
 521   static const TypeInt *CC_LT;  // [-1]  == MINUS_1
 522   static const TypeInt *CC_GT;  // [1]   == ONE
 523   static const TypeInt *CC_EQ;  // [0]   == ZERO
 524   static const TypeInt *CC_LE;  // [-1,0]
 525   static const TypeInt *CC_GE;  // [0,1] == BOOL (!)
 526   static const TypeInt *BYTE;
 527   static const TypeInt *UBYTE;
 528   static const TypeInt *CHAR;
 529   static const TypeInt *SHORT;
 530   static const TypeInt *POS;
 531   static const TypeInt *POS1;
 532   static const TypeInt *INT;
 533   static const TypeInt *SYMINT; // symmetric range [-max_jint..max_jint]

 534 #ifndef PRODUCT
 535   virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
 536 #endif
 537 };
 538 
 539 
 540 //------------------------------TypeLong---------------------------------------
 541 // Class of long integer ranges, the set of integers between a lower bound and
 542 // an upper bound, inclusive.
 543 class TypeLong : public Type {
 544   TypeLong( jlong lo, jlong hi, int w );
 545 protected:
 546   // Do not kill _widen bits.
 547   virtual const Type *filter_helper(const Type *kills, bool include_speculative) const;
 548 public:
 549   virtual bool eq( const Type *t ) const;
 550   virtual int  hash() const;             // Type specific hashing
 551   virtual bool singleton(void) const;    // TRUE if type is a singleton
 552   virtual bool empty(void) const;        // TRUE if type is vacuous
 553 public:

 554   const jlong _lo, _hi;         // Lower bound, upper bound
 555   const short _widen;           // Limit on times we widen this sucker
 556 
 557   static const TypeLong *make(jlong lo);
 558   // must always specify w
 559   static const TypeLong *make(jlong lo, jlong hi, int w);
 560 
 561   // Check for single integer
 562   int is_con() const { return _lo==_hi; }
 563   bool is_con(int i) const { return is_con() && _lo == i; }
 564   jlong get_con() const { assert( is_con(), "" ); return _lo; }
 565 
 566   // Check for positive 32-bit value.
 567   int is_positive_int() const { return _lo >= 0 && _hi <= (jlong)max_jint; }
 568 
 569   virtual bool        is_finite() const;  // Has a finite value
 570 
 571   virtual const Type *xmeet( const Type *t ) const;
 572   virtual const Type *xdual() const;    // Compute dual right now.
 573   virtual const Type *widen( const Type *t, const Type* limit_type ) const;
 574   virtual const Type *narrow( const Type *t ) const;
 575   // Convenience common pre-built types.
 576   static const TypeLong *MINUS_1;
 577   static const TypeLong *ZERO;
 578   static const TypeLong *ONE;
 579   static const TypeLong *POS;
 580   static const TypeLong *LONG;
 581   static const TypeLong *INT;    // 32-bit subrange [min_jint..max_jint]
 582   static const TypeLong *UINT;   // 32-bit unsigned [0..max_juint]

 583 #ifndef PRODUCT
 584   virtual void dump2( Dict &d, uint, outputStream *st  ) const;// Specialized per-Type dumping
 585 #endif
 586 };
 587 
 588 //------------------------------TypeTuple--------------------------------------
 589 // Class of Tuple Types, essentially type collections for function signatures
 590 // and class layouts.  It happens to also be a fast cache for the HotSpot
 591 // signature types.
 592 class TypeTuple : public Type {
 593   TypeTuple( uint cnt, const Type **fields ) : Type(Tuple), _cnt(cnt), _fields(fields) { }
 594 public:
 595   virtual bool eq( const Type *t ) const;
 596   virtual int  hash() const;             // Type specific hashing
 597   virtual bool singleton(void) const;    // TRUE if type is a singleton
 598   virtual bool empty(void) const;        // TRUE if type is vacuous
 599 
 600 public:
 601   const uint          _cnt;              // Count of fields
 602   const Type ** const _fields;           // Array of field types




 472 
 473   virtual const Type *xmeet( const Type *t ) const;
 474   virtual const Type *xdual() const;    // Compute dual right now.
 475   // Convenience common pre-built types.
 476   static const TypeD *ZERO; // positive zero only
 477   static const TypeD *ONE;
 478 #ifndef PRODUCT
 479   virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
 480 #endif
 481 };
 482 
 483 //------------------------------TypeInt----------------------------------------
 484 // Class of integer ranges, the set of integers between a lower bound and an
 485 // upper bound, inclusive.
 486 class TypeInt : public Type {
 487   TypeInt( jint lo, jint hi, int w );
 488 protected:
 489   virtual const Type *filter_helper(const Type *kills, bool include_speculative) const;
 490 
 491 public:
 492   typedef jint NativeType;
 493   virtual bool eq( const Type *t ) const;
 494   virtual int  hash() const;             // Type specific hashing
 495   virtual bool singleton(void) const;    // TRUE if type is a singleton
 496   virtual bool empty(void) const;        // TRUE if type is vacuous
 497   const jint _lo, _hi;          // Lower bound, upper bound
 498   const short _widen;           // Limit on times we widen this sucker
 499 
 500   static const TypeInt *make(jint lo);
 501   // must always specify w
 502   static const TypeInt *make(jint lo, jint hi, int w);
 503 
 504   // Check for single integer
 505   int is_con() const { return _lo==_hi; }
 506   bool is_con(int i) const { return is_con() && _lo == i; }
 507   jint get_con() const { assert( is_con(), "" );  return _lo; }
 508 
 509   virtual bool        is_finite() const;  // Has a finite value
 510 
 511   virtual const Type *xmeet( const Type *t ) const;
 512   virtual const Type *xdual() const;    // Compute dual right now.


 515   // Do not kill _widen bits.
 516   // Convenience common pre-built types.
 517   static const TypeInt *MINUS_1;
 518   static const TypeInt *ZERO;
 519   static const TypeInt *ONE;
 520   static const TypeInt *BOOL;
 521   static const TypeInt *CC;
 522   static const TypeInt *CC_LT;  // [-1]  == MINUS_1
 523   static const TypeInt *CC_GT;  // [1]   == ONE
 524   static const TypeInt *CC_EQ;  // [0]   == ZERO
 525   static const TypeInt *CC_LE;  // [-1,0]
 526   static const TypeInt *CC_GE;  // [0,1] == BOOL (!)
 527   static const TypeInt *BYTE;
 528   static const TypeInt *UBYTE;
 529   static const TypeInt *CHAR;
 530   static const TypeInt *SHORT;
 531   static const TypeInt *POS;
 532   static const TypeInt *POS1;
 533   static const TypeInt *INT;
 534   static const TypeInt *SYMINT; // symmetric range [-max_jint..max_jint]
 535   static const TypeInt *as_self(const Type *t) { return t->is_int(); }
 536 #ifndef PRODUCT
 537   virtual void dump2( Dict &d, uint depth, outputStream *st ) const;
 538 #endif
 539 };
 540 
 541 
 542 //------------------------------TypeLong---------------------------------------
 543 // Class of long integer ranges, the set of integers between a lower bound and
 544 // an upper bound, inclusive.
 545 class TypeLong : public Type {
 546   TypeLong( jlong lo, jlong hi, int w );
 547 protected:
 548   // Do not kill _widen bits.
 549   virtual const Type *filter_helper(const Type *kills, bool include_speculative) const;
 550 public:
 551   virtual bool eq( const Type *t ) const;
 552   virtual int  hash() const;             // Type specific hashing
 553   virtual bool singleton(void) const;    // TRUE if type is a singleton
 554   virtual bool empty(void) const;        // TRUE if type is vacuous
 555 public:
 556   typedef jlong NativeType;
 557   const jlong _lo, _hi;         // Lower bound, upper bound
 558   const short _widen;           // Limit on times we widen this sucker
 559 
 560   static const TypeLong *make(jlong lo);
 561   // must always specify w
 562   static const TypeLong *make(jlong lo, jlong hi, int w);
 563 
 564   // Check for single integer
 565   int is_con() const { return _lo==_hi; }
 566   bool is_con(int i) const { return is_con() && _lo == i; }
 567   jlong get_con() const { assert( is_con(), "" ); return _lo; }
 568 
 569   // Check for positive 32-bit value.
 570   int is_positive_int() const { return _lo >= 0 && _hi <= (jlong)max_jint; }
 571 
 572   virtual bool        is_finite() const;  // Has a finite value
 573 
 574   virtual const Type *xmeet( const Type *t ) const;
 575   virtual const Type *xdual() const;    // Compute dual right now.
 576   virtual const Type *widen( const Type *t, const Type* limit_type ) const;
 577   virtual const Type *narrow( const Type *t ) const;
 578   // Convenience common pre-built types.
 579   static const TypeLong *MINUS_1;
 580   static const TypeLong *ZERO;
 581   static const TypeLong *ONE;
 582   static const TypeLong *POS;
 583   static const TypeLong *LONG;
 584   static const TypeLong *INT;    // 32-bit subrange [min_jint..max_jint]
 585   static const TypeLong *UINT;   // 32-bit unsigned [0..max_juint]
 586   static const TypeLong *as_self(const Type *t) { return t->is_long(); }
 587 #ifndef PRODUCT
 588   virtual void dump2( Dict &d, uint, outputStream *st  ) const;// Specialized per-Type dumping
 589 #endif
 590 };
 591 
 592 //------------------------------TypeTuple--------------------------------------
 593 // Class of Tuple Types, essentially type collections for function signatures
 594 // and class layouts.  It happens to also be a fast cache for the HotSpot
 595 // signature types.
 596 class TypeTuple : public Type {
 597   TypeTuple( uint cnt, const Type **fields ) : Type(Tuple), _cnt(cnt), _fields(fields) { }
 598 public:
 599   virtual bool eq( const Type *t ) const;
 600   virtual int  hash() const;             // Type specific hashing
 601   virtual bool singleton(void) const;    // TRUE if type is a singleton
 602   virtual bool empty(void) const;        // TRUE if type is vacuous
 603 
 604 public:
 605   const uint          _cnt;              // Count of fields
 606   const Type ** const _fields;           // Array of field types


src/share/vm/opto/type.hpp
Index Unified diffs Context diffs Sdiffs Patch New Old Previous File Next File