aboutsummaryrefslogtreecommitdiff
path: root/gcc/python/py-runtime.def
blob: 696ba90a901a28320e284f9c0028496c3a2101a2 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
/* This file is part of GCC.

GCC is free software; you can redistribute it and/or modify it under
the terms of the GNU General Public License as published by the Free
Software Foundation; either version 3, or (at your option) any later
version.

GCC is distributed in the hope that it will be useful, but WITHOUT ANY
WARRANTY; without even the implied warranty of MERCHANTABILITY or
FITNESS FOR A PARTICULAR PURPOSE.  See the GNU General Public License
for more details.

You should have received a copy of the GNU General Public License
along with GCC; see the file COPYING3.  If not see
<http://www.gnu.org/licenses/>.  */

autogen definitions py-runtime;

py-runtime = { code = GPY_RR_extend_globl_stack;
	       arguments = "tree size";
	       proto = "tree";
	       comment = "/* Extends the runtime globl stack by passed size (integer_type_node) */";
               function_identifier = "gpy_rr_extend_runtime_stack";
               fntype = "void_type_node,
	                 integer_type_node,
			 NULL_TREE";
	       build_call = build_call_expr;
	       build_call_args = "fndecl, 1, size";
             };

py-runtime = { code = GPY_RR_fold_attrib;
	       arguments = "tree ident, tree addr, tree offset";
	       proto = "tree, tree, tree";
	       comment = "/* Fold attribute info into an attribute type */";
               function_identifier = "gpy_rr_fold_attribute";
               fntype = "gpy_attrib_type_ptr,
                         gpy_const_char_ptr,
                         gpy_unsigned_char_ptr,
                         integer_type_node,
                         NULL_TREE";
	       build_call = build_call_expr;
	       build_call_args = "fndecl, 3, ident, addr, offset";
             };
py-runtime = { code = GPY_RR_fold_attrib_list;
	       arguments = "VEC(tree,gc) * attribs";
	       proto = "VEC(tree,gc) *";
	       comment = "/* Requires the first tree in the arguments to be an integer_type_node of the number of arguments */";
	       function_identifier = "gpy_rr_fold_attrib_list";
               fntype = "gpy_attrib_type_ptr_ptr,
			 integer_type_node,
			 va_list_type_node,
			 NULL_TREE";
	       build_call = build_call_expr_loc_vec;
	       build_call_args = "BUILTINS_LOCATION, fndecl, attribs";
             };
py-runtime = { code = GPY_RR_fold_class_decl;
	       arguments = "tree attrib_list, tree size, tree identifier";
	       proto = "tree, tree, tree";
	       comment = "/* Fold class data into class object args = <attrib list><size><identifier> */";
               function_identifier = "gpy_rr_fold_class_decl";
               fntype = "gpy_object_type_ptr,
	       	         gpy_attrib_type_ptr_ptr,
			 integer_type_node,
                         gpy_const_char_ptr,
                         NULL_TREE";
	       build_call = build_call_expr;
	       build_call_args = "fndecl, 3, attrib_list, size, identifier";
             };
py-runtime = { code = GPY_RR_fold_func_decl;
	       arguments = "tree identifier, tree func";
	       proto = "tree, tree";
	       comment = "/* Fold func into decl <identifier><fndcel> */";
               function_identifier = "gpy_rr_fold_staticmethod_decl";
               fntype = "gpy_object_type_ptr,
                         gpy_const_char_ptr,
			 ptr_type_node,
                         NULL_TREE";
	       build_call = build_call_expr;
	       build_call_args = "fndecl, 2, identifier, build_fold_addr_expr (func)";
             };
py-runtime = { code = GPY_RR_fold_classmethod_decl;
	       arguments = "tree identifier, tree func";
	       proto = "tree, tree";
	       comment = "/* Fold func into decl <identifier><fndcel> */";
               function_identifier = "gpy_rr_fold_classmethod_decl";
               fntype = "gpy_object_type_ptr,
                         gpy_const_char_ptr,
			 ptr_type_node,
                         NULL_TREE";
	       build_call = build_call_expr;
	       build_call_args = "fndecl, 2, identifier, build_fold_addr_expr (func)";
             };
