< prev index next >

test/testlibrary/jittester/src/jdk/test/lib/jittester/Type.java

Print this page




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package jdk.test.lib.jittester;
  25 
  26 import jdk.test.lib.jittester.visitors.Visitor;
  27 
  28 /**
  29  * Type system's core..
  30  */
  31 public abstract class Type extends IRNode implements Comparable<Type> {
  32 
  33     private final String typeName;
  34 
  35     protected Type(String typeName) {

  36         this.typeName = typeName;





  37     }
  38 
  39     @Override
  40     public boolean equals(Object t) {
  41         if (this == t) {
  42             return true;
  43         }
  44         if (t == null || !(t instanceof Type)) {
  45             return false;
  46         }
  47         return typeName.equals(((Type) t).typeName);
  48     }
  49 
  50     @Override
  51     public int compareTo(Type t) {
  52         return typeName.compareTo(t.typeName);
  53     }
  54 
  55     @Override
  56     public int hashCode() {




  16  * 2 along with this work; if not, write to the Free Software Foundation,
  17  * Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA.
  18  *
  19  * Please contact Oracle, 500 Oracle Parkway, Redwood Shores, CA 94065 USA
  20  * or visit www.oracle.com if you need additional information or have any
  21  * questions.
  22  */
  23 
  24 package jdk.test.lib.jittester;
  25 
  26 import jdk.test.lib.jittester.visitors.Visitor;
  27 
  28 /**
  29  * Type system's core..
  30  */
  31 public abstract class Type extends IRNode implements Comparable<Type> {
  32 
  33     private final String typeName;
  34 
  35     protected Type(String typeName) {
  36         super(null);
  37         this.typeName = typeName;
  38     }
  39 
  40     @Override
  41     public Type getResultType() {
  42         return this;
  43     }
  44 
  45     @Override
  46     public boolean equals(Object t) {
  47         if (this == t) {
  48             return true;
  49         }
  50         if (t == null || !(t instanceof Type)) {
  51             return false;
  52         }
  53         return typeName.equals(((Type) t).typeName);
  54     }
  55 
  56     @Override
  57     public int compareTo(Type t) {
  58         return typeName.compareTo(t.typeName);
  59     }
  60 
  61     @Override
  62     public int hashCode() {


< prev index next >