diff src/pt-const.h @ 922:708827b941b4

[project @ 1994-11-14 22:14:13 by jwe]
author jwe
date Mon, 14 Nov 1994 22:14:13 +0000
parents e8a677c3f042
children df3c4da3adb0
line wrap: on
line diff
--- a/src/pt-const.h
+++ b/src/pt-const.h
@@ -56,6 +56,7 @@
 public:
 
   enum magic_colon { magic_colon_t };
+  enum all_va_args { all_va_args_t };
 
 // Constructors.  It is possible to create the following types of
 // constants:
@@ -77,6 +78,7 @@
 // range            double, double, dobule
 //                  Range
 // magic colon      tree_constant::magic_colon
+// all_va_args      tree_constant::all_va_args
 
   tree_constant (void) : tree_fvc ()
     { rep = new tree_constant_rep (); rep->count = 1; }
@@ -131,6 +133,14 @@
       rep->count = 1;
     }
 
+  tree_constant (tree_constant::all_va_args t) : tree_fvc ()
+    {
+      tree_constant_rep::constant_type tmp;
+      tmp = tree_constant_rep::all_va_args;
+      rep = new tree_constant_rep (tmp);
+      rep->count = 1;
+    }
+
 // Copy constructor.
 
   tree_constant (const tree_constant& a) : tree_fvc ()
@@ -202,6 +212,7 @@
   int is_range (void) const { return rep->is_range (); }
   int is_map (void) const { return rep->is_map (); }
   int is_magic_colon (void) const { return rep->is_magic_colon (); }
+  int is_all_va_args (void) const { return rep->is_all_va_args (); }
 
 // Are any or all of the elements in this constant nonzero?
 
@@ -236,7 +247,7 @@
 
   int is_empty (void) const
     {
-      return ((! (is_magic_colon () || is_unknown ()))
+      return ((! (is_magic_colon () || is_all_va_args () || is_unknown ()))
 	      && (rows () == 0 || columns () == 0));
     }
 
@@ -244,7 +255,7 @@
 
   int is_zero_by_zero (void) const
     {
-      return ((! (is_magic_colon () || is_unknown ()))
+      return ((! (is_magic_colon () || is_all_va_args () || is_unknown ()))
 	      && rows () == 0 && columns () == 0);
     } 
 
@@ -389,7 +400,7 @@
 
   tree_constant make_numeric_or_magic (void) const
     {
-      if (is_numeric_type () || is_magic_colon ())
+      if (is_numeric_type () || is_all_va_args () || is_magic_colon ())
 	return *this;
       else
 	return rep->make_numeric ();
@@ -397,7 +408,8 @@
 
   tree_constant make_numeric_or_range_or_magic (void) const
     {
-      if (is_numeric_type () || is_range () || is_magic_colon ())
+      if (is_numeric_type () || is_range () || is_all_va_args ()
+	  || is_magic_colon ())
 	return *this;
       else
 	return rep->make_numeric ();