-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtypes.h
More file actions
89 lines (78 loc) · 3.54 KB
/
Copy pathtypes.h
File metadata and controls
89 lines (78 loc) · 3.54 KB
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
/* types.h: types
*
* COPYRIGHT 2010. California Institute of Technology
*
* This file is part of chpsim.
*
* Chpsim 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 of the License, or
* (at your option) any later version, and under the terms of the
* following disclaimer of liability:
*
* The California Institute of Technology shall allow RECIPIENT to use and
* distribute this software subject to the terms of the included license
* agreement with the understanding that:
*
* THIS SOFTWARE AND ANY RELATED MATERIALS WERE CREATED BY THE CALIFORNIA
* INSTITUTE OF TECHNOLOGY (CALTECH). THE SOFTWARE IS PROVIDED "AS-IS" TO THE
* RECIPIENT WITHOUT WARRANTY OF ANY KIND, INCLUDING ANY WARRANTIES OF
* PERFORMANCE OR MERCHANTABILITY OR FITNESS FOR A PARTICULAR USE OR PURPOSE
* (AS SET FORTH IN UNITED STATES UCC Sect. 2312-2313) OR FOR ANY PURPOSE
* WHATSOEVER, FOR THE SOFTWARE AND RELATED MATERIALS, HOWEVER USED.
*
* IN NO EVENT SHALL CALTECH BE LIABLE FOR ANY DAMAGES AND/OR COSTS,
* INCLUDING, BUT NOT LIMITED TO, INCIDENTAL OR CONSEQUENTIAL DAMAGES OF ANY
* KIND, INCLUDING ECONOMIC DAMAGE OR INJURY TO PROPERTY AND LOST PROFITS,
* REGARDLESS OF WHETHER CALTECH BE ADVISED, HAVE REASON TO KNOW, OR, IN FACT,
* SHALL KNOW OF THE POSSIBILITY.
*
* RECIPIENT BEARS ALL RISK RELATING TO QUALITY AND PERFORMANCE OF THE
* SOFTWARE AND ANY RELATED MATERIALS, AND AGREES TO INDEMNIFY CALTECH FOR
* ALL THIRD-PARTY CLAIMS RESULTING FROM THE ACTIONS OF RECIPIENT IN THE
* USE OF THE SOFTWARE.
*
* In addition, RECIPIENT also agrees that Caltech is under no obligation to
* provide technical support for the Software.
*
* Finally, Caltech places no restrictions on RECIPIENT's use, preparation of
* Derivative Works, public display or redistribution of the Software other
* than those specified in the GNU General Public License and the requirement
* that all copies of the Software released be marked with the language
* provided in this notice.
*
* You should have received a copy of the GNU General Public License
* along with chpsim. If not, see <http://www.gnu.org/licenses/>.
*
* Authors: Marcel van der Goot and Chris Moore
*/
#ifndef TYPES_H
#define TYPES_H
#include "sem_analysis.h"
#include "exec.h"
extern void init_types(void);
/* call at startup */
extern int type_compatible(type *tp1, type *tp2);
/* True iff the reduced forms of tp1 and tp2 are identical (compile-time
check).
*/
extern int type_compatible_exec(type *tp1, process_state *ps1,
type *tp2, process_state *ps2, exec_info *f);
/* Execution time type checking. Verify that the specific types are
identical ignoring union type differences. Specifying a process_state
for each type allows us to look up the real value for generic types.
*/
extern generic_type generic_int; /* used when the integer type is implicit */
extern generic_type generic_bool; /* used when the boolean type is implicit */
extern void import_builtin_types(sem_info *f);
/* import builtin types */
extern type_def *builtin_string;
extern void fix_builtin_string(void *obj, sem_info *f);
/* Hack to make the builtin type 'string' work so the length of the string
doesn't matter. Call when 'string' is visible in f. obj is used for errors.
*/
extern long integer_nr_bits(void *x, exec_info *f);
/* determine the number of bits needed to specify an integer of type x
* (x should be an integer type)
*/
#endif /* TYPES_H */