parse.c: (length_of_subexp, prefixify_subexp): Handle

OP_MSGCALL, OP_SELECTOR, OP_NSSTRING, and OP_SELF.
This commit is contained in:
Adam Fedor
2002-10-14 01:50:44 +00:00
parent f9072f4138
commit 53c551b7ca
2 changed files with 21 additions and 0 deletions

View File

@@ -1,3 +1,8 @@
2002-10-13 Adam Fedor <fedor@gnu.org>
* parse.c: (length_of_subexp, prefixify_subexp): Handle
OP_MSGCALL, OP_SELECTOR, OP_NSSTRING, and OP_SELF.
2002-10-12 Adam Fedor <fedor@gnu.org> 2002-10-12 Adam Fedor <fedor@gnu.org>
* language.c (binop_result_type): Add language_objc to case. * language.c (binop_result_type): Add language_objc to case.

View File

@@ -830,6 +830,11 @@ length_of_subexp (register struct expression *expr, register int endpos)
args = 1 + longest_to_int (expr->elts[endpos - 2].longconst); args = 1 + longest_to_int (expr->elts[endpos - 2].longconst);
break; break;
case OP_MSGCALL: /* Objective C message (method) call */
oplen = 4;
args = 1 + longest_to_int (expr->elts[endpos - 2].longconst);
break;
case UNOP_MAX: case UNOP_MAX:
case UNOP_MIN: case UNOP_MIN:
oplen = 3; oplen = 3;
@@ -861,6 +866,8 @@ length_of_subexp (register struct expression *expr, register int endpos)
/* fall through */ /* fall through */
case OP_M2_STRING: case OP_M2_STRING:
case OP_STRING: case OP_STRING:
case OP_NSSTRING: /* Objective C Foundation Class NSString constant */
case OP_SELECTOR: /* Objective C "@selector" pseudo-op */
case OP_NAME: case OP_NAME:
case OP_EXPRSTRING: case OP_EXPRSTRING:
oplen = longest_to_int (expr->elts[endpos - 2].longconst); oplen = longest_to_int (expr->elts[endpos - 2].longconst);
@@ -899,6 +906,7 @@ length_of_subexp (register struct expression *expr, register int endpos)
/* C++ */ /* C++ */
case OP_THIS: case OP_THIS:
case OP_SELF:
oplen = 2; oplen = 2;
break; break;
@@ -967,6 +975,11 @@ prefixify_subexp (register struct expression *inexpr,
args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst); args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
break; break;
case OP_MSGCALL: /* Objective C message (method) call */
oplen = 4;
args = 1 + longest_to_int (inexpr->elts[inend - 2].longconst);
break;
case UNOP_MIN: case UNOP_MIN:
case UNOP_MAX: case UNOP_MAX:
oplen = 3; oplen = 3;
@@ -997,6 +1010,8 @@ prefixify_subexp (register struct expression *inexpr,
/* fall through */ /* fall through */
case OP_M2_STRING: case OP_M2_STRING:
case OP_STRING: case OP_STRING:
case OP_NSSTRING: /* Objective C Foundation Class NSString constant */
case OP_SELECTOR: /* Objective C "@selector" pseudo-op */
case OP_NAME: case OP_NAME:
case OP_EXPRSTRING: case OP_EXPRSTRING:
oplen = longest_to_int (inexpr->elts[inend - 2].longconst); oplen = longest_to_int (inexpr->elts[inend - 2].longconst);
@@ -1035,6 +1050,7 @@ prefixify_subexp (register struct expression *inexpr,
/* C++ */ /* C++ */
case OP_THIS: case OP_THIS:
case OP_SELF:
oplen = 2; oplen = 2;
break; break;