* [tuples] objc: make it go
@ 2007-11-11 9:32 Aldy Hernandez
0 siblings, 0 replies; only message in thread
From: Aldy Hernandez @ 2007-11-11 9:32 UTC (permalink / raw)
To: dnovillo, gcc-patches
Go, go objective C. Somehow "go, go, gadget objective C" doesn't have
the same ring.
With this patch, objective C passes all the compile tests. The rest of
the tests pass all the way until link time.
Diego, can you verify that the verify_types_in_gimple_call() is ok with
you? Objective C has function names of OBJ_TYPE_REF. This is also the
case in mainline's gimplifier, so I assume we should allow it in tuples.
Agreed?
Committed to mainline.
* tree-cfg.c (verify_types_in_gimple_call): OBJ_TYPE_REF are allowed
as function types.
[objc]
* objc-act.c (objc_gimplify_expr): Change pre and post to sequences.
* objc-act.h (objc_gimplify_expr): Change prototype accordingly.
[testsuite]
* lib/objc.exp: Set -I regardless of libobjc.
Index: objc/objc-act.c
===================================================================
--- objc/objc-act.c (revision 130047)
+++ objc/objc-act.c (working copy)
@@ -9479,7 +9479,7 @@ objc_rewrite_function_call (tree functio
of its cousins). */
enum gimplify_status
-objc_gimplify_expr (tree *expr_p, tree *pre_p, tree *post_p)
+objc_gimplify_expr (tree *expr_p, gimple_seq pre_p, gimple_seq post_p)
{
enum gimplify_status r0, r1;
if (TREE_CODE (*expr_p) == OBJ_TYPE_REF
Index: objc/objc-act.h
===================================================================
--- objc/objc-act.h (revision 130047)
+++ objc/objc-act.h (working copy)
@@ -32,7 +32,7 @@ const char *objc_printable_name (tree, i
tree objc_get_callee_fndecl (const_tree);
void objc_finish_file (void);
tree objc_fold_obj_type_ref (tree, tree);
-enum gimplify_status objc_gimplify_expr (tree *, tree *, tree *);
+enum gimplify_status objc_gimplify_expr (tree *, gimple_seq, gimple_seq);
/* NB: The remaining public functions are prototyped in c-common.h, for the
benefit of stub-objc.c and objc-act.c. */
Index: testsuite/lib/objc.exp
===================================================================
--- testsuite/lib/objc.exp (revision 130047)
+++ testsuite/lib/objc.exp (working copy)
@@ -179,6 +179,13 @@ proc objc_target_compile { source dest t
[lookfor_file ${objcpath} libobjc/.libs/libobjc-gnu.${shlib_ext}]
}
}
+# FIXME tuples
+# Do not merge.
+#
+# Set -I regardless, so we can run compilation tests.
+ set objc_include_dir "${srcdir}/../../libobjc"
+ lappend options "additional_flags=-I${objc_include_dir}"
+# end FIXME tuples
if { $libobjc_dir != "" } {
set objc_include_dir "${srcdir}/../../libobjc"
lappend options "additional_flags=-I${objc_include_dir}"
Index: tree-cfg.c
===================================================================
--- tree-cfg.c (revision 130047)
+++ tree-cfg.c (working copy)
@@ -3344,11 +3344,15 @@ verify_types_in_gimple_call (gimple stmt
{
bool failed = false;
unsigned int i;
+ tree fn;
if (gimple_call_lhs (stmt))
failed |= verify_types_in_gimple_op (gimple_call_lhs (stmt));
- failed |= verify_types_in_gimple_op (gimple_call_fn (stmt));
+ fn = gimple_call_fn (stmt);
+ if (TREE_CODE (fn) != OBJ_TYPE_REF
+ && verify_types_in_gimple_op (fn))
+ failed = true;
if (gimple_call_chain (stmt))
failed |= verify_types_in_gimple_op (gimple_call_chain (stmt));
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-11-10 23:51 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2007-11-11 9:32 [tuples] objc: make it go Aldy Hernandez
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).