py-runtime = { code = GPY_RR_fold_integer;
	       arguments = "tree integer";
	       proto = "tree";
	       comment = "/* Fold integer into Int object  via Int (x) */";
               function_identifier = "gpy_rr_fold_integer";
               fntype = "gpy_object_type_ptr,
		         integer_type_node,
                         NULL_TREE";
	       build_call = build_call_expr;
	       build_call_args = "fndecl, 1, integer";
             };
py-runtime = { code = GPY_RR_incr_ref_count;
	       arguments = "tree obj";
	       proto = "tree";
	       comment = "/* incr the refrence count on the object  */";
               function_identifier = "gpy_rr_incr_ref_count";
               fntype = "void_type_node,
		         gpy_object_type_ptr,
                         NULL_TREE";
	       build_call = build_call_expr;
	       build_call_args = "fndecl, 1, obj";
             };
py-runtime = { code = GPY_RR_decr_ref_count;
	       arguments = "tree obj";
	       proto = "tree";
	       comment = "/* decr the refrence count on the object  */";
               function_identifier = "gpy_rr_decr_ref_count";
               fntype = "void_type_node,
		         gpy_object_type_ptr,
                         NULL_TREE";
	       build_call = build_call_expr;
	       build_call_args = "fndecl, 1, obj";
             };
py-runtime = { code = GPY_RR_eval_print;
	       arguments = "VEC(tree,gc) * arguments";
	       proto = "VEC(tree,gc) *";
	       comment = "/* first index is the fd (1/0) 2nd idx is number of elements and finaly va_list of args */";
	       function_identifier = "gpy_rr_eval_print";
               fntype = "void_type_node,
			 integer_type_node,
			 integer_type_node,
			 va_list_type_node,
			 NULL_TREE";
	       build_call = build_call_expr_loc_vec;
	       build_call_args = "BUILTINS_LOCATION, fndecl, arguments";
             };
py-runtime = { code = GPY_RR_eval_expression;
	       arguments = "tree x, tree y, tree op";
	       proto = "tree, tree, tree";
	       comment = "/* Evaluate the operation op of the 2 objects x and y and return result */";
               function_identifier = "gpy_rr_eval_expression";
               fntype = "gpy_object_type_ptr,
	       	         gpy_object_type_ptr,
			 integer_type_node,
                         NULL_TREE";
	       build_call = build_call_expr;
	       build_call_args = "fndecl, 3, x, y, op";
             };
py-runtime = { code = GPY_RR_fold_attrib_ref;
	       arguments = "tree base, tree attrib";
	       proto = "tree, tree";
	       comment = "/* Eval base.attrib */";
               function_identifier = "gpy_rr_eval_attrib_reference";
               fntype = "gpy_object_type_ptr_ptr,
	       	      	 gpy_object_type_ptr,
			 gpy_const_char_ptr,
                         NULL_TREE";
	       build_call = build_call_expr;
	       build_call_args = "fndecl, 2, base, attrib";
             };
py-runtime = { code = GPY_RR_fold_call;
	       arguments = "VEC(tree,gc) * arguments";
	       proto = "VEC(tree,gc) *";
	       comment = "/* Eval call */";
               function_identifier = "gpy_rr_fold_call";
               fntype = "gpy_object_type_ptr,
	       	      	 integer_type_node,
			 va_list_type_node,
                         NULL_TREE";
	       build_call = build_call_expr_loc_vec;
	       build_call_args = "BUILTINS_LOCATION, fndecl, arguments";
             };
py-runtime = { code = GPY_RR_fold_argument;
	       arguments = "tree args, tree offset";
	       proto = "tree, tree";
	       comment = "/* Eval arg */";
               function_identifier = "gpy_rr_fold_argument";
               fntype = "gpy_object_type_ptr,
	       	      	 gpy_object_type_ptr_ptr,
			 integer_type_node,
                         NULL_TREE";
	       build_call = build_call_expr;
	       build_call_args = "fndecl, 2, args, offset";
             };