~ubuntu-branches/ubuntu/vivid/nqp/vivid-proposed

« back to all changes in this revision

Viewing changes to src/vm/parrot/6model/storage_spec.h

  • Committer: Package Import Robot
  • Author(s): Alessandro Ghedini
  • Date: 2013-11-01 12:09:18 UTC
  • mfrom: (1.1.4)
  • Revision ID: package-import@ubuntu.com-20131101120918-kx51sl0sxl3exsxi
Tags: 2013.10-1
* New upstream release
* Bump versioned (Build-)Depends on parrot
* Update patches
* Install new README.pod
* Fix vcs-field-not-canonical
* Do not install rubyish examples
* Do not Depends on parrot-devel anymore
* Add 07_disable-serialization-tests.patch

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
#ifndef STORAGE_SPEC_H_GUARD
 
2
#define STORAGE_SPEC_H_GUARD
 
3
 
 
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
 
9
 * the object. */
 
10
typedef struct {
 
11
    /* 0 if this is to be referenced, anything else otherwise. */
 
12
    INTVAL inlineable;
 
13
 
 
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. */
 
17
    INTVAL bits;
 
18
    INTVAL align;
 
19
 
 
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;
 
24
    
 
25
    /* The types that this one can box/unbox to. */
 
26
    INTVAL can_box;
 
27
    
 
28
    /* For ints, whether it's an unsigned value. */
 
29
    INTVAL is_unsigned;
 
30
} storage_spec;
 
31
 
 
32
/* Inlined or not. */
 
33
#define STORAGE_SPEC_REFERENCE  0
 
34
#define STORAGE_SPEC_INLINED    1
 
35
 
 
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
 
41
 
 
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
 
46
 
 
47
#endif