1
#ifndef STORAGE_SPEC_H_GUARD
2
#define STORAGE_SPEC_H_GUARD
4
/* This data structure describes what storage a given representation
5
* needs if something of that representation is to be embedded in
6
* another place. For any representation that expects to be used
7
* as a kind of reference type, it will just want to be a pointer.
8
* But for other things, they would prefer to be "inlined" into
11
/* 0 if this is to be referenced, anything else otherwise. */
14
/* For things that want to be inlined, the number of bits of
15
* storage they need and what kind of byte-boundary they want to
16
* be aligned to. Ignored otherwise. */
20
/* For things that are inlined, if they are just storage of a
21
* primitive type and can unbox, this says what primitive type
22
* that they unbox to. */
23
INTVAL boxed_primitive;
25
/* The types that this one can box/unbox to. */
28
/* For ints, whether it's an unsigned value. */
33
#define STORAGE_SPEC_REFERENCE 0
34
#define STORAGE_SPEC_INLINED 1
36
/* Possible options for boxed primitives. */
37
#define STORAGE_SPEC_BP_NONE 0
38
#define STORAGE_SPEC_BP_INT 1
39
#define STORAGE_SPEC_BP_NUM 2
40
#define STORAGE_SPEC_BP_STR 3
42
/* can_box bit field values. */
43
#define STORAGE_SPEC_CAN_BOX_INT 1
44
#define STORAGE_SPEC_CAN_BOX_NUM 2
45
#define STORAGE_SPEC_CAN_BOX_STR 4