Debian Codegraph @

include/c-chunk.h

raw symbols SCIP
1 /* Copyright (C) 2019-2020 Matthew Fluet.
2 * Copyright (C) 1999-2008 Henry Cejtin, Matthew Fluet, Suresh
3 * Jagannathan, and Stephen Weeks.
4 * Copyright (C) 1997-2000 NEC Research Institute.
5 *
6 * MLton is released under a HPND-style license.
7 * See the file MLton-LICENSE for details.
8 */
9
10 #ifndef _C_CHUNK_H_
11 #define _C_CHUNK_H_
12
13 /* `memcpy` is used by coercion `<ty>_castTo<ty>` functions (`basis/coerce.h`)
14 * and by misaligned `<ty>_fetch`, `<ty>_store`, and `<ty>_move` functions
15 * (`basis/Real/Real-ops.h` and `basis/Word/Word-ops.h`)
16 */
17 #include <string.h>
18 /* Math functions used by `Real<n>_f` functions (`basis/Real/Real-ops.h`).
19 */
20 #include <math.h>
21
22 #include "ml-types.h"
23 #include "c-types.h"
24 #include "c-common.h"
25
26 #define Expect(x,c) __builtin_expect(x, c)
27 #define UNUSED __attribute__ ((unused))
28 #define Unreachable() __builtin_unreachable()
29
30 /* ------------------------------------------------- */
31 /* Operands */
32 /* ------------------------------------------------- */
33
34 #define G(ty, i) (global##ty [i])
35 #define H(ty, k, o) ((ty)(&staticHeap##k + (o)))
36 #define O(ty, b, o) (*(ty*)((b) + (o)))
37 #define S(ty, i) (*(ty*)(StackTop + (i)))
38 #define T(ty, i) T ## ty ## _ ## i
39 #define X(ty, b, i, s, o) (*(ty*)((b) + ((i) * (s)) + (o)))
40
41 /* ------------------------------------------------- */
42 /* Primitives */
43 /* ------------------------------------------------- */
44
45 #ifndef INLINE
46 #define INLINE __attribute__((always_inline)) inline
47 #endif
48 #include "basis/coerce.h"
49 #include "basis/cpointer.h"
50 #include "basis/Real/Real-ops.h"
51 #include "basis/Word/Word-ops.h"
52
53 #endif /* #ifndef _C_CHUNK_H_ */