This is the mail archive of the gdb-patches@sources.redhat.com mailing list for the GDB project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

[PATCH] Rename ObjC ops.


This is by request from Andrew...
2002-10-22  Adam Fedor  <fedor@gnu.org>

	* expression.h: Rename ObjC ops to OP_OBJC_MSGCALL,
	OP_OBJC_SELECTOR, OP_OBJC_NSSTRING, and OP_OBJC_SELF.
	* parse.c (length_of_subexp, prefixify_subexp): Likewise.
	* objc-exp.y: Likewise.	

Index: expression.h
===================================================================
RCS file: /cvs/src/src/gdb/expression.h,v
retrieving revision 1.7
diff -u -p -r1.7 expression.h
--- expression.h	12 Oct 2002 02:43:48 -0000	1.7
+++ expression.h	22 Oct 2002 18:41:17 -0000
@@ -181,11 +181,11 @@ enum exp_opcode
        making three exp_elements.  */
     OP_FUNCALL,
 
-    /* OP_MSGCALL is followed by a string in the next exp_element and then an
+    /* OP_OBJC_MSGCALL is followed by a string in the next exp_element and then an
        integer.  The string is the selector string.  The integer is the number
        of arguments to the message call.  That many plus one values are used, 
        the first one being the object pointer.  This is an Objective C message */
-    OP_MSGCALL,
+    OP_OBJC_MSGCALL,
 
     /* This is EXACTLY like OP_FUNCALL but is semantically different.  
        In F77, array subscript expressions, substring expressions
@@ -283,12 +283,12 @@ enum exp_opcode
        It just comes in a tight (OP_THIS, OP_THIS) pair.  */
     OP_THIS,
 
-    /* Objective-C: OP_SELF is just a placeholder for the class instance
-       variable.  It just comes in a tight (OP_SELF, OP_SELF) pair.  */
-    OP_SELF,
+    /* Objective-C: OP_OBJC_SELF is just a placeholder for the class instance
+       variable.  It just comes in a tight (OP_OBJC_SELF, OP_OBJC_SELF) pair.  */
+    OP_OBJC_SELF,
 
     /* Objective C: "@selector" pseudo-operator */
-    OP_SELECTOR,
+    OP_OBJC_SELECTOR,
 
     /* OP_SCOPE surrounds a type name and a field name.  The type
        name is encoded as one element, but the field name stays as
@@ -320,7 +320,7 @@ enum exp_opcode
     OP_EXPRSTRING,
 
     /* An Objective C Foundation Class NSString constant */
-    OP_NSSTRING,
+    OP_OBJC_NSSTRING,
   };
 
 union exp_element
Index: objc-exp.y
===================================================================
RCS file: /cvs/src/src/gdb/objc-exp.y,v
retrieving revision 1.5
diff -u -p -r1.5 objc-exp.y
--- objc-exp.y	20 Oct 2002 01:38:40 -0000	1.5
+++ objc-exp.y	22 Oct 2002 18:41:18 -0000
@@ -341,9 +341,9 @@ exp	: 	'[' TYPENAME
 			  start_msglist();
 			}
 		msglist ']'
-			{ write_exp_elt_opcode (OP_MSGCALL);
+			{ write_exp_elt_opcode (OP_OBJC_MSGCALL);
 			  end_msglist();
-			  write_exp_elt_opcode (OP_MSGCALL); 
+			  write_exp_elt_opcode (OP_OBJC_MSGCALL); 
 			}
 	;
 
@@ -356,18 +356,18 @@ exp	:	'[' CLASSNAME
 			  start_msglist();
 			}
 		msglist ']'
