diff src/pt-jit.h @ 14922:2e6f83b2f2b9

Cleanup of some type inference functions * src/pt-jit.h (jit_typeinfo::tunion): Renamed to jit_typeinfo::join. (jit_typeinfo::join): New function. (jit_typeinfo::difference): Removed. (jit_phi::infer): Rename tunoin -> join. * src/pt-jit.cc (jit_call::infer): Simplified.
author Max Brister <max@2bass.com>
date Sun, 27 May 2012 22:57:55 -0500
parents 51d4b1018efb
children 168cb10bb9c5
line wrap: on
line diff
--- a/src/pt-jit.h
+++ b/src/pt-jit.h
@@ -253,14 +253,9 @@
 public:
   static void initialize (llvm::Module *m, llvm::ExecutionEngine *e);
 
-  static jit_type *tunion (jit_type *lhs, jit_type *rhs)
+  static jit_type *join (jit_type *lhs, jit_type *rhs)
   {
-    return instance->do_union (lhs, rhs);
-  }
-
-  static jit_type *difference (jit_type *lhs, jit_type *rhs)
-  {
-    return instance->do_difference (lhs, rhs);
+    return instance->do_join (lhs, rhs);
   }
 
   static jit_type *get_any (void) { return instance->any; }
@@ -329,10 +324,8 @@
   jit_typeinfo (llvm::Module *m, llvm::ExecutionEngine *e);
 
   // FIXME: Do these methods really need to be in jit_typeinfo?
-  jit_type *do_union (jit_type *lhs, jit_type *rhs)
+  jit_type *do_join (jit_type *lhs, jit_type *rhs)
   {
-    // FIXME: Actually introduce a union type
-
     // empty case
     if (! lhs)
       return rhs;
@@ -967,7 +960,7 @@
   {
     jit_type *infered = 0;
     for (size_t i = 0; i < argument_count (); ++i)
-      infered = jit_typeinfo::tunion (infered, argument_type (i));
+      infered = jit_typeinfo::join (infered, argument_type (i));
 
     if (infered != type ())
       {