]>
git.ipfire.org Git - thirdparty/gcc.git/blob - gcc/m2/gm2-gcc/m2statement.h
1 /* m2statement.h header file for m2statement.cc.
3 Copyright (C) 2012-2023 Free Software Foundation, Inc.
4 Contributed by Gaius Mulley <gaius@glam.ac.uk>.
6 This file is part of GNU Modula-2.
8 GNU Modula-2 is free software; you can redistribute it and/or modify
9 it under the terms of the GNU General Public License as published by
10 the Free Software Foundation; either version 3, or (at your option)
13 GNU Modula-2 is distributed in the hope that it will be useful, but
14 WITHOUT ANY WARRANTY; without even the implied warranty of
15 MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
16 General Public License for more details.
18 You should have received a copy of the GNU General Public License
19 along with GNU Modula-2; see the file COPYING3. If not see
20 <http://www.gnu.org/licenses/>. */
22 #if !defined(m2statement_h)
24 #if defined(m2statement_c)
26 #define EXTERN extern "C"
27 #else /* !__GNUG__. */
29 #endif /* !__GNUG__. */
30 #else /* !m2statement_c. */
32 #define EXTERN extern "C"
33 #else /* !__GNUG__. */
35 #endif /* !__GNUG__. */
36 #endif /* !m2statement_c. */
38 EXTERN
void m2statement_BuildCallInner (location_t location
, tree fndecl
);
39 EXTERN
void m2statement_BuildEnd (location_t location
, tree fndecl
,
41 EXTERN tree
m2statement_BuildStart (location_t location
, char *name
,
43 EXTERN
void m2statement_BuildIncludeVarVar (location_t location
, tree type
,
44 tree varset
, tree varel
,
45 int is_lvalue
, tree low
);
46 EXTERN
void m2statement_BuildIncludeVarConst (location_t location
, tree type
,
48 int is_lvalue
, int fieldno
);
49 EXTERN
void m2statement_BuildExcludeVarVar (location_t location
, tree type
,
50 tree varset
, tree varel
,
51 int is_lvalue
, tree low
);
52 EXTERN
void m2statement_BuildExcludeVarConst (location_t location
, tree type
,
54 int is_lvalue
, int fieldno
);
55 EXTERN
void m2statement_BuildUnaryForeachWordDo (
56 location_t location
, tree type
, tree op1
, tree op2
,
57 tree (*unop
) (location_t
, tree
, int), int is_op1lvalue
, int is_op2lvalue
,
58 int is_op1const
, int is_op2const
);
59 EXTERN
void m2statement_BuildAsm (location_t location
, tree instr
,
60 int isVolatile
, int isSimple
, tree inputs
,
61 tree outputs
, tree trash
, tree labels
);
62 EXTERN tree
m2statement_BuildFunctValue (location_t location
, tree value
);
63 EXTERN tree
m2statement_BuildIndirectProcedureCallTree (location_t location
,
66 EXTERN tree
m2statement_BuildProcedureCallTree (location_t location
,
67 tree procedure
, tree rettype
);
68 EXTERN
void m2statement_BuildFunctionCallTree (location_t location
,
69 tree procedure
, tree rettype
);
70 EXTERN
void m2statement_BuildParam (location_t location
, tree param
);
72 EXTERN tree
m2statement_BuildIfThenElseEnd (tree condition
, tree then_block
,
74 EXTERN tree
m2statement_BuildIfThenDoEnd (tree condition
, tree then_block
);
76 EXTERN
void m2statement_DeclareLabel (location_t location
, char *name
);
77 EXTERN
void m2statement_BuildGoto (location_t location
, char *name
);
78 EXTERN tree
m2statement_BuildAssignmentTree (location_t location
, tree des
,
80 EXTERN
void m2statement_BuildAssignmentStatement (location_t location
, tree des
,
82 EXTERN
void m2statement_BuildPopFunctionContext (void);
83 EXTERN
void m2statement_BuildPushFunctionContext (void);
84 EXTERN
void m2statement_BuildReturnValueCode (location_t location
, tree fndecl
,
86 EXTERN
void m2statement_BuildEndFunctionCode (location_t location
, tree fndecl
,
88 EXTERN
void m2statement_BuildStartFunctionCode (location_t location
,
89 tree fndecl
, int isexported
,
91 EXTERN
void m2statement_DoJump (location_t location
, tree exp
,
92 char *falselabel
, char *truelabel
);
93 EXTERN tree
m2statement_BuildCall2 (location_t location
, tree function
,
94 tree rettype
, tree arg1
, tree arg2
);
95 EXTERN tree
m2statement_BuildCall3 (location_t location
, tree function
,
96 tree rettype
, tree arg1
, tree arg2
,
98 EXTERN
void m2statement_SetLastFunction (tree t
);
99 EXTERN tree
m2statement_GetLastFunction (void);
100 EXTERN
void m2statement_SetParamList (tree t
);
101 EXTERN tree
m2statement_GetParamList (void);
102 EXTERN tree
m2statement_GetCurrentFunction (void);
103 EXTERN
void m2statement_SetBeginLocation (location_t location
);
104 EXTERN
void m2statement_SetEndLocation (location_t location
);
105 EXTERN tree
m2statement_GetParamTree (tree call
, unsigned int i
);
106 EXTERN tree
m2statement_BuildTryFinally (location_t location
, tree call
,
108 EXTERN tree
m2statement_BuildCleanUp (tree param
);
111 #endif /* m2statement_h. */