OP_OBJC_SELECTOR, OP_OBJC_NSSTRING, and OP_OBJC_SELF.
* parse.c (length_of_subexp, prefixify_subexp): Likewise.
* objc-exp.y: Likewise.
+2002-11-18 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.
+
2002-11-18 Adam Fedor <fedor@gnu.org>
* gdb/parser-defs.h: (struct objc_class_str): New structure
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
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
OP_EXPRSTRING,
/* An Objective C Foundation Class NSString constant */
- OP_NSSTRING,
+ OP_OBJC_NSSTRING,
};
union exp_element
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);
}
;
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);
}
;
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);
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
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);
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;
/* 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);
/* C++ */
case OP_THIS:
- case OP_SELF:
+ case OP_OBJC_SELF:
oplen = 2;
break;
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;
/* 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);
/* C++ */
case OP_THIS:
- case OP_SELF:
+ case OP_OBJC_SELF:
oplen = 2;
break;