PIPS
bootstrap.h
Go to the documentation of this file.
1 /* Warning! Do not modify this file that is automatically generated! */
2 /* Modify src/Libs/bootstrap/bootstrap-local.h instead, to add your own modifications. */
3 
4 /* header file built by cproto */
5 
6 #ifndef bootstrap_header_included
7 #define bootstrap_header_included
8 /* bootstrap-local.h */
9 /*
10 
11  $Id: bootstrap-local.h 23065 2016-03-02 09:05:50Z coelho $
12 
13  Copyright 1989-2016 MINES ParisTech
14 
15  This file is part of PIPS.
16 
17  PIPS is free software: you can redistribute it and/or modify it
18  under the terms of the GNU General Public License as published by
19  the Free Software Foundation, either version 3 of the License, or
20  any later version.
21 
22  PIPS is distributed in the hope that it will be useful, but WITHOUT ANY
23  WARRANTY; without even the implied warranty of MERCHANTABILITY or
24  FITNESS FOR A PARTICULAR PURPOSE.
25 
26  See the GNU General Public License for more details.
27 
28  You should have received a copy of the GNU General Public License
29  along with PIPS. If not, see <http://www.gnu.org/licenses/>.
30 
31 */
32 
33 /* should be some properties to accomodate cray codes?? */
34 #define INT_LENGTH 4
35 #define REAL_LENGTH 4
36 #define DOUBLE_LENGTH 8
37 #define COMPLEX_LENGTH 8
38 #define DCOMPLEX_LENGTH 16
39 
40 /* context for type checking. */
41 typedef struct
42 {
43  hash_table types;
44  stack stats;
45  int number_of_error;
46  int number_of_conversion;
47  int number_of_simplication;
49 
51 
53 
54 /* The following data structure describes an intrinsic function: its
55  name and its arity and its type, a function to type it (?) and a
56  function to obtain its name if it is different from the entity user
57  name, e.g. because of special characters or name collisions. */
58 
59 typedef struct IntrinsicDescriptor
60 {
61  string name;
62  int nbargs;
67 /* cproto-generated files */
68 /* bootstrap.c */
69 extern void CreateAreas(void);
70 extern void type_loop_range(basic /*index*/, range /*r*/, type_context_p /*context*/);
71 extern call convert_constant(call /*c*/, basic /*to_basic*/);
72 extern expression cast_constant(expression /*exp_constant*/, basic /*to_basic*/, type_context_p /*context*/);
73 extern expression insert_cast(basic cast, basic /*from*/, expression /*exp*/, type_context_p /*context*/);
74 extern bool arguments_are_compatible(call /*c*/, hash_table /*types*/);
75 extern type MakeVoidResult(void);
76 extern parameter MakeVoidParameter(void);
77 extern type pointer_to_overloaded_type(int /*n*/);
78 extern type integer_to_overloaded_type(int /*n*/);
79 extern type longinteger_to_overloaded_type(int /*n*/);
81 extern type integer_to_void_type(int /*n*/);
82 extern type void_to_overloaded_type(int /*n*/);
83 extern type overloaded_to_void_type(int /*n*/);
84 extern type void_to_integer_type(int /*n*/);
85 extern typing_function_t get_typing_function_for_intrinsic(const char */*name*/);
87 extern entity FindOrMakeIntrinsic(string /*name*/, int /*arity*/, type (* /*intrinsic_type*/)(int));
88 extern entity FindOrMakeDefaultIntrinsic(string /*name*/, int /*arity*/);
90 extern void CreateIntrinsics(set /*module_list*/);
91 extern bool bootstrap(string /*workspace*/);
92 extern value MakeValueLitteral(void);
93 extern string MakeFileName(char */*prefix*/, char */*base*/, char */*suffix*/);
94 extern entity MakeIoFileArray(entity /*f*/);
95 /* type_checker.c */
96 extern bool check_loop_range(range /*r*/, hash_table /*types*/);
97 extern void typing_of_expressions(string /*name*/, statement /*s*/);
98 extern bool type_checker(const string /*name*/);
99 #endif /* bootstrap_header_included */
struct _newgen_struct_expression_ * expression
Definition: alias_private.h:21
void const char const char const int
bool check_loop_range(range, hash_table)
type_checker.c
Definition: type_checker.c:292
void register_intrinsic_type_descriptor(IntrinsicDescriptor *)
This function is called one time (at the very beginning) to create all intrinsic functions.
Definition: bootstrap.c:4411
entity MakeIoFileArray(entity)
This array is pointed by FILE * pointers returned or used by fopen, fclose,...
Definition: bootstrap.c:5705
bool bootstrap(string)
Definition: bootstrap.c:5619
expression insert_cast(basic cast, basic, expression, type_context_p)
Function in type_checker.c.
Definition: bootstrap.c:1567
type longlonginteger_to_overloaded_type(int)
MB.
Definition: bootstrap.c:4250
void CreateAreas(void)
cproto-generated files
Definition: bootstrap.c:104
expression cast_constant(expression, basic, type_context_p)
Definition: bootstrap.c:1343
typing_function_t get_typing_function_for_intrinsic(const char *)
Definition: bootstrap.c:4330
entity FindOrMakeDefaultIntrinsic(string, int)
Create a default intrinsic.
Definition: bootstrap.c:4397
struct IntrinsicDescriptor IntrinsicDescriptor
The following data structure describes an intrinsic function: its name and its arity and its type,...
struct type_context_t * type_context_p
void typing_of_expressions(string, statement)
Definition: type_checker.c:526
parameter MakeVoidParameter(void)
Definition: bootstrap.c:4199
entity FindOrMakeIntrinsic(string, int, type(*)(int))
This function creates an entity that represents an intrinsic function, if the entity does not already...
Definition: bootstrap.c:4371
type void_to_overloaded_type(int)
value MakeValueLitteral(void)
Definition: bootstrap.c:5680
type integer_to_void_type(int)
Definition: bootstrap.c:4264
type MakeVoidResult(void)
Move the following functions to ri-util/type.c.
Definition: bootstrap.c:4193
basic(* typing_function_t)(call, type_context_p)
Definition: bootstrap.h:50
string MakeFileName(char *, char *, char *)
Definition: bootstrap.c:5687
void(* switch_name_function)(expression, type_context_p)
Definition: bootstrap.h:52
call convert_constant(call, basic)
Definition: bootstrap.c:1253
type pointer_to_overloaded_type(int)
Definition: bootstrap.c:4208
type integer_to_overloaded_type(int)
Definition: bootstrap.c:4222
void type_loop_range(basic, range, type_context_p)
Definition: bootstrap.c:1038
bool arguments_are_compatible(call, hash_table)
Definition: bootstrap.c:1965
void CreateIntrinsics(set)
Definition: bootstrap.c:4417
type overloaded_to_void_type(int)
Definition: bootstrap.c:4292
bool type_checker(const string)
Definition: type_checker.c:548
switch_name_function get_switch_name_function_for_intrinsic(const char *)
Definition: bootstrap.c:4338
type longinteger_to_overloaded_type(int)
MB.
Definition: bootstrap.c:4236
type void_to_integer_type(int)
Definition: bootstrap.c:4306
struct _newgen_struct_type_ * type
struct _newgen_struct_call_ * call
Definition: ri.h:63
struct _newgen_struct_basic_ * basic
Definition: ri.h:47
The following data structure describes an intrinsic function: its name and its arity and its type,...
type(* intrinsic_type)(int)
switch_name_function name_function
typing_function_t type_function
the stack head
Definition: stack.c:62
FI: I do not understand why the type is duplicated at the set level.
Definition: set.c:59
context for type checking.