Skip to content

Commit 2c42b1f

Browse files
committed
Stub in a few serialization related data structures.
1 parent 8071678 commit 2c42b1f

File tree

1 file changed

+43
-0
lines changed

1 file changed

+43
-0
lines changed

src/6model/serialization.h

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
/* This represents the root of the serialization data; everything hangs
2+
* off this. In read mode, we don't do much besides populate and then
3+
* read this. In write mode, however, the tables and data chunks will be
4+
* filled out and grown as needed. */
5+
typedef struct {
6+
/* The version of the serialization format. */
7+
Parrot_Int4 version;
8+
9+
/* The number of dependencies, as well as a pointer to the
10+
* dependencies table. */
11+
Parrot_Int4 num_dependencies;
12+
Parrot_Int4 **dependencies_table;
13+
14+
/* List of the serialization context objects that we depend on. */
15+
PMC **dependent_scs;
16+
17+
/* The number of STables, as well as pointers to the STables
18+
* table and data chunk. */
19+
Parrot_Int4 num_stables;
20+
Parrot_Int4 **stables_table;
21+
char *stables_data;
22+
23+
/* The number of objects, as well as pointers to the objects
24+
* table and data chunk. */
25+
Parrot_Int4 num_objects;
26+
Parrot_Int4 *objects_table;
27+
char *objects_data;
28+
29+
/* Array of STRINGs. */
30+
PMC *string_heap;
31+
} SerializationRoot;
32+
33+
/* Represents the serialization reader and the various functions available
34+
* on it. */
35+
typedef struct {
36+
SerializationRoot root;
37+
} SerializationReader;
38+
39+
/* Represents the serialization writer and the various functions available
40+
* on it. */
41+
typedef struct {
42+
SerializationRoot root;
43+
} SerializationWriter;

0 commit comments

Comments
 (0)