Sandra Loosemore - PATCH: CALL_EXPR representation part 8/9 (OBJC front end) (original) (raw)
This is the mail archive of the gcc-patches@gcc.gnu.orgmailing list for the GCC 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] |
- From: Sandra Loosemore
- To: GCC Patches
- Cc: Brooks Moses , Lee Millward
- Date: Sat, 10 Feb 2007 10:44:32 -0500
- Subject: PATCH: CALL_EXPR representation part 8/9 (OBJC front end)
This is part 8 of the patch to change the CALL_EXPR representation. This piece contains the changes to the OBJC front end.-Sandra
2007-02-09 Sandra Loosemore sandra@codesourcery.com Brooks Moses brooks.moses@codesourcery.com Lee Millward lee.millward@codesourcery.com
* objc-act.c (receiver_is_class_object): Use new CALL_EXPR accessors.
(objc_get_callee_fndecl): Likewise.
Index: gcc/objc/objc-act.c
*** gcc/objc/objc-act.c (revision 121705)
--- gcc/objc/objc-act.c (working copy)
*************** receiver_is_class_object (tree receiver,
*** 6131,6137 ****
/* The receiver is a function call that returns an id. Check if
it is a call to objc_getClass, if so, pick up the class name. /
if (TREE_CODE (receiver) == CALL_EXPR
! && (exp = TREE_OPERAND (receiver, 0))
&& TREE_CODE (exp) == ADDR_EXPR
&& (exp = TREE_OPERAND (exp, 0))
&& TREE_CODE (exp) == FUNCTION_DECL
--- 6131,6137 ----
/ The receiver is a function call that returns an id. Check if
it is a call to objc_getClass, if so, pick up the class name. /
if (TREE_CODE (receiver) == CALL_EXPR
! && (exp = CALL_EXPR_FN (receiver))
&& TREE_CODE (exp) == ADDR_EXPR
&& (exp = TREE_OPERAND (exp, 0))
&& TREE_CODE (exp) == FUNCTION_DECL
*************** receiver_is_class_object (tree receiver,
*** 6141,6149 ****
&& TREE_TYPE (exp) == TREE_TYPE (objc_get_class_decl)
&& !strcmp (IDENTIFIER_POINTER (DECL_NAME (exp)), TAG_GETCLASS)
/ We have a call to objc_get_class/objc_getClass! /
! && (arg = TREE_OPERAND (receiver, 1))
! && TREE_CODE (arg) == TREE_LIST
! && (arg = TREE_VALUE (arg)))
{
STRIP_NOPS (arg);
if (TREE_CODE (arg) == ADDR_EXPR
--- 6141,6147 ----
&& TREE_TYPE (exp) == TREE_TYPE (objc_get_class_decl)
&& !strcmp (IDENTIFIER_POINTER (DECL_NAME (exp)), TAG_GETCLASS)
/ We have a call to objc_get_class/objc_getClass! */
! && (arg = CALL_EXPR_ARG (receiver, 0)))
{
STRIP_NOPS (arg);
if (TREE_CODE (arg) == ADDR_EXPR
*************** objc_gimplify_expr (tree *expr_p, tree *
*** 9517,9523 ****
tree
objc_get_callee_fndecl (tree call_expr)
{
! tree addr = TREE_OPERAND (call_expr, 0);
if (TREE_CODE (addr) != OBJ_TYPE_REF)
return 0;
--- 9515,9521 ----
tree
objc_get_callee_fndecl (tree call_expr)
{
! tree addr = CALL_EXPR_FN (call_expr);
if (TREE_CODE (addr) != OBJ_TYPE_REF)
return 0;
- Follow-Ups:
- Re: PATCH: CALL_EXPR representation part 8/9 (OBJC front end)
* From: Mike Stump
- Re: PATCH: CALL_EXPR representation part 8/9 (OBJC front end)
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |