GCCPY:
[official-gcc.git] / gcc / python / dot-tree.h
blob21298613537fbc927b016d02124470a5a6d0c156
1 /* This file is part of GCC.
3 GCC is free software; you can redistribute it and/or modify
4 it under the terms of the GNU General Public License as published by
5 the Free Software Foundation; either version 3, or (at your option)
6 any later version.
8 GCC is distributed in the hope that it will be useful,
9 but WITHOUT ANY WARRANTY; without even the implied warranty of
10 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
11 GNU General Public License for more details.
13 You should have received a copy of the GNU General Public License
14 along with GCC; see the file COPYING3. If not see
15 <http://www.gnu.org/licenses/>. */
17 #ifndef __GCC_DOT_TREE_H__
18 #define __GCC_DOT_TREE_H__
20 extern vec<tree,va_gc> * gpy_builtin_types_vec;
22 #define gpy_object_type_ptr (*gpy_builtin_types_vec) [0]
23 #define gpy_object_type_ptr_ptr (*gpy_builtin_types_vec) [1]
24 #define gpy_const_char_ptr (*gpy_builtin_types_vec) [2]
25 #define gpy_vector_type (*gpy_builtin_types_vec) [3]
26 #define gpy_vector_type_ptr (*gpy_builtin_types_vec) [4]
27 #define gpy_vector_type_ptr_ptr (*gpy_builtin_types_vec) [5]
28 #define gpy_attrib_type (*gpy_builtin_types_vec) [6]
29 #define gpy_attrib_type_ptr (*gpy_builtin_types_vec) [7]
30 #define gpy_attrib_type_ptr_ptr (*gpy_builtin_types_vec) [8]
31 #define gpy_unsigned_char_ptr build_pointer_type (unsigned_char_type_node)
32 #define gpy_unsigned_char_ptr_ptr build_pointer_type (gpy_unsigned_char_ptr)
34 extern char * dot_pass_concat (const char *, const char *);
35 #define dot_pass_concat_identifier(X_, Y_) \
36 get_identifier (dot_pass_concat (X_, Y_))
38 /* Appends vector y on x */
39 #define GPY_VEC_stmts_append(T,x,y) \
40 do { \
41 int x_; T t_ = NULL_TREE; \
42 for (x_ = 0; y->iterate (x_, &t_); ++x_) \
43 vec_safe_push (x, t_); \
44 } while (0);
46 /* Passes */
47 typedef vec<gpydot,va_gc> * dot_table;
48 typedef vec<tree,va_gc> * tree_table;
50 extern vec<gpydot,va_gc> * dot_pass_check1 (vec<gpydot,va_gc> *);
51 extern vec<gpydot,va_gc> * dot_pass_const_fold (vec<gpydot,va_gc> *);
52 extern vec<gpydot,va_gc> * dot_pass_translate (vec<gpydot,va_gc> *);
53 extern vec<gpydot,va_gc> * dot_pass_PrettyPrint (vec<gpydot,va_gc> *);
54 extern vec<tree,va_gc> * dot_pass_GenTypes (vec<gpydot,va_gc> *);
55 extern vec<tree,va_gc> * dot_pass_genericify (vec<tree,va_gc> *, vec<gpydot,va_gc> *);
57 extern void dot_pass_gdotPrettyPrint (vec<gpydot,va_gc> * decls);
58 extern void dot_pass_pretty_PrintTypes (vec<tree,va_gc> *);
59 extern void dot_pass_manager_WriteGlobals (void);
60 extern void dot_pass_manager_ProcessDecl (gpy_dot_tree_t * const);
61 extern void gpy_dot_types_init (void);
63 // gpy-data-export.c
64 struct gpy_dataExport {
65 bool main;
66 char * entry;
67 char * module;
68 } ;
69 extern void gpy_import_read (const char *);
70 extern gpy_dataExport * gpy_readExportData (const char *);
71 extern void gpy_pushExportData (struct gpy_dataExport *);
72 extern void gpy_writeExport (const char *, bool, const char *, const char *);
74 // gpy-builtins.c
75 extern int gpy_checkBuiltin (const char *);
77 #endif //__GCC_DOT_TREE_H__