Debian Codegraph @

kernel/byterun/rocq_values.h

raw symbols SCIP
1 /***********************************************************************/
2 /* */
3 /* Rocq Compiler */
4 /* */
5 /* Benjamin Gregoire, projets Logical and Cristal */
6 /* INRIA Rocquencourt */
7 /* */
8 /* */
9 /***********************************************************************/
10
11 #ifndef _ROCQ_VALUES_
12 #define _ROCQ_VALUES_
13
14 #include <caml/alloc.h>
15 #include <caml/mlvalues.h>
16
17 #include <float.h>
18
19 #define Default_tag 0
20
21 #define ATOM_ID_TAG 0
22 #define ATOM_INDUCTIVE_TAG 1
23 #define ATOM_TYPE_TAG 2
24 #define ATOM_PROJ_TAG 3
25 #define ATOM_FIX_TAG 4
26 #define ATOM_SWITCH_TAG 5
27 #define ATOM_COFIX_TAG 6
28 #define ATOM_COFIXEVALUATED_TAG 7
29
30 #define Is_double(v) (Tag_val(v) == Double_tag)
31 #define Is_tailrec_switch(v) (Field(v,1) == Val_true)
32
33 /* rocq values for primitive operations */
34 #define rocq_tag_C1 2
35 #define rocq_tag_C0 1
36 #define rocq_tag_pair 1
37 #define rocq_true Val_int(0)
38 #define rocq_false Val_int(1)
39 #define rocq_Eq Val_int(0)
40 #define rocq_Lt Val_int(1)
41 #define rocq_Gt Val_int(2)
42 #define rocq_FEq Val_int(0)
43 #define rocq_FLt Val_int(1)
44 #define rocq_FGt Val_int(2)
45 #define rocq_FNotComparable Val_int(3)
46 #define rocq_PNormal Val_int(0)
47 #define rocq_NNormal Val_int(1)
48 #define rocq_PSubn Val_int(2)
49 #define rocq_NSubn Val_int(3)
50 #define rocq_PZero Val_int(4)
51 #define rocq_NZero Val_int(5)
52 #define rocq_PInf Val_int(6)
53 #define rocq_NInf Val_int(7)
54 #define rocq_NaN Val_int(8)
55
56 #define FLOAT_EXP_SHIFT (2101) /* 2*emax + prec */
57
58 #endif /* _ROCQ_VALUES_ */