summaryrefslogtreecommitdiff
path: root/gcc/python/py-runtime.c
diff options
context:
space:
mode:
authorredbrain <redbrain@gcc.gnu.org>2012-04-21 19:12:19 +0100
committerredbrain <redbrain@gcc.gnu.org>2012-04-21 19:12:19 +0100
commit6bb2994a691ee688ac538c2ac9d382804aad5abe (patch)
tree9bf8e9a3e0886c75383b07c144be6a157b285c11 /gcc/python/py-runtime.c
parent30903ba9eb9e6b3f3d926041cfc438c71377d6f6 (diff)
downloadgcc-alpha-v0.1.tar.gz
lots of argument passing work finished and we can compile python nowalpha-v0.1
Diffstat (limited to 'gcc/python/py-runtime.c')
-rw-r--r--gcc/python/py-runtime.c20
1 files changed, 20 insertions, 0 deletions
diff --git a/gcc/python/py-runtime.c b/gcc/python/py-runtime.c
index c9213fac8b5..64834471d4f 100644
--- a/gcc/python/py-runtime.c
+++ b/gcc/python/py-runtime.c
@@ -315,6 +315,26 @@ tree GPY_RR_fold_call (VEC(tree,gc) * arguments)
return build_call_expr_loc_vec (BUILTINS_LOCATION, fndecl, arguments);
}
+tree GPY_RR_fold_argument (tree args, tree offset)
+{
+ tree fntype = build_function_type_list (gpy_object_type_ptr,
+ gpy_object_type_ptr_ptr,
+ integer_type_node,
+ NULL_TREE);
+ tree fndecl = build_decl (BUILTINS_LOCATION, FUNCTION_DECL,
+ get_identifier ("gpy_rr_fold_argument"),
+ fntype);
+ tree restype = TREE_TYPE (fndecl);
+ tree resdecl = build_decl (BUILTINS_LOCATION, RESULT_DECL, NULL_TREE,
+ restype);
+ DECL_CONTEXT (resdecl) = fndecl;
+ DECL_RESULT (fndecl) = resdecl;
+ DECL_EXTERNAL (fndecl) = 1;
+ TREE_PUBLIC (fndecl) = 1;
+
+ return build_call_expr (fndecl, 2, args, offset);
+}
+
static
tree gpy_build_py_vector_type (void)