-			{ write_exp_elt_opcode (OP_MSGCALL);
+			{ write_exp_elt_opcode (OP_OBJC_MSGCALL);
 			  end_msglist();
-			  write_exp_elt_opcode (OP_MSGCALL); 
+			  write_exp_elt_opcode (OP_OBJC_MSGCALL); 
 			}
 	;
 
 exp	:	'[' exp
 			{ start_msglist(); }
 		msglist ']'
-			{ write_exp_elt_opcode (OP_MSGCALL);
+			{ write_exp_elt_opcode (OP_OBJC_MSGCALL);
 			  end_msglist();
-			  write_exp_elt_opcode (OP_MSGCALL); 
+			  write_exp_elt_opcode (OP_OBJC_MSGCALL); 
 			}
 	;
 
@@ -565,9 +565,9 @@ exp	:	VARIABLE
 
 exp	:	SELECTOR 
 			{
-			  write_exp_elt_opcode (OP_SELECTOR);
+			  write_exp_elt_opcode (OP_OBJC_SELECTOR);
 			  write_exp_string ($1);
-			  write_exp_elt_opcode (OP_SELECTOR); }
+			  write_exp_elt_opcode (OP_OBJC_SELECTOR); }
 
 exp	:	SIZEOF '(' type ')'	%prec UNARY
 			{ write_exp_elt_opcode (OP_LONG);
@@ -605,9 +605,9 @@ exp	:	STRING
 exp     :	NSSTRING	/* ObjC NextStep NSString constant
 				 * of the form '@' '"' string '"'.
 				 */
-			{ write_exp_elt_opcode (OP_NSSTRING);
+			{ write_exp_elt_opcode (OP_OBJC_NSSTRING);
 			  write_exp_string ($1);
-			  write_exp_elt_opcode (OP_NSSTRING); }
+			  write_exp_elt_opcode (OP_OBJC_NSSTRING); }
 	;
 
 block	:	BLOCKNAME
@@ -756,8 +756,8 @@ variable:	name_not_typename
 			      if (innermost_block == 0 || 
 				  contained_in (block_found, innermost_block))
 				innermost_block = block_found;
-			      write_exp_elt_opcode (OP_SELF);
-			      write_exp_elt_opcode (OP_SELF);
+			      write_exp_elt_opcode (OP_OBJC_SELF);
+			      write_exp_elt_opcode (OP_OBJC_SELF);
 			      write_exp_elt_opcode (STRUCTOP_PTR);
 			      write_exp_string ($1.stoken);
 			      write_exp_elt_opcode (STRUCTOP_PTR);
Index: parse.c
===================================================================
RCS file: /cvs/src/src/gdb/parse.c,v
retrieving revision 1.29
diff -u -p -r1.29 parse.c
--- parse.c	14 Oct 2002 01:50:44 -0000	1.29
+++ parse.c	22 Oct 2002 18:41:19 -0000
@@ -830,7 +830,7 @@ length_of_subexp (register struct expres
       args = 1 + longest_to_int (expr->elts[endpos - 2].longconst);
       break;
 
-    case OP_MSGCALL:		/* Objective C message (method) call */
+    case OP_OBJC_MSGCALL:	/* Objective C message (method) call */
       oplen = 4;
       args = 1 + longest_to_int (expr->elts[endpos - 2].longconst);
       break;
@@ -866,8 +866,8 @@ length_of_subexp (register struct expres
       /* fall through */
     case OP_M2_STRING:
     case OP_STRING:
-    case OP_NSSTRING:		/* Objective C Foundation Class NSString constant */
-    case OP_SELECTOR:		/* Objective C "@selector" pseudo-op */
+    case OP_OBJC_NSSTRING:	/* Objective C Foundation Class NSString constant */
+    case OP_OBJC_SELECTOR:	/* Objective C "@selector" pseudo-op */
     case OP_NAME:
     case OP_EXPRSTRING:
       oplen = longest_to_int (expr->elts[endpos - 2].longconst);
@@ -906,7 +906,7 @@ length_of_subexp (register struct expres
 
       /* C++ */
     case OP_THIS:
-    case OP_SELF:
+    case OP_OBJC_SELF:
       oplen = 2;
       break;
 
@@ -975,7 +975,7 @@ prefixify_subexp (register struct expres
       args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
       break;
 
-    case OP_MSGCALL:		/* Objective C message (method) call */
+    case OP_OBJC_MSGCALL:	/* Objective C message (method) call */
       oplen = 4;
       args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
       break;
@@ -1010,8 +1010,8 @@ prefixify_subexp (register struct expres
       /* fall through */
     case OP_M2_STRING:
     case OP_STRING:
-    case OP_NSSTRING:		/* Objective C Foundation Class NSString constant */
-    case OP_SELECTOR:		/* Objective C "@selector" pseudo-op */
+    case OP_OBJC_NSSTRING:	/* Objective C Foundation Class NSString constant */
+    case OP_OBJC_SELECTOR:	/* Objective C "@selector" pseudo-op */
     case OP_NAME:
     case OP_EXPRSTRING:
       oplen = longest_to_int (inexpr->elts[inend - 2].longconst);
@@ -1050,7 +1050,7 @@ prefixify_subexp (register struct expres
 
       /* C++ */
     case OP_THIS:
-    case OP_SELF:
+    case OP_OBJC_SELF:
       oplen = 2;
       break;
 

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]