Commit | Line | Data |
---|---|---|
7f918cf1 CE |
1 | /* Copyright (C) 2014 Matthew Fluet. |
2 | * Copyright (C) 1999-2006 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 BSD-style license. | |
7 | * See the file MLton-LICENSE for details. | |
8 | */ | |
9 | ||
10 | #if (defined (MLTON_GC_INTERNAL_TYPES)) | |
11 | ||
12 | /* GC_init uses the array of struct intInfInits in s at program start | |
13 | * to allocate intInfs. | |
14 | * The globalIndex'th entry of the globals array in s is set to the | |
15 | * IntInf.int whose value corresponds to the mlstr string. | |
16 | * | |
17 | * The strings pointed to by the mlstr fields consist of | |
18 | * an optional ~ | |
19 | * one of [1-9] | |
20 | * zero or more of [0-9] | |
21 | * a trailing EOS | |
22 | */ | |
23 | struct GC_intInfInit { | |
24 | uint32_t globalIndex; | |
25 | const char *mlstr; | |
26 | }; | |
27 | ||
28 | /* GC_init allocates a collection of arrays/vectors in the heap. */ | |
29 | struct GC_vectorInit { | |
30 | size_t elementSize; | |
31 | uint32_t globalIndex; | |
32 | GC_arrayLength length; | |
33 | pointer words; | |
34 | }; | |
35 | ||
36 | #endif /* (defined (MLTON_GC_INTERNAL_TYPES)) */ | |
37 | ||
38 | #if (defined (MLTON_GC_INTERNAL_FUNCS)) | |
39 | ||
40 | static inline size_t sizeofInitialBytesLive (GC_state s); | |
41 | static void initVectors (GC_state s); | |
42 | static void initWorld (GC_state s); | |
43 | ||
44 | #endif /* (defined (MLTON_GC_INTERNAL_FUNCS)) */ |